Merge remote-tracking branch 'origin/master'
正在显示
8 个修改的文件
包含
166 行增加
和
152 行删除
... | @@ -388,7 +388,7 @@ public class AjhMeetingSendController { | ... | @@ -388,7 +388,7 @@ public class AjhMeetingSendController { |
388 | queryWrapper.orderByDesc("send_status"); | 388 | queryWrapper.orderByDesc("send_status"); |
389 | //Step.2 AutoPoi 导出Excel | 389 | //Step.2 AutoPoi 导出Excel |
390 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); | 390 | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
391 | List<AjhMeetingSend> pageList = ajhMeetingSendService.list(queryWrapper); | 391 | List<AjhMeetingSend> pageList = ajhMeetingSendService.getList(queryWrapper); |
392 | //导出文件名称 | 392 | //导出文件名称 |
393 | mv.addObject(NormalExcelConstants.FILE_NAME, "会议记录列表"); | 393 | mv.addObject(NormalExcelConstants.FILE_NAME, "会议记录列表"); |
394 | mv.addObject(NormalExcelConstants.CLASS, AjhMeetingSend.class); | 394 | mv.addObject(NormalExcelConstants.CLASS, AjhMeetingSend.class); | ... | ... |
... | @@ -33,4 +33,10 @@ public interface AjhMeetingSendMapper extends BaseMapper<AjhMeetingSend> { | ... | @@ -33,4 +33,10 @@ public interface AjhMeetingSendMapper extends BaseMapper<AjhMeetingSend> { |
33 | " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_receipt GROUP BY meets_id ) r ON r.meets_id = id " + | 33 | " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_receipt GROUP BY meets_id ) r ON r.meets_id = id " + |
34 | " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_attend GROUP BY meets_id ) a ON a.meets_id = id ${ew.customSqlSegment}") | 34 | " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_attend GROUP BY meets_id ) a ON a.meets_id = id ${ew.customSqlSegment}") |
35 | List<AjhMeetingSend> getListByWrapper(Page page,@Param("ew") QueryWrapper<AjhMeetingSend> queryWrapper); | 35 | List<AjhMeetingSend> getListByWrapper(Page page,@Param("ew") QueryWrapper<AjhMeetingSend> queryWrapper); |
36 | |||
37 | @Select("SELECT *,IFNULL( r.count, 0 ) AS invite_num,IFNULL( a.count, 0 ) AS partic_num " + | ||
38 | " FROM ajh_meeting_send " + | ||
39 | " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_receipt GROUP BY meets_id ) r ON r.meets_id = id " + | ||
40 | " LEFT JOIN ( SELECT count( id ) count, meets_id FROM ajh_meeting_attend GROUP BY meets_id ) a ON a.meets_id = id ${ew.customSqlSegment}") | ||
41 | List<AjhMeetingSend> getList(@Param("ew") QueryWrapper<AjhMeetingSend> queryWrapper); | ||
36 | } | 42 | } | ... | ... |
... | @@ -9,6 +9,7 @@ import com.skua.modules.ajh.vo.AjhMeetingVO; | ... | @@ -9,6 +9,7 @@ import com.skua.modules.ajh.vo.AjhMeetingVO; |
9 | import org.springframework.scheduling.annotation.Async; | 9 | import org.springframework.scheduling.annotation.Async; |
10 | 10 | ||
11 | import java.util.HashMap; | 11 | import java.util.HashMap; |
12 | import java.util.List; | ||
12 | 13 | ||
13 | /** | 14 | /** |
14 | * 会议记录 | 15 | * 会议记录 |
... | @@ -35,4 +36,6 @@ public interface IAjhMeetingSendService extends IService<AjhMeetingSend> { | ... | @@ -35,4 +36,6 @@ public interface IAjhMeetingSendService extends IService<AjhMeetingSend> { |
35 | public AjhMeetingSend queryByMeetId(String meetId); | 36 | public AjhMeetingSend queryByMeetId(String meetId); |
36 | 37 | ||
37 | IPage<AjhMeetingSend> queryPage(Page<AjhMeetingSend> page, QueryWrapper<AjhMeetingSend> queryWrapper); | 38 | IPage<AjhMeetingSend> queryPage(Page<AjhMeetingSend> page, QueryWrapper<AjhMeetingSend> queryWrapper); |
39 | |||
40 | List<AjhMeetingSend> getList(QueryWrapper<AjhMeetingSend> queryWrapper); | ||
38 | } | 41 | } | ... | ... |
... | @@ -180,4 +180,10 @@ public class AjhMeetingSendServiceImpl extends ServiceImpl<AjhMeetingSendMapper, | ... | @@ -180,4 +180,10 @@ public class AjhMeetingSendServiceImpl extends ServiceImpl<AjhMeetingSendMapper, |
180 | page.setRecords(list); | 180 | page.setRecords(list); |
181 | return page; | 181 | return page; |
182 | } | 182 | } |
183 | |||
184 | @Override | ||
185 | public List<AjhMeetingSend> getList(QueryWrapper<AjhMeetingSend> queryWrapper) { | ||
186 | List<AjhMeetingSend> list = ajhMeetingSendMapper.getList(queryWrapper); | ||
187 | return list; | ||
188 | } | ||
183 | } | 189 | } | ... | ... |
1 | package com.skua.modules.dataAnalysis.controller; | 1 | package com.skua.modules.dataAnalysis.controller; |
2 | 2 | ||
3 | import com.skua.core.api.vo.Result; | 3 | import com.skua.core.api.vo.Result; |
4 | import com.skua.core.context.BaseContextHandler; | ||
5 | import com.skua.modules.common.service.ICommonSqlService; | ||
4 | import com.skua.modules.dataAnalysis.service.IFactoryCenterService; | 6 | import com.skua.modules.dataAnalysis.service.IFactoryCenterService; |
5 | import com.skua.modules.dataAnalysis.vo.StatisticsParam; | 7 | import com.skua.modules.dataAnalysis.vo.StatisticsParam; |
6 | import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringDetailVO; | 8 | import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringDetailVO; |
7 | import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringVO; | 9 | import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringVO; |
10 | import com.skua.modules.dataAnalysis.vo.WaterQualityParams; | ||
8 | import io.swagger.annotations.Api; | 11 | import io.swagger.annotations.Api; |
9 | import io.swagger.annotations.ApiOperation; | 12 | import io.swagger.annotations.ApiOperation; |
10 | import lombok.extern.slf4j.Slf4j; | 13 | import lombok.extern.slf4j.Slf4j; |
... | @@ -13,6 +16,7 @@ import org.springframework.web.bind.annotation.GetMapping; | ... | @@ -13,6 +16,7 @@ import org.springframework.web.bind.annotation.GetMapping; |
13 | import org.springframework.web.bind.annotation.RequestMapping; | 16 | import org.springframework.web.bind.annotation.RequestMapping; |
14 | import org.springframework.web.bind.annotation.RestController; | 17 | import org.springframework.web.bind.annotation.RestController; |
15 | 18 | ||
19 | import java.util.ArrayList; | ||
16 | import java.util.HashMap; | 20 | import java.util.HashMap; |
17 | import java.util.List; | 21 | import java.util.List; |
18 | import java.util.Map; | 22 | import java.util.Map; |
... | @@ -25,12 +29,14 @@ public class FactoryCenterController { | ... | @@ -25,12 +29,14 @@ public class FactoryCenterController { |
25 | 29 | ||
26 | @Autowired | 30 | @Autowired |
27 | private IFactoryCenterService factoryCenterService; | 31 | private IFactoryCenterService factoryCenterService; |
32 | @Autowired | ||
33 | private ICommonSqlService commonSqlService; | ||
28 | 34 | ||
29 | @ApiOperation(value="厂区驾驶舱实时数据查询", notes="厂区驾驶舱实时数据查询") | 35 | @ApiOperation(value="厂区驾驶舱实时数据查询", notes="厂区驾驶舱实时数据查询") |
30 | @GetMapping(value = "/getRealTimeData") | 36 | @GetMapping(value = "/getRealTimeData") |
31 | public Result<List<WaterQualityMonitoringDetailVO>> getRealTimeData(String departId) { | 37 | public Result<List<WaterQualityMonitoringDetailVO>> getRealTimeData(String departId) { |
32 | Result<List<WaterQualityMonitoringDetailVO>> result = new Result<List<WaterQualityMonitoringDetailVO>>(); | 38 | Result<List<WaterQualityMonitoringDetailVO>> result = new Result<List<WaterQualityMonitoringDetailVO>>(); |
33 | List<WaterQualityMonitoringDetailVO> list = factoryCenterService.queryMonitoringData(departId); | 39 | List<WaterQualityMonitoringDetailVO> list = factoryCenterService.queryMonitoringData(departId,null); |
34 | result.setSuccess(true); | 40 | result.setSuccess(true); |
35 | result.setResult(list); | 41 | result.setResult(list); |
36 | return result; | 42 | return result; |
... | @@ -177,4 +183,21 @@ public class FactoryCenterController { | ... | @@ -177,4 +183,21 @@ public class FactoryCenterController { |
177 | result.setResult(map); | 183 | result.setResult(map); |
178 | return result; | 184 | return result; |
179 | } | 185 | } |
186 | |||
187 | @ApiOperation(value="水质监控实时数据查询", notes="水质监控实时数据查询") | ||
188 | @GetMapping(value = "/queryMonitoringData") | ||
189 | public Result<List<WaterQualityMonitoringDetailVO>> queryMonitoringData(WaterQualityParams waterQualityParams) { | ||
190 | Result<List<WaterQualityMonitoringDetailVO>> result = new Result<List<WaterQualityMonitoringDetailVO>>(); | ||
191 | List<WaterQualityMonitoringDetailVO> list = new ArrayList<>(); | ||
192 | String departIds = waterQualityParams.getDepartId(); | ||
193 | if(waterQualityParams.getDepartId()!=null){ | ||
194 | departIds = commonSqlService.getChildFactorys(waterQualityParams.getDepartId()); | ||
195 | }else{ | ||
196 | departIds = commonSqlService.getChildFactorys(BaseContextHandler.getRealDepartId()); | ||
197 | } | ||
198 | list = factoryCenterService.queryMonitoringData(departIds,waterQualityParams.getParmType()); | ||
199 | result.setSuccess(true); | ||
200 | result.setResult(list); | ||
201 | return result; | ||
202 | } | ||
180 | } | 203 | } | ... | ... |
... | @@ -13,7 +13,7 @@ public interface IFactoryCenterService { | ... | @@ -13,7 +13,7 @@ public interface IFactoryCenterService { |
13 | * @param departId | 13 | * @param departId |
14 | * @return | 14 | * @return |
15 | */ | 15 | */ |
16 | List<WaterQualityMonitoringDetailVO> queryMonitoringData(String departId); | 16 | List<WaterQualityMonitoringDetailVO> queryMonitoringData(String departId,String parmType); |
17 | 17 | ||
18 | Map<String, Object> getData(String departId,String month); | 18 | Map<String, Object> getData(String departId,String month); |
19 | 19 | ... | ... |
... | @@ -45,19 +45,32 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { | ... | @@ -45,19 +45,32 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { |
45 | private static DecimalFormat df = new DecimalFormat("#.##"); | 45 | private static DecimalFormat df = new DecimalFormat("#.##"); |
46 | 46 | ||
47 | @Override | 47 | @Override |
48 | public List<WaterQualityMonitoringDetailVO> queryMonitoringData(String departId) { | 48 | public List<WaterQualityMonitoringDetailVO> queryMonitoringData(String departId,String parmType) { |
49 | List<WaterQualityMonitoringDetailVO> list = new ArrayList<>(); | 49 | List<WaterQualityMonitoringDetailVO> list = new ArrayList<>(); |
50 | Map<String, Object> monitorTagMap = new HashMap<String,Object>(); | 50 | Map<String, Object> monitorTagMap = new HashMap<String,Object>(); |
51 | QueryWrapper<SysMonitorMetricInfo> qw = new QueryWrapper<>(); | 51 | QueryWrapper<SysMonitorMetricInfo> qw = new QueryWrapper<>(); |
52 | qw.in("metric_uid_tag", "JSTP,JSTN,JSPH,JSNH3N,JSCOD,CSTP,CSTN,CSPH,CSNH3N,CSCOD,CSLL,JSLL,CSLJLL,JSLJLL,CSSS,JSSS".split(",")); //CSLL 出水瞬时流量() CSLJLL 出水流量累计JSLL(JSLJLL) JSSS 进水浊度 CSSS 出水浊度 | 52 | //CSLL 出水瞬时流量() CSLJLL 出水流量累计JSLL(JSLJLL) JSSS 进水浊度 CSSS 出水浊度 |
53 | qw.eq("depart_id", departId); | 53 | String inTags = "JSTP,JSTN,JSPH,JSNH3N,JSCOD,JSLL,JSLJLL,JSSS"; |
54 | String outTags = "CSTP,CSTN,CSPH,CSNH3N,CSCOD,CSLL,CSLJLL,CSSS"; | ||
55 | String tags = inTags+","+outTags; | ||
56 | if(parmType != null){ | ||
57 | if("in".equals(parmType)){ | ||
58 | tags = inTags; | ||
59 | }else if("out".equals(parmType)){ | ||
60 | tags = outTags; | ||
61 | }else{ | ||
62 | tags = inTags+","+outTags; | ||
63 | } | ||
64 | } | ||
65 | qw.in("metric_uid_tag", tags.split(",")); | ||
66 | qw.in("depart_id", departId.split(",")); | ||
54 | qw.groupBy("depart_id","metric_uid_tag"); | 67 | qw.groupBy("depart_id","metric_uid_tag"); |
55 | List<SysMonitorMetricInfo> monitorList = sysMonitorMetricInfoService.list(qw); | 68 | List<SysMonitorMetricInfo> monitorList = sysMonitorMetricInfoService.list(qw); |
56 | //获取实时指标 | 69 | //获取实时指标 |
57 | String fields = ""; | 70 | String fields = ""; |
58 | for(SysMonitorMetricInfo monitorInfo : monitorList) { | 71 | for(SysMonitorMetricInfo monitorInfo : monitorList) { |
59 | fields = fields+","+monitorInfo.getId(); | 72 | fields = fields+","+monitorInfo.getId(); |
60 | monitorTagMap.put(monitorInfo.getMetricUidTag(), monitorInfo.getId()); | 73 | monitorTagMap.put(monitorInfo.getMetricUidTag()+"-"+monitorInfo.getDepartId(), monitorInfo.getId()); |
61 | } | 74 | } |
62 | if(!StringUtils.isEmpty(fields)) { | 75 | if(!StringUtils.isEmpty(fields)) { |
63 | fields = fields.substring(1); | 76 | fields = fields.substring(1); |
... | @@ -68,10 +81,47 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { | ... | @@ -68,10 +81,47 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { |
68 | if(pgDataList!=null&&pgDataList.size()>0) { | 81 | if(pgDataList!=null&&pgDataList.size()>0) { |
69 | dataMap = pgDataList.get(0); | 82 | dataMap = pgDataList.get(0); |
70 | } | 83 | } |
84 | String[] departArray = departId.split(","); | ||
85 | int sort = 0;//序号 | ||
86 | for(String depart : departArray) { | ||
87 | if(parmType != null){ | ||
88 | if("in".equals(parmType)){ | ||
89 | sort++; | ||
90 | list = putInWaterDataInList(sort,list,dataMap,monitorTagMap,depart); | ||
91 | }else if("out".equals(parmType)){ | ||
92 | sort++; | ||
93 | list = putOutWaterDataInList(sort,list,dataMap,monitorTagMap,depart); | ||
94 | }else{ | ||
95 | sort++; | ||
96 | list = putInWaterDataInList(sort,list,dataMap,monitorTagMap,depart); | ||
97 | sort++; | ||
98 | list = putOutWaterDataInList(sort,list,dataMap,monitorTagMap,depart); | ||
99 | } | ||
100 | }else{ | ||
101 | sort++; | ||
102 | list = putInWaterDataInList(sort,list,dataMap,monitorTagMap,depart); | ||
103 | sort++; | ||
104 | list = putOutWaterDataInList(sort,list,dataMap,monitorTagMap,depart); | ||
105 | } | ||
106 | } | ||
107 | return list; | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * 进水数据 | ||
112 | * @param sort | ||
113 | * @param list | ||
114 | * @param dataMap | ||
115 | * @param monitorTagMap | ||
116 | * @param depart | ||
117 | * @return | ||
118 | */ | ||
119 | private List<WaterQualityMonitoringDetailVO> putInWaterDataInList(int sort, List<WaterQualityMonitoringDetailVO> list, | ||
120 | Map<String, Object> dataMap, Map<String, Object> monitorTagMap, String depart) { | ||
71 | WaterQualityMonitoringDetailVO inVO = new WaterQualityMonitoringDetailVO(); | 121 | WaterQualityMonitoringDetailVO inVO = new WaterQualityMonitoringDetailVO(); |
72 | inVO.setParmType("in"); | 122 | inVO.setParmType("in"); |
73 | inVO.setNum(1); | 123 | inVO.setNum(sort); |
74 | inVO.setDepartId(departId); | 124 | inVO.setDepartId(depart); |
75 | inVO.setCodUpper("150"); | 125 | inVO.setCodUpper("150"); |
76 | inVO.setCodLower("0"); | 126 | inVO.setCodLower("0"); |
77 | inVO.setNh3Upper("35"); | 127 | inVO.setNh3Upper("35"); |
... | @@ -82,84 +132,33 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { | ... | @@ -82,84 +132,33 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { |
82 | inVO.setTnLower("0"); | 132 | inVO.setTnLower("0"); |
83 | inVO.setPhUpper("14"); | 133 | inVO.setPhUpper("14"); |
84 | inVO.setPhLower("0"); | 134 | inVO.setPhLower("0"); |
85 | if(monitorTagMap.get("JSCOD")!=null){ | 135 | inVO.setCodVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"JSCOD")); |
86 | if(dataMap.get(monitorTagMap.get("JSCOD").toString())!=null){ | 136 | inVO.setNh3Val(getValueFromDataMap(dataMap,monitorTagMap,depart,"JSNH3N")); |
87 | inVO.setCodVal(dataMap.get(monitorTagMap.get("JSCOD").toString()).toString()); | 137 | inVO.setTpVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"JSTP")); |
88 | }else{ | 138 | inVO.setTnVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"JSTN")); |
89 | inVO.setCodVal("0"); | 139 | inVO.setPhVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"JSPH")); |
90 | } | 140 | inVO.setSsllVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"JSLL")); |
91 | }else{ | 141 | inVO.setLjllVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"JSLJLL")); |
92 | inVO.setCodVal("0"); | 142 | inVO.setZdVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"JSSS")); |
93 | } | 143 | list.add(inVO); |
94 | if(monitorTagMap.get("JSNH3N")!=null){ | 144 | return list; |
95 | if(dataMap.get(monitorTagMap.get("JSNH3N").toString())!=null){ | ||
96 | inVO.setNh3Val(dataMap.get(monitorTagMap.get("JSNH3N").toString()).toString()); | ||
97 | }else{ | ||
98 | inVO.setNh3Val("0"); | ||
99 | } | ||
100 | }else{ | ||
101 | inVO.setNh3Val("0"); | ||
102 | } | ||
103 | if(monitorTagMap.get("JSTP")!=null){ | ||
104 | if(dataMap.get(monitorTagMap.get("JSTP").toString())!=null){ | ||
105 | inVO.setTpVal(dataMap.get(monitorTagMap.get("JSTP").toString()).toString()); | ||
106 | }else{ | ||
107 | inVO.setTpVal("0"); | ||
108 | } | ||
109 | }else{ | ||
110 | inVO.setTpVal("0"); | ||
111 | } | ||
112 | if(monitorTagMap.get("JSTN")!=null){ | ||
113 | if(dataMap.get(monitorTagMap.get("JSTN").toString())!=null){ | ||
114 | inVO.setTnVal(dataMap.get(monitorTagMap.get("JSTN").toString()).toString()); | ||
115 | }else{ | ||
116 | inVO.setTnVal("0"); | ||
117 | } | ||
118 | }else{ | ||
119 | inVO.setTnVal("0"); | ||
120 | } | ||
121 | if(monitorTagMap.get("JSPH")!=null){ | ||
122 | if(dataMap.get(monitorTagMap.get("JSPH").toString())!=null){ | ||
123 | inVO.setPhVal(dataMap.get(monitorTagMap.get("JSPH").toString()).toString()); | ||
124 | }else{ | ||
125 | inVO.setPhVal("0"); | ||
126 | } | ||
127 | }else{ | ||
128 | inVO.setPhVal("0"); | ||
129 | } | 145 | } |
130 | 146 | ||
131 | if(monitorTagMap.get("JSLL")!=null){ | 147 | /** |
132 | if(dataMap.get(monitorTagMap.get("JSLL").toString())!=null){ | 148 | * 出水数据 |
133 | inVO.setSsllVal(dataMap.get(monitorTagMap.get("JSLL").toString()).toString()); | 149 | * @param sort |
134 | }else{ | 150 | * @param list |
135 | inVO.setSsllVal("0"); | 151 | * @param dataMap |
136 | } | 152 | * @param monitorTagMap |
137 | }else{ | 153 | * @param depart |
138 | inVO.setSsllVal("0"); | 154 | * @return |
139 | } | 155 | */ |
140 | if(monitorTagMap.get("JSLJLL")!=null){ | 156 | private List<WaterQualityMonitoringDetailVO> putOutWaterDataInList(int sort, List<WaterQualityMonitoringDetailVO> list, |
141 | if(dataMap.get(monitorTagMap.get("JSLJLL").toString())!=null){ | 157 | Map<String, Object> dataMap, Map<String, Object> monitorTagMap, String depart) { |
142 | inVO.setLjllVal(dataMap.get(monitorTagMap.get("JSLJLL").toString()).toString()); | ||
143 | }else{ | ||
144 | inVO.setLjllVal("0"); | ||
145 | } | ||
146 | }else{ | ||
147 | inVO.setLjllVal("0"); | ||
148 | } | ||
149 | if(monitorTagMap.get("JSSS")!=null){ | ||
150 | if(dataMap.get(monitorTagMap.get("JSSS").toString())!=null){ | ||
151 | inVO.setZdVal(dataMap.get(monitorTagMap.get("JSSS").toString()).toString()); | ||
152 | }else{ | ||
153 | inVO.setZdVal("0"); | ||
154 | } | ||
155 | }else{ | ||
156 | inVO.setZdVal("0"); | ||
157 | } | ||
158 | list.add(inVO); | ||
159 | WaterQualityMonitoringDetailVO outVO = new WaterQualityMonitoringDetailVO(); | 158 | WaterQualityMonitoringDetailVO outVO = new WaterQualityMonitoringDetailVO(); |
160 | outVO.setParmType("out"); | 159 | outVO.setParmType("out"); |
161 | outVO.setNum(2); | 160 | outVO.setNum(sort++); |
162 | outVO.setDepartId(departId); | 161 | outVO.setDepartId(depart); |
163 | outVO.setCodUpper("30"); | 162 | outVO.setCodUpper("30"); |
164 | outVO.setCodLower("0"); | 163 | outVO.setCodLower("0"); |
165 | outVO.setNh3Upper("1.5"); | 164 | outVO.setNh3Upper("1.5"); |
... | @@ -170,81 +169,36 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { | ... | @@ -170,81 +169,36 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { |
170 | outVO.setTnLower("0"); | 169 | outVO.setTnLower("0"); |
171 | outVO.setPhUpper("9"); | 170 | outVO.setPhUpper("9"); |
172 | outVO.setPhLower("6"); | 171 | outVO.setPhLower("6"); |
173 | if(monitorTagMap.get("CSCOD")!=null){ | 172 | outVO.setCodVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"CSCOD")); |
174 | if(dataMap.get(monitorTagMap.get("CSCOD").toString())!=null){ | 173 | outVO.setNh3Val(getValueFromDataMap(dataMap,monitorTagMap,depart,"CSNH3N")); |
175 | outVO.setCodVal(dataMap.get(monitorTagMap.get("CSCOD").toString()).toString()); | 174 | outVO.setTpVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"CSTP")); |
176 | }else{ | 175 | outVO.setTnVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"CSTN")); |
177 | outVO.setCodVal("0"); | 176 | outVO.setPhVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"CSPH")); |
178 | } | 177 | outVO.setSsllVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"CSLL")); |
179 | }else{ | 178 | outVO.setLjllVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"CSLJLL")); |
180 | outVO.setCodVal("0"); | 179 | outVO.setZdVal(getValueFromDataMap(dataMap,monitorTagMap,depart,"CSSS")); |
181 | } | 180 | list.add(outVO); |
182 | if(monitorTagMap.get("CSNH3N")!=null){ | 181 | return list; |
183 | if(dataMap.get(monitorTagMap.get("CSNH3N").toString())!=null){ | ||
184 | outVO.setNh3Val(dataMap.get(monitorTagMap.get("CSNH3N").toString()).toString()); | ||
185 | }else{ | ||
186 | outVO.setNh3Val("0"); | ||
187 | } | ||
188 | }else{ | ||
189 | outVO.setNh3Val("0"); | ||
190 | } | ||
191 | if(monitorTagMap.get("CSTP")!=null){ | ||
192 | if(dataMap.get(monitorTagMap.get("CSTP").toString())!=null){ | ||
193 | outVO.setTpVal(dataMap.get(monitorTagMap.get("CSTP").toString()).toString()); | ||
194 | }else{ | ||
195 | outVO.setTpVal("0"); | ||
196 | } | ||
197 | }else{ | ||
198 | outVO.setTpVal("0"); | ||
199 | } | ||
200 | if(monitorTagMap.get("CSTN")!=null){ | ||
201 | if(dataMap.get(monitorTagMap.get("CSTN").toString())!=null){ | ||
202 | outVO.setTnVal(dataMap.get(monitorTagMap.get("CSTN").toString()).toString()); | ||
203 | }else{ | ||
204 | outVO.setTnVal("0"); | ||
205 | } | ||
206 | }else{ | ||
207 | outVO.setTnVal("0"); | ||
208 | } | ||
209 | if(monitorTagMap.get("CSPH")!=null){ | ||
210 | if(dataMap.get(monitorTagMap.get("CSPH").toString())!=null){ | ||
211 | outVO.setPhVal(dataMap.get(monitorTagMap.get("CSPH").toString()).toString()); | ||
212 | }else{ | ||
213 | outVO.setPhVal("0"); | ||
214 | } | ||
215 | }else{ | ||
216 | outVO.setPhVal("0"); | ||
217 | } | 182 | } |
218 | 183 | ||
219 | if(monitorTagMap.get("CSLL")!=null){ | 184 | /** |
220 | if(dataMap.get(monitorTagMap.get("CSLL").toString())!=null){ | 185 | * 获取数据值 |
221 | inVO.setSsllVal(dataMap.get(monitorTagMap.get("CSLL").toString()).toString()); | 186 | * @param dataMap |
222 | }else{ | 187 | * @param monitorTagMap |
223 | inVO.setSsllVal("0"); | 188 | * @param depart |
224 | } | 189 | * @return |
225 | }else{ | 190 | */ |
226 | inVO.setSsllVal("0"); | 191 | private String getValueFromDataMap(Map<String, Object> dataMap, Map<String, Object> monitorTagMap, |
227 | } | 192 | String depart, String tag) { |
228 | if(monitorTagMap.get("CSLJLL")!=null){ | 193 | if(monitorTagMap.get(tag+"-"+depart)!=null){ |
229 | if(dataMap.get(monitorTagMap.get("CSLJLL").toString())!=null){ | 194 | if(dataMap.get(monitorTagMap.get(tag+"-"+depart).toString())!=null){ |
230 | inVO.setLjllVal(dataMap.get(monitorTagMap.get("CSLJLL").toString()).toString()); | 195 | return dataMap.get(monitorTagMap.get(tag+"-"+depart).toString()).toString(); |
231 | }else{ | ||
232 | inVO.setLjllVal("0"); | ||
233 | } | ||
234 | }else{ | ||
235 | inVO.setLjllVal("0"); | ||
236 | } | ||
237 | if(monitorTagMap.get("CSSS")!=null){ | ||
238 | if(dataMap.get(monitorTagMap.get("CSSS").toString())!=null){ | ||
239 | inVO.setZdVal(dataMap.get(monitorTagMap.get("CSSS").toString()).toString()); | ||
240 | }else{ | 196 | }else{ |
241 | inVO.setZdVal("0"); | 197 | return "0"; |
242 | } | 198 | } |
243 | }else{ | 199 | }else{ |
244 | inVO.setZdVal("0"); | 200 | return "0"; |
245 | } | 201 | } |
246 | list.add(outVO); | ||
247 | return list; | ||
248 | } | 202 | } |
249 | 203 | ||
250 | @Override | 204 | @Override | ... | ... |
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/vo/WaterQualityParams.java
0 → 100644
1 | package com.skua.modules.dataAnalysis.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | /** | ||
8 | * 水质监控参数对象 | ||
9 | */ | ||
10 | @Data | ||
11 | @ApiModel(value="水质监控参数对象", description="水质监控参数对象") | ||
12 | public class WaterQualityParams { | ||
13 | |||
14 | //所属机构 | ||
15 | @ApiModelProperty(value = "所属机构") | ||
16 | private String departId; | ||
17 | |||
18 | //进出水类型 | ||
19 | @ApiModelProperty(value = "进出水类型") | ||
20 | private String parmType; | ||
21 | |||
22 | } |
-
请 注册 或 登录 后发表评论