项目禅道BUG修改
正在显示
11 个修改的文件
包含
101 行增加
和
58 行删除
1 | package com.skua.modules.appdownload; | ||
2 | |||
3 | import com.skua.core.api.ISysBaseAPI; | ||
4 | import com.skua.core.api.vo.Result; | ||
5 | import com.skua.core.aspect.annotation.AutoLog; | ||
6 | import io.swagger.annotations.Api; | ||
7 | import io.swagger.annotations.ApiOperation; | ||
8 | import lombok.extern.slf4j.Slf4j; | ||
9 | import org.springframework.beans.factory.annotation.Autowired; | ||
10 | import org.springframework.web.bind.annotation.GetMapping; | ||
11 | import org.springframework.web.bind.annotation.RequestMapping; | ||
12 | import org.springframework.web.bind.annotation.RestController; | ||
13 | |||
14 | import java.util.Map; | ||
15 | |||
16 | /** | ||
17 | * 视频信息 | ||
18 | */ | ||
19 | @Slf4j | ||
20 | @Api(tags="APP下载二维码") | ||
21 | @RestController | ||
22 | @RequestMapping("/app/appdownload") | ||
23 | public class AppDownLoadController { | ||
24 | |||
25 | @Autowired | ||
26 | private ISysBaseAPI iSysBaseAPI; | ||
27 | |||
28 | @AutoLog(value = "APP下载二维码") | ||
29 | @ApiOperation(value="APP下载二维码", notes="APP下载二维码") | ||
30 | @GetMapping(value = "/getAppDownLoad") | ||
31 | public Result<Map<String,Object>> getIOSAppDownLoad() { | ||
32 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); | ||
33 | Map<String,Object> map = iSysBaseAPI.getIOSAppDownLoad(); | ||
34 | result.setSuccess(true); | ||
35 | result.setResult(map); | ||
36 | return result; | ||
37 | } | ||
38 | |||
39 | } |
... | @@ -101,8 +101,7 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData | ... | @@ -101,8 +101,7 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData |
101 | Map<String, Object> getWeekReport(@Param(value="dataTime") String dataTime, @Param(value="departId") String departId, | 101 | Map<String, Object> getWeekReport(@Param(value="dataTime") String dataTime, @Param(value="departId") String departId, |
102 | @Param(value="week") String week,@Param(value="startDate") String startDate,@Param(value="endDate") String endDate, | 102 | @Param(value="week") String week,@Param(value="startDate") String startDate,@Param(value="endDate") String endDate, |
103 | @Param(value="dataViewName3a24") String dataViewName3a24, | 103 | @Param(value="dataViewName3a24") String dataViewName3a24, |
104 | @Param(value="dataViewName2119") String dataViewName2119, | 104 | @Param(value="dataViewName2119") String dataViewName2119); |
105 | @Param(value="dataViewName9bff") String dataViewName9bff); | ||
106 | 105 | ||
107 | List<DepartWeekReportVO> getWeekReportData(@Param(value="startDate") String startDate, @Param(value="endDate") String endDate, | 106 | List<DepartWeekReportVO> getWeekReportData(@Param(value="startDate") String startDate, @Param(value="endDate") String endDate, |
108 | @Param(value="dataViewName3a24") String dataViewName3a24, | 107 | @Param(value="dataViewName3a24") String dataViewName3a24, | ... | ... |
... | @@ -179,18 +179,18 @@ | ... | @@ -179,18 +179,18 @@ |
179 | #{dataTime} as time, | 179 | #{dataTime} as time, |
180 | #{startDate} as startdate, | 180 | #{startDate} as startdate, |
181 | #{endDate} as enddate, | 181 | #{endDate} as enddate, |
182 | v9.JSCOD as jscod, | 182 | v2.JSCOD as jscod, |
183 | v9.JSAD as jsnh3n, | 183 | v2.JSAD as jsnh3n, |
184 | v9.JSPH as jsph, | 184 | v2.JSPH as jsph, |
185 | v9.JSZD as jstn, | 185 | v2.JSZD as jstn, |
186 | v9.JSZL as jstp, | 186 | v2.JSZL as jstp, |
187 | v9.CSCOD as cscod, | 187 | v2.CSCOD as cscod, |
188 | v9.CSAD as csnh3n, | 188 | v2.CSAD as csnh3n, |
189 | v9.CSPH as csph, | 189 | v2.CSPH as csph, |
190 | v9.CSTN as cstn, | 190 | v2.CSTN as cstn, |
191 | v9.CSZL as cstp, | 191 | v2.CSZL as cstp, |
192 | v9.JSSS as jsss, | 192 | v2.JSSS as jsss, |
193 | v9.CSSS as csss, | 193 | v2.CSSS as csss, |
194 | v3.qt5,v3.qt4,v3.qt3,v3.qt2,v3.qt1, | 194 | v3.qt5,v3.qt4,v3.qt3,v3.qt2,v3.qt1, |
195 | v3.scqk5,v3.scqk4,v3.scqk3,v3.scqk2,v3.scqk1, | 195 | v3.scqk5,v3.scqk4,v3.scqk3,v3.scqk2,v3.scqk1, |
196 | v3.id,v3.zwncb,v3.tnlgyy,v3.sjtnl, | 196 | v3.id,v3.zwncb,v3.tnlgyy,v3.sjtnl, |
... | @@ -208,14 +208,6 @@ | ... | @@ -208,14 +208,6 @@ |
208 | sys_depart d | 208 | sys_depart d |
209 | LEFT JOIN (SELECT * FROM view_30a8 WHERE depart_id = #{departId} AND time = #{dataTime} AND zs = #{week}) v3 on v3.depart_id = d.id | 209 | LEFT JOIN (SELECT * FROM view_30a8 WHERE depart_id = #{departId} AND time = #{dataTime} AND zs = #{week}) v3 on v3.depart_id = d.id |
210 | LEFT JOIN (SELECT | 210 | LEFT JOIN (SELECT |
211 | ROUND(AVG(v.JSCOD),2) JSCOD,ROUND(AVG(v.JSAD),2) JSAD,ROUND(AVG(v.JSPH),2) JSPH, | ||
212 | ROUND(AVG(v.JSZD),2) JSZD,ROUND(AVG(v.JSZL),2) JSZL,ROUND(AVG(v.JSSS),2) JSSS, | ||
213 | ROUND(AVG(v.CSCOD),2) CSCOD,ROUND(AVG(v.CSAD),2) CSAD,ROUND(AVG(v.CSPH),2) CSPH, | ||
214 | ROUND(AVG(v.CSTN),2) CSTN,ROUND(AVG(v.CSZL),2) CSZL,ROUND(AVG(v.CSSS),2) CSSS, | ||
215 | v.depart_id | ||
216 | FROM ${dataViewName9bff} v | ||
217 | WHERE v.depart_id = #{departId} AND v.time >= #{startDate} AND v.time <= #{endDate} ) v9 on v9.depart_id = d.id | ||
218 | LEFT JOIN (SELECT | ||
219 | SUM(IFNULL(v.DLHJ,0)) dlhj,(SUM( IFNULL(v.PAMRJ,0) ) + SUM( IFNULL(v.SCLPAMZ,0) ) + | 211 | SUM(IFNULL(v.DLHJ,0)) dlhj,(SUM( IFNULL(v.PAMRJ,0) ) + SUM( IFNULL(v.SCLPAMZ,0) ) + |
220 | SUM( IFNULL(v.SCLPAMF,0) ) + SUM( IFNULL(v.NACLO,0) ) + SUM( IFNULL(v.PACGT,0) ) + | 212 | SUM( IFNULL(v.SCLPAMF,0) ) + SUM( IFNULL(v.NACLO,0) ) + SUM( IFNULL(v.PACGT,0) ) + |
221 | SUM( IFNULL(v.PACYT,0) ) + SUM( IFNULL(v.PFS,0) ) + SUM( IFNULL(v.FHTY,0) ) +SUM( IFNULL(v.RYXNJ,0) ) + | 213 | SUM( IFNULL(v.PACYT,0) ) + SUM( IFNULL(v.PFS,0) ) + SUM( IFNULL(v.FHTY,0) ) +SUM( IFNULL(v.RYXNJ,0) ) + |
... | @@ -227,6 +219,10 @@ | ... | @@ -227,6 +219,10 @@ |
227 | LEFT JOIN (SELECT | 219 | LEFT JOIN (SELECT |
228 | SUM(v.CSL) zclsl, | 220 | SUM(v.CSL) zclsl, |
229 | ROUND(AVG(v.CSL),2) rjclsl, | 221 | ROUND(AVG(v.CSL),2) rjclsl, |
222 | ROUND(AVG(v.JSCOD),2) JSCOD,ROUND(AVG(v.JSAD),2) JSAD,ROUND(AVG(v.JSPH),2) JSPH, | ||
223 | ROUND(AVG(v.JSZD),2) JSZD,ROUND(AVG(v.JSZL),2) JSZL,ROUND(AVG(v.JSSS),2) JSSS, | ||
224 | ROUND(AVG(v.CSCOD),2) CSCOD,ROUND(AVG(v.CSAD),2) CSAD,ROUND(AVG(v.CSPH),2) CSPH, | ||
225 | ROUND(AVG(v.CSTN),2) CSTN,ROUND(AVG(v.CSZL),2) CSZL,ROUND(AVG(v.CSSS),2) CSSS, | ||
230 | v.depart_id | 226 | v.depart_id |
231 | FROM ${dataViewName2119} v | 227 | FROM ${dataViewName2119} v |
232 | WHERE v.depart_id = #{departId} AND v.time >= #{startDate} AND v.time <= #{endDate} ) v2 on v2.depart_id = d.id | 228 | WHERE v.depart_id = #{departId} AND v.time >= #{startDate} AND v.time <= #{endDate} ) v2 on v2.depart_id = d.id | ... | ... |
... | @@ -27,7 +27,6 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa | ... | @@ -27,7 +27,6 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa |
27 | 27 | ||
28 | private static String view2119 = "2119ecbf53a1d2d0708258ff67cfd9e1"; | 28 | private static String view2119 = "2119ecbf53a1d2d0708258ff67cfd9e1"; |
29 | private static String view3a24 = "3a243d5715b9e1a3753c180872ca0df9"; | 29 | private static String view3a24 = "3a243d5715b9e1a3753c180872ca0df9"; |
30 | private static String view9bff = "9bffaf9187093d6e6a4390e8c56acca8"; | ||
31 | private static String view4411 = "4411ed3d78634bcdcd700f6e33724025"; | 30 | private static String view4411 = "4411ed3d78634bcdcd700f6e33724025"; |
32 | @Autowired | 31 | @Autowired |
33 | private FCustomReportDatasetMapper mapper; | 32 | private FCustomReportDatasetMapper mapper; |
... | @@ -171,10 +170,9 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa | ... | @@ -171,10 +170,9 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa |
171 | String field3a24 = "DLHJ,PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ," + | 170 | String field3a24 = "DLHJ,PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ," + |
172 | "YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2,WNL"; | 171 | "YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2,WNL"; |
173 | String dataViewName3a24 = ReportViewUtil.buildView(view3a24, field3a24, "", startDate, endDate); | 172 | String dataViewName3a24 = ReportViewUtil.buildView(view3a24, field3a24, "", startDate, endDate); |
174 | String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", "", startDate, endDate); | 173 | String field2119 = "CSL,JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS"; |
175 | String field9bff = "JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS"; | 174 | String dataViewName2119 = ReportViewUtil.buildView(view2119,field2119, "", startDate, endDate); |
176 | String dataViewName9bff = ReportViewUtil.buildView(view9bff, field9bff, "", startDate, endDate); | 175 | valueMap = mapper.getWeekReport(dataTime, departId, week, startDate, endDate, dataViewName3a24, dataViewName2119); |
177 | valueMap = mapper.getWeekReport(dataTime, departId, week, startDate, endDate, dataViewName3a24, dataViewName2119, dataViewName9bff); | ||
178 | if(valueMap==null){ | 176 | if(valueMap==null){ |
179 | valueMap = new HashMap<>(); | 177 | valueMap = new HashMap<>(); |
180 | valueMap.put("depart_id", departId); | 178 | valueMap.put("depart_id", departId); |
... | @@ -403,8 +401,6 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa | ... | @@ -403,8 +401,6 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa |
403 | "YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2,WNL"; | 401 | "YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2,WNL"; |
404 | String dataViewName3a24 = ReportViewUtil.buildView(view3a24, field3a24, "", startDate, endDate); | 402 | String dataViewName3a24 = ReportViewUtil.buildView(view3a24, field3a24, "", startDate, endDate); |
405 | String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", "", startDate, endDate); | 403 | String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", "", startDate, endDate); |
406 | String field9bff = "JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS"; | ||
407 | String dataViewName9bff = ReportViewUtil.buildView(view9bff, field9bff, "", startDate, endDate); | ||
408 | list = mapper.getWeekReportData(startDate, endDate, dataViewName3a24, dataViewName2119); | 404 | list = mapper.getWeekReportData(startDate, endDate, dataViewName3a24, dataViewName2119); |
409 | map.put("start", startDate);//开始时间 | 405 | map.put("start", startDate);//开始时间 |
410 | map.put("end", endDate);//结束时间 | 406 | map.put("end", endDate);//结束时间 | ... | ... |
... | @@ -11,7 +11,8 @@ public interface WaterAnalysisNewMapper { | ... | @@ -11,7 +11,8 @@ public interface WaterAnalysisNewMapper { |
11 | List<Map<String, Object>> queryFacList(@Param("time") String time,@Param("factoryIds") String factoryIds); | 11 | List<Map<String, Object>> queryFacList(@Param("time") String time,@Param("factoryIds") String factoryIds); |
12 | List<DictModel> queryDictItemsByCode(@Param("code") String code); | 12 | List<DictModel> queryDictItemsByCode(@Param("code") String code); |
13 | List<Map<String, Object>> queryCSList(); | 13 | List<Map<String, Object>> queryCSList(); |
14 | List<Double> queryAvgByCode(@Param("code") String code, @Param("time") String time, @Param("factoryIds") String factoryIds); | 14 | List<Double> queryAvgByCode(@Param("code") String code, @Param("time") String time, |
15 | @Param("factoryIds") String factoryIds, @Param("reportId") String reportId); | ||
15 | Double queryAvgSumByCode(@Param("code") String code, @Param("time") String time, @Param("factoryIds") String factoryIds); | 16 | Double queryAvgSumByCode(@Param("code") String code, @Param("time") String time, @Param("factoryIds") String factoryIds); |
16 | List<Map<String, Object>> queryAllFacList(@Param("factoryIds") String factoryIds); | 17 | List<Map<String, Object>> queryAllFacList(@Param("factoryIds") String factoryIds); |
17 | Double queryAvgSumByCodeAndFac(@Param("code") String code, @Param("time") String time, @Param("factoryId") String factoryId); | 18 | Double queryAvgSumByCodeAndFac(@Param("code") String code, @Param("time") String time, @Param("factoryId") String factoryId); | ... | ... |
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/WaterAnalysisNewMapper.xml
... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
5 | SELECT | 5 | SELECT |
6 | sd.depart_name factoryName, | 6 | sd.depart_name factoryName, |
7 | sd.id factoryId, | 7 | sd.id factoryId, |
8 | t.item_text standard, | 8 | t.alarm_standard_level_name standard, |
9 | sfi.pro_longitude longitude, | 9 | sfi.pro_longitude longitude, |
10 | sfi.pro_latitude latitude, | 10 | sfi.pro_latitude latitude, |
11 | sa.area_name areaName, | 11 | sa.area_name areaName, |
... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
14 | sys_depart sd | 14 | sys_depart sd |
15 | LEFT JOIN sys_factory_info sfi ON sfi.depart_id = sd.id | 15 | LEFT JOIN sys_factory_info sfi ON sfi.depart_id = sd.id |
16 | LEFT JOIN sys_area sa ON sa.id = sfi.pro_county | 16 | LEFT JOIN sys_area sa ON sa.id = sfi.pro_county |
17 | LEFT JOIN ( SELECT item_text, item_value FROM sys_dict_item WHERE dict_id = '71a36a3388da093c19733298c7fa6932' ) t ON t.item_value = sfi.out_level | 17 | LEFT JOIN alarm_level_standard_config t ON t.id = sfi.out_level |
18 | LEFT JOIN ( | 18 | LEFT JOIN ( |
19 | SELECT | 19 | SELECT |
20 | t.factory_id, | 20 | t.factory_id, |
... | @@ -150,24 +150,25 @@ | ... | @@ -150,24 +150,25 @@ |
150 | FROM | 150 | FROM |
151 | sys_metric_dict | 151 | sys_metric_dict |
152 | WHERE | 152 | WHERE |
153 | id in('CSCOD','CSNH3N','CSTN','CSTP','CSPH') | 153 | id in('CSCOD','CSAD','CSTN','CSZL','CSPH') |
154 | order by sort_num | 154 | order by sort_num |
155 | </select> | 155 | </select> |
156 | <select id="queryAvgByCode" resultType="java.lang.Double"> | 156 | <select id="queryAvgByCode" resultType="java.lang.Double"> |
157 | SELECT | 157 | SELECT |
158 | round(avg( index_value ),2) count | 158 | round(avg( v.item_value ),2) count |
159 | FROM | 159 | FROM |
160 | sys_data_calculation | 160 | f_report_itemv v |
161 | WHERE | 161 | WHERE |
162 | LEFT ( ts, 7 ) = #{time} | 162 | v.reit_id = ( SELECT id FROM f_report_item WHERE report_id = #{reportId} AND item_code = #{code} ) |
163 | AND index_tag = #{code} | 163 | AND LEFT ( v.data_time, 7 ) = #{time} |
164 | AND depart_id in | 164 | AND v.depart_id in |
165 | <foreach item="item" index="index" collection="factoryIds.split(',')" open="(" separator="," close=")"> | 165 | <foreach item="item" index="index" collection="factoryIds.split(',')" open="(" separator="," close=")"> |
166 | #{item} | 166 | #{item} |
167 | </foreach> | 167 | </foreach> |
168 | GROUP BY | 168 | GROUP BY |
169 | depart_id | 169 | v.depart_id |
170 | order by count desc | 170 | order by |
171 | avg(v.item_value) desc | ||
171 | </select> | 172 | </select> |
172 | <select id="queryAvgSumByCode" resultType="java.lang.Double"> | 173 | <select id="queryAvgSumByCode" resultType="java.lang.Double"> |
173 | SELECT | 174 | SELECT | ... | ... |
... | @@ -16,7 +16,7 @@ import java.util.concurrent.atomic.AtomicReference; | ... | @@ -16,7 +16,7 @@ import java.util.concurrent.atomic.AtomicReference; |
16 | 16 | ||
17 | @Service | 17 | @Service |
18 | public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { | 18 | public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { |
19 | private static String REPOART_ID_HY = "9bffaf9187093d6e6a4390e8c56acca8"; | 19 | private static String view2119 = "2119ecbf53a1d2d0708258ff67cfd9e1"; |
20 | @Autowired | 20 | @Autowired |
21 | private WaterAnalysisNewMapper waterAnalysisNewMapper; | 21 | private WaterAnalysisNewMapper waterAnalysisNewMapper; |
22 | @Override | 22 | @Override |
... | @@ -65,7 +65,8 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { | ... | @@ -65,7 +65,8 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { |
65 | public List<Map<String, Object>> queryFacListWaterQCL(String time) { | 65 | public List<Map<String, Object>> queryFacListWaterQCL(String time) { |
66 | String departIds = BaseContextHandler.getDeparts(); | 66 | String departIds = BaseContextHandler.getDeparts(); |
67 | List<Map<String, Object>> result = Lists.newArrayList(); | 67 | List<Map<String, Object>> result = Lists.newArrayList(); |
68 | String dataViewName = ReportViewUtil.buildViewLike(REPOART_ID_HY,"CSCOD,CSTN,CSZL,CSAD,JSCOD,JSZD,JSZL,JSAD", departIds, time); | 68 | String fields = "CSCOD,CSTN,CSZL,CSAD,JSCOD,JSZD,JSZL,JSAD"; |
69 | String dataViewName = ReportViewUtil.buildViewLike(view2119,fields, departIds, time); | ||
69 | List<Map<String, Object>> list = waterAnalysisNewMapper.queryAllFactoryList(time,departIds,dataViewName); | 70 | List<Map<String, Object>> list = waterAnalysisNewMapper.queryAllFactoryList(time,departIds,dataViewName); |
70 | if (list != null) { | 71 | if (list != null) { |
71 | for (Map<String, Object> map : list) { | 72 | for (Map<String, Object> map : list) { |
... | @@ -107,7 +108,8 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { | ... | @@ -107,7 +108,8 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { |
107 | public Map<String, Object> queryWaterQCL(String time) { | 108 | public Map<String, Object> queryWaterQCL(String time) { |
108 | Map<String, Object> result = Maps.newHashMap(); | 109 | Map<String, Object> result = Maps.newHashMap(); |
109 | String departIds = BaseContextHandler.getDeparts(); | 110 | String departIds = BaseContextHandler.getDeparts(); |
110 | String dataViewName = ReportViewUtil.buildViewLike(REPOART_ID_HY,"CSCOD,CSTN,CSZL,CSAD,JSCOD,JSZD,JSZL,JSAD", departIds, time); | 111 | String fields = "CSCOD,CSTN,CSZL,CSAD,JSCOD,JSZD,JSZL,JSAD"; |
112 | String dataViewName = ReportViewUtil.buildViewLike(view2119,fields, departIds, time); | ||
111 | result = waterAnalysisNewMapper.queryAvgQcl(dataViewName, time, departIds); | 113 | result = waterAnalysisNewMapper.queryAvgQcl(dataViewName, time, departIds); |
112 | if(result==null){ | 114 | if(result==null){ |
113 | result = new HashMap<>(); | 115 | result = new HashMap<>(); |
... | @@ -120,6 +122,7 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { | ... | @@ -120,6 +122,7 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { |
120 | } | 122 | } |
121 | @Override | 123 | @Override |
122 | public List<Map<String, Object>> queryCSAnalysis(String time) { | 124 | public List<Map<String, Object>> queryCSAnalysis(String time) { |
125 | String reportId = "2119ecbf53a1d2d0708258ff67cfd9e1"; | ||
123 | String departIds = BaseContextHandler.getDeparts(); | 126 | String departIds = BaseContextHandler.getDeparts(); |
124 | //获取负荷比例 | 127 | //获取负荷比例 |
125 | List<DictModel> fhData = waterAnalysisNewMapper.queryDictItemsByCode("water_analysis_proportion"); | 128 | List<DictModel> fhData = waterAnalysisNewMapper.queryDictItemsByCode("water_analysis_proportion"); |
... | @@ -139,7 +142,7 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { | ... | @@ -139,7 +142,7 @@ public class WaterAnalysisNewServiceImpl implements WaterAnalysisNewService { |
139 | Double finalUp = up; | 142 | Double finalUp = up; |
140 | data.forEach(v -> { | 143 | data.forEach(v -> { |
141 | String code = (String) v.get("id"); | 144 | String code = (String) v.get("id"); |
142 | List<Double> datan = waterAnalysisNewMapper.queryAvgByCode(code, time, departIds); | 145 | List<Double> datan = waterAnalysisNewMapper.queryAvgByCode(code, time, departIds, reportId); |
143 | if (datan != null && datan.size() > 0) { | 146 | if (datan != null && datan.size() > 0) { |
144 | DoubleSummaryStatistics statistics = datan.stream().mapToDouble(Number::doubleValue).summaryStatistics(); | 147 | DoubleSummaryStatistics statistics = datan.stream().mapToDouble(Number::doubleValue).summaryStatistics(); |
145 | //取最大值 | 148 | //取最大值 | ... | ... |
... | @@ -43,13 +43,19 @@ public class NFDataSyncJob implements Job { | ... | @@ -43,13 +43,19 @@ public class NFDataSyncJob implements Job { |
43 | String itemValue = map.get("item_value").toString(); | 43 | String itemValue = map.get("item_value").toString(); |
44 | String itemType = map.get("item_type").toString(); | 44 | String itemType = map.get("item_type").toString(); |
45 | Map<String, String> data = new HashMap<>(); | 45 | Map<String, String> data = new HashMap<>(); |
46 | data.put(itemCode, itemValue); | ||
47 | data.put("departId", departId); | 46 | data.put("departId", departId); |
48 | data.put("time",yesterday); | 47 | data.put("time",yesterday); |
49 | if("szsl".equals(itemType)){ | 48 | if("szsl".equals(itemType)){ |
49 | data.put(itemCode, itemValue); | ||
50 | data.put("reportId", SZSL); | 50 | data.put("reportId", SZSL); |
51 | reportDataService.insertOrUpdateReportData(departId, time, data, SZSL); | 51 | reportDataService.insertOrUpdateReportData(departId, time, data, SZSL); |
52 | }else if("hyrb".equals(itemType)){ | 52 | }else if("hyrb".equals(itemType)){ |
53 | String indexs = "JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS"; | ||
54 | if(itemCode.indexOf(indexs) > 0){ | ||
55 | data.put(itemCode+"HY", itemValue); | ||
56 | }else{ | ||
57 | data.put(itemCode, itemValue); | ||
58 | } | ||
53 | data.put("reportId", HYRB); | 59 | data.put("reportId", HYRB); |
54 | reportDataService.insertOrUpdateReportData(departId, time, data, HYRB); | 60 | reportDataService.insertOrUpdateReportData(departId, time, data, HYRB); |
55 | }else { | 61 | }else { | ... | ... |
... | @@ -4,6 +4,7 @@ import java.util.Date; | ... | @@ -4,6 +4,7 @@ import java.util.Date; |
4 | import com.baomidou.mybatisplus.annotation.IdType; | 4 | import com.baomidou.mybatisplus.annotation.IdType; |
5 | import com.baomidou.mybatisplus.annotation.TableId; | 5 | import com.baomidou.mybatisplus.annotation.TableId; |
6 | import com.baomidou.mybatisplus.annotation.TableName; | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
7 | import com.skua.core.aspect.annotation.Dict; | ||
7 | import io.swagger.annotations.ApiModel; | 8 | import io.swagger.annotations.ApiModel; |
8 | import io.swagger.annotations.ApiModelProperty; | 9 | import io.swagger.annotations.ApiModelProperty; |
9 | import lombok.Data; | 10 | import lombok.Data; |
... | @@ -30,6 +31,7 @@ public class ReportDisplay { | ... | @@ -30,6 +31,7 @@ public class ReportDisplay { |
30 | /**所属厂区*/ | 31 | /**所属厂区*/ |
31 | @Excel(name = "所属厂区", width = 15) | 32 | @Excel(name = "所属厂区", width = 15) |
32 | @ApiModelProperty(value = "所属厂区") | 33 | @ApiModelProperty(value = "所属厂区") |
34 | @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name") | ||
33 | private String departId; | 35 | private String departId; |
34 | /**报表名称*/ | 36 | /**报表名称*/ |
35 | @Excel(name = "报表名称", width = 15) | 37 | @Excel(name = "报表名称", width = 15) | ... | ... |
... | @@ -64,18 +64,18 @@ | ... | @@ -64,18 +64,18 @@ |
64 | ) v3 ON d.id = v3.depart_id | 64 | ) v3 ON d.id = v3.depart_id |
65 | LEFT JOIN ( | 65 | LEFT JOIN ( |
66 | SELECT | 66 | SELECT |
67 | ROUND(AVG(JSZL),2) AS JSZL, | 67 | ROUND(AVG(JSZLHY),2) AS JSZL, |
68 | ROUND(AVG(JSCOD),2) AS JSCOD, | 68 | ROUND(AVG(JSCODHY),2) AS JSCOD, |
69 | ROUND(AVG(JSSS),2) AS JSSS, | 69 | ROUND(AVG(JSSSHY),2) AS JSSS, |
70 | ROUND(AVG(JSAD),2) AS JSAD, | 70 | ROUND(AVG(JSADHY),2) AS JSAD, |
71 | ROUND(AVG(JSZD),2) AS JSZD, | 71 | ROUND(AVG(JSZDHY),2) AS JSZD, |
72 | ROUND(AVG(CSZL),2) AS CSZL, | 72 | ROUND(AVG(CSZLHY),2) AS CSZL, |
73 | ROUND(AVG(CSTN),2) AS CSTN, | 73 | ROUND(AVG(CSTNHY),2) AS CSTN, |
74 | ROUND(AVG(CSAD),2) AS CSAD, | 74 | ROUND(AVG(CSADHY),2) AS CSAD, |
75 | ROUND(AVG(CSSS),2) AS CSSS, | 75 | ROUND(AVG(CSSSHY),2) AS CSSS, |
76 | ROUND(AVG(CSCOD),2) AS CSCOD, | 76 | ROUND(AVG(CSCODHY),2) AS CSCOD, |
77 | ROUND(AVG(CSPH),2) AS CSPH, | 77 | ROUND(AVG(CSPHHY),2) AS CSPH, |
78 | ROUND(AVG(JSPH),2) AS JSPH, | 78 | ROUND(AVG(JSPHHY),2) AS JSPH, |
79 | time, | 79 | time, |
80 | depart_id | 80 | depart_id |
81 | FROM | 81 | FROM | ... | ... |
... | @@ -102,7 +102,7 @@ public class ShiroConfig { | ... | @@ -102,7 +102,7 @@ public class ShiroConfig { |
102 | filterChainDefinitionMap.put("/equip/equipInfo/archivesList", "anon"); | 102 | filterChainDefinitionMap.put("/equip/equipInfo/archivesList", "anon"); |
103 | filterChainDefinitionMap.put("/sys/common/upload/**", "anon"); | 103 | filterChainDefinitionMap.put("/sys/common/upload/**", "anon"); |
104 | filterChainDefinitionMap.put("/v1/system/datestandard/sysStructDict/noPageList", "anon"); | 104 | filterChainDefinitionMap.put("/v1/system/datestandard/sysStructDict/noPageList", "anon"); |
105 | filterChainDefinitionMap.put("/v1/report/reportDisplay/**", "anon"); | 105 | // filterChainDefinitionMap.put("/v1/report/reportDisplay/**", "anon"); |
106 | filterChainDefinitionMap.put("/v1/sys/factoryMonitorData/**", "anon"); | 106 | filterChainDefinitionMap.put("/v1/sys/factoryMonitorData/**", "anon"); |
107 | filterChainDefinitionMap.put("/sys/dict/getDictItems/**", "anon"); | 107 | filterChainDefinitionMap.put("/sys/dict/getDictItems/**", "anon"); |
108 | //性能监控 | 108 | //性能监控 | ... | ... |
-
请 注册 或 登录 后发表评论