72eb82e2 张雷

Merge remote-tracking branch 'origin/master' into master

2 个父辈 7290d1b5 79358c7d
...@@ -86,7 +86,7 @@ public final class ChineseInital { ...@@ -86,7 +86,7 @@ public final class ChineseInital {
86 } 86 }
87 87
88 public static void main(String[] args) { 88 public static void main(String[] args) {
89 System.out.println("获取拼音首字母:"+getAllFirstLetter("1大中国南昌中大china")); 89 System.out.println("获取拼音首字母:"+getAllFirstLetter("1-1#进水提升泵"));
90 } 90 }
91 91
92 }
...\ No newline at end of file ...\ No newline at end of file
92 }
......
...@@ -28,6 +28,8 @@ public class JTDisplayScreenController { ...@@ -28,6 +28,8 @@ public class JTDisplayScreenController {
28 public Result<List<SysFactoryInfoVO>> factoryList() { 28 public Result<List<SysFactoryInfoVO>> factoryList() {
29 Result<List<SysFactoryInfoVO>> result = new Result<>(); 29 Result<List<SysFactoryInfoVO>> result = new Result<>();
30 List<SysFactoryInfoVO> list = displayScreenService.getFactoryList(); 30 List<SysFactoryInfoVO> list = displayScreenService.getFactoryList();
31
32
31 result.setResult(list); 33 result.setResult(list);
32 return result; 34 return result;
33 } 35 }
......
...@@ -55,7 +55,7 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { ...@@ -55,7 +55,7 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService {
55 List<Map<String, Object>> dataList = masterDB.queryForList(factorySql); 55 List<Map<String, Object>> dataList = masterDB.queryForList(factorySql);
56 for(Map<String, Object> dataMap : dataList) { 56 for(Map<String, Object> dataMap : dataList) {
57 // resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("create_by"))+""+ConvertUtils.getString(dataMap.get("title"))); 57 // resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("create_by"))+""+ConvertUtils.getString(dataMap.get("title")));
58 factoryInfoVO = new SysFactoryInfoVO(dataMap.get("id")+"",dataMap.get("depart_id").toString(),dataMap.get("depart_name").toString(),dataMap.get("pro_longitude").toString(),dataMap.get("pro_latitude").toString()); 58 factoryInfoVO = new SysFactoryInfoVO(dataMap.get("id")+"",dataMap.get("depart_id").toString(),dataMap.get("depart_name").toString(),dataMap.get("pro_longitude").toString(),dataMap.get("pro_latitude").toString(),1);
59 factoryInfoMap.put(factoryInfoVO.getDepartId(),factoryInfoVO); 59 factoryInfoMap.put(factoryInfoVO.getDepartId(),factoryInfoVO);
60 } 60 }
61 //查询部门集合 61 //查询部门集合
...@@ -89,9 +89,19 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { ...@@ -89,9 +89,19 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService {
89 } 89 }
90 // resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("create_by"))+""+ConvertUtils.getString(dataMap.get("title"))); 90 // resultMap.put(ConvertUtils.getString(dataMap.get("id")), ConvertUtils.getString(dataMap.get("create_by"))+""+ConvertUtils.getString(dataMap.get("title")));
91 } 91 }
92
93
92 factoryInfoVOList = new ArrayList(factoryInfoMap.values()); 94 factoryInfoVOList = new ArrayList(factoryInfoMap.values());
95
96 // 添加:中冶数据
97 factorySql = "select fi.id,fi.depart_id,d.depart_name, fi.pro_longitude,fi.pro_latitude ,d.depart_type from sys_factory_info fi ,sys_depart d where fi.depart_id = d.id and d.depart_type =-1";
98 List<SysFactoryInfoVO> factroyList = masterDB.query(factorySql, new BeanPropertyRowMapper<SysFactoryInfoVO>(SysFactoryInfoVO.class));
99 if(factroyList != null ){
100 factoryInfoVOList.addAll(factroyList);
101 }
93 return factoryInfoVOList; 102 return factoryInfoVOList;
94 } 103 }
104
95 /** 105 /**
96 * 项目运营情况 106 * 项目运营情况
97 * @param departId 107 * @param departId
......
...@@ -17,6 +17,9 @@ public class SysFactoryInfoVO { ...@@ -17,6 +17,9 @@ public class SysFactoryInfoVO {
17 @ApiModelProperty(value = "水厂名称") 17 @ApiModelProperty(value = "水厂名称")
18 private String departId; 18 private String departId;
19 19
20 @ApiModelProperty(value = "厂站类型")
21 private Integer departType = 1;
22
20 @ApiModelProperty(value = "水厂名称") 23 @ApiModelProperty(value = "水厂名称")
21 private String departName; 24 private String departName;
22 25
...@@ -42,11 +45,12 @@ public class SysFactoryInfoVO { ...@@ -42,11 +45,12 @@ public class SysFactoryInfoVO {
42 public SysFactoryInfoVO() { 45 public SysFactoryInfoVO() {
43 } 46 }
44 47
45 public SysFactoryInfoVO(String id, String departId, String departName, String proLongitude, String proLatitude) { 48 public SysFactoryInfoVO(String id, String departId, String departName, String proLongitude, String proLatitude,Integer departType) {
46 this.id = id; 49 this.id = id;
47 this.departId = departId; 50 this.departId = departId;
48 this.departName = departName; 51 this.departName = departName;
49 this.proLongitude = proLongitude; 52 this.proLongitude = proLongitude;
50 this.proLatitude = proLatitude; 53 this.proLatitude = proLatitude;
54 this.departType = departType;
51 } 55 }
52 } 56 }
......
...@@ -11,16 +11,6 @@ import java.util.List; ...@@ -11,16 +11,6 @@ import java.util.List;
11 */ 11 */
12 public interface OperationReportMapper { 12 public interface OperationReportMapper {
13 /*** 13 /***
14 * 查询月度生产数据报表
15 * @param startTime
16 * @param endTime
17 * @param lastStartTime
18 * @param lastEndTime
19 * @return
20 */
21 List<FReportMonthDataVO> queryReportMonthData(@Param("startTime") String startTime,@Param("endTime") String endTime, @Param("lastStartTime")String lastStartTime,@Param("lastEndTime") String lastEndTime) ;
22
23 /***
24 * 查询隐含排查部门名称 14 * 查询隐含排查部门名称
25 * @return 15 * @return
26 */ 16 */
......
...@@ -2,64 +2,10 @@ ...@@ -2,64 +2,10 @@
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="com.skua.modules.report.mapper.OperationReportMapper"> 3 <mapper namespace="com.skua.modules.report.mapper.OperationReportMapper">
4 4
5 <!-- -->
6 <select id="queryReportMonthData" resultType="com.skua.modules.report.vo.FReportMonthDataVO">
7 SELECT
8 a.depart_id,tc.target_water,tc. target_power,tc.target_drug,
9 (select t.depart_name from sys_depart t where t.id = a.depart_id ) 'depart_name',
10 (
11 select sum(fiv.item_value)/10000 from f_report_itemv fiv ,f_report_item fi
12 where fi.report_id = '2119ecbf53a1d2d0708258ff67cfd9e1' and item_code= 'CSL' and fiv.reit_id =fi.id and a.depart_id = fiv.depart_id and fiv.data_time like '2024%'
13 ) 'ysjsl',
14 (
15 select sum(fiv.item_value)/10000 from f_report_itemv fiv ,f_report_item fi
16 where fi.report_id = '2119ecbf53a1d2d0708258ff67cfd9e1' and item_code= 'CSL' and fiv.reit_id =fi.id and a.depart_id = fiv.depart_id and fiv.data_time like '2023%'
17 ) 'tqysjsl',
18 (select sum(fiv.item_value)/10000 from f_report_itemv fiv ,f_report_item fi
19 where fi.report_id = '3a243d5715b9e1a3753c180872ca0df9' and item_code= 'DLHJ' and fiv.reit_id =fi.id and a.depart_id = fiv.depart_id and fiv.data_time like '2024%' ) 'ydh',
20 sum( IF ( ( `d`.`item_code` = 'yslwcbl' ), `a`.`item_value`, NULL ) ) AS `yslwcbl`, -- 月水量完成比例
21 sum( IF ( ( `d`.`item_code` = 'ysjsldyqntqyy' ), `a`.`item_value`, NULL ) ) AS `ysjsldyqntqyy`, -- 月实际水量低于去年同期原因
22 sum( IF ( ( `d`.`item_code` = 'qntqsfsl' ), `a`.`item_value`, NULL ) ) AS `qntqsfsl`, -- 去年同期收费水量
23 sum( IF ( ( `d`.`item_code` = 'ysfsl' ), `a`.`item_value`, NULL ) ) AS `ysfsl`, -- 月收费水量
24 sum( IF ( ( `d`.`item_code` = 'bnsjdh' ), `a`.`item_value`, NULL ) ) AS `bnsjdh`,-- 本年实际电耗
25 sum( IF ( ( `d`.`item_code` = 'sldyyqyy' ), `a`.`item_value`, NULL ) ) AS `sldyyqyy`,-- 收费水量对比变化率
26 sum( IF ( ( `d`.`item_code` = 'dhgyqntqyy' ), `a`.`item_value`, NULL ) ) AS `dhgyqntqyy`, -- 电耗高于去年同期原因
27 sum( IF ( ( `d`.`item_code` = 'yyf' ), `a`.`item_value`, NULL ) ) AS `yyf`, -- 月药费
28 sum( IF ( ( `d`.`item_code` = 'yhgyqntqyy' ), `a`.`item_value`, NULL ) ) AS `yhgyqntqyy`, -- 药耗高于去年同期原因
29 sum( IF ( ( `d`.`item_code` = 'dhcmbzyy' ), `a`.`item_value`, NULL ) ) AS `dhcmbzyy`, -- 电耗超目标值原因
30 sum( IF ( ( `d`.`item_code` = 'yhcyqyy' ), `a`.`item_value`, NULL ) ) AS `yhcyqyy` -- 药耗超预期原因
31 FROM
32 ( (SELECT reit_id,item_value,depart_id
33 FROM f_report_itemv
34 WHERE
35 data_time LIKE '2024%'
36 AND reit_id IN (
37 '1818936216687595521',
38 '1818936217375461377',
39 '1818936218109464577',
40 '1818936218910576642',
41 '1818936219120291842',
42 '1818936219854295042',
43 '1818936220017872897',
44 '1818936220353417218',
45 '1818936220571521025',
46 '1818936220739293185',
47 '1818936220890288130' )
48 ) `a`
49 LEFT JOIN `f_report_item` `d` ON ( ( `a`.`reit_id` = `d`.`id` ) )
50 LEFT JOIN `report_target_config` tc ON ( ( `tc`.`depart_id` = `a`.`depart_id` ) )
51 )
52 WHERE
53 1 = 1
54 GROUP BY
55 `a`.`depart_id`
56 </select>
57
58
59 <select id="queryDepatNameList" resultType="java.lang.String"> 5 <select id="queryDepatNameList" resultType="java.lang.String">
60 select d.depart_name from ajh_rectification_info t 6 select d.depart_name from ajh_rectification_info t
61 left join sys_depart d on t.depart_id = d.id 7 left join sys_depart d on t.depart_id = d.id
62 group by t.depart_id 8 group by t.depart_id
63 </select> 9 </select>
64 10
65 </mapper>
...\ No newline at end of file ...\ No newline at end of file
11 </mapper>
......
...@@ -8,12 +8,6 @@ import com.skua.modules.report.vo.ProductDataVO; ...@@ -8,12 +8,6 @@ import com.skua.modules.report.vo.ProductDataVO;
8 */ 8 */
9 public interface IOperationReportService { 9 public interface IOperationReportService {
10 10
11 /***
12 * 执行查询sql语句返回一个结果
13 * @param sql
14 * @return
15 */
16 String queryForString(String sql );
17 11
18 /*** 12 /***
19 * 处理月季度数据 13 * 处理月季度数据
......
...@@ -22,6 +22,10 @@ public class FReportPowerMonthDataVO { ...@@ -22,6 +22,10 @@ public class FReportPowerMonthDataVO {
22 @ApiModelProperty(value = "原因分析") 22 @ApiModelProperty(value = "原因分析")
23 private String causeAnalysis; 23 private String causeAnalysis;
24 24
25 public FReportPowerMonthDataVO(){
26
27 }
28
25 public FReportPowerMonthDataVO(String deptartName, String targetConsume, String realConsume , String causeAnalysis) { 29 public FReportPowerMonthDataVO(String deptartName, String targetConsume, String realConsume , String causeAnalysis) {
26 this.deptartName = deptartName; 30 this.deptartName = deptartName;
27 this.targetConsume = targetConsume; 31 this.targetConsume = targetConsume;
......
...@@ -19,6 +19,10 @@ public class FReportWaterMonthDataVO { ...@@ -19,6 +19,10 @@ public class FReportWaterMonthDataVO {
19 @ApiModelProperty(value = "原因分析") 19 @ApiModelProperty(value = "原因分析")
20 private String causeAnalysis; 20 private String causeAnalysis;
21 21
22 public FReportWaterMonthDataVO(){
23
24 }
25
22 public FReportWaterMonthDataVO(String deptartName, String ratio, String causeAnalysis) { 26 public FReportWaterMonthDataVO(String deptartName, String ratio, String causeAnalysis) {
23 this.deptartName = deptartName; 27 this.deptartName = deptartName;
24 this.ratio = ratio; 28 this.ratio = ratio;
......
1 package com.skua.modules.report.vo; 1 package com.skua.modules.report.vo;
2 2
3 import com.skua.core.util.ConvertUtils;
3 import io.swagger.annotations.ApiModel; 4 import io.swagger.annotations.ApiModel;
4 import io.swagger.annotations.ApiModelProperty; 5 import io.swagger.annotations.ApiModelProperty;
5 import lombok.Data; 6 import lombok.Data;
...@@ -18,19 +19,22 @@ public class ProductDataVO { ...@@ -18,19 +19,22 @@ public class ProductDataVO {
18 19
19 @ApiModelProperty(value = "季度开始时间") 20 @ApiModelProperty(value = "季度开始时间")
20 private String startTime; 21 private String startTime;
21
22 @ApiModelProperty(value = "季度结束时间") 22 @ApiModelProperty(value = "季度结束时间")
23 private String endTime; 23 private String endTime;
24 @ApiModelProperty(value = "水务厂站数量") 24 @ApiModelProperty(value = "水务厂站数量")
25 private String deptartCount; 25 private String deptartCount;
26
27 @ApiModelProperty(value = "相差天数")
28 private Long dayNum;
29
26 @ApiModelProperty(value = "收费水量") 30 @ApiModelProperty(value = "收费水量")
27 private String chargeWaterVolume;//收费水量9854.012552万吨 31 private String chargeWaterVolume;//收费水量9854.012552万吨
28 @ApiModelProperty(value = "收费水量-日均值") 32 @ApiModelProperty(value = "收费水量-日均值")
29 private String avgDayWaterVolume;//平均108.29万吨/天 33 private Double avgDayWaterVolume;//平均108.29万吨/天
30 @ApiModelProperty(value = "收费水量-同比增长") 34 @ApiModelProperty(value = "收费水量-同比增长")
31 private String chargeWaterRatio; 35 private Double chargeWaterRatio;
32 @ApiModelProperty(value = "收费水量-完成率") 36 @ApiModelProperty(value = "收费水量-完成率")
33 private String completeRatio; 37 private Double completeRatio;
34 @ApiModelProperty(value = "序时进度") 38 @ApiModelProperty(value = "序时进度")
35 private String sequentialProgress; 39 private String sequentialProgress;
36 40
...@@ -39,17 +43,17 @@ public class ProductDataVO { ...@@ -39,17 +43,17 @@ public class ProductDataVO {
39 @ApiModelProperty(value = "实际处理水量") 43 @ApiModelProperty(value = "实际处理水量")
40 private String ysjslWaterVolume; 44 private String ysjslWaterVolume;
41 @ApiModelProperty(value = "实际处理水量-日均值") 45 @ApiModelProperty(value = "实际处理水量-日均值")
42 private String avgYsjslWaterVolume;//平均99.76万吨/天 46 private Double avgYsjslWaterVolume;//平均99.76万吨/天
43 @ApiModelProperty(value = "实际处理水量--同比增长") 47 @ApiModelProperty(value = "实际处理水量--同比增长")
44 private String ysjslWaterRatio; 48 private Double ysjslWaterRatio;
45 49
46 50
47 @ApiModelProperty(value = "药量目标") 51 @ApiModelProperty(value = "药量目标")
48 private String targetDrug; 52 private Double targetDrug;
49 53
50 54
51 @ApiModelProperty(value = "药剂实际费用") 55 @ApiModelProperty(value = "药剂实际费用")
52 private String drugCost;//实际发生为0.219元/吨水 56 private Double drugCost;//实际发生为0.219元/吨水
53 57
54 58
55 @ApiModelProperty(value = "实际水量同比下降--水务公司列表") 59 @ApiModelProperty(value = "实际水量同比下降--水务公司列表")
...@@ -76,6 +80,16 @@ public class ProductDataVO { ...@@ -76,6 +80,16 @@ public class ProductDataVO {
76 @ApiModelProperty(value = "隐患部门名称") 80 @ApiModelProperty(value = "隐患部门名称")
77 private String dangerDeptNames; 81 private String dangerDeptNames;
78 82
83 //收费水量-日均值
84 public Double getAvgDayWaterVolume() {
85 avgDayWaterVolume = ConvertUtils.getDouble(chargeWaterVolume,0) / dayNum ;
86 return avgDayWaterVolume;
87 }
88 //实际处理水量-日均值
89 public Double getAvgYsjslWaterVolume() {
90 avgYsjslWaterVolume = ConvertUtils.getDouble(ysjslWaterVolume,0) / dayNum;
91 return avgYsjslWaterVolume;
92 }
79 93
80 public String getWaterDeptartName() { 94 public String getWaterDeptartName() {
81 return getDeptName(waterDeptartList); 95 return getDeptName(waterDeptartList);
...@@ -110,3 +124,4 @@ public class ProductDataVO { ...@@ -110,3 +124,4 @@ public class ProductDataVO {
110 return deptName; 124 return deptName;
111 } 125 }
112 } 126 }
127
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!