运营分析专题修改
正在显示
5 个修改的文件
包含
31 行增加
和
13 行删除
... | @@ -20,6 +20,9 @@ public interface ReportConstant { | ... | @@ -20,6 +20,9 @@ public interface ReportConstant { |
20 | //供水日报 | 20 | //供水日报 |
21 | public static final String view6643 = "6643ef559d863f57de5fd33220c773c4"; | 21 | public static final String view6643 = "6643ef559d863f57de5fd33220c773c4"; |
22 | 22 | ||
23 | //周报 | ||
24 | public static final String view30a8 = "30a80f54ff288ede9d2df2ddd073b6c3"; | ||
25 | |||
23 | //药剂字段 | 26 | //药剂字段 |
24 | public static final String fieldYj = "PAMZ,PAMF,PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ," + | 27 | public static final String fieldYj = "PAMZ,PAMF,PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ," + |
25 | "YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2"; | 28 | "YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2"; | ... | ... |
... | @@ -25,7 +25,7 @@ public interface FactoryOperateCenterMapper { | ... | @@ -25,7 +25,7 @@ public interface FactoryOperateCenterMapper { |
25 | 25 | ||
26 | List<Map<String, Object>> getFlowData(@Param("departId") String departId, @Param("month") String month); | 26 | List<Map<String, Object>> getFlowData(@Param("departId") String departId, @Param("month") String month); |
27 | 27 | ||
28 | List<Map<String, String>> getReportCount(@Param("departId") String departId, @Param("month") String month, | 28 | List<Map<String, Object>> getReportCount(@Param("departId") String departId, @Param("month") String month, |
29 | @Param("reportName") String reportName); | 29 | @Param("reportName") String reportName); |
30 | 30 | ||
31 | @Anonymous | 31 | @Anonymous | ... | ... |
... | @@ -121,12 +121,15 @@ | ... | @@ -121,12 +121,15 @@ |
121 | 121 | ||
122 | <select id="getReportCount" resultType="java.util.HashMap"> | 122 | <select id="getReportCount" resultType="java.util.HashMap"> |
123 | SELECT | 123 | SELECT |
124 | time | 124 | v.time |
125 | FROM | 125 | FROM |
126 | ${reportName} | 126 | ${reportName} v |
127 | WHERE | 127 | WHERE |
128 | depart_id = #{departId} | 128 | v.depart_id in |
129 | AND time LIKE CONCAT(#{month},'%') | 129 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> |
130 | #{item} | ||
131 | </foreach> | ||
132 | AND v.time LIKE CONCAT(#{month},'%') | ||
130 | </select> | 133 | </select> |
131 | 134 | ||
132 | <select id="getSdyData" resultType="java.util.HashMap"> | 135 | <select id="getSdyData" resultType="java.util.HashMap"> | ... | ... |
... | @@ -300,10 +300,14 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer | ... | @@ -300,10 +300,14 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer |
300 | double ndmb = 100;int ndmbd = 1;int ndmbs = 1; | 300 | double ndmb = 100;int ndmbd = 1;int ndmbs = 1; |
301 | double scyb = 100;int scybd = 1;int scybs = 1; | 301 | double scyb = 100;int scybd = 1;int scybs = 1; |
302 | double zhf = 100; | 302 | double zhf = 100; |
303 | List<Map<String,String>> nhList = factoryOperateCenterMapper.getReportCount(departId,month,"view_3a24");//能耗日报表 | 303 | String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,"", departId, month); |
304 | List<Map<String,String>> yyzbList = factoryOperateCenterMapper.getReportCount(departId,month,"view_30a8");//运营周报表 | 304 | List<Map<String,Object>> nhList = factoryOperateCenterMapper.getReportCount(departId,month,dataViewName3a24);//能耗日报表 |
305 | List<Map<String,String>> scybList = factoryOperateCenterMapper.getReportCount(departId,month,"view_4411");//月度生产数据报表 | 305 | String dataViewName30a8 = ReportViewUtil.buildViewLike(ReportConstant.view30a8,"", departId, month); |
306 | List<Map<String,String>> hyList = factoryOperateCenterMapper.getReportCount(departId,month,"view_9bff");//化验数据日报表 | 306 | List<Map<String,Object>> yyzbList = factoryOperateCenterMapper.getReportCount(departId,month,dataViewName30a8);//运营周报表 |
307 | String dataViewName4411 = ReportViewUtil.buildViewLike(ReportConstant.view4411,"", departId, month); | ||
308 | List<Map<String,Object>> scybList = factoryOperateCenterMapper.getReportCount(departId,month,dataViewName4411);//月度生产数据报表 | ||
309 | String dataViewName9bff = ReportViewUtil.buildViewLike(ReportConstant.view9bff,"", departId, month); | ||
310 | List<Map<String,Object>> hyList = factoryOperateCenterMapper.getReportCount(departId,month,dataViewName9bff);//化验数据日报表 | ||
307 | //能耗报表 | 311 | //能耗报表 |
308 | nhd = nhList.size(); | 312 | nhd = nhList.size(); |
309 | nh = DoubleOperaUtils.bigDecimalRound((100*nhd)/dayCount,0); | 313 | nh = DoubleOperaUtils.bigDecimalRound((100*nhd)/dayCount,0); | ... | ... |
... | @@ -26,6 +26,11 @@ public class NFDataSyncJob implements Job { | ... | @@ -26,6 +26,11 @@ public class NFDataSyncJob implements Job { |
26 | 26 | ||
27 | @Autowired | 27 | @Autowired |
28 | private IReportDataService reportDataService; | 28 | private IReportDataService reportDataService; |
29 | //污水水质 | ||
30 | private static String wsFields = "JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS"; | ||
31 | //供水指标 | ||
32 | private static String gsFields = "GSL,YSSD,CCSWD,YSWD,CCSPH,YSPH,CCSAD,YSAD,CCSHYL,YSHYL,CCSSD," + | ||
33 | "YSNRDCGJQ,CCSRYHT,YSRYHT,CCSNRDCGJQ,CCSZDCGJQ,CCSJLZS,YSZDCGJQ,YSJLZS,CCSRYKJD,YSRYKJD,CCSCHW,YSCHW,CCSHZD,YSHZD"; | ||
29 | 34 | ||
30 | /** | 35 | /** |
31 | * 若参数变量名修改 QuartzJobController中也需对应修改 | 36 | * 若参数变量名修改 QuartzJobController中也需对应修改 |
... | @@ -61,14 +66,17 @@ public class NFDataSyncJob implements Job { | ... | @@ -61,14 +66,17 @@ public class NFDataSyncJob implements Job { |
61 | data.put("reportId", ReportConstant.view2119); | 66 | data.put("reportId", ReportConstant.view2119); |
62 | reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view2119); | 67 | reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view2119); |
63 | }else if("hyrb".equals(itemType)){ | 68 | }else if("hyrb".equals(itemType)){ |
64 | String indexs = "JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS"; | 69 | if(wsFields.indexOf(itemCode) > 0){ |
65 | if(indexs.indexOf(itemCode) > 0){ | ||
66 | data.put(itemCode+"HY", itemValue); | 70 | data.put(itemCode+"HY", itemValue); |
71 | data.put("reportId", ReportConstant.view9bff); | ||
72 | reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view9bff); | ||
73 | }else if(gsFields.indexOf(itemCode) > 0){ | ||
74 | data.put(itemCode, itemValue); | ||
75 | data.put("reportId", ReportConstant.view6643); | ||
76 | reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view6643); | ||
67 | }else{ | 77 | }else{ |
68 | data.put(itemCode, itemValue); | 78 | data.put(itemCode, itemValue); |
69 | } | 79 | } |
70 | data.put("reportId", ReportConstant.view9bff); | ||
71 | reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view9bff); | ||
72 | }else { | 80 | }else { |
73 | log.info("恩菲【"+itemType+"】类型数据未进行数据同步"); | 81 | log.info("恩菲【"+itemType+"】类型数据未进行数据同步"); |
74 | } | 82 | } | ... | ... |
-
请 注册 或 登录 后发表评论