kangwei: 解决bug:运营季报公式
正在显示
18 个修改的文件
包含
113 行增加
和
91 行删除
... | @@ -38,6 +38,8 @@ | ... | @@ -38,6 +38,8 @@ |
38 | WHERE | 38 | WHERE |
39 | d.depart_type = 1 | 39 | d.depart_type = 1 |
40 | AND r.report_date LIKE CONCAT(#{year},'%') | 40 | AND r.report_date LIKE CONCAT(#{year},'%') |
41 | |||
42 | order by r.report_date desc | ||
41 | </select> | 43 | </select> |
42 | 44 | ||
43 | <select id="getMapData" resultType="com.skua.modules.emergency.vo.MapDatabaseResult"> | 45 | <select id="getMapData" resultType="com.skua.modules.emergency.vo.MapDatabaseResult"> | ... | ... |
... | @@ -152,7 +152,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven | ... | @@ -152,7 +152,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven |
152 | 152 | ||
153 | @Override | 153 | @Override |
154 | public List<RiskDatabaseResult> getRiskList(String year) { | 154 | public List<RiskDatabaseResult> getRiskList(String year) { |
155 | if(year==null){ | 155 | if(StringUtils.isEmpty(year)){ |
156 | year = String.valueOf(DateUtils.getYear()); | 156 | year = String.valueOf(DateUtils.getYear()); |
157 | } | 157 | } |
158 | List<RiskDatabaseResult> list = emergencyRiskEventMapper.getRiskList(year); | 158 | List<RiskDatabaseResult> list = emergencyRiskEventMapper.getRiskList(year); |
... | @@ -161,7 +161,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven | ... | @@ -161,7 +161,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven |
161 | 161 | ||
162 | @Override | 162 | @Override |
163 | public List<DangerDatabaseResult> getDangerList(String year) { | 163 | public List<DangerDatabaseResult> getDangerList(String year) { |
164 | if(year==null){ | 164 | if(StringUtils.isEmpty(year)){ |
165 | year = String.valueOf(DateUtils.getYear()); | 165 | year = String.valueOf(DateUtils.getYear()); |
166 | } | 166 | } |
167 | List<DangerDatabaseResult> list = emergencyRiskEventMapper.getDangerList(year); | 167 | List<DangerDatabaseResult> list = emergencyRiskEventMapper.getDangerList(year); |
... | @@ -170,7 +170,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven | ... | @@ -170,7 +170,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven |
170 | 170 | ||
171 | @Override | 171 | @Override |
172 | public List<MapDatabaseResult> getMapData(String year) { | 172 | public List<MapDatabaseResult> getMapData(String year) { |
173 | if(year==null){ | 173 | if(StringUtils.isEmpty(year)){ |
174 | year = String.valueOf(DateUtils.getYear()); | 174 | year = String.valueOf(DateUtils.getYear()); |
175 | } | 175 | } |
176 | List<DangerDatabaseResult> dangerList = emergencyRiskEventMapper.getDangerList(year); | 176 | List<DangerDatabaseResult> dangerList = emergencyRiskEventMapper.getDangerList(year); | ... | ... |
... | @@ -2,6 +2,7 @@ package com.skua.modules.dataAnalysis.controller; | ... | @@ -2,6 +2,7 @@ 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.aspect.annotation.AutoLog; | 4 | import com.skua.core.aspect.annotation.AutoLog; |
5 | import com.skua.core.context.BaseContextHandler; | ||
5 | import com.skua.core.util.DateUtils; | 6 | import com.skua.core.util.DateUtils; |
6 | import com.skua.modules.dataAnalysis.service.IPowerAnalysisNewService; | 7 | import com.skua.modules.dataAnalysis.service.IPowerAnalysisNewService; |
7 | import com.skua.modules.dataAnalysis.vo.OperationMonthVO; | 8 | import com.skua.modules.dataAnalysis.vo.OperationMonthVO; |
... | @@ -148,7 +149,8 @@ public class PowerAnalysisNewController { | ... | @@ -148,7 +149,8 @@ public class PowerAnalysisNewController { |
148 | @GetMapping(value = "/powerCutDownAllList") | 149 | @GetMapping(value = "/powerCutDownAllList") |
149 | public Result powerCutDownAllList(String time) { | 150 | public Result powerCutDownAllList(String time) { |
150 | Result result = new Result(); | 151 | Result result = new Result(); |
151 | Map<String, Object> resultMap = operationMonthService.powerCutDownAllList(time); | 152 | String departIds = BaseContextHandler.getDeparts(); |
153 | Map<String, Object> resultMap = operationMonthService.powerCutDownAllList(departIds,time); | ||
152 | result.setSuccess(true); | 154 | result.setSuccess(true); |
153 | result.setResult(resultMap); | 155 | result.setResult(resultMap); |
154 | return result; | 156 | return result; | ... | ... |
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/PowerAnalysisNewMapper.xml
... | @@ -376,7 +376,7 @@ | ... | @@ -376,7 +376,7 @@ |
376 | <select id="querySixMonthPowerConsumption" resultType="map"> | 376 | <select id="querySixMonthPowerConsumption" resultType="map"> |
377 | SELECT | 377 | SELECT |
378 | ROUND(SUM(IFNULL(v2.CSL,0))/10000,2) AS totalBYCLSL, | 378 | ROUND(SUM(IFNULL(v2.CSL,0))/10000,2) AS totalBYCLSL, |
379 | ROUND(IFNULL(v3.DLHJ,0),2) AS totalBYYDL, | 379 | ROUND(IFNULL(v3.DLHJ,0)/10000,2) AS totalBYYDL, |
380 | ROUND(IFNULL(v3.DLHJ,0)/SUM(v2.CSL),2) AS dsdh, | 380 | ROUND(IFNULL(v3.DLHJ,0)/SUM(v2.CSL),2) AS dsdh, |
381 | LEFT(v2.time,7) AS time | 381 | LEFT(v2.time,7) AS time |
382 | from ${dataViewName2119} v2 | 382 | from ${dataViewName2119} v2 |
... | @@ -795,8 +795,8 @@ | ... | @@ -795,8 +795,8 @@ |
795 | </select> | 795 | </select> |
796 | <select id="queryHDLAndSLByFac" resultType="java.util.Map"> | 796 | <select id="queryHDLAndSLByFac" resultType="java.util.Map"> |
797 | SELECT | 797 | SELECT |
798 | ROUND(SUM(v2.CSL),2) AS totalBYCLSL, | 798 | ROUND(SUM(IFNULL(v2.CSL,0))/10000,2) AS totalBYCLSL, |
799 | IFNULL(v3.DLHJ,0) AS totalBYYDL, | 799 | ROUND(IFNULL(v3.DLHJ,0)/10000,2) AS totalBYYDL, |
800 | ROUND(IFNULL(v3.DLHJ,0)/SUM(v2.CSL),2) AS dsdh, | 800 | ROUND(IFNULL(v3.DLHJ,0)/SUM(v2.CSL),2) AS dsdh, |
801 | LEFT(v2.time,7) AS time | 801 | LEFT(v2.time,7) AS time |
802 | from ${dataViewName2119} v2 | 802 | from ${dataViewName2119} v2 | ... | ... |
... | @@ -6,9 +6,9 @@ import java.util.List; | ... | @@ -6,9 +6,9 @@ import java.util.List; |
6 | import java.util.Map; | 6 | import java.util.Map; |
7 | 7 | ||
8 | public interface IFactoryOperateCenterService { | 8 | public interface IFactoryOperateCenterService { |
9 | 9 | //厂区统计数据 | |
10 | Map<String, Object> getData(String departId,String month); | 10 | Map<String, Object> getData(String departId,String month); |
11 | 11 | //厂区报表统计数据 | |
12 | Map<String, Object> getReportData(String departId, String month); | 12 | Map<String, Object> getReportData(String departId, String month); |
13 | 13 | ||
14 | List<EquipAlarmVO> getEquipAlarm(String departId, String month); | 14 | List<EquipAlarmVO> getEquipAlarm(String departId, String month); | ... | ... |
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/IPowerAnalysisNewService.java
... | @@ -24,7 +24,6 @@ public interface IPowerAnalysisNewService { | ... | @@ -24,7 +24,6 @@ public interface IPowerAnalysisNewService { |
24 | Map<String, Object> powerDSDHCurve(String id, String type, String time); | 24 | Map<String, Object> powerDSDHCurve(String id, String type, String time); |
25 | 25 | ||
26 | /** | 26 | /** |
27 | * | ||
28 | * @Description 电耗分析单位污染物削减电耗 | 27 | * @Description 电耗分析单位污染物削减电耗 |
29 | * @Date 2021-06-03 16:37 | 28 | * @Date 2021-06-03 16:37 |
30 | * @Param [time] | 29 | * @Param [time] |
... | @@ -35,7 +34,6 @@ public interface IPowerAnalysisNewService { | ... | @@ -35,7 +34,6 @@ public interface IPowerAnalysisNewService { |
35 | Map<String, Object> powerConsumptionDistributionList(String type, String time); | 34 | Map<String, Object> powerConsumptionDistributionList(String type, String time); |
36 | 35 | ||
37 | /** | 36 | /** |
38 | * | ||
39 | * @Description 根据厂站获取单位污染物削减电耗历史趋势 | 37 | * @Description 根据厂站获取单位污染物削减电耗历史趋势 |
40 | * @Date 2021-06-04 15:05 | 38 | * @Date 2021-06-04 15:05 |
41 | * @Param [startTime, endTime, factoryId] | 39 | * @Param [startTime, endTime, factoryId] |
... | @@ -44,13 +42,12 @@ public interface IPowerAnalysisNewService { | ... | @@ -44,13 +42,12 @@ public interface IPowerAnalysisNewService { |
44 | Map<String, Object> powerCutDownByFac(String startTime, String endTime, String departId); | 42 | Map<String, Object> powerCutDownByFac(String startTime, String endTime, String departId); |
45 | 43 | ||
46 | /** | 44 | /** |
47 | * | ||
48 | * @Description 电耗分析获取所有单位污染物削减电耗列表 | 45 | * @Description 电耗分析获取所有单位污染物削减电耗列表 |
49 | * @Date 2021-06-04 18:33 | 46 | * @Date 2021-06-04 18:33 |
50 | * @Param [time] | 47 | * @Param [time] |
51 | * @return java.util.Map<java.lang.String, java.lang.Object> | 48 | * @return java.util.Map<java.lang.String, java.lang.Object> |
52 | **/ | 49 | **/ |
53 | Map<String, Object> powerCutDownAllList(String time); | 50 | Map<String, Object> powerCutDownAllList(String departIds,String time); |
54 | 51 | ||
55 | /** | 52 | /** |
56 | * | 53 | * | ... | ... |
... | @@ -33,7 +33,7 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer | ... | @@ -33,7 +33,7 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer |
33 | private FactoryOperateCenterMapper factoryOperateCenterMapper; | 33 | private FactoryOperateCenterMapper factoryOperateCenterMapper; |
34 | @Resource | 34 | @Resource |
35 | private ReportTargetConfigMapper reportTargetMapper; | 35 | private ReportTargetConfigMapper reportTargetMapper; |
36 | 36 | //厂区统计数据 | |
37 | @Override | 37 | @Override |
38 | public Map<String, Object> getData(String departId, String month) { | 38 | public Map<String, Object> getData(String departId, String month) { |
39 | DecimalFormat df = new DecimalFormat("#.##"); | 39 | DecimalFormat df = new DecimalFormat("#.##"); |
... | @@ -156,6 +156,7 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer | ... | @@ -156,6 +156,7 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer |
156 | map.put("nclsl",new HashMap<>()); | 156 | map.put("nclsl",new HashMap<>()); |
157 | Map<String, Object> nclslMap = new HashMap<>(); | 157 | Map<String, Object> nclslMap = new HashMap<>(); |
158 | nclslMap.put("nsjsl", yearClsl); | 158 | nclslMap.put("nsjsl", yearClsl); |
159 | nclslMap.put("nsjsl", yearClslMb); | ||
159 | nclslMap.put("wcbfb", df.format(100*yearClsl/yearClslMb)); | 160 | nclslMap.put("wcbfb", df.format(100*yearClsl/yearClslMb)); |
160 | nclslMap.put("nmb", yearClslMb); | 161 | nclslMap.put("nmb", yearClslMb); |
161 | nclslMap.put("nmbTb", df.format((yearClslMb-yearTbClslMb)/yearClslMb)); | 162 | nclslMap.put("nmbTb", df.format((yearClslMb-yearTbClslMb)/yearClslMb)); |
... | @@ -170,7 +171,7 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer | ... | @@ -170,7 +171,7 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer |
170 | map.put("yclsl",new HashMap<>()); | 171 | map.put("yclsl",new HashMap<>()); |
171 | Map<String, Object> yclslMap = new HashMap<>(); | 172 | Map<String, Object> yclslMap = new HashMap<>(); |
172 | yclslMap.put("ysjsl", monthClsl); | 173 | yclslMap.put("ysjsl", monthClsl); |
173 | yclslMap.put("wcbfb", df.format(100*monthClsl/(yearClslMb/12))); | 174 | yclslMap.put("wcbfb", df.format(100*monthClsl/(yearClslMb/12)));//较上月 |
174 | yclslMap.put("ymb", df.format(yearClslMb/12)); | 175 | yclslMap.put("ymb", df.format(yearClslMb/12)); |
175 | yclslMap.put("ymbTb", "0"); | 176 | yclslMap.put("ymbTb", "0"); |
176 | yclslMap.put("ywcd", df.format(100*monthClsl/(yearClslMb/12))); | 177 | yclslMap.put("ywcd", df.format(100*monthClsl/(yearClslMb/12))); |
... | @@ -320,7 +321,7 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer | ... | @@ -320,7 +321,7 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer |
320 | return monthDataVOList; | 321 | return monthDataVOList; |
321 | } | 322 | } |
322 | 323 | ||
323 | 324 | //厂区报表统计数据 | |
324 | @Override | 325 | @Override |
325 | public Map<String, Object> getReportData(String departId, String month) { | 326 | public Map<String, Object> getReportData(String departId, String month) { |
326 | int dayCount = DateUtils.getDayCountByMonth(month); | 327 | int dayCount = DateUtils.getDayCountByMonth(month); | ... | ... |
此文件的差异被折叠,
点击展开。
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 | * @auther kangwei | ||
9 | * @create 2024-12-19-10:19 | ||
10 | */ | ||
11 | @Data | ||
12 | @ApiModel(value="能耗分析:单位污染物削减耗电量对象", description="能耗分析:单位污染物削减耗电量对象") | ||
13 | public class PowerCutDownVO { | ||
14 | |||
15 | @ApiModelProperty(value = "部门编号") | ||
16 | public String departId ; | ||
17 | |||
18 | |||
19 | @ApiModelProperty(value = "名称") | ||
20 | public String clsl ; | ||
21 | |||
22 | @ApiModelProperty(value = "名称") | ||
23 | public String codValue; | ||
24 | |||
25 | @ApiModelProperty(value = "名称") | ||
26 | public String hdl; | ||
27 | |||
28 | @ApiModelProperty(value = "名称") | ||
29 | public String nh3nValue; | ||
30 | |||
31 | @ApiModelProperty(value = "名称") | ||
32 | public String num; | ||
33 | |||
34 | @ApiModelProperty(value = "名称") | ||
35 | public String tnValue; | ||
36 | |||
37 | @ApiModelProperty(value = "名称") | ||
38 | public String tpValue; | ||
39 | |||
40 | } |
... | @@ -7,8 +7,6 @@ import com.skua.modules.report.vo.ProductDataVO; | ... | @@ -7,8 +7,6 @@ import com.skua.modules.report.vo.ProductDataVO; |
7 | * @create 2024-10-14-9:11 | 7 | * @create 2024-10-14-9:11 |
8 | */ | 8 | */ |
9 | public interface IOperationReportService { | 9 | public interface IOperationReportService { |
10 | |||
11 | |||
12 | /*** | 10 | /*** |
13 | * 处理月季度数据 | 11 | * 处理月季度数据 |
14 | * @param year | 12 | * @param year | ... | ... |
... | @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.IService; | ... | @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.IService; |
10 | * 月度电费报表 | 10 | * 月度电费报表 |
11 | */ | 11 | */ |
12 | public interface IReportElectricCostService extends IService<ReportElectricCost> { | 12 | public interface IReportElectricCostService extends IService<ReportElectricCost> { |
13 | 13 | //月度电费报表-分页列表查询 | |
14 | IPage<ReportElectricCost> getPage(Page<ReportElectricCost> page, ReportElectricCost reportElectricCost); | 14 | IPage<ReportElectricCost> getPage(Page<ReportElectricCost> page, ReportElectricCost reportElectricCost); |
15 | 15 | ||
16 | } | 16 | } | ... | ... |
此文件的差异被折叠,
点击展开。
... | @@ -6,6 +6,7 @@ import com.skua.core.context.BaseContextHandler; | ... | @@ -6,6 +6,7 @@ import com.skua.core.context.BaseContextHandler; |
6 | import com.skua.modules.report.entity.ReportElectricCost; | 6 | import com.skua.modules.report.entity.ReportElectricCost; |
7 | import com.skua.modules.report.mapper.ReportElectricCostMapper; | 7 | import com.skua.modules.report.mapper.ReportElectricCostMapper; |
8 | import com.skua.modules.report.service.IReportElectricCostService; | 8 | import com.skua.modules.report.service.IReportElectricCostService; |
9 | import org.apache.commons.lang.StringUtils; | ||
9 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
10 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
11 | 12 | ||
... | @@ -23,10 +24,10 @@ public class ReportElectricCostServiceImpl extends ServiceImpl<ReportElectricCos | ... | @@ -23,10 +24,10 @@ public class ReportElectricCostServiceImpl extends ServiceImpl<ReportElectricCos |
23 | 24 | ||
24 | @Resource | 25 | @Resource |
25 | private ReportElectricCostMapper reportElectricCostMapper; | 26 | private ReportElectricCostMapper reportElectricCostMapper; |
26 | 27 | //月度电费报表-分页列表查询 | |
27 | @Override | 28 | @Override |
28 | public IPage<ReportElectricCost> getPage(Page<ReportElectricCost> page, ReportElectricCost reportElectricCost) { | 29 | public IPage<ReportElectricCost> getPage(Page<ReportElectricCost> page, ReportElectricCost reportElectricCost) { |
29 | if(reportElectricCost.getDepartId()==null){ | 30 | if(StringUtils.isEmpty(reportElectricCost.getDepartId())){ |
30 | reportElectricCost.setDepartId(BaseContextHandler.getDeparts()); | 31 | reportElectricCost.setDepartId(BaseContextHandler.getDeparts()); |
31 | } | 32 | } |
32 | // if(reportElectricCost.getMonth()!=null){ | 33 | // if(reportElectricCost.getMonth()!=null){ | ... | ... |
... | @@ -11,7 +11,7 @@ import java.math.BigDecimal; | ... | @@ -11,7 +11,7 @@ import java.math.BigDecimal; |
11 | public class FReportPowerMonthDataVO { | 11 | public class FReportPowerMonthDataVO { |
12 | 12 | ||
13 | @ApiModelProperty(value = "所属厂站名称") | 13 | @ApiModelProperty(value = "所属厂站名称") |
14 | private String deptartName; | 14 | private String departName; |
15 | 15 | ||
16 | @ApiModelProperty(value = "目标消耗") | 16 | @ApiModelProperty(value = "目标消耗") |
17 | private String targetConsume; | 17 | private String targetConsume; |
... | @@ -26,8 +26,8 @@ public class FReportPowerMonthDataVO { | ... | @@ -26,8 +26,8 @@ public class FReportPowerMonthDataVO { |
26 | 26 | ||
27 | } | 27 | } |
28 | 28 | ||
29 | public FReportPowerMonthDataVO(String deptartName, String targetConsume, String realConsume , String causeAnalysis) { | 29 | public FReportPowerMonthDataVO(String departName, String targetConsume, String realConsume , String causeAnalysis) { |
30 | this.deptartName = deptartName; | 30 | this.departName = departName; |
31 | this.targetConsume = targetConsume; | 31 | this.targetConsume = targetConsume; |
32 | this.realConsume = realConsume; | 32 | this.realConsume = realConsume; |
33 | this.causeAnalysis = causeAnalysis; | 33 | this.causeAnalysis = causeAnalysis; | ... | ... |
... | @@ -11,7 +11,7 @@ import java.math.BigDecimal; | ... | @@ -11,7 +11,7 @@ import java.math.BigDecimal; |
11 | public class FReportWaterMonthDataVO { | 11 | public class FReportWaterMonthDataVO { |
12 | 12 | ||
13 | @ApiModelProperty(value = "所属厂站名称") | 13 | @ApiModelProperty(value = "所属厂站名称") |
14 | private String deptartName; | 14 | private String departName; |
15 | 15 | ||
16 | @ApiModelProperty(value = "比例") | 16 | @ApiModelProperty(value = "比例") |
17 | private String ratio; | 17 | private String ratio; |
... | @@ -23,8 +23,8 @@ public class FReportWaterMonthDataVO { | ... | @@ -23,8 +23,8 @@ public class FReportWaterMonthDataVO { |
23 | 23 | ||
24 | } | 24 | } |
25 | 25 | ||
26 | public FReportWaterMonthDataVO(String deptartName, String ratio, String causeAnalysis) { | 26 | public FReportWaterMonthDataVO(String departName, String ratio, String causeAnalysis) { |
27 | this.deptartName = deptartName; | 27 | this.departName = departName; |
28 | this.ratio = ratio; | 28 | this.ratio = ratio; |
29 | this.causeAnalysis = causeAnalysis; | 29 | this.causeAnalysis = causeAnalysis; |
30 | } | 30 | } | ... | ... |
... | @@ -26,15 +26,12 @@ public class ProductDataVO { | ... | @@ -26,15 +26,12 @@ public class ProductDataVO { |
26 | @ApiModelProperty(value = "水务厂站数量") | 26 | @ApiModelProperty(value = "水务厂站数量") |
27 | private String deptartCount; | 27 | private String deptartCount; |
28 | 28 | ||
29 | @ApiModelProperty(value = "相差天数") | ||
30 | private Long dayNum; | ||
31 | |||
32 | @ApiModelProperty(value = "收费水量") | 29 | @ApiModelProperty(value = "收费水量") |
33 | private String chargeWaterVolume;//收费水量9854.012552万吨 | 30 | private String chargeWaterVolume;//收费水量9854.012552万吨 |
34 | @ApiModelProperty(value = "收费水量-日均值") | 31 | @ApiModelProperty(value = "收费水量-日均值") |
35 | private String avgDayWaterVolume;//平均108.29万吨/天 | 32 | private String avgDayWaterVolume;//平均108.29万吨/天 |
36 | @ApiModelProperty(value = "收费水量-同比增长") | 33 | @ApiModelProperty(value = "收费水量-同比增长") |
37 | private Double chargeWaterRatio; | 34 | private String chargeWaterRatio; |
38 | @ApiModelProperty(value = "收费水量-完成率") | 35 | @ApiModelProperty(value = "收费水量-完成率") |
39 | private String completeRatio; | 36 | private String completeRatio; |
40 | @ApiModelProperty(value = "序时进度") | 37 | @ApiModelProperty(value = "序时进度") |
... | @@ -47,7 +44,7 @@ public class ProductDataVO { | ... | @@ -47,7 +44,7 @@ public class ProductDataVO { |
47 | @ApiModelProperty(value = "实际处理水量-日均值") | 44 | @ApiModelProperty(value = "实际处理水量-日均值") |
48 | private String avgYsjslWaterVolume;//平均99.76万吨/天 | 45 | private String avgYsjslWaterVolume;//平均99.76万吨/天 |
49 | @ApiModelProperty(value = "实际处理水量--同比增长") | 46 | @ApiModelProperty(value = "实际处理水量--同比增长") |
50 | private Double ysjslWaterRatio; | 47 | private String ysjslWaterRatio; |
51 | 48 | ||
52 | 49 | ||
53 | @ApiModelProperty(value = "药量目标") | 50 | @ApiModelProperty(value = "药量目标") |
... | @@ -65,12 +62,13 @@ public class ProductDataVO { | ... | @@ -65,12 +62,13 @@ public class ProductDataVO { |
65 | 62 | ||
66 | @ApiModelProperty(value = "水电耗高于控制目标--水务公司列表") | 63 | @ApiModelProperty(value = "水电耗高于控制目标--水务公司列表") |
67 | private List<FReportPowerMonthDataVO> powerDeptartList = new ArrayList<>(); | 64 | private List<FReportPowerMonthDataVO> powerDeptartList = new ArrayList<>(); |
68 | @ApiModelProperty(value = "水电耗高于控制目标--水务公司列表") | 65 | @ApiModelProperty(value = "水电耗高于控制目标--水务公司名称") |
69 | private String powerDeptartName; | 66 | private String powerDeptartName; |
70 | 67 | ||
71 | @ApiModelProperty(value = "药剂成本高于控制目标--水务公司列表") | 68 | @ApiModelProperty(value = "药剂成本高于控制目标--水务公司列表") |
72 | private List<FReportPowerMonthDataVO> drugDeptartList = new ArrayList<>(); | 69 | private List<FReportPowerMonthDataVO> drugDeptartList = new ArrayList<>(); |
73 | @ApiModelProperty(value = "药剂成本高于控制目标--水务公司列表") | 70 | |
71 | @ApiModelProperty(value = "药剂成本高于控制目标--水务公司名称") | ||
74 | private String drugDeptartName; | 72 | private String drugDeptartName; |
75 | 73 | ||
76 | @ApiModelProperty(value = "季度最后一天") | 74 | @ApiModelProperty(value = "季度最后一天") |
... | @@ -82,17 +80,6 @@ public class ProductDataVO { | ... | @@ -82,17 +80,6 @@ public class ProductDataVO { |
82 | @ApiModelProperty(value = "隐患部门名称") | 80 | @ApiModelProperty(value = "隐患部门名称") |
83 | private String dangerDeptNames; | 81 | private String dangerDeptNames; |
84 | 82 | ||
85 | //收费水量-日均值 | ||
86 | public String getAvgDayWaterVolume() { | ||
87 | avgDayWaterVolume = JSUtils.divide(chargeWaterVolume , dayNum ) ; | ||
88 | return avgDayWaterVolume; | ||
89 | } | ||
90 | //实际处理水量-日均值 | ||
91 | public String getAvgYsjslWaterVolume() { | ||
92 | // avgYsjslWaterVolume = ConvertUtils.getDouble(ysjslWaterVolume,0) / dayNum; | ||
93 | avgYsjslWaterVolume = JSUtils.divide(ysjslWaterVolume , dayNum ) ; | ||
94 | return avgYsjslWaterVolume; | ||
95 | } | ||
96 | 83 | ||
97 | public String getWaterDeptartName() { | 84 | public String getWaterDeptartName() { |
98 | return getDeptName(waterDeptartList); | 85 | return getDeptName(waterDeptartList); |
... | @@ -111,8 +98,8 @@ public class ProductDataVO { | ... | @@ -111,8 +98,8 @@ public class ProductDataVO { |
111 | if( deptartList != null && !deptartList.isEmpty() ){ | 98 | if( deptartList != null && !deptartList.isEmpty() ){ |
112 | for(FReportWaterMonthDataVO dataVO : deptartList){ | 99 | for(FReportWaterMonthDataVO dataVO : deptartList){ |
113 | if(deptName.length() > 0 ) deptName+="、"; | 100 | if(deptName.length() > 0 ) deptName+="、"; |
114 | if(StringUtils.isNotEmpty(dataVO.getDeptartName())){ | 101 | if(StringUtils.isNotEmpty(dataVO.getDepartName())){ |
115 | deptName += dataVO.getDeptartName(); | 102 | deptName += dataVO.getDepartName(); |
116 | } | 103 | } |
117 | 104 | ||
118 | } | 105 | } |
... | @@ -124,8 +111,8 @@ public class ProductDataVO { | ... | @@ -124,8 +111,8 @@ public class ProductDataVO { |
124 | if( deptartList != null && !deptartList.isEmpty() ){ | 111 | if( deptartList != null && !deptartList.isEmpty() ){ |
125 | for(FReportPowerMonthDataVO dataVO : deptartList){ | 112 | for(FReportPowerMonthDataVO dataVO : deptartList){ |
126 | if(deptName.length() > 0 ) deptName+="、"; | 113 | if(deptName.length() > 0 ) deptName+="、"; |
127 | if(StringUtils.isNotEmpty(dataVO.getDeptartName())){ | 114 | if(StringUtils.isNotEmpty(dataVO.getDepartName())){ |
128 | deptName += dataVO.getDeptartName(); | 115 | deptName += dataVO.getDepartName(); |
129 | } | 116 | } |
130 | } | 117 | } |
131 | } | 118 | } | ... | ... |
... | @@ -2,6 +2,7 @@ package com.skua.modules.equipment.service.impl; | ... | @@ -2,6 +2,7 @@ package com.skua.modules.equipment.service.impl; |
2 | 2 | ||
3 | import com.skua.common.constant.ReportConstant; | 3 | import com.skua.common.constant.ReportConstant; |
4 | import com.skua.common.report.ReportViewUtil; | 4 | import com.skua.common.report.ReportViewUtil; |
5 | import com.skua.common.report.vo.ReportItemVO; | ||
5 | import com.skua.core.context.SpringContextUtils; | 6 | import com.skua.core.context.SpringContextUtils; |
6 | import com.skua.core.util.ConvertUtils; | 7 | import com.skua.core.util.ConvertUtils; |
7 | import com.skua.modules.common.vo.DateVO; | 8 | import com.skua.modules.common.vo.DateVO; |
... | @@ -38,20 +39,18 @@ public class DrugConsumptionAnalusisServiceImpl implements IDrugConsumptionAnaly | ... | @@ -38,20 +39,18 @@ public class DrugConsumptionAnalusisServiceImpl implements IDrugConsumptionAnaly |
38 | //数据展示 | 39 | //数据展示 |
39 | public DrugConsumptionDisplayVO dataDisplay(String time, String departId){ | 40 | public DrugConsumptionDisplayVO dataDisplay(String time, String departId){ |
40 | DrugConsumptionDisplayVO displayVO = null; | 41 | DrugConsumptionDisplayVO displayVO = null; |
41 | DateVO dateVO = new DateVO(time);//转换后的时间参数 | 42 | String startTime = time+"-01"; |
42 | //出水量 | 43 | String endTime = time +"-31"; |
43 | Double CSL = getCSL(departId, dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate());//出水量 | 44 | // DateVO dateVO = new DateVO(time);//转换后的时间参数 |
44 | //同比-上月出水量 | 45 | |
45 | Double tbsyCsl = getCSL(departId, dateVO.getLastMonthStartTime(),dateVO.getLastMonthEndTime());//出水量 | 46 | //出水量:+同比+环比 |
46 | //环比--去年出水量 | 47 | ReportItemVO csl_reportVO = ReportViewUtil.getSumValueByTBHB(ReportConstant.view2119,ReportConstant.field_CSL, departId, startTime, endTime); |
47 | Double tbqnCsl = getCSL(departId, dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime());//出水量 | 48 | //总药耗:value ; 同比 环比 |
48 | 49 | ReportItemVO zyhReportVO = ReportViewUtil.getSumValueByTBHB( ReportConstant.view3a24,ReportConstant.fieldYj, departId, startTime,endTime); | |
49 | //计算药耗 | 50 | //计算药耗 |
50 | Double zyh = countDSYH(departId ,dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate());//总药耗 | 51 | displayVO = new DrugConsumptionDisplayVO(ConvertUtils.getDouble(csl_reportVO.getValue(),0d) , ConvertUtils.getDouble(csl_reportVO.getValueHb(),0d), ConvertUtils.getDouble(csl_reportVO.getValueTb(),0d), |
51 | Double tbqnzyh = countDSYH(departId ,dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime() );//去年同比总药耗 | 52 | ConvertUtils.getDouble(zyhReportVO.getValue(),0d), ConvertUtils.getDouble(zyhReportVO.getValueHb(),0d), ConvertUtils.getDouble(zyhReportVO.getValueTb(),0d)); |
52 | Double hbsyzyh = countDSYH(departId ,dateVO.getLastMonthStartTime(),dateVO.getLastMonthEndTime() );//环比上月总药耗 | ||
53 | 53 | ||
54 | displayVO = new DrugConsumptionDisplayVO( CSL, tbqnCsl, tbsyCsl, zyh, hbsyzyh, tbqnzyh); | ||
55 | 54 | ||
56 | //历史最低吨水药耗??? | 55 | //历史最低吨水药耗??? |
57 | String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,ReportConstant.fieldClsl, departId, null,null); | 56 | String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,ReportConstant.fieldClsl, departId, null,null); | ... | ... |
1 | package com.skua.modules.equipment.vo; | 1 | package com.skua.modules.equipment.vo; |
2 | 2 | ||
3 | import com.skua.core.util.ConvertUtils; | ||
4 | import com.skua.tool.util.JSUtils; | ||
3 | import io.swagger.annotations.ApiModel; | 5 | import io.swagger.annotations.ApiModel; |
4 | import io.swagger.annotations.ApiModelProperty; | 6 | import io.swagger.annotations.ApiModelProperty; |
5 | import lombok.Data; | 7 | import lombok.Data; |
... | @@ -84,39 +86,32 @@ public class DrugConsumptionDisplayVO { | ... | @@ -84,39 +86,32 @@ public class DrugConsumptionDisplayVO { |
84 | this.CSL = CSL; | 86 | this.CSL = CSL; |
85 | this.tbqnCsl = tbqnCsl; | 87 | this.tbqnCsl = tbqnCsl; |
86 | this.hbsyCsl = hbsyCsl; | 88 | this.hbsyCsl = hbsyCsl; |
87 | this.zyh = zyh; | 89 | this.zyh = ConvertUtils.getDouble(zyh,0d); |
88 | this.hbsyzyh = hbsyzyh; | 90 | this.hbsyzyh = hbsyzyh; |
89 | this.tbqnzyh = tbqnzyh; | 91 | this.tbqnzyh = tbqnzyh; |
92 | // 计算吨水药耗: 药耗量[kg] / 处理水量[吨] | ||
93 | this.dsyh = Double.parseDouble(JSUtils.divide(zyh, CSL)); | ||
94 | //同比总药耗 | ||
95 | this.tbqnzyhsl = Double.parseDouble(JSUtils.subtract( zyh, tbqnzyh)); | ||
96 | String expression = "100*( "+zyh+" - "+tbqnzyh+") / "+tbqnzyh; | ||
97 | this.tbqnzyhbl = Double.parseDouble(JSUtils.executeExpression(expression,"0") ); | ||
98 | //同比吨水药耗 | ||
99 | this.tbqndsyh = Double.parseDouble( JSUtils.divide(tbqnzyh ,tbqnCsl)); | ||
100 | this.tbqndsyhsl = this.getValue(this.dsyh - this.tbqndsyh); | ||
101 | expression = "100*( "+this.dsyh+" - "+this.tbqndsyh+") / "+this.tbqnzyh; | ||
102 | this.tbqndsyhbl = Double.parseDouble( JSUtils.executeExpression( expression, "0")); | ||
103 | |||
104 | //环比 总药耗 | ||
105 | this.hbsyzyhsl = Double.parseDouble(JSUtils.subtract( this.zyh ,this.hbsyzyh)); | ||
106 | expression = "100*( "+this.zyh+" - "+this.hbsyzyh+") / "+this.hbsyzyh; | ||
107 | this.hbsyzyhbl = Double.parseDouble(JSUtils.executeExpression(expression,"0") ); | ||
108 | //环比 吨水药耗 | ||
109 | this.hbsydsyh = Double.parseDouble( JSUtils.divide(this.hbsyzyh ,this.hbsyCsl)); | ||
110 | this.hbsydsyhsl = this.getValue(this.dsyh - this.hbsydsyh); | ||
111 | expression = "100*( "+this.dsyh+" - "+this.hbsydsyh+") / "+this.hbsydsyh; | ||
112 | this.hbsydsyhbl = Double.parseDouble( JSUtils.executeExpression( expression, "0")); | ||
113 | |||
90 | 114 | ||
91 | if(this.zyh != null ){ | ||
92 | //计算吨水药耗 | ||
93 | //药耗量[kg] / 处理水量[吨] | ||
94 | if(this.CSL != null && Double.compare(this.CSL, 0.0) != 0) { | ||
95 | this.dsyh = this.getValue(this.zyh /this.CSL ); | ||
96 | } | ||
97 | //同比总药耗 | ||
98 | if(this.tbqnzyh != null){ | ||
99 | this.tbqnzyhsl = this.getValue(this.zyh - this.tbqnzyh); | ||
100 | this.tbqnzyhbl = this.getValue(((this.zyh - this.tbqnzyh)/this.tbqnzyh)*100) ; | ||
101 | //计算吨水药耗 //同比吨水药耗 | ||
102 | if(this.tbqnCsl != null && Double.compare(this.tbqnCsl, 0.0) != 0) this.tbqndsyh = this.getValue(this.tbqnzyh /this.tbqnCsl ); | ||
103 | if(this.tbqndsyh != null && this.dsyh != null ){ | ||
104 | this.tbqndsyhsl = this.getValue(dsyh-tbqndsyh); | ||
105 | this.tbqndsyhbl = this.getValue((dsyh-tbqndsyh)/tbqndsyh*100); | ||
106 | } | ||
107 | } | ||
108 | //环比总药耗 | ||
109 | if(this.hbsyzyh != null ){ | ||
110 | this.hbsyzyhsl = this.getValue(this.zyh - this.hbsyzyh); | ||
111 | this.hbsyzyhbl = this.getValue(((this.zyh - this.hbsyzyh)/this.hbsyzyh)*100) ; | ||
112 | //环比-吨水药耗 | ||
113 | if(this.hbsyCsl != null && Double.compare(this.hbsyCsl, 0.0) != 0) this.hbsydsyh = this.getValue(this.hbsyzyh /this.hbsyCsl ); | ||
114 | if(this.hbsydsyh != null && this.dsyh != null){ | ||
115 | this.hbsydsyhsl = this.getValue(this.dsyh - this.hbsydsyh); | ||
116 | this.hbsydsyhbl = this.getValue((this.dsyh - this.hbsydsyh) / this.hbsydsyh*100); | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | } | 115 | } |
121 | private Double getValue(Double d) { | 116 | private Double getValue(Double d) { |
122 | try{ | 117 | try{ | ... | ... |
-
请 注册 或 登录 后发表评论