Merge remote-tracking branch 'origin/master'
正在显示
3 个修改的文件
包含
27 行增加
和
15 行删除
... | @@ -22,7 +22,9 @@ public interface ScreenMapper { | ... | @@ -22,7 +22,9 @@ public interface ScreenMapper { |
22 | @Param("TbstartTime") String TbstartTime, @Param("TbendTime") String TbendTime, | 22 | @Param("TbstartTime") String TbstartTime, @Param("TbendTime") String TbendTime, |
23 | @Param("timeType") String timeType); | 23 | @Param("timeType") String timeType); |
24 | 24 | ||
25 | List<Map<String, Object>> getYhdlqs(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("departIds") String departIds); | 25 | List<Map<String, Object>> getYhdlqs(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("departIds") String departIds, |
26 | @Param("dataViewName3a24") String dataViewName3a24, @Param("dataViewName2119") String dataViewName2119); | ||
26 | 27 | ||
27 | List<Map<String, Object>> getYhylqs(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("departIds") String departIds); | 28 | List<Map<String, Object>> getYhylqs(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("departIds") String departIds, |
29 | @Param("dataViewName3a24") String dataViewName3a24, @Param("dataViewName2119") String dataViewName2119); | ||
28 | } | 30 | } | ... | ... |
... | @@ -61,16 +61,16 @@ | ... | @@ -61,16 +61,16 @@ |
61 | v2.clsl, | 61 | v2.clsl, |
62 | ROUND(SUM( v3.DLHJ )/v2.clsl,4) AS dsdh | 62 | ROUND(SUM( v3.DLHJ )/v2.clsl,4) AS dsdh |
63 | FROM | 63 | FROM |
64 | view_3a24 v3 | 64 | ${dataViewName3a24} v3 |
65 | LEFT JOIN | 65 | LEFT JOIN |
66 | ( SELECT | 66 | ( SELECT |
67 | LEFT( time, 7) time,SUM(CSL) clsl FROM view_2119 | 67 | LEFT( v2119.time, 7) time,ROUND(SUM(v2119.CSL),4) AS clsl FROM ${dataViewName2119} v2119 |
68 | WHERE time >= #{startDate} AND time <= #{endDate} | 68 | WHERE v2119.time >= #{startDate} AND v2119.time <= #{endDate} |
69 | AND depart_id in | 69 | AND v2119.depart_id in |
70 | <foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")"> | 70 | <foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")"> |
71 | '${item}' | 71 | '${item}' |
72 | </foreach> | 72 | </foreach> |
73 | GROUP BY LEFT(time, 7) ) v2 | 73 | GROUP BY LEFT(v2119.time, 7) ) v2 |
74 | ON v2.time = LEFT( v3.time, 7 ) | 74 | ON v2.time = LEFT( v3.time, 7 ) |
75 | WHERE v3.time >= #{startDate} AND v3.time <= #{endDate} | 75 | WHERE v3.time >= #{startDate} AND v3.time <= #{endDate} |
76 | AND v3.depart_id in | 76 | AND v3.depart_id in |
... | @@ -90,16 +90,16 @@ | ... | @@ -90,16 +90,16 @@ |
90 | + SUM( v3.HXT ) + SUM( v3.FECL3 ) + SUM( v3.SH ) + SUM( v3.CH3COOH ) + SUM( v3.FESO4G ) + SUM( v3.FESO4Y ) | 90 | + SUM( v3.HXT ) + SUM( v3.FECL3 ) + SUM( v3.SH ) + SUM( v3.CH3COOH ) + SUM( v3.FESO4G ) + SUM( v3.FESO4Y ) |
91 | + SUM( v3.H2O2 ) ) / v2.clsl, 4 ) AS dsyh | 91 | + SUM( v3.H2O2 ) ) / v2.clsl, 4 ) AS dsyh |
92 | FROM | 92 | FROM |
93 | view_3a24 v3 | 93 | ${dataViewName3a24} v3 |
94 | LEFT JOIN | 94 | LEFT JOIN |
95 | ( SELECT | 95 | ( SELECT |
96 | LEFT( time, 7) time,SUM(CSL) clsl FROM view_2119 | 96 | LEFT( v2119.time, 7) time,SUM(v2119.CSL) clsl FROM ${dataViewName2119} v2119 |
97 | WHERE time >= #{startDate} AND time <= #{endDate} | 97 | WHERE v2119.time >= #{startDate} AND v2119.time <= #{endDate} |
98 | AND depart_id in | 98 | AND v2119.depart_id in |
99 | <foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")"> | 99 | <foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")"> |
100 | '${item}' | 100 | '${item}' |
101 | </foreach> | 101 | </foreach> |
102 | GROUP BY LEFT(time, 7) ) v2 | 102 | GROUP BY LEFT(v2119.time, 7) ) v2 |
103 | ON v2.time = LEFT( v3.time, 7 ) | 103 | ON v2.time = LEFT( v3.time, 7 ) |
104 | WHERE v3.time >= #{startDate} AND v3.time <= #{endDate} | 104 | WHERE v3.time >= #{startDate} AND v3.time <= #{endDate} |
105 | AND v3.depart_id in | 105 | AND v3.depart_id in | ... | ... |
1 | package com.skua.modules.threedimensional.service.impl; | 1 | package com.skua.modules.threedimensional.service.impl; |
2 | 2 | ||
3 | import com.skua.common.report.ReportViewUtil; | ||
3 | import com.skua.core.service.IFactoryInfoService; | 4 | import com.skua.core.service.IFactoryInfoService; |
4 | import com.skua.core.util.DateUtils; | 5 | import com.skua.core.util.DateUtils; |
5 | import com.skua.modules.flow.utils.StringUtil; | 6 | import com.skua.modules.flow.utils.StringUtil; |
... | @@ -204,20 +205,23 @@ public class ScreenDataServiceImpl implements IScreenDataService { | ... | @@ -204,20 +205,23 @@ public class ScreenDataServiceImpl implements IScreenDataService { |
204 | @Override | 205 | @Override |
205 | public List<Map<String, Object>> factorySLQS(String departId,String startTime, String endTime, String TbstartTime, String TbendTime, | 206 | public List<Map<String, Object>> factorySLQS(String departId,String startTime, String endTime, String TbstartTime, String TbendTime, |
206 | String timeType) { | 207 | String timeType) { |
207 | |||
208 | return screenMapper.factorySLQS( departId,startTime, endTime, TbstartTime, TbendTime, | 208 | return screenMapper.factorySLQS( departId,startTime, endTime, TbstartTime, TbendTime, |
209 | timeType); | 209 | timeType); |
210 | } | 210 | } |
211 | 211 | ||
212 | @Override | 212 | @Override |
213 | public List<Map<String, Object>> getYhdlqs(StatisticsParams statisticsParams) { | 213 | public List<Map<String, Object>> getYhdlqs(StatisticsParams statisticsParams) { |
214 | String view2119 = "2119ecbf53a1d2d0708258ff67cfd9e1"; | ||
215 | String view3a24 = "3a243d5715b9e1a3753c180872ca0df9"; | ||
214 | List<Map<String, Object>> list = new ArrayList<>(); | 216 | List<Map<String, Object>> list = new ArrayList<>(); |
215 | String startDate = statisticsParams.getStartDate(); | 217 | String startDate = statisticsParams.getStartDate(); |
216 | String endDate = statisticsParams.getEndDate(); | 218 | String endDate = statisticsParams.getEndDate(); |
217 | String departIds = statisticsParams.getDepartIds(); | 219 | String departIds = statisticsParams.getDepartIds(); |
218 | Map<String, Object> valueMap = new HashMap<>(); | 220 | Map<String, Object> valueMap = new HashMap<>(); |
219 | List<String> monthList = getMonthsBetween(startDate,endDate); | 221 | List<String> monthList = getMonthsBetween(startDate,endDate); |
220 | List<Map<String, Object>> dataList = screenMapper.getYhdlqs(startDate,endDate,departIds); | 222 | String dataViewName3a24 = ReportViewUtil.buildView(view3a24, "DLHJ", departIds, startDate, endDate); |
223 | String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", departIds, startDate, endDate); | ||
224 | List<Map<String, Object>> dataList = screenMapper.getYhdlqs(startDate,endDate,departIds,dataViewName3a24,dataViewName2119); | ||
221 | if(dataList.size()>0){ | 225 | if(dataList.size()>0){ |
222 | for (Map<String, Object> vMap : dataList) { | 226 | for (Map<String, Object> vMap : dataList) { |
223 | valueMap.put(vMap.get("time").toString(),vMap); | 227 | valueMap.put(vMap.get("time").toString(),vMap); |
... | @@ -252,13 +256,19 @@ public class ScreenDataServiceImpl implements IScreenDataService { | ... | @@ -252,13 +256,19 @@ public class ScreenDataServiceImpl implements IScreenDataService { |
252 | 256 | ||
253 | @Override | 257 | @Override |
254 | public List<Map<String, Object>> getYhylqs(StatisticsParams statisticsParams) { | 258 | public List<Map<String, Object>> getYhylqs(StatisticsParams statisticsParams) { |
259 | String view2119 = "2119ecbf53a1d2d0708258ff67cfd9e1"; | ||
260 | String view3a24 = "3a243d5715b9e1a3753c180872ca0df9"; | ||
255 | List<Map<String, Object>> list = new ArrayList<>(); | 261 | List<Map<String, Object>> list = new ArrayList<>(); |
256 | String startDate = statisticsParams.getStartDate(); | 262 | String startDate = statisticsParams.getStartDate(); |
257 | String endDate = statisticsParams.getEndDate(); | 263 | String endDate = statisticsParams.getEndDate(); |
258 | String departIds = statisticsParams.getDepartIds(); | 264 | String departIds = statisticsParams.getDepartIds(); |
259 | Map<String, Object> valueMap = new HashMap<>(); | 265 | Map<String, Object> valueMap = new HashMap<>(); |
260 | List<String> monthList = getMonthsBetween(startDate,endDate); | 266 | List<String> monthList = getMonthsBetween(startDate,endDate); |
261 | List<Map<String, Object>> dataList = screenMapper.getYhylqs(startDate,endDate,departIds); | 267 | String field3a24 = "PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ," + |
268 | "YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2"; | ||
269 | String dataViewName3a24 = ReportViewUtil.buildView(view3a24, field3a24, departIds, startDate, endDate); | ||
270 | String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", departIds, startDate, endDate); | ||
271 | List<Map<String, Object>> dataList = screenMapper.getYhylqs(startDate,endDate,departIds,dataViewName3a24,dataViewName2119); | ||
262 | if(dataList.size()>0){ | 272 | if(dataList.size()>0){ |
263 | for (Map<String, Object> vMap : dataList) { | 273 | for (Map<String, Object> vMap : dataList) { |
264 | valueMap.put(vMap.get("time").toString(),vMap); | 274 | valueMap.put(vMap.get("time").toString(),vMap); | ... | ... |
-
请 注册 或 登录 后发表评论