kangwei: 指挥中心---药耗分析
--- 维修费用飞行 重点事项推进情况-后端
正在显示
19 个修改的文件
包含
545 行增加
和
25 行删除
... | @@ -318,10 +318,15 @@ public class ReportViewUtil { | ... | @@ -318,10 +318,15 @@ public class ReportViewUtil { |
318 | * @return | 318 | * @return |
319 | */ | 319 | */ |
320 | public static ReportItemVO getSumValueByTBHB(String reportId, String fields, String departIds , String startTime , String endTime){ | 320 | public static ReportItemVO getSumValueByTBHB(String reportId, String fields, String departIds , String startTime , String endTime){ |
321 | return getSumValueByTBHB(reportId, fields, departIds , startTime , endTime,null); | ||
322 | } | ||
323 | |||
324 | |||
325 | public static ReportItemVO getSumValueByTBHB(String reportId, String fields, String departIds , String startTime , String endTime,String operatorSign){ | ||
321 | ReportItemVO reportItemVO = null; | 326 | ReportItemVO reportItemVO = null; |
322 | String dataViewName3a24_value = ReportViewUtil.buildViewLike(reportId,fields, departIds, startTime,endTime); | 327 | String dataViewName3a24_value = ReportViewUtil.buildViewLike(reportId,fields, departIds, startTime,endTime,operatorSign); |
323 | String dataViewName3a24_valueHB = ReportViewUtil.buildViewLike(reportId,fields, departIds, DateUtils.getHbDate(startTime),DateUtils.getHbDate(endTime)); | 328 | String dataViewName3a24_valueHB = ReportViewUtil.buildViewLike(reportId,fields, departIds, DateUtils.getHbDate(startTime),DateUtils.getHbDate(endTime),operatorSign); |
324 | String dataViewName3a24_valueTB = ReportViewUtil.buildViewLike(reportId,fields, departIds, DateUtils.getTbDate(startTime),DateUtils.getTbDate(endTime)); | 329 | String dataViewName3a24_valueTB = ReportViewUtil.buildViewLike(reportId,fields, departIds, DateUtils.getTbDate(startTime),DateUtils.getTbDate(endTime),operatorSign); |
325 | 330 | ||
326 | String fieldsSql = ""; | 331 | String fieldsSql = ""; |
327 | if(StringUtils.isNotEmpty(fields)) { | 332 | if(StringUtils.isNotEmpty(fields)) { |
... | @@ -347,8 +352,6 @@ public class ReportViewUtil { | ... | @@ -347,8 +352,6 @@ public class ReportViewUtil { |
347 | return reportItemVO; | 352 | return reportItemVO; |
348 | } | 353 | } |
349 | 354 | ||
350 | |||
351 | |||
352 | public static String getValueByDSDH( String departIds , String startTime , String endTime){ | 355 | public static String getValueByDSDH( String departIds , String startTime , String endTime){ |
353 | 356 | ||
354 | String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,"DLHJ", departIds, startTime,endTime); | 357 | String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,"DLHJ", departIds, startTime,endTime); | ... | ... |
... | @@ -8,6 +8,7 @@ import com.skua.core.util.ConvertUtils; | ... | @@ -8,6 +8,7 @@ import com.skua.core.util.ConvertUtils; |
8 | import com.skua.modules.algorithm.vo.DepartLoadRateResultVO; | 8 | import com.skua.modules.algorithm.vo.DepartLoadRateResultVO; |
9 | import com.skua.modules.algorithm.vo.WaterTreatmentVO; | 9 | import com.skua.modules.algorithm.vo.WaterTreatmentVO; |
10 | import com.skua.modules.common.vo.DateVO; | 10 | import com.skua.modules.common.vo.DateVO; |
11 | import com.skua.modules.equipment.vo.DrugConsumptionDisplayVO; | ||
11 | import com.skua.modules.quartz.util.BaseUtil; | 12 | import com.skua.modules.quartz.util.BaseUtil; |
12 | import com.skua.modules.report.vo.DepartLoadRateVO; | 13 | import com.skua.modules.report.vo.DepartLoadRateVO; |
13 | import com.skua.modules.report.vo.FRportlCommandCenterVO; | 14 | import com.skua.modules.report.vo.FRportlCommandCenterVO; |
... | @@ -58,7 +59,7 @@ public class ReportItemvService { | ... | @@ -58,7 +59,7 @@ public class ReportItemvService { |
58 | long lastYearDifferDay = DateUtils.differenceDay(dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime()); | 59 | long lastYearDifferDay = DateUtils.differenceDay(dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime()); |
59 | 60 | ||
60 | //当月数据/环比、同比 | 61 | //当月数据/环比、同比 |
61 | FRportlCommandCenterVO nowMonthVO = new FRportlCommandCenterVO("月总数据(", JSUtils.format(nowMonthValue), JSUtils.format(lastMonthValue), JSUtils.format(lastYearValue)); | 62 | FRportlCommandCenterVO nowMonthVO = new FRportlCommandCenterVO("月总数据", JSUtils.format(nowMonthValue), JSUtils.format(lastMonthValue), JSUtils.format(lastYearValue)); |
62 | //日均数据:/环比/同比 | 63 | //日均数据:/环比/同比 |
63 | FRportlCommandCenterVO lastMonthVO = new FRportlCommandCenterVO("日均数据",JSUtils.divide( nowMonthValue ,nowDifferDay ) ,JSUtils.divide( lastMonthValue ,lastMonthDifferDay ),JSUtils.divide( lastYearValue ,lastYearDifferDay ) ); | 64 | FRportlCommandCenterVO lastMonthVO = new FRportlCommandCenterVO("日均数据",JSUtils.divide( nowMonthValue ,nowDifferDay ) ,JSUtils.divide( lastMonthValue ,lastMonthDifferDay ),JSUtils.divide( lastYearValue ,lastYearDifferDay ) ); |
64 | //吨水消耗=万吨水产泥量 | 65 | //吨水消耗=万吨水产泥量 |
... | @@ -365,19 +366,22 @@ public class ReportItemvService { | ... | @@ -365,19 +366,22 @@ public class ReportItemvService { |
365 | } | 366 | } |
366 | 367 | ||
367 | public List<FRportlCommandCenterVO> statisticsByYh(String departIds, String startDate, String endDate) { | 368 | public List<FRportlCommandCenterVO> statisticsByYh(String departIds, String startDate, String endDate) { |
368 | String startDateTb = DateUtils.getTbDate(startDate); | 369 | //出水量:+同比+环比 |
369 | String endDateTb = DateUtils.getTbDate(endDate); | 370 | ReportItemVO csl_reportVO = ReportViewUtil.getSumValueByTBHB(ReportConstant.view2119,ReportConstant.field_CSL, departIds, startDate, endDate); |
370 | String startDateHb = DateUtils.getHbDate(startDate); | 371 | //总药耗:value ; 同比 环比 |
371 | String endDateHb = DateUtils.getHbDate(endDate); | 372 | ReportItemVO zyhReportVO = ReportViewUtil.getSumValueByTBHB( ReportConstant.view3a24,ReportConstant.fieldYj, departIds, startDate,endDate); |
372 | //药剂SQL | 373 | //日均药耗 value ,同比,环比 |
373 | String dataViewName3a24 = ReportViewUtil.buildView(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, startDate, endDate); | 374 | ReportItemVO zyhReportAVG = ReportViewUtil.getSumValueByTBHB( ReportConstant.view3a24,ReportConstant.fieldYj, departIds, startDate,endDate,"avg"); |
374 | String dataViewName3a24Tb = ReportViewUtil.buildView(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, startDateTb, endDateTb); | 375 | |
375 | String dataViewName3a24Hb = ReportViewUtil.buildView(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, startDateHb, endDateHb); | 376 | //计算药耗 |
376 | //处理水量 | 377 | DrugConsumptionDisplayVO displayVO = new DrugConsumptionDisplayVO(ConvertUtils.getDouble(csl_reportVO.getValue(),0d) , ConvertUtils.getDouble(csl_reportVO.getValueHb(),0d), ConvertUtils.getDouble(csl_reportVO.getValueTb(),0d), |
377 | String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, startDate, endDate); | 378 | ConvertUtils.getDouble(zyhReportVO.getValue(),0d), ConvertUtils.getDouble(zyhReportVO.getValueHb(),0d), ConvertUtils.getDouble(zyhReportVO.getValueTb(),0d)); |
378 | String dataViewName2119Tb = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, startDateTb, endDateTb); | 379 | |
379 | String dataViewName2119Hb = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, startDateHb, endDateHb); | 380 | List<FRportlCommandCenterVO> dataList = new ArrayList<>(); |
380 | 381 | ||
382 | dataList.add( new FRportlCommandCenterVO("月总药耗" ,zyhReportVO.getValue(),zyhReportVO.getValueTb(),zyhReportVO.getValueHb()) ); | ||
383 | dataList.add( new FRportlCommandCenterVO("日均药耗" ,zyhReportAVG.getValue(),zyhReportAVG.getValueTb(),zyhReportAVG.getValueHb()) ); | ||
384 | dataList.add( new FRportlCommandCenterVO("吨水药耗" ,displayVO.getDsyh()+"",displayVO.getTbqndsyh()+"",displayVO.getHbsydsyh()+"") ); | ||
381 | return null; | 385 | return null; |
382 | } | 386 | } |
383 | } | 387 | } | ... | ... |
sk-module-biz/src/main/java/com/skua/modules/dataAnalysis/controller/SysCommandCentreController.java
... | @@ -11,6 +11,7 @@ import com.skua.modules.algorithm.vo.DepartLoadRateResultVO; | ... | @@ -11,6 +11,7 @@ import com.skua.modules.algorithm.vo.DepartLoadRateResultVO; |
11 | import com.skua.modules.algorithm.vo.StackedAreaChartDataVO; | 11 | import com.skua.modules.algorithm.vo.StackedAreaChartDataVO; |
12 | import com.skua.modules.algorithm.vo.WaterTreatmentVO; | 12 | import com.skua.modules.algorithm.vo.WaterTreatmentVO; |
13 | import com.skua.modules.common.vo.DateVO; | 13 | import com.skua.modules.common.vo.DateVO; |
14 | import com.skua.modules.equipment.vo.EquipmentRepairAnalysisVO; | ||
14 | import com.skua.modules.guest.util.DateUtil; | 15 | import com.skua.modules.guest.util.DateUtil; |
15 | import com.skua.modules.report.vo.DepartDrugResult; | 16 | import com.skua.modules.report.vo.DepartDrugResult; |
16 | import com.skua.modules.report.vo.FRportlCommandCenterVO; | 17 | import com.skua.modules.report.vo.FRportlCommandCenterVO; |
... | @@ -33,6 +34,7 @@ import java.time.YearMonth; | ... | @@ -33,6 +34,7 @@ import java.time.YearMonth; |
33 | import java.time.format.DateTimeFormatter; | 34 | import java.time.format.DateTimeFormatter; |
34 | import java.util.ArrayList; | 35 | import java.util.ArrayList; |
35 | import java.util.List; | 36 | import java.util.List; |
37 | import java.util.Map; | ||
36 | 38 | ||
37 | /** | 39 | /** |
38 | * 统计功能配置表 | 40 | * 统计功能配置表 |
... | @@ -338,7 +340,17 @@ public class SysCommandCentreController { | ... | @@ -338,7 +340,17 @@ public class SysCommandCentreController { |
338 | return result; | 340 | return result; |
339 | } | 341 | } |
340 | 342 | ||
341 | 343 | //EquipmentRepairAnalysisVO | |
344 | @AutoLog(value = "指挥中心-设备维修维护费用统计") | ||
345 | @ApiOperation(value="指挥中心-设备维修维护费用统计", notes="指挥中心-设备维修维护费用统计") | ||
346 | @GetMapping(value = "/statisticsBySbwx") | ||
347 | public Result<Map<String,Object>> equipmentRepairAnalysis(String startDate, String endDate) { | ||
348 | Map<String,Object> dataMap = commandCentreService.equipmentRepairAnalysis(startDate,endDate); | ||
349 | Result<Map<String,Object>> result = new Result<>(); | ||
350 | result.setSuccess(true); | ||
351 | result.setResult(dataMap); | ||
352 | return result; | ||
353 | } | ||
342 | 354 | ||
343 | /** | 355 | /** |
344 | * 获取时间之间的月份 | 356 | * 获取时间之间的月份 | ... | ... |
... | @@ -3,6 +3,8 @@ package com.skua.modules.dataAnalysis.service; | ... | @@ -3,6 +3,8 @@ package com.skua.modules.dataAnalysis.service; |
3 | import com.skua.modules.algorithm.vo.WaterTreatmentVO; | 3 | import com.skua.modules.algorithm.vo.WaterTreatmentVO; |
4 | import com.skua.modules.report.vo.*; | 4 | import com.skua.modules.report.vo.*; |
5 | import java.util.List; | 5 | import java.util.List; |
6 | import java.util.Map; | ||
7 | |||
6 | /** | 8 | /** |
7 | * <pre> | 9 | * <pre> |
8 | * 指挥中心实现逻辑 | 10 | * 指挥中心实现逻辑 |
... | @@ -31,4 +33,13 @@ public interface ICommandCentreService { | ... | @@ -31,4 +33,13 @@ public interface ICommandCentreService { |
31 | * @return | 33 | * @return |
32 | */ | 34 | */ |
33 | List<WaterTreatmentVO> statisticsCLSLXQ(String startDate,String endDate ,String departIds); | 35 | List<WaterTreatmentVO> statisticsCLSLXQ(String startDate,String endDate ,String departIds); |
36 | |||
37 | |||
38 | /*** | ||
39 | * 指挥中心----设备维修维护费用分析 | ||
40 | * @param startDate | ||
41 | * @param endDate | ||
42 | * @return | ||
43 | */ | ||
44 | Map<String, Object> equipmentRepairAnalysis(String startDate, String endDate); | ||
34 | } | 45 | } | ... | ... |
sk-module-biz/src/main/java/com/skua/modules/dataAnalysis/service/impl/CommandCentreServiceImpl.java
... | @@ -7,6 +7,7 @@ import com.skua.core.util.ConvertUtils; | ... | @@ -7,6 +7,7 @@ import com.skua.core.util.ConvertUtils; |
7 | import com.skua.modules.dataAnalysis.service.ICommandCentreService; | 7 | import com.skua.modules.dataAnalysis.service.ICommandCentreService; |
8 | import com.skua.modules.algorithm.vo.WaterTreatmentVO; | 8 | import com.skua.modules.algorithm.vo.WaterTreatmentVO; |
9 | import com.skua.modules.common.vo.DateVO; | 9 | import com.skua.modules.common.vo.DateVO; |
10 | import com.skua.modules.equipment.vo.EquipmentRepairAnalysisVO; | ||
10 | import com.skua.modules.quartz.util.BaseUtil; | 11 | import com.skua.modules.quartz.util.BaseUtil; |
11 | import com.skua.modules.report.vo.*; | 12 | import com.skua.modules.report.vo.*; |
12 | import com.skua.modules.report.mapper.FReportItemvMapper; | 13 | import com.skua.modules.report.mapper.FReportItemvMapper; |
... | @@ -65,10 +66,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService { | ... | @@ -65,10 +66,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService { |
65 | } | 66 | } |
66 | 67 | ||
67 | 68 | ||
68 | private JdbcTemplate getJdbcTemplate(){ | 69 | |
69 | JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); | ||
70 | return masterDB; | ||
71 | } | ||
72 | /*** | 70 | /*** |
73 | * 指挥中心----运行负荷率分析----处理水量详情 | 71 | * 指挥中心----运行负荷率分析----处理水量详情 |
74 | * @param | 72 | * @param |
... | @@ -126,6 +124,35 @@ public class CommandCentreServiceImpl implements ICommandCentreService { | ... | @@ -126,6 +124,35 @@ public class CommandCentreServiceImpl implements ICommandCentreService { |
126 | } | 124 | } |
127 | return dateList; | 125 | return dateList; |
128 | } | 126 | } |
127 | |||
128 | /*** | ||
129 | * 指挥中心----设备维修维护费用分析 | ||
130 | * @param startDate | ||
131 | * @param endDate | ||
132 | * @return | ||
133 | */ | ||
134 | public Map<String, Object> equipmentRepairAnalysis(String startDate, String endDate){ | ||
135 | Map<String, Object> dataMap = new HashMap<>(); | ||
136 | startDate = startDate+" 00:00:00"; | ||
137 | endDate = endDate+" 23:59:59"; | ||
138 | String sql = "select round( ifnull(sum( er.total_cost),0) ,2) 'cost' from equipment_repair er where er.reality_maintenance_end_time >='"+startDate+"' and er.reality_maintenance_end_time <='"+endDate+"'"; | ||
139 | String totalCost = getJdbcTemplate().queryForObject(sql,String.class); | ||
140 | sql = "select aaa.* from ( select er.depart_id,d.depart_name, ei.equipment_name,er.fault_content,er.fault_library_id ,ei.equipment_level from equipment_repair er "; | ||
141 | sql += " left join equipment_info ei on er.info_id = ei.id "; | ||
142 | sql +=" left join sys_depart d on d.id = er.depart_id"; | ||
143 | sql += " where er.reality_maintenance_end_time >='"+startDate+"' and er.reality_maintenance_end_time <='"+endDate+"' ) aaa"; | ||
144 | sql += " where aaa.equipment_level = '6bf727eb7e7cca6a95c694dab0036b2c'";//A类设备 | ||
145 | List<EquipmentRepairAnalysisVO> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<EquipmentRepairAnalysisVO>(EquipmentRepairAnalysisVO.class));; | ||
146 | |||
147 | dataMap.put("totalCost",totalCost); | ||
148 | dataMap.put("dataList",dataList); | ||
149 | return dataMap; | ||
150 | } | ||
151 | private JdbcTemplate getJdbcTemplate(){ | ||
152 | JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); | ||
153 | return masterDB; | ||
154 | } | ||
155 | |||
129 | //通用csl查询,返回Map<部门编号,CSL出水量> | 156 | //通用csl查询,返回Map<部门编号,CSL出水量> |
130 | public Map<String,String> commonQueryCsl(String departIds ,String startTime ,String endTime){ | 157 | public Map<String,String> commonQueryCsl(String departIds ,String startTime ,String endTime){ |
131 | Map<String,String> cslMap = new HashMap<>(); | 158 | Map<String,String> cslMap = new HashMap<>(); | ... | ... |
1 | package com.skua.modules.report.controller; | ||
2 | |||
3 | import java.util.Arrays; | ||
4 | import java.util.List; | ||
5 | import java.util.Map; | ||
6 | import java.io.IOException; | ||
7 | import java.io.UnsupportedEncodingException; | ||
8 | import java.net.URLDecoder; | ||
9 | import javax.servlet.http.HttpServletRequest; | ||
10 | import javax.servlet.http.HttpServletResponse; | ||
11 | import com.skua.core.api.vo.Result; | ||
12 | import com.skua.core.aspect.annotation.AutoLog; | ||
13 | import com.skua.core.context.BaseContextHandler; | ||
14 | import com.skua.core.query.QueryGenerator; | ||
15 | import com.skua.core.service.ISequenceService; | ||
16 | import com.skua.core.util.ConvertUtils; | ||
17 | import com.skua.modules.report.entity.MajorIssuesProcess; | ||
18 | import com.skua.modules.report.entity.MajorIssuesProcessItem; | ||
19 | import com.skua.modules.report.service.IMajorIssuesProcessItemService; | ||
20 | import com.skua.modules.report.service.IMajorIssuesProcessService; | ||
21 | import java.util.Date; | ||
22 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
23 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
24 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
25 | import lombok.extern.slf4j.Slf4j; | ||
26 | |||
27 | import org.jeecgframework.poi.excel.ExcelImportUtil; | ||
28 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | ||
29 | import org.jeecgframework.poi.excel.entity.ExportParams; | ||
30 | import org.jeecgframework.poi.excel.entity.ImportParams; | ||
31 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | ||
32 | |||
33 | import org.springframework.beans.factory.annotation.Autowired; | ||
34 | import org.springframework.web.bind.annotation.*; | ||
35 | import org.springframework.web.multipart.MultipartFile; | ||
36 | import org.springframework.web.multipart.MultipartHttpServletRequest; | ||
37 | import org.springframework.web.servlet.ModelAndView; | ||
38 | import com.alibaba.fastjson.JSON; | ||
39 | import io.swagger.annotations.Api; | ||
40 | import io.swagger.annotations.ApiOperation; | ||
41 | |||
42 | /** | ||
43 | * <pre> | ||
44 | * 重点事项推进情况 | ||
45 | * </pre> | ||
46 | * @author 开发者姓名 | ||
47 | * @version V0.1, 开发时间 | ||
48 | */ | ||
49 | @Slf4j | ||
50 | @Api(tags="重点事项推进情况") | ||
51 | @RestController("webMajorIssuesProcessController") | ||
52 | @RequestMapping("/web/report/majorIssuesProcess") | ||
53 | public class MajorIssuesProcessController { | ||
54 | @Autowired | ||
55 | private IMajorIssuesProcessService majorIssuesProcessService; | ||
56 | @Autowired | ||
57 | private IMajorIssuesProcessItemService majorIssuesProcessItemService; | ||
58 | |||
59 | @AutoLog(value = "重点事项推进情况-分页列表查询") | ||
60 | @ApiOperation(value="重点事项推进情况-分页列表查询", notes="重点事项推进情况-分页列表查询") | ||
61 | @GetMapping(value = "/list") | ||
62 | public Result<IPage<MajorIssuesProcess>> queryPageList(MajorIssuesProcess majorIssuesProcess, | ||
63 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
64 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | ||
65 | HttpServletRequest req) { | ||
66 | Result<IPage<MajorIssuesProcess>> result = new Result<IPage<MajorIssuesProcess>>(); | ||
67 | QueryWrapper<MajorIssuesProcess> queryWrapper = QueryGenerator.initQueryWrapper(majorIssuesProcess, req.getParameterMap()); | ||
68 | Page<MajorIssuesProcess> page = new Page<MajorIssuesProcess>(pageNo, pageSize); | ||
69 | IPage<MajorIssuesProcess> pageList = majorIssuesProcessService.page(page, queryWrapper); | ||
70 | result.setSuccess(true); | ||
71 | result.setResult(pageList); | ||
72 | return result; | ||
73 | } | ||
74 | |||
75 | @AutoLog(value = "重点事项推进情况-添加") | ||
76 | @ApiOperation(value="重点事项推进情况-添加", notes="重点事项推进情况-添加") | ||
77 | @PostMapping(value = "/add") | ||
78 | public Result<MajorIssuesProcess> add(@RequestBody MajorIssuesProcess majorIssuesProcess) { | ||
79 | Result<MajorIssuesProcess> result = new Result<MajorIssuesProcess>(); | ||
80 | try { | ||
81 | majorIssuesProcessService.save(majorIssuesProcess); | ||
82 | result.success("添加成功!"); | ||
83 | } catch (Exception e) { | ||
84 | log.error(e.getMessage(),e); | ||
85 | result.error500("操作失败"); | ||
86 | } | ||
87 | return result; | ||
88 | } | ||
89 | |||
90 | @AutoLog(value = "重点事项推进情况-编辑") | ||
91 | @ApiOperation(value="重点事项推进情况-编辑", notes="重点事项推进情况-编辑") | ||
92 | @PutMapping(value = "/edit") | ||
93 | public Result<MajorIssuesProcess> edit(@RequestBody MajorIssuesProcess majorIssuesProcess) { | ||
94 | Result<MajorIssuesProcess> result = new Result<MajorIssuesProcess>(); | ||
95 | MajorIssuesProcess majorIssuesProcessEntity = majorIssuesProcessService.getById(majorIssuesProcess.getId()); | ||
96 | if(majorIssuesProcessEntity==null) { | ||
97 | result.error500("未找到对应实体"); | ||
98 | }else { | ||
99 | boolean ok = majorIssuesProcessService.updateById(majorIssuesProcess); | ||
100 | if(ok) { | ||
101 | result.success("修改成功!"); | ||
102 | } | ||
103 | } | ||
104 | return result; | ||
105 | } | ||
106 | |||
107 | @AutoLog(value = "重点事项推进情况-通过id删除") | ||
108 | @ApiOperation(value="重点事项推进情况-通过id删除", notes="重点事项推进情况-通过id删除") | ||
109 | @DeleteMapping(value = "/delete") | ||
110 | public Result<?> delete(@RequestParam(name="id",required=true) String id) { | ||
111 | try { | ||
112 | majorIssuesProcessService.removeById(id); | ||
113 | } catch (Exception e) { | ||
114 | log.error("删除失败",e.getMessage()); | ||
115 | return Result.error("删除失败!"); | ||
116 | } | ||
117 | return Result.ok("删除成功!"); | ||
118 | } | ||
119 | |||
120 | |||
121 | @AutoLog(value = "重点事项推进情况-批量删除") | ||
122 | @ApiOperation(value="重点事项推进情况-批量删除", notes="重点事项推进情况-批量删除") | ||
123 | @DeleteMapping(value = "/deleteBatch") | ||
124 | public Result<MajorIssuesProcess> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | ||
125 | Result<MajorIssuesProcess> result = new Result<MajorIssuesProcess>(); | ||
126 | if(ids==null || "".equals(ids.trim())) { | ||
127 | result.error500("参数不识别!"); | ||
128 | }else { | ||
129 | this.majorIssuesProcessService.removeByIds(Arrays.asList(ids.split(","))); | ||
130 | result.success("删除成功!"); | ||
131 | } | ||
132 | return result; | ||
133 | } | ||
134 | |||
135 | @AutoLog(value = "重点事项推进情况-通过id查询") | ||
136 | @ApiOperation(value="重点事项推进情况-通过id查询", notes="重点事项推进情况-通过id查询") | ||
137 | @GetMapping(value = "/queryById") | ||
138 | public Result<MajorIssuesProcess> queryById(@RequestParam(name="id",required=true) String id) { | ||
139 | Result<MajorIssuesProcess> result = new Result<MajorIssuesProcess>(); | ||
140 | MajorIssuesProcess majorIssuesProcess = majorIssuesProcessService.getById(id); | ||
141 | if(majorIssuesProcess==null) { | ||
142 | result.error500("未找到对应实体"); | ||
143 | }else { | ||
144 | result.setResult(majorIssuesProcess); | ||
145 | result.setSuccess(true); | ||
146 | } | ||
147 | return result; | ||
148 | } | ||
149 | |||
150 | @AutoLog(value = "重点事项推进情况-进展列表") | ||
151 | @ApiOperation(value="重点事项推进情况-进展列表", notes="重点事项推进情况-进展列表") | ||
152 | @GetMapping(value = "/processList") | ||
153 | public Result<List<MajorIssuesProcessItem>> queryProcessListById(@RequestParam(name="id",required=true) String id) { | ||
154 | Result<List<MajorIssuesProcessItem>> result = new Result<List<MajorIssuesProcessItem>>(); | ||
155 | QueryWrapper<MajorIssuesProcessItem> queryWrapper = new QueryWrapper<MajorIssuesProcessItem>(); | ||
156 | queryWrapper.eq("matter_process_id",id); | ||
157 | queryWrapper.orderByDesc("create_time"); | ||
158 | List<MajorIssuesProcessItem> dataList = majorIssuesProcessItemService.list(); | ||
159 | result.setResult(dataList); | ||
160 | result.setSuccess(true); | ||
161 | return result; | ||
162 | } | ||
163 | @AutoLog(value = "重点事项推进情况-水厂添加进展") | ||
164 | @ApiOperation(value="重点事项推进情况-水厂添加进展", notes="重点事项推进情况-水厂添加进展") | ||
165 | @PostMapping(value = "/addProcess") | ||
166 | public Result<MajorIssuesProcessItem> addProcess(@RequestBody MajorIssuesProcessItem majorIssuesProcessItem) { | ||
167 | Result<MajorIssuesProcessItem> result = new Result<MajorIssuesProcessItem>(); | ||
168 | try { | ||
169 | majorIssuesProcessItemService.saveProcess(majorIssuesProcessItem); | ||
170 | result.success("添加成功!"); | ||
171 | } catch (Exception e) { | ||
172 | log.error(e.getMessage(),e); | ||
173 | result.error500("操作失败"); | ||
174 | } | ||
175 | return result; | ||
176 | } | ||
177 | } |
1 | package com.skua.modules.report.entity; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import com.baomidou.mybatisplus.annotation.IdType; | ||
6 | import com.baomidou.mybatisplus.annotation.TableId; | ||
7 | import com.baomidou.mybatisplus.annotation.TableName; | ||
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import com.skua.core.aspect.annotation.Dict; | ||
10 | import io.swagger.annotations.ApiModel; | ||
11 | import io.swagger.annotations.ApiModelProperty; | ||
12 | import lombok.Data; | ||
13 | import lombok.EqualsAndHashCode; | ||
14 | import lombok.experimental.Accessors; | ||
15 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
16 | import org.springframework.format.annotation.DateTimeFormat; | ||
17 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
18 | |||
19 | /** | ||
20 | * 重点事项推进情况 | ||
21 | */ | ||
22 | @Data | ||
23 | @TableName("f_major_issues_process") | ||
24 | @EqualsAndHashCode(callSuper = false) | ||
25 | @Accessors(chain = true) | ||
26 | @ApiModel(value="f_major_issues_process对象", description="重点事项推进情况") | ||
27 | public class MajorIssuesProcess { | ||
28 | |||
29 | /**id*/ | ||
30 | @TableId(type = IdType.ID_WORKER_STR) | ||
31 | @ApiModelProperty(value = "id") | ||
32 | private String id; | ||
33 | /**水务公司*/ | ||
34 | @Excel(name = "水务公司", width = 15) | ||
35 | @ApiModelProperty(value = "水务公司") | ||
36 | private String departId; | ||
37 | /**事项名称*/ | ||
38 | @Excel(name = "事项名称", width = 15) | ||
39 | @ApiModelProperty(value = "事项名称") | ||
40 | private String matterName; | ||
41 | /**立项时间*/ | ||
42 | @Excel(name = "立项时间", width = 15) | ||
43 | @ApiModelProperty(value = "立项时间") | ||
44 | private String startTime; | ||
45 | /**完成时间节点*/ | ||
46 | @Excel(name = "完成时间节点", width = 15) | ||
47 | @ApiModelProperty(value = "完成时间节点") | ||
48 | private String endTime; | ||
49 | /**推进频率*/ | ||
50 | @Excel(name = "推进频率", width = 15) | ||
51 | @ApiModelProperty(value = "推进频率") | ||
52 | private Integer cycle; | ||
53 | @ApiModelProperty(value = "循环周期单位") | ||
54 | @Dict(dicCode = "loop_unit") | ||
55 | private String cycleUnit; | ||
56 | /**预估金额*/ | ||
57 | @Excel(name = "预估金额", width = 15) | ||
58 | @ApiModelProperty(value = "预估金额") | ||
59 | private String estimateMoney; | ||
60 | /**解决措施*/ | ||
61 | @Excel(name = "解决措施", width = 15) | ||
62 | @ApiModelProperty(value = "解决措施") | ||
63 | private String handleMeasures; | ||
64 | /**当前进展*/ | ||
65 | @Excel(name = "当前进展", width = 15) | ||
66 | @ApiModelProperty(value = "当前进展") | ||
67 | private String currentProgress; | ||
68 | |||
69 | @ApiModelProperty(value = "最近进展时间") | ||
70 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
71 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
72 | private Date currentProgressTime; | ||
73 | /**创建人id*/ | ||
74 | @Excel(name = "创建人id", width = 15) | ||
75 | @ApiModelProperty(value = "创建人id") | ||
76 | private String createBy; | ||
77 | /**创建时间*/ | ||
78 | @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
79 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
80 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
81 | @ApiModelProperty(value = "创建时间") | ||
82 | private Date createTime; | ||
83 | /**修改人id*/ | ||
84 | @Excel(name = "修改人id", width = 15) | ||
85 | @ApiModelProperty(value = "修改人id") | ||
86 | private String updateBy; | ||
87 | /**修改时间*/ | ||
88 | @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
89 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
90 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
91 | @ApiModelProperty(value = "修改时间") | ||
92 | private Date updateTime; | ||
93 | /**删除标识,0:正常,1:删除*/ | ||
94 | @Excel(name = "删除标识,0:正常,1:删除", width = 15) | ||
95 | @ApiModelProperty(value = "删除标识,0:正常,1:删除") | ||
96 | private Integer delFlag; | ||
97 | } |
sk-module-datafill/src/main/java/com/skua/modules/report/entity/MajorIssuesProcessItem.java
0 → 100644
1 | package com.skua.modules.report.entity; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import com.baomidou.mybatisplus.annotation.IdType; | ||
6 | import com.baomidou.mybatisplus.annotation.TableId; | ||
7 | import com.baomidou.mybatisplus.annotation.TableName; | ||
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import io.swagger.annotations.ApiModel; | ||
10 | import io.swagger.annotations.ApiModelProperty; | ||
11 | import lombok.Data; | ||
12 | import lombok.EqualsAndHashCode; | ||
13 | import lombok.experimental.Accessors; | ||
14 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
15 | import org.springframework.format.annotation.DateTimeFormat; | ||
16 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
17 | |||
18 | /** | ||
19 | * 重点事项推进情况--详情 | ||
20 | */ | ||
21 | @Data | ||
22 | @TableName("f_major_issues_process_item") | ||
23 | @EqualsAndHashCode(callSuper = false) | ||
24 | @Accessors(chain = true) | ||
25 | @ApiModel(value="f_major_issues_process_item对象", description="重点事项推进情况--详情") | ||
26 | public class MajorIssuesProcessItem { | ||
27 | |||
28 | /**id*/ | ||
29 | @TableId(type = IdType.ID_WORKER_STR) | ||
30 | @ApiModelProperty(value = "id") | ||
31 | private String id; | ||
32 | /**事项编号id*/ | ||
33 | @Excel(name = "事项编号id", width = 15) | ||
34 | @ApiModelProperty(value = "事项编号id") | ||
35 | private String matterProcessId; | ||
36 | /**事项进展*/ | ||
37 | @Excel(name = "事项进展", width = 15) | ||
38 | @ApiModelProperty(value = "事项进展") | ||
39 | private String matterProgress; | ||
40 | /**创建人id*/ | ||
41 | @Excel(name = "创建人id", width = 15) | ||
42 | @ApiModelProperty(value = "创建人id") | ||
43 | private String createBy; | ||
44 | /**创建时间*/ | ||
45 | @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
46 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
47 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
48 | @ApiModelProperty(value = "创建时间") | ||
49 | private Date createTime; | ||
50 | } |
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/MajorIssuesProcessItemMapper.java
0 → 100644
1 | package com.skua.modules.report.mapper; | ||
2 | |||
3 | import java.util.List; | ||
4 | |||
5 | import org.apache.ibatis.annotations.Param; | ||
6 | import com.skua.modules.report.entity.MajorIssuesProcessItem; | ||
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
8 | |||
9 | /** | ||
10 | * 重点事项推进情况--详情 | ||
11 | */ | ||
12 | public interface MajorIssuesProcessItemMapper extends BaseMapper<MajorIssuesProcessItem> { | ||
13 | |||
14 | /** | ||
15 | * 硒鼓重点事项的情况--当前事项 | ||
16 | * @param majorIssuesProcessItem | ||
17 | */ | ||
18 | void updateMajorIssuesProcess(MajorIssuesProcessItem majorIssuesProcessItem); | ||
19 | } |
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/MajorIssuesProcessMapper.java
0 → 100644
1 | package com.skua.modules.report.mapper; | ||
2 | |||
3 | import java.util.List; | ||
4 | |||
5 | import org.apache.ibatis.annotations.Param; | ||
6 | import com.skua.modules.report.entity.MajorIssuesProcess; | ||
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
8 | |||
9 | /** | ||
10 | * 重点事项推进情况 | ||
11 | */ | ||
12 | public interface MajorIssuesProcessMapper extends BaseMapper<MajorIssuesProcess> { | ||
13 | |||
14 | } |
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/xml/MajorIssuesProcessItemMapper.xml
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
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.MajorIssuesProcessItemMapper"> | ||
4 | |||
5 | <update id="updateMajorIssuesProcess" > | ||
6 | update f_major_issues_process set current_progress = #{matterProgress} and current_progress_time = #{createTime} where id = #{matterProcessId} | ||
7 | </update> | ||
8 | |||
9 | </mapper> |
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/xml/MajorIssuesProcessMapper.xml
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
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.MajorIssuesProcessMapper"> | ||
4 | |||
5 | </mapper> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
sk-module-datafill/src/main/java/com/skua/modules/report/service/IMajorIssuesProcessItemService.java
0 → 100644
1 | package com.skua.modules.report.service; | ||
2 | |||
3 | import com.skua.modules.report.entity.MajorIssuesProcessItem; | ||
4 | import com.baomidou.mybatisplus.extension.service.IService; | ||
5 | |||
6 | /** | ||
7 | * 重点事项推进情况--详情 | ||
8 | */ | ||
9 | public interface IMajorIssuesProcessItemService extends IService<MajorIssuesProcessItem> { | ||
10 | |||
11 | void saveProcess(MajorIssuesProcessItem majorIssuesProcessItem); | ||
12 | } |
1 | package com.skua.modules.report.service.impl; | ||
2 | |||
3 | import com.skua.modules.report.entity.MajorIssuesProcessItem; | ||
4 | import com.skua.modules.report.mapper.MajorIssuesProcessItemMapper; | ||
5 | import com.skua.modules.report.service.IMajorIssuesProcessItemService; | ||
6 | import org.springframework.stereotype.Service; | ||
7 | |||
8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
9 | import org.springframework.transaction.annotation.Transactional; | ||
10 | |||
11 | /** | ||
12 | * 重点事项推进情况--详情 | ||
13 | */ | ||
14 | @Service | ||
15 | public class MajorIssuesProcessItemServiceImpl extends ServiceImpl<MajorIssuesProcessItemMapper, MajorIssuesProcessItem> implements IMajorIssuesProcessItemService { | ||
16 | |||
17 | @Transactional | ||
18 | public void saveProcess(MajorIssuesProcessItem majorIssuesProcessItem){ | ||
19 | this.baseMapper.insert(majorIssuesProcessItem); | ||
20 | this.baseMapper.updateMajorIssuesProcess(majorIssuesProcessItem); | ||
21 | } | ||
22 | } |
1 | package com.skua.modules.report.service.impl; | ||
2 | |||
3 | import com.skua.modules.report.entity.MajorIssuesProcess; | ||
4 | import com.skua.modules.report.mapper.MajorIssuesProcessMapper; | ||
5 | import com.skua.modules.report.service.IMajorIssuesProcessService; | ||
6 | import org.springframework.stereotype.Service; | ||
7 | |||
8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
9 | |||
10 | /** | ||
11 | * 重点事项推进情况 | ||
12 | */ | ||
13 | @Service | ||
14 | public class MajorIssuesProcessServiceImpl extends ServiceImpl<MajorIssuesProcessMapper, MajorIssuesProcess> implements IMajorIssuesProcessService { | ||
15 | |||
16 | } |
... | @@ -14,6 +14,7 @@ import java.io.Serializable; | ... | @@ -14,6 +14,7 @@ import java.io.Serializable; |
14 | public class FRportlCommandCenterVO implements Serializable { | 14 | public class FRportlCommandCenterVO implements Serializable { |
15 | @ApiModelProperty(value = "标题") | 15 | @ApiModelProperty(value = "标题") |
16 | private String title; | 16 | private String title; |
17 | |||
17 | @ApiModelProperty(value = "结果") | 18 | @ApiModelProperty(value = "结果") |
18 | private String value; | 19 | private String value; |
19 | 20 | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/vo/EquipmentRepairAnalysisVO.java
0 → 100644
1 | package com.skua.modules.equipment.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
7 | |||
8 | /** | ||
9 | * @auther kangwei | ||
10 | * @create 2025-02-19-18:25 | ||
11 | */ | ||
12 | @Data | ||
13 | @ApiModel(value="设备维修统计对象", description="设备维修统计对象") | ||
14 | public class EquipmentRepairAnalysisVO { | ||
15 | @ApiModelProperty(value = "水厂编号") | ||
16 | private java.lang.String departId; | ||
17 | |||
18 | @ApiModelProperty(value = "水厂名称") | ||
19 | private java.lang.String departName; | ||
20 | |||
21 | @ApiModelProperty(value = "设备名称") | ||
22 | private java.lang.String equipmentName; | ||
23 | /**故障内容*/ | ||
24 | @ApiModelProperty(value = "故障情况") | ||
25 | private java.lang.String faultContent; | ||
26 | |||
27 | @ApiModelProperty(value = "处理措施") | ||
28 | private java.lang.String faultLibraryId; | ||
29 | |||
30 | } |
... | @@ -94,7 +94,7 @@ public class MybatisInterceptor implements Interceptor { | ... | @@ -94,7 +94,7 @@ public class MybatisInterceptor implements Interceptor { |
94 | add("erp_purchase_plan_item"); | 94 | add("erp_purchase_plan_item"); |
95 | add("erp_purchase_material"); | 95 | add("erp_purchase_material"); |
96 | add("erp_distribut_material"); | 96 | add("erp_distribut_material"); |
97 | add("erp_settlement");//供应商结算、水厂结算 | 97 | //add("erp_settlement");//供应商结算、水厂结算 |
98 | //共享风险库 | 98 | //共享风险库 |
99 | add("danger_level_manage_share"); | 99 | add("danger_level_manage_share"); |
100 | // 库存表 | 100 | // 库存表 | ... | ... |
-
请 注册 或 登录 后发表评论