kangwei: 生产运营日报
正在显示
10 个修改的文件
包含
96 行增加
和
9 行删除
... | @@ -47,5 +47,7 @@ public interface ReportConstant { | ... | @@ -47,5 +47,7 @@ public interface ReportConstant { |
47 | public static final String fieldSz = "JSZL,CSZL,JSCOD,CSCOD,JSAD,CSAD,JSZD,CSTN,JSPH,JSSS,CSPH,CSSS"; | 47 | public static final String fieldSz = "JSZL,CSZL,JSCOD,CSCOD,JSAD,CSAD,JSZD,CSTN,JSPH,JSSS,CSPH,CSSS"; |
48 | //出水字段 | 48 | //出水字段 |
49 | public static final String field_2119_CS = "CSZL,CSCOD,CSAD,CSTN,CSPH"; | 49 | public static final String field_2119_CS = "CSZL,CSCOD,CSAD,CSTN,CSPH"; |
50 | //进水字段 | ||
51 | public static final String field_2119_JS = "JSZL,JSCOD,JSAD,JSZD,JSPH"; | ||
50 | 52 | ||
51 | } | 53 | } | ... | ... |
... | @@ -9,6 +9,7 @@ import com.skua.modules.common.vo.DepartVO; | ... | @@ -9,6 +9,7 @@ import com.skua.modules.common.vo.DepartVO; |
9 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
10 | 10 | ||
11 | import javax.annotation.Resource; | 11 | import javax.annotation.Resource; |
12 | import java.util.HashMap; | ||
12 | import java.util.List; | 13 | import java.util.List; |
13 | import java.util.Map; | 14 | import java.util.Map; |
14 | 15 | ||
... | @@ -24,7 +25,11 @@ public class CommonSqlServiceImpl implements ICommonSqlService { | ... | @@ -24,7 +25,11 @@ public class CommonSqlServiceImpl implements ICommonSqlService { |
24 | 25 | ||
25 | @Override | 26 | @Override |
26 | public Map<String, Object> queryForMap(String sql) { | 27 | public Map<String, Object> queryForMap(String sql) { |
27 | return commonSqlMapper.queryForMap(sql); | 28 | Map<String, Object> dataMap = commonSqlMapper.queryForMap(sql); |
29 | if(dataMap == null ){ | ||
30 | dataMap = new HashMap<>(); | ||
31 | } | ||
32 | return dataMap ; | ||
28 | } | 33 | } |
29 | 34 | ||
30 | @Override | 35 | @Override | ... | ... |
... | @@ -830,4 +830,27 @@ public class DateUtils { | ... | @@ -830,4 +830,27 @@ public class DateUtils { |
830 | calendar.setTime(currentDate); | 830 | calendar.setTime(currentDate); |
831 | return calendar.get(Calendar.MONTH)+1; | 831 | return calendar.get(Calendar.MONTH)+1; |
832 | } | 832 | } |
833 | |||
834 | /*** | ||
835 | * 前几天时间 | ||
836 | * @param dateString | ||
837 | * @param minusDays | ||
838 | * @return | ||
839 | */ | ||
840 | public static String getPreviousDay(String dateString,Integer minusDays){ | ||
841 | if(minusDays == null){ | ||
842 | minusDays = 1; | ||
843 | } | ||
844 | // 假设这是你提供的日期字符串 | ||
845 | //String dateString = "2023-03-15"; | ||
846 | // 创建一个DateTimeFormatter来解析日期字符串 | ||
847 | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); | ||
848 | // 使用formatter将字符串解析为LocalDate对象 | ||
849 | LocalDate date = LocalDate.parse(dateString, formatter); | ||
850 | // 获取前一天的日期 | ||
851 | LocalDate previousDay = date.minusDays(minusDays); | ||
852 | // 将前一天的日期格式化为字符串 | ||
853 | String previousDayString = previousDay.format(formatter); | ||
854 | return previousDayString; | ||
855 | } | ||
833 | } | 856 | } | ... | ... |
... | @@ -9,6 +9,8 @@ import java.math.BigDecimal; | ... | @@ -9,6 +9,8 @@ import java.math.BigDecimal; |
9 | import java.text.DecimalFormat; | 9 | import java.text.DecimalFormat; |
10 | import java.text.ParseException; | 10 | import java.text.ParseException; |
11 | import java.text.SimpleDateFormat; | 11 | import java.text.SimpleDateFormat; |
12 | import java.time.LocalDate; | ||
13 | import java.time.format.DateTimeFormatter; | ||
12 | import java.util.*; | 14 | import java.util.*; |
13 | import java.util.regex.Matcher; | 15 | import java.util.regex.Matcher; |
14 | import java.util.regex.Pattern; | 16 | import java.util.regex.Pattern; |
... | @@ -54,6 +56,8 @@ public class JSUtils { | ... | @@ -54,6 +56,8 @@ public class JSUtils { |
54 | return "0"; | 56 | return "0"; |
55 | } | 57 | } |
56 | 58 | ||
59 | |||
60 | |||
57 | /*** | 61 | /*** |
58 | * 格式化结果,保留两位小数 | 62 | * 格式化结果,保留两位小数 |
59 | * @param obj1 | 63 | * @param obj1 | ... | ... |
... | @@ -93,7 +93,7 @@ public class AjhPlanScheduleConfig { | ... | @@ -93,7 +93,7 @@ public class AjhPlanScheduleConfig { |
93 | this.configName = configName; | 93 | this.configName = configName; |
94 | } | 94 | } |
95 | 95 | ||
96 | public AjhPlanScheduleConfig(String departId, String year, String parentId, String configName, String completeTime, String responsibler) { | 96 | public AjhPlanScheduleConfig(String departId, String years, String parentId, String configName, String completeTime, String responsibler) { |
97 | this.departId = departId; | 97 | this.departId = departId; |
98 | this.years = years; | 98 | this.years = years; |
99 | this.parentId = parentId; | 99 | this.parentId = parentId; | ... | ... |
... | @@ -28,8 +28,8 @@ public class EventMapController { | ... | @@ -28,8 +28,8 @@ public class EventMapController { |
28 | @Autowired | 28 | @Autowired |
29 | private IEmergencyRiskEventService emergencyRiskEventService; | 29 | private IEmergencyRiskEventService emergencyRiskEventService; |
30 | 30 | ||
31 | @AutoLog(value = "风险库统计(数字)") | 31 | @AutoLog(value = "隐患事件统计(数字)") |
32 | @ApiOperation(value="风险库统计", notes="风险库统计") | 32 | @ApiOperation(value="隐患事件统计(数字)", notes="隐患事件统计(数字)") |
33 | @GetMapping(value = "/dangerEventStatistics") | 33 | @GetMapping(value = "/dangerEventStatistics") |
34 | public Result<DangerEventOverviewVO> dangerEventStatistics(String departIds, String startDate, String endDate){ | 34 | public Result<DangerEventOverviewVO> dangerEventStatistics(String departIds, String startDate, String endDate){ |
35 | Result<DangerEventOverviewVO> result = new Result<>(); | 35 | Result<DangerEventOverviewVO> result = new Result<>(); |
... | @@ -41,8 +41,8 @@ public class EventMapController { | ... | @@ -41,8 +41,8 @@ public class EventMapController { |
41 | result.setResult(eventOverview); | 41 | result.setResult(eventOverview); |
42 | return result; | 42 | return result; |
43 | } | 43 | } |
44 | @AutoLog(value = "安全检查列表") | 44 | @AutoLog(value = "隐患事件统计(列表)") |
45 | @ApiOperation(value="安全检查列表", notes="安全检查列表") | 45 | @ApiOperation(value="隐患事件统计(列表)", notes="隐患事件统计(列表)") |
46 | @GetMapping(value = "/dangerEventStatisticsList") | 46 | @GetMapping(value = "/dangerEventStatisticsList") |
47 | public Result<List<DangerEventOverviewVO>> dangerEventStatisticsList(String departIds,String startDate, String endDate){ | 47 | public Result<List<DangerEventOverviewVO>> dangerEventStatisticsList(String departIds,String startDate, String endDate){ |
48 | Result<List<DangerEventOverviewVO>> result = new Result<>(); | 48 | Result<List<DangerEventOverviewVO>> result = new Result<>(); |
... | @@ -57,7 +57,7 @@ public class EventMapController { | ... | @@ -57,7 +57,7 @@ public class EventMapController { |
57 | } | 57 | } |
58 | 58 | ||
59 | @AutoLog(value = "风险库统计(数字)") | 59 | @AutoLog(value = "风险库统计(数字)") |
60 | @ApiOperation(value="风险库统计", notes="风险库统计") | 60 | @ApiOperation(value="风险库统计(数字)", notes="风险库统计(数字)") |
61 | @GetMapping(value = "/riskLibraryStatistics") | 61 | @GetMapping(value = "/riskLibraryStatistics") |
62 | public Result<RiskDatabaseResult> riskLibraryStatistics(String departIds,String startDate, String endDate){ | 62 | public Result<RiskDatabaseResult> riskLibraryStatistics(String departIds,String startDate, String endDate){ |
63 | Result<RiskDatabaseResult> result = new Result<>(); | 63 | Result<RiskDatabaseResult> result = new Result<>(); | ... | ... |
... | @@ -181,7 +181,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven | ... | @@ -181,7 +181,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven |
181 | * @return | 181 | * @return |
182 | */ | 182 | */ |
183 | public RiskDatabaseResult getRiskLibraryStatistics(String departIds, String startDate, String endDate){ | 183 | public RiskDatabaseResult getRiskLibraryStatistics(String departIds, String startDate, String endDate){ |
184 | String sql = " select sum(ifnull(aa.count,0)) 'aqyhCount',sum(ifnull(bb.count,0) )'yhpcCount', sum(ifnull(cc.count,0)) 'ycCount', sum(ifnull(dd.count,0)) 'xjCount'"; | 184 | String sql = " select sum(ifnull(aa.count,0)) 'aqyhCount',sum(ifnull(bb.count,0) )'yhpcCount', sum(ifnull(ee.count,0)) 'yhpcSJCount', sum(ifnull(cc.count,0)) 'ycCount', sum(ifnull(dd.count,0)) 'xjCount'"; |
185 | sql += getRiskLibraryStatisticsSql(departIds, startDate, endDate); | 185 | sql += getRiskLibraryStatisticsSql(departIds, startDate, endDate); |
186 | 186 | ||
187 | List<RiskDatabaseResult> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<RiskDatabaseResult>(RiskDatabaseResult.class)); | 187 | List<RiskDatabaseResult> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<RiskDatabaseResult>(RiskDatabaseResult.class)); |
... | @@ -191,7 +191,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven | ... | @@ -191,7 +191,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven |
191 | return new RiskDatabaseResult(0,0,0,0,0); | 191 | return new RiskDatabaseResult(0,0,0,0,0); |
192 | } | 192 | } |
193 | public List<RiskDatabaseResult> getRiskLibraryStatisticsList(String departIds, String startDate, String endDate){ | 193 | public List<RiskDatabaseResult> getRiskLibraryStatisticsList(String departIds, String startDate, String endDate){ |
194 | String sql = " select d.id 'dpart_id',d.depart_name , ifnull(aa.count,0) 'aqyhCount',ifnull(bb.count,0) 'yhpcCount', ifnull(cc.count,0) 'ycCount', ifnull(dd.count,0) 'xjCount'"; | 194 | String sql = " select d.id 'dpart_id',d.depart_name , ifnull(aa.count,0) 'aqyhCount',ifnull(bb.count,0) 'yhpcCount',ifnull(ee.count,0) 'yhpcSJCount', ifnull(cc.count,0) 'ycCount', ifnull(dd.count,0) 'xjCount'"; |
195 | sql += getRiskLibraryStatisticsSql(departIds, startDate, endDate); | 195 | sql += getRiskLibraryStatisticsSql(departIds, startDate, endDate); |
196 | List<RiskDatabaseResult> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<RiskDatabaseResult>(RiskDatabaseResult.class)); | 196 | List<RiskDatabaseResult> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<RiskDatabaseResult>(RiskDatabaseResult.class)); |
197 | return dataList; | 197 | return dataList; |
... | @@ -266,6 +266,9 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven | ... | @@ -266,6 +266,9 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven |
266 | sql += " left join ( select t.depart_id , count(1) 'count' from ajh_rectification_info t where t.rec_ord_report_date >='"+startDate+"' and t.rec_ord_report_date <='"+endDate+"' group by t.depart_id) aa on aa.depart_id = d.id"; | 266 | sql += " left join ( select t.depart_id , count(1) 'count' from ajh_rectification_info t where t.rec_ord_report_date >='"+startDate+"' and t.rec_ord_report_date <='"+endDate+"' group by t.depart_id) aa on aa.depart_id = d.id"; |
267 | // 风险排查 | 267 | // 风险排查 |
268 | sql += " left join ( select depart_id ,count(id) 'count' from danger_inspection_record where report_date >= '"+startDate+" 00:00:00' and report_date <='"+endDate+" 23:59:59' group by depart_id ) bb on bb.depart_id = d.id "; | 268 | sql += " left join ( select depart_id ,count(id) 'count' from danger_inspection_record where report_date >= '"+startDate+" 00:00:00' and report_date <='"+endDate+" 23:59:59' group by depart_id ) bb on bb.depart_id = d.id "; |
269 | //实际完成数量 | ||
270 | sql += " left join ( select depart_id ,count(id) 'count' from danger_inspection_record where status = '2' and end_date >= '"+startDate+" 00:00:00' and end_date <='"+endDate+" 23:59:59' group by depart_id ) eee on eee.depart_id = d.id "; | ||
271 | |||
269 | // 异常 | 272 | // 异常 |
270 | sql += " left join ( select t.depart_id , count(1) 'count' from problem_report_plan t where t.report_time >='"+startDate+"' and t.report_time <='"+endDate+"' group by t.depart_id) cc on cc.depart_id = d.id"; | 273 | sql += " left join ( select t.depart_id , count(1) 'count' from problem_report_plan t where t.report_time >='"+startDate+"' and t.report_time <='"+endDate+"' group by t.depart_id) cc on cc.depart_id = d.id"; |
271 | //巡检 | 274 | //巡检 | ... | ... |
... | @@ -28,6 +28,8 @@ public class RiskDatabaseResult { | ... | @@ -28,6 +28,8 @@ public class RiskDatabaseResult { |
28 | @ApiModelProperty(value = "隐患排查数量") | 28 | @ApiModelProperty(value = "隐患排查数量") |
29 | private Integer yhpcCount; | 29 | private Integer yhpcCount; |
30 | 30 | ||
31 | @ApiModelProperty(value = "隐患排查:实际完成次数") | ||
32 | private Integer yhpcSJCount; | ||
31 | 33 | ||
32 | /**异常数*/ | 34 | /**异常数*/ |
33 | @ApiModelProperty(value = "异常数") | 35 | @ApiModelProperty(value = "异常数") | ... | ... |
sk-module-biz/src/main/java/com/skua/modules/report/controller/OperationDailyController.java
0 → 100644
此文件的差异被折叠,
点击展开。
1 | package com.skua.modules.report.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModelProperty; | ||
4 | import lombok.Data; | ||
5 | |||
6 | /** | ||
7 | * 运营日报 日报 | ||
8 | * @author kangwei | ||
9 | */ | ||
10 | @Data | ||
11 | public class OperationDailyVO { | ||
12 | |||
13 | @ApiModelProperty(value = "处理水量合计") | ||
14 | private String cslhj; | ||
15 | |||
16 | @ApiModelProperty(value = "日均水量") | ||
17 | private String clsavg; | ||
18 | |||
19 | @ApiModelProperty(value = "昨日增加出水量") | ||
20 | private String increaseCLS; | ||
21 | |||
22 | @ApiModelProperty(value = "吨水电耗") | ||
23 | private String dsdh; | ||
24 | |||
25 | @ApiModelProperty(value = "昨日增加吨水电耗") | ||
26 | private String increaseDsdh; | ||
27 | |||
28 | @ApiModelProperty(value = "污泥量") | ||
29 | private String wnl; | ||
30 | |||
31 | @ApiModelProperty(value = "污泥脱水公司") | ||
32 | private String wnDepartName; | ||
33 | |||
34 | @ApiModelProperty(value = "污泥浓度公司") | ||
35 | private String mlssDepartName; | ||
36 | |||
37 | @ApiModelProperty(value = "进水超标公司") | ||
38 | private String jsDepartName; | ||
39 | |||
40 | @ApiModelProperty(value = "出水超标公司") | ||
41 | private String csDepartName; | ||
42 | |||
43 | @ApiModelProperty(value = "电耗超标公司") | ||
44 | private String dhDepartName; | ||
45 | |||
46 | @ApiModelProperty(value = "药耗超标公司") | ||
47 | private String yhDepartName; | ||
48 | } |
-
请 注册 或 登录 后发表评论