60d0b2f9 康伟

kangwei:

水厂运营分析中本年度吨水药费板块增加详情,展示每种药剂的目标完成情况,包括每种药剂的药剂名称、目标量、使用量
1 个父辈 fde678da
......@@ -27,6 +27,4 @@ public class PgCommonServiceImpl implements IPgCommonService {
public Map<String, Object> queryForMap(String sql) {
return jdbcTemplate.queryForMap(sql);
}
}
......
......@@ -35,6 +35,17 @@ public class FactoryOperateCenterController {
return result;
}
@ApiOperation(value="厂区统计数据:吨水药费详情", notes="厂区统计数据:吨水药费详情")
@GetMapping(value = "/dsyfDetail")
public Result<List<YJMonthDataVO>> dsyfDetail(String departId,String month) {
Result<List<YJMonthDataVO>> result = new Result<>();
List<YJMonthDataVO> map = factoryOperateCenterService.dsyfDetail(departId,month);
result.setSuccess(true);
result.setResult(map);
return result;
}
@ApiOperation(value="厂区报表统计数据", notes="厂区报表统计数据")
@GetMapping(value = "/report")
public Result<Map<String,Object>> getReportData(String departId,String month) {
......
package com.skua.modules.dataAnalysis.service;
import com.skua.modules.dataAnalysis.vo.ArchivesWarnVO;
import com.skua.modules.dataAnalysis.vo.EquipAlarmVO;
import com.skua.modules.dataAnalysis.vo.EquipRunTimeVO;
import com.skua.modules.dataAnalysis.vo.EquipWarnVO;
import com.skua.modules.dataAnalysis.vo.*;
import java.util.List;
import java.util.Map;
......@@ -23,5 +20,7 @@ public interface IFactoryOperateCenterService {
List<ArchivesWarnVO> getArchivesWarn(String departId);
Map<String, Object> getFlowData(String departId, String month);
//吨水药费:详情
List<YJMonthDataVO> dsyfDetail(String departId, String month);
}
......
......@@ -3,16 +3,16 @@ package com.skua.modules.dataAnalysis.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.skua.common.constant.ReportConstant;
import com.skua.common.report.ReportViewUtil;
import com.skua.core.util.ConvertUtils;
import com.skua.core.util.DoubleOperaUtils;
import com.skua.modules.dataAnalysis.mapper.FactoryOperateCenterMapper;
import com.skua.modules.dataAnalysis.service.IFactoryOperateCenterService;
import com.skua.modules.dataAnalysis.vo.ArchivesWarnVO;
import com.skua.modules.dataAnalysis.vo.EquipAlarmVO;
import com.skua.modules.dataAnalysis.vo.EquipRunTimeVO;
import com.skua.modules.dataAnalysis.vo.EquipWarnVO;
import com.skua.modules.dataAnalysis.vo.*;
import com.skua.modules.report.entity.ReportTargetConfig;
import com.skua.modules.report.mapper.ReportTargetConfigMapper;
import com.skua.tool.util.DateUtils;
import io.swagger.annotations.ApiModelProperty;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -221,6 +221,76 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer
return map;
}
//吨水药费:详情
public List<YJMonthDataVO> dsyfDetail(String departId, String month){
String tbMonth = DateUtils.getTbMonth(month);
String hbMonth = DateUtils.getHbMonth(month);
String year = month.substring(0,4);
LambdaQueryWrapper<ReportTargetConfig> queryWrapper = new LambdaQueryWrapper<ReportTargetConfig>();
queryWrapper.eq(ReportTargetConfig::getDepartId,departId);
queryWrapper.eq(ReportTargetConfig::getTargetYear,year);
List<ReportTargetConfig> yearTargetList = reportTargetMapper.selectList(queryWrapper);
ReportTargetConfig target = null;
if(yearTargetList.size() > 0) {
target = yearTargetList.get(0);
}
if(target == null ) target = new ReportTargetConfig();
String field3a24 = "DLHJ,PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ,YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2";
String dataViewName3a24Month = ReportViewUtil.buildViewLike(ReportConstant.view3a24,field3a24, departId, month);
String dataViewName3a24MonthTb = ReportViewUtil.buildViewLike(ReportConstant.view3a24,field3a24, departId, tbMonth);
String dataViewName3a24MonthHb = ReportViewUtil.buildViewLike(ReportConstant.view3a24,field3a24, departId, hbMonth);
List<YJMonthDataVO> monthDataVOList = new ArrayList<>();
String dataViewName2119Month = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departId, month);
String dataViewName2119MonthTb = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departId, tbMonth);
String dataViewName2119MonthHb = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departId, hbMonth);
Map<String,Object> monthMap = factoryOperateCenterMapper.getSdyData(dataViewName2119Month, dataViewName3a24Month, departId, month);
Map<String,Object> monthHbMap = factoryOperateCenterMapper.getSdyData(dataViewName2119MonthHb, dataViewName3a24MonthHb, departId, hbMonth);
Map<String,Object> monthTbMap = factoryOperateCenterMapper.getSdyData(dataViewName2119MonthTb, dataViewName3a24MonthTb, departId, tbMonth);
//String yjName, String yjCode, String yearTarge, String monthTarge, String value, String valueHB, String valueTB
monthDataVOList.add( new YJMonthDataVO("PAC(液)","PACYT" ,ConvertUtils.getString(target.getTargetPacyt(),"0"),ConvertUtils.getString(monthMap.get("PACYT"),"0"),
ConvertUtils.getString(monthHbMap.get("PACYT"),"0") ,ConvertUtils.getString(monthTbMap.get("PACYT") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("PAC(固)","PACGT" ,ConvertUtils.getString(target.getTargetPacgt(),"0"),ConvertUtils.getString(monthMap.get("PACGT"),"0"),
ConvertUtils.getString(monthHbMap.get("PACGT"),"0") ,ConvertUtils.getString(monthTbMap.get("PACGT") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("NaClO","NACLO" ,ConvertUtils.getString(target.getTargetNaclo(),"0"),ConvertUtils.getString(monthMap.get("NACLO"),"0"),
ConvertUtils.getString(monthHbMap.get("NACLO"),"0") ,ConvertUtils.getString(monthTbMap.get("NACLO") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("水处理PAM(-)","SCLPAMF" ,ConvertUtils.getString(target.getTargetSclpamf(),"0"),ConvertUtils.getString(monthMap.get("SCLPAMF"),"0"),
ConvertUtils.getString(monthHbMap.get("SCLPAMF"),"0") ,ConvertUtils.getString(monthTbMap.get("SCLPAMF") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("污脱PAM乳剂","PAMRJ" ,ConvertUtils.getString(target.getTargetPamrj(),"0"),ConvertUtils.getString(monthMap.get("PAMRJ"),"0"),
ConvertUtils.getString(monthHbMap.get("PAMRJ"),"0") ,ConvertUtils.getString(monthTbMap.get("PAMRJ") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("PFS","PFS" ,ConvertUtils.getString(target.getTargetPfs(),"0"),ConvertUtils.getString(monthMap.get("PFS"),"0"),
ConvertUtils.getString(monthHbMap.get("PFS"),"0") ,ConvertUtils.getString(monthTbMap.get("PFS") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("复合铁盐","FHTY" ,ConvertUtils.getString(target.getTargetFhty(),"0"),ConvertUtils.getString(monthMap.get("FHTY"),"0"),
ConvertUtils.getString(monthHbMap.get("FHTY"),"0") ,ConvertUtils.getString(monthTbMap.get("FHTY") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("乳液絮凝剂","RYXNJ" ,ConvertUtils.getString(target.getTargetRyxnj(),"0"),ConvertUtils.getString(monthMap.get("RYXNJ"),"0"),
ConvertUtils.getString(monthHbMap.get("RYXNJ"),"0") ,ConvertUtils.getString(monthTbMap.get("RYXNJ") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("益维磷","YWL" ,ConvertUtils.getString(target.getTargetYwl(),"0"),ConvertUtils.getString(monthMap.get("YWL"),"0"),
ConvertUtils.getString(monthHbMap.get("YWL"),"0") ,ConvertUtils.getString(monthTbMap.get("YWL") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("高效除磷剂","GXCLJ" ,ConvertUtils.getString(target.getTargetGxclj(),"0"),ConvertUtils.getString(monthMap.get("GXCLJ"),"0"),
ConvertUtils.getString(monthHbMap.get("GXCLJ"),"0") ,ConvertUtils.getString(monthTbMap.get("GXCLJ") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("CH3COONA","CH3COONA" ,ConvertUtils.getString(target.getTargetCh3coona(),"0"),ConvertUtils.getString(monthMap.get("CH3COONA"),"0"),
ConvertUtils.getString(monthHbMap.get("CH3COONA"),"0") ,ConvertUtils.getString(monthTbMap.get("CH3COONA") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("活性炭","HXT" ,ConvertUtils.getString(target.getTargetHxt(),"0"),ConvertUtils.getString(monthMap.get("HXT"),"0"),
ConvertUtils.getString(monthHbMap.get("HXT"),"0") ,ConvertUtils.getString(monthTbMap.get("HXT") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("FeCl3","FECL3" ,ConvertUtils.getString(target.getTargetFecl3(),"0"),ConvertUtils.getString(monthMap.get("FECL3"),"0"),
ConvertUtils.getString(monthHbMap.get("FECL3"),"0") ,ConvertUtils.getString(monthTbMap.get("FECL3") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("石灰","SH" ,ConvertUtils.getString(target.getTargetSh(),"0"),ConvertUtils.getString(monthMap.get("SH"),"0"),
ConvertUtils.getString(monthHbMap.get("SH"),"0") ,ConvertUtils.getString(monthTbMap.get("SH") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("CH3COOH","CH3COOH" ,ConvertUtils.getString(target.getTargetCh3cooh(),"0"),ConvertUtils.getString(monthMap.get("CH3COOH"),"0"),
ConvertUtils.getString(monthHbMap.get("CH3COOH"),"0") ,ConvertUtils.getString(monthTbMap.get("CH3COOH") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("FeSO4固","FESO4G" ,ConvertUtils.getString(target.getTargetFeso4g(),"0"),ConvertUtils.getString(monthMap.get("FESO4G"),"0"),
ConvertUtils.getString(monthHbMap.get("FESO4G"),"0") ,ConvertUtils.getString(monthTbMap.get("FESO4G") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("FeSO4液","FESO4Y" ,ConvertUtils.getString(target.getTargetFeso4y(),"0"),ConvertUtils.getString(monthMap.get("FESO4Y"),"0"),
ConvertUtils.getString(monthHbMap.get("FESO4Y"),"0") ,ConvertUtils.getString(monthTbMap.get("FESO4Y") ,"0") ) );
monthDataVOList.add( new YJMonthDataVO("H2O2","H2O2" ,ConvertUtils.getString(target.getTargetH2o2(),"0"),ConvertUtils.getString(monthMap.get("H2O2"),"0"),
ConvertUtils.getString(monthHbMap.get("H2O2"),"0") ,ConvertUtils.getString(monthTbMap.get("H2O2") ,"0") ) );
return monthDataVOList;
}
@Override
public Map<String, Object> getReportData(String departId, String month) {
int dayCount = DateUtils.getDayCountByMonth(month);
......@@ -358,6 +428,4 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer
map.put("yes", yes);
return map;
}
}
......
package com.skua.modules.dataAnalysis.vo;
import com.skua.tool.util.JSUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 药剂月消耗数据
*/
@Data
@ApiModel(value="药剂月消耗数据", description="药剂月消耗数据")
public class YJMonthDataVO {
@ApiModelProperty(value = "药剂名称")
private String yjName;
@ApiModelProperty(value = "药剂Code")
private String yjCode;
@ApiModelProperty(value = "年目标")
private String yearTarge;//年目标
@ApiModelProperty(value = "月目标")
private String monthTarge;//月目标
@ApiModelProperty(value = "本月值")
private String value;//本月值
@ApiModelProperty(value = "环比")
private String valueHB;//环比
@ApiModelProperty(value = "同比")
private String valueTB;//同比
public String getMonthTarge() {
monthTarge = JSUtils.divide(yearTarge,12);
return monthTarge;
}
public YJMonthDataVO(){
}
public YJMonthDataVO(String yjName, String yjCode, String yearTarge, String value, String valueHB, String valueTB) {
this.yjName = yjName;
this.yjCode = yjCode;
this.yearTarge = yearTarge;
this.value = value;
this.valueHB = valueHB;
this.valueTB = valueTB;
}
}
......@@ -100,8 +100,6 @@ public class DictAspect {
String text = field.getAnnotation(Dict.class).dicText();
String table = field.getAnnotation(Dict.class).dictTable();
String key = String.valueOf(item.get(field.getName()));
String textValue = "";
//翻译字典值对应的txt
if(!org.apache.commons.lang3.StringUtils.isBlank(table)){
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!