kangwei:
水厂运营分析中本年度吨水药费板块增加详情,展示每种药剂的目标完成情况,包括每种药剂的药剂名称、目标量、使用量
正在显示
6 个修改的文件
包含
133 行增加
和
14 行删除
... | @@ -27,6 +27,4 @@ public class PgCommonServiceImpl implements IPgCommonService { | ... | @@ -27,6 +27,4 @@ public class PgCommonServiceImpl implements IPgCommonService { |
27 | public Map<String, Object> queryForMap(String sql) { | 27 | public Map<String, Object> queryForMap(String sql) { |
28 | return jdbcTemplate.queryForMap(sql); | 28 | return jdbcTemplate.queryForMap(sql); |
29 | } | 29 | } |
30 | |||
31 | |||
32 | } | 30 | } | ... | ... |
... | @@ -35,6 +35,17 @@ public class FactoryOperateCenterController { | ... | @@ -35,6 +35,17 @@ public class FactoryOperateCenterController { |
35 | return result; | 35 | return result; |
36 | } | 36 | } |
37 | 37 | ||
38 | @ApiOperation(value="厂区统计数据:吨水药费详情", notes="厂区统计数据:吨水药费详情") | ||
39 | @GetMapping(value = "/dsyfDetail") | ||
40 | public Result<List<YJMonthDataVO>> dsyfDetail(String departId,String month) { | ||
41 | Result<List<YJMonthDataVO>> result = new Result<>(); | ||
42 | List<YJMonthDataVO> map = factoryOperateCenterService.dsyfDetail(departId,month); | ||
43 | result.setSuccess(true); | ||
44 | result.setResult(map); | ||
45 | return result; | ||
46 | } | ||
47 | |||
48 | |||
38 | @ApiOperation(value="厂区报表统计数据", notes="厂区报表统计数据") | 49 | @ApiOperation(value="厂区报表统计数据", notes="厂区报表统计数据") |
39 | @GetMapping(value = "/report") | 50 | @GetMapping(value = "/report") |
40 | public Result<Map<String,Object>> getReportData(String departId,String month) { | 51 | public Result<Map<String,Object>> getReportData(String departId,String month) { | ... | ... |
1 | package com.skua.modules.dataAnalysis.service; | 1 | package com.skua.modules.dataAnalysis.service; |
2 | 2 | ||
3 | import com.skua.modules.dataAnalysis.vo.ArchivesWarnVO; | 3 | import com.skua.modules.dataAnalysis.vo.*; |
4 | import com.skua.modules.dataAnalysis.vo.EquipAlarmVO; | ||
5 | import com.skua.modules.dataAnalysis.vo.EquipRunTimeVO; | ||
6 | import com.skua.modules.dataAnalysis.vo.EquipWarnVO; | ||
7 | 4 | ||
8 | import java.util.List; | 5 | import java.util.List; |
9 | import java.util.Map; | 6 | import java.util.Map; |
... | @@ -23,5 +20,7 @@ public interface IFactoryOperateCenterService { | ... | @@ -23,5 +20,7 @@ public interface IFactoryOperateCenterService { |
23 | List<ArchivesWarnVO> getArchivesWarn(String departId); | 20 | List<ArchivesWarnVO> getArchivesWarn(String departId); |
24 | 21 | ||
25 | Map<String, Object> getFlowData(String departId, String month); | 22 | Map<String, Object> getFlowData(String departId, String month); |
23 | //吨水药费:详情 | ||
24 | List<YJMonthDataVO> dsyfDetail(String departId, String month); | ||
26 | } | 25 | } |
27 | 26 | ... | ... |
... | @@ -3,16 +3,16 @@ package com.skua.modules.dataAnalysis.service.impl; | ... | @@ -3,16 +3,16 @@ package com.skua.modules.dataAnalysis.service.impl; |
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.skua.common.constant.ReportConstant; | 4 | import com.skua.common.constant.ReportConstant; |
5 | import com.skua.common.report.ReportViewUtil; | 5 | import com.skua.common.report.ReportViewUtil; |
6 | import com.skua.core.util.ConvertUtils; | ||
6 | import com.skua.core.util.DoubleOperaUtils; | 7 | import com.skua.core.util.DoubleOperaUtils; |
7 | import com.skua.modules.dataAnalysis.mapper.FactoryOperateCenterMapper; | 8 | import com.skua.modules.dataAnalysis.mapper.FactoryOperateCenterMapper; |
8 | import com.skua.modules.dataAnalysis.service.IFactoryOperateCenterService; | 9 | import com.skua.modules.dataAnalysis.service.IFactoryOperateCenterService; |
9 | import com.skua.modules.dataAnalysis.vo.ArchivesWarnVO; | 10 | import com.skua.modules.dataAnalysis.vo.*; |
10 | import com.skua.modules.dataAnalysis.vo.EquipAlarmVO; | ||
11 | import com.skua.modules.dataAnalysis.vo.EquipRunTimeVO; | ||
12 | import com.skua.modules.dataAnalysis.vo.EquipWarnVO; | ||
13 | import com.skua.modules.report.entity.ReportTargetConfig; | 11 | import com.skua.modules.report.entity.ReportTargetConfig; |
14 | import com.skua.modules.report.mapper.ReportTargetConfigMapper; | 12 | import com.skua.modules.report.mapper.ReportTargetConfigMapper; |
15 | import com.skua.tool.util.DateUtils; | 13 | import com.skua.tool.util.DateUtils; |
14 | import io.swagger.annotations.ApiModelProperty; | ||
15 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
16 | import org.springframework.beans.factory.annotation.Autowired; | 16 | import org.springframework.beans.factory.annotation.Autowired; |
17 | import org.springframework.stereotype.Service; | 17 | import org.springframework.stereotype.Service; |
18 | import javax.annotation.Resource; | 18 | import javax.annotation.Resource; |
... | @@ -221,6 +221,76 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer | ... | @@ -221,6 +221,76 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer |
221 | return map; | 221 | return map; |
222 | } | 222 | } |
223 | 223 | ||
224 | //吨水药费:详情 | ||
225 | public List<YJMonthDataVO> dsyfDetail(String departId, String month){ | ||
226 | String tbMonth = DateUtils.getTbMonth(month); | ||
227 | String hbMonth = DateUtils.getHbMonth(month); | ||
228 | String year = month.substring(0,4); | ||
229 | LambdaQueryWrapper<ReportTargetConfig> queryWrapper = new LambdaQueryWrapper<ReportTargetConfig>(); | ||
230 | queryWrapper.eq(ReportTargetConfig::getDepartId,departId); | ||
231 | queryWrapper.eq(ReportTargetConfig::getTargetYear,year); | ||
232 | List<ReportTargetConfig> yearTargetList = reportTargetMapper.selectList(queryWrapper); | ||
233 | ReportTargetConfig target = null; | ||
234 | if(yearTargetList.size() > 0) { | ||
235 | target = yearTargetList.get(0); | ||
236 | } | ||
237 | if(target == null ) target = new ReportTargetConfig(); | ||
238 | |||
239 | String field3a24 = "DLHJ,PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ,YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2"; | ||
240 | String dataViewName3a24Month = ReportViewUtil.buildViewLike(ReportConstant.view3a24,field3a24, departId, month); | ||
241 | String dataViewName3a24MonthTb = ReportViewUtil.buildViewLike(ReportConstant.view3a24,field3a24, departId, tbMonth); | ||
242 | String dataViewName3a24MonthHb = ReportViewUtil.buildViewLike(ReportConstant.view3a24,field3a24, departId, hbMonth); | ||
243 | |||
244 | List<YJMonthDataVO> monthDataVOList = new ArrayList<>(); | ||
245 | String dataViewName2119Month = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departId, month); | ||
246 | String dataViewName2119MonthTb = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departId, tbMonth); | ||
247 | String dataViewName2119MonthHb = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departId, hbMonth); | ||
248 | Map<String,Object> monthMap = factoryOperateCenterMapper.getSdyData(dataViewName2119Month, dataViewName3a24Month, departId, month); | ||
249 | Map<String,Object> monthHbMap = factoryOperateCenterMapper.getSdyData(dataViewName2119MonthHb, dataViewName3a24MonthHb, departId, hbMonth); | ||
250 | Map<String,Object> monthTbMap = factoryOperateCenterMapper.getSdyData(dataViewName2119MonthTb, dataViewName3a24MonthTb, departId, tbMonth); | ||
251 | |||
252 | //String yjName, String yjCode, String yearTarge, String monthTarge, String value, String valueHB, String valueTB | ||
253 | monthDataVOList.add( new YJMonthDataVO("PAC(液)","PACYT" ,ConvertUtils.getString(target.getTargetPacyt(),"0"),ConvertUtils.getString(monthMap.get("PACYT"),"0"), | ||
254 | ConvertUtils.getString(monthHbMap.get("PACYT"),"0") ,ConvertUtils.getString(monthTbMap.get("PACYT") ,"0") ) ); | ||
255 | monthDataVOList.add( new YJMonthDataVO("PAC(固)","PACGT" ,ConvertUtils.getString(target.getTargetPacgt(),"0"),ConvertUtils.getString(monthMap.get("PACGT"),"0"), | ||
256 | ConvertUtils.getString(monthHbMap.get("PACGT"),"0") ,ConvertUtils.getString(monthTbMap.get("PACGT") ,"0") ) ); | ||
257 | monthDataVOList.add( new YJMonthDataVO("NaClO","NACLO" ,ConvertUtils.getString(target.getTargetNaclo(),"0"),ConvertUtils.getString(monthMap.get("NACLO"),"0"), | ||
258 | ConvertUtils.getString(monthHbMap.get("NACLO"),"0") ,ConvertUtils.getString(monthTbMap.get("NACLO") ,"0") ) ); | ||
259 | monthDataVOList.add( new YJMonthDataVO("水处理PAM(-)","SCLPAMF" ,ConvertUtils.getString(target.getTargetSclpamf(),"0"),ConvertUtils.getString(monthMap.get("SCLPAMF"),"0"), | ||
260 | ConvertUtils.getString(monthHbMap.get("SCLPAMF"),"0") ,ConvertUtils.getString(monthTbMap.get("SCLPAMF") ,"0") ) ); | ||
261 | monthDataVOList.add( new YJMonthDataVO("污脱PAM乳剂","PAMRJ" ,ConvertUtils.getString(target.getTargetPamrj(),"0"),ConvertUtils.getString(monthMap.get("PAMRJ"),"0"), | ||
262 | ConvertUtils.getString(monthHbMap.get("PAMRJ"),"0") ,ConvertUtils.getString(monthTbMap.get("PAMRJ") ,"0") ) ); | ||
263 | monthDataVOList.add( new YJMonthDataVO("PFS","PFS" ,ConvertUtils.getString(target.getTargetPfs(),"0"),ConvertUtils.getString(monthMap.get("PFS"),"0"), | ||
264 | ConvertUtils.getString(monthHbMap.get("PFS"),"0") ,ConvertUtils.getString(monthTbMap.get("PFS") ,"0") ) ); | ||
265 | monthDataVOList.add( new YJMonthDataVO("复合铁盐","FHTY" ,ConvertUtils.getString(target.getTargetFhty(),"0"),ConvertUtils.getString(monthMap.get("FHTY"),"0"), | ||
266 | ConvertUtils.getString(monthHbMap.get("FHTY"),"0") ,ConvertUtils.getString(monthTbMap.get("FHTY") ,"0") ) ); | ||
267 | monthDataVOList.add( new YJMonthDataVO("乳液絮凝剂","RYXNJ" ,ConvertUtils.getString(target.getTargetRyxnj(),"0"),ConvertUtils.getString(monthMap.get("RYXNJ"),"0"), | ||
268 | ConvertUtils.getString(monthHbMap.get("RYXNJ"),"0") ,ConvertUtils.getString(monthTbMap.get("RYXNJ") ,"0") ) ); | ||
269 | monthDataVOList.add( new YJMonthDataVO("益维磷","YWL" ,ConvertUtils.getString(target.getTargetYwl(),"0"),ConvertUtils.getString(monthMap.get("YWL"),"0"), | ||
270 | ConvertUtils.getString(monthHbMap.get("YWL"),"0") ,ConvertUtils.getString(monthTbMap.get("YWL") ,"0") ) ); | ||
271 | monthDataVOList.add( new YJMonthDataVO("高效除磷剂","GXCLJ" ,ConvertUtils.getString(target.getTargetGxclj(),"0"),ConvertUtils.getString(monthMap.get("GXCLJ"),"0"), | ||
272 | ConvertUtils.getString(monthHbMap.get("GXCLJ"),"0") ,ConvertUtils.getString(monthTbMap.get("GXCLJ") ,"0") ) ); | ||
273 | monthDataVOList.add( new YJMonthDataVO("CH3COONA","CH3COONA" ,ConvertUtils.getString(target.getTargetCh3coona(),"0"),ConvertUtils.getString(monthMap.get("CH3COONA"),"0"), | ||
274 | ConvertUtils.getString(monthHbMap.get("CH3COONA"),"0") ,ConvertUtils.getString(monthTbMap.get("CH3COONA") ,"0") ) ); | ||
275 | monthDataVOList.add( new YJMonthDataVO("活性炭","HXT" ,ConvertUtils.getString(target.getTargetHxt(),"0"),ConvertUtils.getString(monthMap.get("HXT"),"0"), | ||
276 | ConvertUtils.getString(monthHbMap.get("HXT"),"0") ,ConvertUtils.getString(monthTbMap.get("HXT") ,"0") ) ); | ||
277 | monthDataVOList.add( new YJMonthDataVO("FeCl3","FECL3" ,ConvertUtils.getString(target.getTargetFecl3(),"0"),ConvertUtils.getString(monthMap.get("FECL3"),"0"), | ||
278 | ConvertUtils.getString(monthHbMap.get("FECL3"),"0") ,ConvertUtils.getString(monthTbMap.get("FECL3") ,"0") ) ); | ||
279 | monthDataVOList.add( new YJMonthDataVO("石灰","SH" ,ConvertUtils.getString(target.getTargetSh(),"0"),ConvertUtils.getString(monthMap.get("SH"),"0"), | ||
280 | ConvertUtils.getString(monthHbMap.get("SH"),"0") ,ConvertUtils.getString(monthTbMap.get("SH") ,"0") ) ); | ||
281 | monthDataVOList.add( new YJMonthDataVO("CH3COOH","CH3COOH" ,ConvertUtils.getString(target.getTargetCh3cooh(),"0"),ConvertUtils.getString(monthMap.get("CH3COOH"),"0"), | ||
282 | ConvertUtils.getString(monthHbMap.get("CH3COOH"),"0") ,ConvertUtils.getString(monthTbMap.get("CH3COOH") ,"0") ) ); | ||
283 | monthDataVOList.add( new YJMonthDataVO("FeSO4固","FESO4G" ,ConvertUtils.getString(target.getTargetFeso4g(),"0"),ConvertUtils.getString(monthMap.get("FESO4G"),"0"), | ||
284 | ConvertUtils.getString(monthHbMap.get("FESO4G"),"0") ,ConvertUtils.getString(monthTbMap.get("FESO4G") ,"0") ) ); | ||
285 | monthDataVOList.add( new YJMonthDataVO("FeSO4液","FESO4Y" ,ConvertUtils.getString(target.getTargetFeso4y(),"0"),ConvertUtils.getString(monthMap.get("FESO4Y"),"0"), | ||
286 | ConvertUtils.getString(monthHbMap.get("FESO4Y"),"0") ,ConvertUtils.getString(monthTbMap.get("FESO4Y") ,"0") ) ); | ||
287 | monthDataVOList.add( new YJMonthDataVO("H2O2","H2O2" ,ConvertUtils.getString(target.getTargetH2o2(),"0"),ConvertUtils.getString(monthMap.get("H2O2"),"0"), | ||
288 | ConvertUtils.getString(monthHbMap.get("H2O2"),"0") ,ConvertUtils.getString(monthTbMap.get("H2O2") ,"0") ) ); | ||
289 | |||
290 | return monthDataVOList; | ||
291 | } | ||
292 | |||
293 | |||
224 | @Override | 294 | @Override |
225 | public Map<String, Object> getReportData(String departId, String month) { | 295 | public Map<String, Object> getReportData(String departId, String month) { |
226 | int dayCount = DateUtils.getDayCountByMonth(month); | 296 | int dayCount = DateUtils.getDayCountByMonth(month); |
... | @@ -358,6 +428,4 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer | ... | @@ -358,6 +428,4 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer |
358 | map.put("yes", yes); | 428 | map.put("yes", yes); |
359 | return map; | 429 | return map; |
360 | } | 430 | } |
361 | |||
362 | |||
363 | } | 431 | } | ... | ... |
1 | package com.skua.modules.dataAnalysis.vo; | ||
2 | |||
3 | import com.skua.tool.util.JSUtils; | ||
4 | import io.swagger.annotations.ApiModel; | ||
5 | import io.swagger.annotations.ApiModelProperty; | ||
6 | import lombok.Data; | ||
7 | |||
8 | /** | ||
9 | * 药剂月消耗数据 | ||
10 | */ | ||
11 | @Data | ||
12 | @ApiModel(value="药剂月消耗数据", description="药剂月消耗数据") | ||
13 | public class YJMonthDataVO { | ||
14 | @ApiModelProperty(value = "药剂名称") | ||
15 | private String yjName; | ||
16 | @ApiModelProperty(value = "药剂Code") | ||
17 | private String yjCode; | ||
18 | @ApiModelProperty(value = "年目标") | ||
19 | private String yearTarge;//年目标 | ||
20 | @ApiModelProperty(value = "月目标") | ||
21 | private String monthTarge;//月目标 | ||
22 | @ApiModelProperty(value = "本月值") | ||
23 | private String value;//本月值 | ||
24 | @ApiModelProperty(value = "环比") | ||
25 | private String valueHB;//环比 | ||
26 | @ApiModelProperty(value = "同比") | ||
27 | private String valueTB;//同比 | ||
28 | |||
29 | public String getMonthTarge() { | ||
30 | monthTarge = JSUtils.divide(yearTarge,12); | ||
31 | return monthTarge; | ||
32 | } | ||
33 | |||
34 | public YJMonthDataVO(){ | ||
35 | } | ||
36 | |||
37 | public YJMonthDataVO(String yjName, String yjCode, String yearTarge, String value, String valueHB, String valueTB) { | ||
38 | this.yjName = yjName; | ||
39 | this.yjCode = yjCode; | ||
40 | this.yearTarge = yearTarge; | ||
41 | this.value = value; | ||
42 | this.valueHB = valueHB; | ||
43 | this.valueTB = valueTB; | ||
44 | } | ||
45 | } |
... | @@ -100,8 +100,6 @@ public class DictAspect { | ... | @@ -100,8 +100,6 @@ public class DictAspect { |
100 | String text = field.getAnnotation(Dict.class).dicText(); | 100 | String text = field.getAnnotation(Dict.class).dicText(); |
101 | String table = field.getAnnotation(Dict.class).dictTable(); | 101 | String table = field.getAnnotation(Dict.class).dictTable(); |
102 | String key = String.valueOf(item.get(field.getName())); | 102 | String key = String.valueOf(item.get(field.getName())); |
103 | |||
104 | |||
105 | String textValue = ""; | 103 | String textValue = ""; |
106 | //翻译字典值对应的txt | 104 | //翻译字典值对应的txt |
107 | if(!org.apache.commons.lang3.StringUtils.isBlank(table)){ | 105 | if(!org.apache.commons.lang3.StringUtils.isBlank(table)){ | ... | ... |
-
请 注册 或 登录 后发表评论