kangwei: 水厂运营考核专题:吨水药费详情接口(药剂目标完成情况)
正在显示
4 个修改的文件
包含
88 行增加
和
34 行删除
... | @@ -26,7 +26,7 @@ public interface ReportConstant { | ... | @@ -26,7 +26,7 @@ public interface ReportConstant { |
26 | //药剂字段 | 26 | //药剂字段 |
27 | 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," + |
28 | "YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2"; | 28 | "YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2"; |
29 | 29 | public static final String fieldYj_2 = "PACYT,PACGT,NaClO,SCLPAMF,PAMRJ,PFS,FHTY,RYXNJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2"; | |
30 | //水量字段 | 30 | //水量字段 |
31 | public static final String fieldClsl = "CSL,JSL"; | 31 | public static final String fieldClsl = "CSL,JSL"; |
32 | public static final String field_CSL= "CSL"; | 32 | public static final String field_CSL= "CSL"; | ... | ... |
... | @@ -319,8 +319,8 @@ public class ReportViewUtil { | ... | @@ -319,8 +319,8 @@ public class ReportViewUtil { |
319 | public static ReportItemVO getSumValueByTBHB(String reportId, String fields, String departIds , String startTime , String endTime){ | 319 | public static ReportItemVO getSumValueByTBHB(String reportId, String fields, String departIds , String startTime , String endTime){ |
320 | ReportItemVO reportItemVO = null; | 320 | ReportItemVO reportItemVO = null; |
321 | String dataViewName3a24_value = ReportViewUtil.buildViewLike(reportId,fields, departIds, startTime,endTime); | 321 | String dataViewName3a24_value = ReportViewUtil.buildViewLike(reportId,fields, departIds, startTime,endTime); |
322 | String dataViewName3a24_valueHB = ReportViewUtil.buildViewLike(reportId,fields, departIds, DateUtils.getHbDate(startTime),DateUtils.getHbDate(startTime)); | 322 | String dataViewName3a24_valueHB = ReportViewUtil.buildViewLike(reportId,fields, departIds, DateUtils.getHbDate(startTime),DateUtils.getHbDate(endTime)); |
323 | String dataViewName3a24_valueTB = ReportViewUtil.buildViewLike(reportId,fields, departIds, DateUtils.getTbDate(startTime),DateUtils.getTbDate(startTime)); | 323 | String dataViewName3a24_valueTB = ReportViewUtil.buildViewLike(reportId,fields, departIds, DateUtils.getTbDate(startTime),DateUtils.getTbDate(endTime)); |
324 | 324 | ||
325 | String fieldsSql = ""; | 325 | String fieldsSql = ""; |
326 | if(StringUtils.isNotEmpty(fields)) { | 326 | if(StringUtils.isNotEmpty(fields)) { | ... | ... |
... | @@ -3,6 +3,8 @@ package com.skua.modules.dataAnalysis.service.impl; | ... | @@ -3,6 +3,8 @@ 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.common.report.vo.ReportItemVO; | ||
7 | import com.skua.core.context.SpringContextUtils; | ||
6 | import com.skua.core.util.ConvertUtils; | 8 | import com.skua.core.util.ConvertUtils; |
7 | import com.skua.core.util.DoubleOperaUtils; | 9 | import com.skua.core.util.DoubleOperaUtils; |
8 | import com.skua.modules.dataAnalysis.mapper.FactoryOperateCenterMapper; | 10 | import com.skua.modules.dataAnalysis.mapper.FactoryOperateCenterMapper; |
... | @@ -11,9 +13,11 @@ import com.skua.modules.dataAnalysis.vo.*; | ... | @@ -11,9 +13,11 @@ import com.skua.modules.dataAnalysis.vo.*; |
11 | import com.skua.modules.report.entity.ReportTargetConfig; | 13 | import com.skua.modules.report.entity.ReportTargetConfig; |
12 | import com.skua.modules.report.mapper.ReportTargetConfigMapper; | 14 | import com.skua.modules.report.mapper.ReportTargetConfigMapper; |
13 | import com.skua.tool.util.DateUtils; | 15 | import com.skua.tool.util.DateUtils; |
16 | import com.skua.tool.util.JSUtils; | ||
14 | import io.swagger.annotations.ApiModelProperty; | 17 | import io.swagger.annotations.ApiModelProperty; |
15 | import org.jeecgframework.poi.excel.annotation.Excel; | 18 | import org.jeecgframework.poi.excel.annotation.Excel; |
16 | import org.springframework.beans.factory.annotation.Autowired; | 19 | import org.springframework.beans.factory.annotation.Autowired; |
20 | import org.springframework.jdbc.core.JdbcTemplate; | ||
17 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
18 | import javax.annotation.Resource; | 22 | import javax.annotation.Resource; |
19 | import java.text.DecimalFormat; | 23 | import java.text.DecimalFormat; |
... | @@ -222,8 +226,10 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer | ... | @@ -222,8 +226,10 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer |
222 | 226 | ||
223 | //吨水药费:详情 | 227 | //吨水药费:详情 |
224 | public List<YJMonthDataVO> dsyfDetail(String departId, String month){ | 228 | public List<YJMonthDataVO> dsyfDetail(String departId, String month){ |
225 | String tbMonth = DateUtils.getTbMonth(month); | 229 | //String tbMonth = DateUtils.getTbMonth(month); |
226 | String hbMonth = DateUtils.getHbMonth(month); | 230 | // String hbMonth = DateUtils.getHbMonth(month); |
231 | String startTime = month+"-01" ; | ||
232 | String endTime = month+"-31"; | ||
227 | String year = month.substring(0,4); | 233 | String year = month.substring(0,4); |
228 | LambdaQueryWrapper<ReportTargetConfig> queryWrapper = new LambdaQueryWrapper<ReportTargetConfig>(); | 234 | LambdaQueryWrapper<ReportTargetConfig> queryWrapper = new LambdaQueryWrapper<ReportTargetConfig>(); |
229 | queryWrapper.eq(ReportTargetConfig::getDepartId,departId); | 235 | queryWrapper.eq(ReportTargetConfig::getDepartId,departId); |
... | @@ -234,57 +240,83 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer | ... | @@ -234,57 +240,83 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer |
234 | target = yearTargetList.get(0); | 240 | target = yearTargetList.get(0); |
235 | } | 241 | } |
236 | if(target == null ) target = new ReportTargetConfig(); | 242 | if(target == null ) target = new ReportTargetConfig(); |
237 | |||
238 | String field3a24 = ReportConstant.fieldDl+","+ ReportConstant.fieldYj; | ||
239 | String dataViewName3a24Month = ReportViewUtil.buildViewLike(ReportConstant.view3a24,field3a24, departId, month); | ||
240 | String dataViewName3a24MonthTb = ReportViewUtil.buildViewLike(ReportConstant.view3a24,field3a24, departId, tbMonth); | ||
241 | String dataViewName3a24MonthHb = ReportViewUtil.buildViewLike(ReportConstant.view3a24,field3a24, departId, hbMonth); | ||
242 | |||
243 | List<YJMonthDataVO> monthDataVOList = new ArrayList<>(); | 243 | List<YJMonthDataVO> monthDataVOList = new ArrayList<>(); |
244 | String dataViewName2119Month = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, departId, month); | 244 | /* String dataViewName2119Month = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, departId, month); |
245 | String dataViewName2119MonthTb = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, departId, tbMonth); | 245 | String dataViewName2119MonthTb = ReportViewUtil.buildViewLike(ReportConstant.view2119, ReportConstant.fieldClsl, departId, tbMonth); |
246 | String dataViewName2119MonthHb = ReportViewUtil.buildViewLike(ReportConstant.view2119,ReportConstant.fieldClsl, departId, hbMonth); | 246 | String dataViewName2119MonthHb = ReportViewUtil.buildViewLike(ReportConstant.view2119,ReportConstant.fieldClsl, departId, hbMonth);*/ |
247 | Map<String,Object> monthMap = factoryOperateCenterMapper.getSdyData(dataViewName2119Month, dataViewName3a24Month, departId, month); | 247 | /* Map<String,Object> monthMap = factoryOperateCenterMapper.getSdyData(dataViewName2119Month, dataViewName3a24Month, departId, month); |
248 | Map<String,Object> monthHbMap = factoryOperateCenterMapper.getSdyData(dataViewName2119MonthHb, dataViewName3a24MonthHb, departId, hbMonth); | 248 | Map<String,Object> monthHbMap = factoryOperateCenterMapper.getSdyData(dataViewName2119MonthHb, dataViewName3a24MonthHb, departId, hbMonth); |
249 | Map<String,Object> monthTbMap = factoryOperateCenterMapper.getSdyData(dataViewName2119MonthTb, dataViewName3a24MonthTb, departId, tbMonth); | 249 | Map<String,Object> monthTbMap = factoryOperateCenterMapper.getSdyData(dataViewName2119MonthTb, dataViewName3a24MonthTb, departId, tbMonth);*/ |
250 | |||
251 | //ReportItemVO csl_repotItem = ReportViewUtil.getSumValueByTBHB(ReportConstant.view2119, ReportConstant.fieldClsl, departId, startTime, endTime);//出水量 | ||
252 | |||
253 | String dataViewName3a24Month = ReportViewUtil.buildViewLike(ReportConstant.view3a24,ReportConstant.fieldYj_2, departId, startTime, endTime); | ||
254 | String dataViewName3a24MonthHb = ReportViewUtil.buildViewLike(ReportConstant.view3a24,ReportConstant.fieldYj_2, departId, DateUtils.getHbDate(startTime),DateUtils.getHbDate(endTime)); | ||
255 | String dataViewName3a24MonthTb = ReportViewUtil.buildViewLike(ReportConstant.view3a24,ReportConstant.fieldYj_2, departId, DateUtils.getTbDate(startTime),DateUtils.getTbDate(endTime)); | ||
256 | String fieldSql = "";// "select sum(IFNULL(aaa.,0) ) from " + dataViewName3a24Month +" aaa"; | ||
257 | String[] field3a24List = ReportConstant.fieldYj_2.split(","); | ||
258 | for(String field : field3a24List){ | ||
259 | if(fieldSql.length() > 0 ) fieldSql+=","; | ||
260 | fieldSql += " sum(IFNULL(aaa."+field+",0) ) "+field; | ||
261 | } | ||
250 | 262 | ||
251 | monthDataVOList.add( new YJMonthDataVO("PAC(液)","PACYT" ,ConvertUtils.getString(target.getTargetPacyt(),"0"),ConvertUtils.getString(monthMap.get("PACYT"),"0"), | 263 | JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); |
264 | Map<String,Object> monthMap = masterDB.queryForMap("select "+ fieldSql+ " from " + dataViewName3a24Month +" aaa " ); | ||
265 | Map<String,Object> monthHbMap = masterDB.queryForMap("select "+ fieldSql+ " from " + dataViewName3a24MonthHb +" aaa " ); | ||
266 | Map<String,Object> monthTbMap = masterDB.queryForMap("select "+ fieldSql+ " from " + dataViewName3a24MonthTb +" aaa " ); | ||
267 | |||
268 | |||
269 | monthDataVOList.add( new YJMonthDataVO("PAC(液)","PACYT" ,"KG",ConvertUtils.getString(target.getTargetPacyt(),"0"),ConvertUtils.getString(monthMap.get("PACYT"),"0"), | ||
252 | ConvertUtils.getString(monthHbMap.get("PACYT"),"0") ,ConvertUtils.getString(monthTbMap.get("PACYT") ,"0") ) ); | 270 | ConvertUtils.getString(monthHbMap.get("PACYT"),"0") ,ConvertUtils.getString(monthTbMap.get("PACYT") ,"0") ) ); |
253 | monthDataVOList.add( new YJMonthDataVO("PAC(固)","PACGT" ,ConvertUtils.getString(target.getTargetPacgt(),"0"),ConvertUtils.getString(monthMap.get("PACGT"),"0"), | 271 | monthDataVOList.add( new YJMonthDataVO("PAC(固)","PACGT" ,"KG",ConvertUtils.getString(target.getTargetPacgt(),"0"),ConvertUtils.getString(monthMap.get("PACGT"),"0"), |
254 | ConvertUtils.getString(monthHbMap.get("PACGT"),"0") ,ConvertUtils.getString(monthTbMap.get("PACGT") ,"0") ) ); | 272 | ConvertUtils.getString(monthHbMap.get("PACGT"),"0") ,ConvertUtils.getString(monthTbMap.get("PACGT") ,"0") ) ); |
255 | monthDataVOList.add( new YJMonthDataVO("NaClO","NACLO" ,ConvertUtils.getString(target.getTargetNaclo(),"0"),ConvertUtils.getString(monthMap.get("NACLO"),"0"), | 273 | monthDataVOList.add( new YJMonthDataVO("NaClO","NACLO" ,"KG",ConvertUtils.getString(target.getTargetNaclo(),"0"),ConvertUtils.getString(monthMap.get("NACLO"),"0"), |
256 | ConvertUtils.getString(monthHbMap.get("NACLO"),"0") ,ConvertUtils.getString(monthTbMap.get("NACLO") ,"0") ) ); | 274 | ConvertUtils.getString(monthHbMap.get("NACLO"),"0") ,ConvertUtils.getString(monthTbMap.get("NACLO") ,"0") ) ); |
257 | monthDataVOList.add( new YJMonthDataVO("水处理PAM(-)","SCLPAMF" ,ConvertUtils.getString(target.getTargetSclpamf(),"0"),ConvertUtils.getString(monthMap.get("SCLPAMF"),"0"), | 275 | monthDataVOList.add( new YJMonthDataVO("水处理PAM(-)","SCLPAMF" ,"KG",ConvertUtils.getString(target.getTargetSclpamf(),"0"),ConvertUtils.getString(monthMap.get("SCLPAMF"),"0"), |
258 | ConvertUtils.getString(monthHbMap.get("SCLPAMF"),"0") ,ConvertUtils.getString(monthTbMap.get("SCLPAMF") ,"0") ) ); | 276 | ConvertUtils.getString(monthHbMap.get("SCLPAMF"),"0") ,ConvertUtils.getString(monthTbMap.get("SCLPAMF") ,"0") ) ); |
259 | monthDataVOList.add( new YJMonthDataVO("污脱PAM乳剂","PAMRJ" ,ConvertUtils.getString(target.getTargetPamrj(),"0"),ConvertUtils.getString(monthMap.get("PAMRJ"),"0"), | 277 | |
278 | monthDataVOList.add( new YJMonthDataVO("污脱PAM乳剂","PAMRJ","KG" ,ConvertUtils.getString(target.getTargetPamrj(),"0"),ConvertUtils.getString(monthMap.get("PAMRJ"),"0"), | ||
260 | ConvertUtils.getString(monthHbMap.get("PAMRJ"),"0") ,ConvertUtils.getString(monthTbMap.get("PAMRJ") ,"0") ) ); | 279 | ConvertUtils.getString(monthHbMap.get("PAMRJ"),"0") ,ConvertUtils.getString(monthTbMap.get("PAMRJ") ,"0") ) ); |
261 | monthDataVOList.add( new YJMonthDataVO("PFS","PFS" ,ConvertUtils.getString(target.getTargetPfs(),"0"),ConvertUtils.getString(monthMap.get("PFS"),"0"), | 280 | monthDataVOList.add( new YJMonthDataVO("PFS","PFS" ,"KG",ConvertUtils.getString(target.getTargetPfs(),"0"),ConvertUtils.getString(monthMap.get("PFS"),"0"), |
262 | ConvertUtils.getString(monthHbMap.get("PFS"),"0") ,ConvertUtils.getString(monthTbMap.get("PFS") ,"0") ) ); | 281 | ConvertUtils.getString(monthHbMap.get("PFS"),"0") ,ConvertUtils.getString(monthTbMap.get("PFS") ,"0") ) ); |
263 | monthDataVOList.add( new YJMonthDataVO("复合铁盐","FHTY" ,ConvertUtils.getString(target.getTargetFhty(),"0"),ConvertUtils.getString(monthMap.get("FHTY"),"0"), | 282 | monthDataVOList.add( new YJMonthDataVO("复合铁盐","FHTY","KG" ,ConvertUtils.getString(target.getTargetFhty(),"0"),ConvertUtils.getString(monthMap.get("FHTY"),"0"), |
264 | ConvertUtils.getString(monthHbMap.get("FHTY"),"0") ,ConvertUtils.getString(monthTbMap.get("FHTY") ,"0") ) ); | 283 | ConvertUtils.getString(monthHbMap.get("FHTY"),"0") ,ConvertUtils.getString(monthTbMap.get("FHTY") ,"0") ) ); |
265 | monthDataVOList.add( new YJMonthDataVO("乳液絮凝剂","RYXNJ" ,ConvertUtils.getString(target.getTargetRyxnj(),"0"),ConvertUtils.getString(monthMap.get("RYXNJ"),"0"), | 284 | monthDataVOList.add( new YJMonthDataVO("乳液絮凝剂","RYXNJ" ,"KG",ConvertUtils.getString(target.getTargetRyxnj(),"0"),ConvertUtils.getString(monthMap.get("RYXNJ"),"0"), |
266 | ConvertUtils.getString(monthHbMap.get("RYXNJ"),"0") ,ConvertUtils.getString(monthTbMap.get("RYXNJ") ,"0") ) ); | 285 | ConvertUtils.getString(monthHbMap.get("RYXNJ"),"0") ,ConvertUtils.getString(monthTbMap.get("RYXNJ") ,"0") ) ); |
267 | monthDataVOList.add( new YJMonthDataVO("益维磷","YWL" ,ConvertUtils.getString(target.getTargetYwl(),"0"),ConvertUtils.getString(monthMap.get("YWL"),"0"), | 286 | monthDataVOList.add( new YJMonthDataVO("益维磷","YWL" ,"KG",ConvertUtils.getString(target.getTargetYwl(),"0"),ConvertUtils.getString(monthMap.get("YWL"),"0"), |
268 | ConvertUtils.getString(monthHbMap.get("YWL"),"0") ,ConvertUtils.getString(monthTbMap.get("YWL") ,"0") ) ); | 287 | ConvertUtils.getString(monthHbMap.get("YWL"),"0") ,ConvertUtils.getString(monthTbMap.get("YWL") ,"0") ) ); |
269 | monthDataVOList.add( new YJMonthDataVO("高效除磷剂","GXCLJ" ,ConvertUtils.getString(target.getTargetGxclj(),"0"),ConvertUtils.getString(monthMap.get("GXCLJ"),"0"), | 288 | monthDataVOList.add( new YJMonthDataVO("高效除磷剂","GXCLJ" ,"KG",ConvertUtils.getString(target.getTargetGxclj(),"0"),ConvertUtils.getString(monthMap.get("GXCLJ"),"0"), |
270 | ConvertUtils.getString(monthHbMap.get("GXCLJ"),"0") ,ConvertUtils.getString(monthTbMap.get("GXCLJ") ,"0") ) ); | 289 | ConvertUtils.getString(monthHbMap.get("GXCLJ"),"0") ,ConvertUtils.getString(monthTbMap.get("GXCLJ") ,"0") ) ); |
271 | monthDataVOList.add( new YJMonthDataVO("CH3COONA","CH3COONA" ,ConvertUtils.getString(target.getTargetCh3coona(),"0"),ConvertUtils.getString(monthMap.get("CH3COONA"),"0"), | 290 | monthDataVOList.add( new YJMonthDataVO("CH3COONA","CH3COONA" ,"KG",ConvertUtils.getString(target.getTargetCh3coona(),"0"),ConvertUtils.getString(monthMap.get("CH3COONA"),"0"), |
272 | ConvertUtils.getString(monthHbMap.get("CH3COONA"),"0") ,ConvertUtils.getString(monthTbMap.get("CH3COONA") ,"0") ) ); | 291 | ConvertUtils.getString(monthHbMap.get("CH3COONA"),"0") ,ConvertUtils.getString(monthTbMap.get("CH3COONA") ,"0") ) ); |
273 | monthDataVOList.add( new YJMonthDataVO("活性炭","HXT" ,ConvertUtils.getString(target.getTargetHxt(),"0"),ConvertUtils.getString(monthMap.get("HXT"),"0"), | 292 | monthDataVOList.add( new YJMonthDataVO("活性炭","HXT" ,"KG",ConvertUtils.getString(target.getTargetHxt(),"0"),ConvertUtils.getString(monthMap.get("HXT"),"0"), |
274 | ConvertUtils.getString(monthHbMap.get("HXT"),"0") ,ConvertUtils.getString(monthTbMap.get("HXT") ,"0") ) ); | 293 | ConvertUtils.getString(monthHbMap.get("HXT"),"0") ,ConvertUtils.getString(monthTbMap.get("HXT") ,"0") ) ); |
275 | monthDataVOList.add( new YJMonthDataVO("FeCl3","FECL3" ,ConvertUtils.getString(target.getTargetFecl3(),"0"),ConvertUtils.getString(monthMap.get("FECL3"),"0"), | 294 | monthDataVOList.add( new YJMonthDataVO("FeCl3","FECL3" ,"KG",ConvertUtils.getString(target.getTargetFecl3(),"0"),ConvertUtils.getString(monthMap.get("FECL3"),"0"), |
276 | ConvertUtils.getString(monthHbMap.get("FECL3"),"0") ,ConvertUtils.getString(monthTbMap.get("FECL3") ,"0") ) ); | 295 | ConvertUtils.getString(monthHbMap.get("FECL3"),"0") ,ConvertUtils.getString(monthTbMap.get("FECL3") ,"0") ) ); |
277 | monthDataVOList.add( new YJMonthDataVO("石灰","SH" ,ConvertUtils.getString(target.getTargetSh(),"0"),ConvertUtils.getString(monthMap.get("SH"),"0"), | 296 | monthDataVOList.add( new YJMonthDataVO("石灰","SH" ,"KG",ConvertUtils.getString(target.getTargetSh(),"0"),ConvertUtils.getString(monthMap.get("SH"),"0"), |
278 | ConvertUtils.getString(monthHbMap.get("SH"),"0") ,ConvertUtils.getString(monthTbMap.get("SH") ,"0") ) ); | 297 | ConvertUtils.getString(monthHbMap.get("SH"),"0") ,ConvertUtils.getString(monthTbMap.get("SH") ,"0") ) ); |
279 | monthDataVOList.add( new YJMonthDataVO("CH3COOH","CH3COOH" ,ConvertUtils.getString(target.getTargetCh3cooh(),"0"),ConvertUtils.getString(monthMap.get("CH3COOH"),"0"), | 298 | monthDataVOList.add( new YJMonthDataVO("CH3COOH","CH3COOH" ,"KG",ConvertUtils.getString(target.getTargetCh3cooh(),"0"),ConvertUtils.getString(monthMap.get("CH3COOH"),"0"), |
280 | ConvertUtils.getString(monthHbMap.get("CH3COOH"),"0") ,ConvertUtils.getString(monthTbMap.get("CH3COOH") ,"0") ) ); | 299 | ConvertUtils.getString(monthHbMap.get("CH3COOH"),"0") ,ConvertUtils.getString(monthTbMap.get("CH3COOH") ,"0") ) ); |
281 | monthDataVOList.add( new YJMonthDataVO("FeSO4固","FESO4G" ,ConvertUtils.getString(target.getTargetFeso4g(),"0"),ConvertUtils.getString(monthMap.get("FESO4G"),"0"), | 300 | monthDataVOList.add( new YJMonthDataVO("FeSO4固","FESO4G" ,"KG",ConvertUtils.getString(target.getTargetFeso4g(),"0"),ConvertUtils.getString(monthMap.get("FESO4G"),"0"), |
282 | ConvertUtils.getString(monthHbMap.get("FESO4G"),"0") ,ConvertUtils.getString(monthTbMap.get("FESO4G") ,"0") ) ); | 301 | ConvertUtils.getString(monthHbMap.get("FESO4G"),"0") ,ConvertUtils.getString(monthTbMap.get("FESO4G") ,"0") ) ); |
283 | monthDataVOList.add( new YJMonthDataVO("FeSO4液","FESO4Y" ,ConvertUtils.getString(target.getTargetFeso4y(),"0"),ConvertUtils.getString(monthMap.get("FESO4Y"),"0"), | 302 | monthDataVOList.add( new YJMonthDataVO("FeSO4液","FESO4Y" ,"KG",ConvertUtils.getString(target.getTargetFeso4y(),"0"),ConvertUtils.getString(monthMap.get("FESO4Y"),"0"), |
284 | ConvertUtils.getString(monthHbMap.get("FESO4Y"),"0") ,ConvertUtils.getString(monthTbMap.get("FESO4Y") ,"0") ) ); | 303 | ConvertUtils.getString(monthHbMap.get("FESO4Y"),"0") ,ConvertUtils.getString(monthTbMap.get("FESO4Y") ,"0") ) ); |
285 | monthDataVOList.add( new YJMonthDataVO("H2O2","H2O2" ,ConvertUtils.getString(target.getTargetH2o2(),"0"),ConvertUtils.getString(monthMap.get("H2O2"),"0"), | 304 | monthDataVOList.add( new YJMonthDataVO("H2O2","H2O2","KG" ,ConvertUtils.getString(target.getTargetH2o2(),"0"),ConvertUtils.getString(monthMap.get("H2O2"),"0"), |
286 | ConvertUtils.getString(monthHbMap.get("H2O2"),"0") ,ConvertUtils.getString(monthTbMap.get("H2O2") ,"0") ) ); | 305 | ConvertUtils.getString(monthHbMap.get("H2O2"),"0") ,ConvertUtils.getString(monthTbMap.get("H2O2") ,"0") ) ); |
287 | 306 | ||
307 | /* | ||
308 | Map<String,String> nameMap = new HashMap<>(); | ||
309 | nameMap.put("PACYT","PAC(液)");nameMap.put("PACGT","PAC(固)");nameMap.put("NaClO","NaClO"); nameMap.put("SCLPAMF","水处理PAM(-)"); | ||
310 | nameMap.put("PAMRJ","污脱PAM乳剂"); nameMap.put("PFS","PFS");nameMap.put("FHTY","复合铁盐"); nameMap.put("RYXNJ","乳液絮凝剂"); | ||
311 | nameMap.put("CH3COONA","CH3COONA");nameMap.put("HXT","活性炭");nameMap.put("FECL3","FECL3"); nameMap.put("SH","石灰"); | ||
312 | nameMap.put("CH3COOH","CH3COOH"); nameMap.put("FESO4G","FeSO4固"); nameMap.put("FESO4Y","FeSO4液"); nameMap.put("H2O2","H2O2"); | ||
313 | ReportItemVO reportItemVO = null; | ||
314 | Map<String, Integer> map = new HashMap<>(); | ||
315 | for (Map.Entry<String, Integer> entry : map.entrySet()) { | ||
316 | //System.out.println("Key: " + entry.getKey() + ", Value: " + entry.getValue()); | ||
317 | |||
318 | monthDataVOList.add( new YJMonthDataVO(entry.getValue() , entry.getKey(),ConvertUtils.getString(target.getTargetPacyt(),"0") ,reportItemVO.getValue(),reportItemVO.getValueHb(),reportItemVO.getValueTb() )); | ||
319 | }*/ | ||
288 | return monthDataVOList; | 320 | return monthDataVOList; |
289 | } | 321 | } |
290 | 322 | ... | ... |
... | @@ -26,6 +26,17 @@ public class YJMonthDataVO { | ... | @@ -26,6 +26,17 @@ public class YJMonthDataVO { |
26 | @ApiModelProperty(value = "同比") | 26 | @ApiModelProperty(value = "同比") |
27 | private String valueTB;//同比 | 27 | private String valueTB;//同比 |
28 | 28 | ||
29 | |||
30 | @ApiModelProperty(value = "环比-比例") | ||
31 | private String valueHB_bl;//环比 | ||
32 | @ApiModelProperty(value = "同比-比例") | ||
33 | private String valueTB_bl;//同比 | ||
34 | @ApiModelProperty(value = "单位") | ||
35 | private String unit; | ||
36 | |||
37 | |||
38 | |||
39 | |||
29 | public String getMonthTarge() { | 40 | public String getMonthTarge() { |
30 | monthTarge = JSUtils.divide(yearTarge,12); | 41 | monthTarge = JSUtils.divide(yearTarge,12); |
31 | return monthTarge; | 42 | return monthTarge; |
... | @@ -34,12 +45,23 @@ public class YJMonthDataVO { | ... | @@ -34,12 +45,23 @@ public class YJMonthDataVO { |
34 | public YJMonthDataVO(){ | 45 | public YJMonthDataVO(){ |
35 | } | 46 | } |
36 | 47 | ||
37 | public YJMonthDataVO(String yjName, String yjCode, String yearTarge, String value, String valueHB, String valueTB) { | 48 | public YJMonthDataVO(String yjName, String yjCode, String unit, String yearTarge, String value, String valueHB, String valueTB) { |
38 | this.yjName = yjName; | 49 | this.yjName = yjName; |
39 | this.yjCode = yjCode; | 50 | this.yjCode = yjCode; |
51 | this.unit = unit; | ||
40 | this.yearTarge = yearTarge; | 52 | this.yearTarge = yearTarge; |
41 | this.value = value; | 53 | this.value = value; |
42 | this.valueHB = valueHB; | 54 | this.valueHB = valueHB; |
43 | this.valueTB = valueTB; | 55 | this.valueTB = valueTB; |
44 | } | 56 | } |
57 | |||
58 | public String getValueHB_bl() { | ||
59 | String expression = "( "+this.value +"-" +this.valueHB+")*100/"+this.valueHB; | ||
60 | return JSUtils.executeExpression(expression ,"0.0"); | ||
61 | } | ||
62 | |||
63 | public String getValueTB_bl() { | ||
64 | String expression = "( "+this.value +"-" +this.valueTB+")*100/"+this.valueTB; | ||
65 | return JSUtils.executeExpression(expression ,"0.0"); | ||
66 | } | ||
45 | } | 67 | } | ... | ... |
-
请 注册 或 登录 后发表评论