c2945bf7 sonin

运营季报 重点工作情况 修改

1 个父辈 1a4fc839
1 package com.skua.common.constant;
2
3 /**
4 * <pre>
5 * 常量
6 * </pre>
7 *
8 * @author sonin
9 * @version 1.0 2023/3/9 10:12
10 */
11 public interface BusinessConstant {
12
13 String dateFormat = "yyyy-MM-dd HH:mm:ss";
14
15 String startTimeSuffix = " 00:00:00";
16
17 String endTimeSuffix = " 23:59:59";
18
19 String countSuffix = "Count";
20
21 String sumSuffix = "Sum";
22
23 }
1 package com.skua.modules.biz;
2
3 import java.util.Collection;
4 import java.util.Map;
5
6 /**
7 * @Author:sonin
8 * @Date:2025/2/18 15:35
9 */
10 public interface IBusinessService {
11
12 Map<String, String> dictMap(String dictCode, Collection<?> inCol);
13
14 }
1 package com.skua.modules.biz.impl;
2
3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 import com.skua.modules.base.service.IBaseService;
5 import com.skua.modules.biz.IBusinessService;
6 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.stereotype.Service;
8
9 import java.util.Collection;
10 import java.util.HashMap;
11 import java.util.List;
12 import java.util.Map;
13
14 /**
15 * @Author:sonin
16 * @Date:2025/2/18 15:35
17 */
18 @Service
19 public class BusinessServiceImpl implements IBusinessService {
20
21 @Autowired
22 private IBaseService baseService;
23
24 @Override
25 public Map<String, String> dictMap(String dictCode, Collection<?> inCol) {
26 String key0, value0, table0;
27 QueryWrapper<?> queryWrapper0 = new QueryWrapper<>();
28 if ("equipment_info".equals(dictCode)) {
29 key0 = "id";
30 value0 = "equipment_name";
31 table0 = dictCode;
32 } else if ("sys_user".equals(dictCode)) {
33 key0 = "id";
34 value0 = "realname";
35 table0 = dictCode;
36 } else if ("sys_struct_dict".equals(dictCode)) {
37 key0 = "id";
38 value0 = "struct_name";
39 table0 = dictCode;
40 } else if ("equipment_category".equals(dictCode)) {
41 key0 = "id";
42 value0 = "des";
43 table0 = dictCode;
44 } else if ("evaluate_score_desc".equals(dictCode)) {
45 key0 = "id";
46 value0 = "score_desc";
47 table0 = dictCode;
48 } else if ("carbon_qualitative_desc".equals(dictCode)) {
49 key0 = "id";
50 value0 = "qualitative_desc";
51 table0 = dictCode;
52 } else if ("sys_depart".equals(dictCode)) {
53 key0 = "id";
54 value0 = "depart_name";
55 table0 = dictCode;
56 } else {
57 // 数据字典查询
58 queryWrapper0.eq("sys_dict.dict_code", dictCode);
59 key0 = "sys_dict_item.item_value";
60 value0 = "sys_dict_item.item_text";
61 table0 = "sys_dict inner join sys_dict_item on sys_dict.id = sys_dict_item.dict_id";
62 }
63 String sqlSelect = "select " + key0 + " as key0, " + value0 + " as value0 from " + table0;
64 if (inCol != null && !inCol.isEmpty()) {
65 queryWrapper0.in(key0, inCol);
66 }
67 List<Map<String, Object>> queryMapList0 = baseService.queryForList(sqlSelect, queryWrapper0);
68 Map<String, String> dictMap = new HashMap<>(10);
69 for (Map<String, Object> item : queryMapList0) {
70 dictMap.put(String.valueOf(item.get("key0")), String.valueOf(item.get("value0")));
71 }
72 return dictMap;
73 }
74
75
76 }
1 package com.skua.modules.report.service.impl; 1 package com.skua.modules.report.service.impl;
2 2
3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 import com.skua.common.constant.BusinessConstant;
3 import com.skua.common.constant.ReportConstant; 5 import com.skua.common.constant.ReportConstant;
4 import com.skua.common.report.ReportViewUtil; 6 import com.skua.common.report.ReportViewUtil;
5 import com.skua.core.context.BaseContextHandler; 7 import com.skua.core.context.BaseContextHandler;
6 import com.skua.core.context.SpringContextUtils; 8 import com.skua.core.context.SpringContextUtils;
7 import com.skua.core.util.ConvertUtils; 9 import com.skua.core.util.ConvertUtils;
10 import com.skua.modules.base.service.IBaseService;
11 import com.skua.modules.biz.IBusinessService;
8 import com.skua.modules.report.mapper.OperationReportMapper; 12 import com.skua.modules.report.mapper.OperationReportMapper;
9 import com.skua.modules.report.service.IOperationReportService; 13 import com.skua.modules.report.service.IOperationReportService;
10 import com.skua.modules.report.vo.*; 14 import com.skua.modules.report.vo.*;
...@@ -22,8 +26,11 @@ import java.math.BigDecimal; ...@@ -22,8 +26,11 @@ import java.math.BigDecimal;
22 import java.math.RoundingMode; 26 import java.math.RoundingMode;
23 import java.time.LocalDate; 27 import java.time.LocalDate;
24 import java.time.format.DateTimeFormatter; 28 import java.time.format.DateTimeFormatter;
29 import java.util.ArrayList;
30 import java.util.HashMap;
25 import java.util.List; 31 import java.util.List;
26 import java.util.Map; 32 import java.util.Map;
33 import java.util.stream.Collectors;
27 34
28 /*** 35 /***
29 * 运营周报 36 * 运营周报
...@@ -33,6 +40,10 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -33,6 +40,10 @@ public class OperationReportServiceImpl implements IOperationReportService {
33 40
34 @Resource 41 @Resource
35 private OperationReportMapper operationReportMapper; 42 private OperationReportMapper operationReportMapper;
43 @Resource
44 private IBaseService baseService;
45 @Resource
46 private IBusinessService businessService;
36 47
37 private JdbcTemplate getJdbcTemplate(){ 48 private JdbcTemplate getJdbcTemplate(){
38 JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); 49 JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master");
...@@ -154,7 +165,7 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -154,7 +165,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
154 productDataVO.setDrugDeptartList(yyhMonthDataList); 165 productDataVO.setDrugDeptartList(yyhMonthDataList);
155 166
156 167
157 //隐患排查完成情况 168 // 隐患排查完成情况
158 List<String> deptNameList = operationReportMapper.queryDepatNameList(); 169 List<String> deptNameList = operationReportMapper.queryDepatNameList();
159 productDataVO.setDangerDeptCount( 0 ); 170 productDataVO.setDangerDeptCount( 0 );
160 if(deptNameList != null && !deptNameList.isEmpty()){ 171 if(deptNameList != null && !deptNameList.isEmpty()){
...@@ -162,6 +173,36 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -162,6 +173,36 @@ public class OperationReportServiceImpl implements IOperationReportService {
162 productDataVO.setDangerDeptNames(String.join(",",deptNameList)); 173 productDataVO.setDangerDeptNames(String.join(",",deptNameList));
163 } 174 }
164 175
176 // 翻译
177 Map<String, String> sysDepartDictMap = businessService.dictMap("sys_depart", null);
178 // 1. 重点工作事项:取重点事项推进情况里面,当月完成的重点事项记录
179 QueryWrapper<?> queryWrapper1 = new QueryWrapper<>();
180 queryWrapper1.eq("status", "2")
181 .ge("end_time", startDate)
182 .le("end_time", endDate);
183 List<Map<String, Object>> queryMapList1 = baseService.queryForList("select * from f_major_issues_process", queryWrapper1);
184 for (Map<String, Object> item: queryMapList1) {
185 List<Map<String, Object>> priorityWorkItemList = new ArrayList<>();
186 priorityWorkItemList.add(new HashMap<String, Object>(){{
187 put("key0", item.get("depart_id"));
188 put("value0", sysDepartDictMap.get(item.get("depart_id")));
189 }});
190 productDataVO.setPriorityWorkItemList(priorityWorkItemList);
191 }
192 // 2: 隐患排查巡检:取风险点巡检记录里面巡检类型是生产巡检的数据
193 QueryWrapper<?> queryWrapper2 = new QueryWrapper<>();
194 queryWrapper2.eq("inspection_type", "1")
195 .ge("end_date", startDate + BusinessConstant.startTimeSuffix)
196 .le("end_date", endDate + BusinessConstant.endTimeSuffix);
197 List<Map<String, Object>> queryMapList2 = baseService.queryForList("select * from danger_inspection_record", queryWrapper2);
198 for (Map<String, Object> item: queryMapList2) {
199 List<Map<String, Object>> hiddenDangerInspectionList = new ArrayList<>();
200 hiddenDangerInspectionList.add(new HashMap<String, Object>(){{
201 put("key0", item.get("depart_id"));
202 put("value0", sysDepartDictMap.get(item.get("depart_id")));
203 }});
204 productDataVO.setHiddenDangerInspectionList(hiddenDangerInspectionList);
205 }
165 return productDataVO; 206 return productDataVO;
166 } 207 }
167 208
......
...@@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringUtils;
9 9
10 import java.util.ArrayList; 10 import java.util.ArrayList;
11 import java.util.List; 11 import java.util.List;
12 import java.util.Map;
12 13
13 /** 14 /**
14 * 月度生产数据报表 15 * 月度生产数据报表
...@@ -60,6 +61,15 @@ public class ProductDataVO { ...@@ -60,6 +61,15 @@ public class ProductDataVO {
60 @ApiModelProperty(value = "药剂实际费用") 61 @ApiModelProperty(value = "药剂实际费用")
61 private Double drugCost;//实际发生为0.219元/吨水 62 private Double drugCost;//实际发生为0.219元/吨水
62 63
64 // 重点工作事项
65 private List<Map<String, Object>> priorityWorkItemList = new ArrayList<>();
66
67 // 隐患排查巡检
68 private List<Map<String, Object>> hiddenDangerInspectionList = new ArrayList<>();
69
70 // 运营管理抽查情况
71 private List<Map<String, Object>> managementSpotCheckList = new ArrayList<>();
72
63 73
64 @ApiModelProperty(value = "实际水量同比下降--水务公司列表") 74 @ApiModelProperty(value = "实际水量同比下降--水务公司列表")
65 private List<FReportWaterMonthDataVO> waterDeptartList = new ArrayList<>(); 75 private List<FReportWaterMonthDataVO> waterDeptartList = new ArrayList<>();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!