refactor(module): 重构报表统计逻辑
- 优化了巡检分析、目标统计等模块的计算逻辑 - 修复了部分除零错误和数据展示问题 - 重构了部门查询方式,提高了代码复用性和可维护性- 优化了数据库连接配置,去除了不必要的转义字符
正在显示
4 个修改的文件
包含
63 行增加
和
74 行删除
1 | package com.skua.modules.statistics.controller; | 1 | package com.skua.modules.statistics.controller; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
3 | import com.skua.core.api.vo.Result; | 4 | import com.skua.core.api.vo.Result; |
4 | import com.skua.core.context.BaseContextHandler; | 5 | import com.skua.core.context.BaseContextHandler; |
5 | import com.skua.modules.statistics.service.IReportTargetStatisticsService; | 6 | import com.skua.modules.statistics.service.IReportTargetStatisticsService; |
... | @@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | ... | @@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping; |
18 | import org.springframework.web.bind.annotation.RestController; | 19 | import org.springframework.web.bind.annotation.RestController; |
19 | 20 | ||
20 | import java.util.ArrayList; | 21 | import java.util.ArrayList; |
22 | import java.util.Arrays; | ||
21 | import java.util.List; | 23 | import java.util.List; |
22 | 24 | ||
23 | /** | 25 | /** |
... | @@ -48,26 +50,17 @@ public class ReportTargetStatisticsController { | ... | @@ -48,26 +50,17 @@ public class ReportTargetStatisticsController { |
48 | } | 50 | } |
49 | ReportTargetStatisticsVO targetStatisticsVO = targetStatisticsService.targetWaterStatistics(departIds,year,startTime,endTime); | 51 | ReportTargetStatisticsVO targetStatisticsVO = targetStatisticsService.targetWaterStatistics(departIds,year,startTime,endTime); |
50 | 52 | ||
51 | SysDepart depart = departService.getById("1892199062790823936"); | ||
52 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),"1892199062790823936","1"); | ||
53 | ReportTargetStatisticsVO targetStatisticsVO_nj = targetStatisticsService.targetWaterStatistics(departIds,year,startTime,endTime); | ||
54 | targetStatisticsVO_nj.setDepartName(depart.getDepartName()); targetStatisticsVO_nj.setDepartId(depart.getId()); | ||
55 | |||
56 | depart = departService.getById("1892199890272477184"); | ||
57 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),"1892199890272477184","1"); | ||
58 | ReportTargetStatisticsVO targetStatisticsVO_wh = targetStatisticsService.targetWaterStatistics(departIds,year,startTime,endTime); | ||
59 | targetStatisticsVO_wh.setDepartName(depart.getDepartName()); targetStatisticsVO_wh.setDepartId(depart.getId()); | ||
60 | |||
61 | depart = departService.getById("1818215543140909056"); | ||
62 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),"1818215543140909056","1"); | ||
63 | ReportTargetStatisticsVO targetStatisticsVO_ef = targetStatisticsService.targetWaterStatistics(departIds,year,startTime,endTime); | ||
64 | targetStatisticsVO_ef.setDepartName(depart.getDepartName()); targetStatisticsVO_ef.setDepartId(depart.getId()); | ||
65 | |||
66 | List<ReportTargetStatisticsVO> dataList = new ArrayList<>(); | 53 | List<ReportTargetStatisticsVO> dataList = new ArrayList<>(); |
67 | dataList.add( targetStatisticsVO_nj); | 54 | QueryWrapper<SysDepart> queryWrapper = new QueryWrapper<>(); |
68 | dataList.add(targetStatisticsVO_wh ); | 55 | //三个分区域 |
69 | dataList.add(targetStatisticsVO_ef ); | 56 | queryWrapper.eq("depart_type", "0"); |
70 | 57 | List<SysDepart> departList = departService.list(queryWrapper); | |
58 | for (SysDepart depart : departList) { | ||
59 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),depart.getId(),"1"); | ||
60 | ReportTargetStatisticsVO qyTargetStatisticsVO = targetStatisticsService.targetWaterStatistics(departIds,year,startTime,endTime); | ||
61 | qyTargetStatisticsVO.setDepartName(depart.getDepartName()); qyTargetStatisticsVO.setDepartId(depart.getId()); | ||
62 | dataList.add(qyTargetStatisticsVO); | ||
63 | } | ||
71 | targetStatisticsVO.setDataList( dataList ); | 64 | targetStatisticsVO.setDataList( dataList ); |
72 | result.setSuccess(true); | 65 | result.setSuccess(true); |
73 | result.setResult(targetStatisticsVO); | 66 | result.setResult(targetStatisticsVO); |
... | @@ -108,28 +101,18 @@ public class ReportTargetStatisticsController { | ... | @@ -108,28 +101,18 @@ public class ReportTargetStatisticsController { |
108 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),departId,"1"); | 101 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),departId,"1"); |
109 | } | 102 | } |
110 | ReportTargetEnergyVO targetStatisticsVO = targetStatisticsService.targetEnergyStatistics(departIds,year,startTime,endTime); | 103 | ReportTargetEnergyVO targetStatisticsVO = targetStatisticsService.targetEnergyStatistics(departIds,year,startTime,endTime); |
111 | |||
112 | SysDepart depart = departService.getById("1892199062790823936"); | ||
113 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),"1892199062790823936","1"); | ||
114 | ReportTargetEnergyVO targetStatisticsVO_nj = targetStatisticsService.targetEnergyStatistics(departIds,year,startTime,endTime); | ||
115 | targetStatisticsVO_nj.setDepartName(depart.getDepartName()); targetStatisticsVO_nj.setDepartId(depart.getId()); | ||
116 | |||
117 | depart = departService.getById("1892199890272477184"); | ||
118 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),"1892199890272477184","1"); | ||
119 | ReportTargetEnergyVO targetStatisticsVO_wh = targetStatisticsService.targetEnergyStatistics(departIds,year,startTime,endTime); | ||
120 | targetStatisticsVO_wh.setDepartName(depart.getDepartName()); targetStatisticsVO_wh.setDepartId(depart.getId()); | ||
121 | |||
122 | depart = departService.getById("1818215543140909056"); | ||
123 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),"1818215543140909056","1"); | ||
124 | ReportTargetEnergyVO targetStatisticsVO_ef = targetStatisticsService.targetEnergyStatistics(departIds,year,startTime,endTime); | ||
125 | targetStatisticsVO_ef.setDepartName(depart.getDepartName()); targetStatisticsVO_ef.setDepartId(depart.getId()); | ||
126 | |||
127 | List<ReportTargetEnergyVO> dataList = new ArrayList<>(); | 104 | List<ReportTargetEnergyVO> dataList = new ArrayList<>(); |
128 | dataList.add( targetStatisticsVO_nj); | 105 | QueryWrapper<SysDepart> queryWrapper = new QueryWrapper<>(); |
129 | dataList.add(targetStatisticsVO_wh ); | 106 | //三个分区域 |
130 | dataList.add(targetStatisticsVO_ef ); | 107 | queryWrapper.eq("depart_type", "0"); |
131 | 108 | List<SysDepart> departList = departService.list(queryWrapper); | |
132 | targetStatisticsVO.setDataList( dataList ); | 109 | for (SysDepart depart : departList) { |
110 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),depart.getId(),"1"); | ||
111 | ReportTargetEnergyVO qyTargetStatisticsVO = targetStatisticsService.targetEnergyStatistics(departIds,year,startTime,endTime); | ||
112 | qyTargetStatisticsVO.setDepartName(depart.getDepartName()); qyTargetStatisticsVO.setDepartId(depart.getId()); | ||
113 | dataList.add(qyTargetStatisticsVO); | ||
114 | } | ||
115 | targetStatisticsVO.setDataList(dataList); | ||
133 | result.setSuccess(true); | 116 | result.setSuccess(true); |
134 | result.setResult(targetStatisticsVO); | 117 | result.setResult(targetStatisticsVO); |
135 | } catch (Exception e) { | 118 | } catch (Exception e) { |
... | @@ -172,28 +155,18 @@ public class ReportTargetStatisticsController { | ... | @@ -172,28 +155,18 @@ public class ReportTargetStatisticsController { |
172 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),departId,"1"); | 155 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),departId,"1"); |
173 | } | 156 | } |
174 | ReportTargetStatisticsVO targetStatisticsVO = targetStatisticsService.targetCostStatistics(departIds,year,startTime,endTime); | 157 | ReportTargetStatisticsVO targetStatisticsVO = targetStatisticsService.targetCostStatistics(departIds,year,startTime,endTime); |
175 | |||
176 | SysDepart depart = departService.getById("1892199062790823936"); | ||
177 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),"1892199062790823936","1"); | ||
178 | ReportTargetStatisticsVO targetStatisticsVO_nj = targetStatisticsService.targetCostStatistics(departIds,year,startTime,endTime); | ||
179 | targetStatisticsVO_nj.setDepartName(depart.getDepartName()); targetStatisticsVO_nj.setDepartId(depart.getId()); | ||
180 | |||
181 | depart = departService.getById("1892199890272477184"); | ||
182 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),"1892199890272477184","1"); | ||
183 | ReportTargetStatisticsVO targetStatisticsVO_wh = targetStatisticsService.targetCostStatistics(departIds,year,startTime,endTime); | ||
184 | targetStatisticsVO_wh.setDepartName(depart.getDepartName()); targetStatisticsVO_wh.setDepartId(depart.getId()); | ||
185 | |||
186 | depart = departService.getById("1818215543140909056"); | ||
187 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),"1818215543140909056","1"); | ||
188 | ReportTargetStatisticsVO targetStatisticsVO_ef = targetStatisticsService.targetCostStatistics(departIds,year,startTime,endTime); | ||
189 | targetStatisticsVO_ef.setDepartName(depart.getDepartName()); targetStatisticsVO_ef.setDepartId(depart.getId()); | ||
190 | |||
191 | List<ReportTargetStatisticsVO> dataList = new ArrayList<>(); | 158 | List<ReportTargetStatisticsVO> dataList = new ArrayList<>(); |
192 | dataList.add( targetStatisticsVO_nj); | 159 | QueryWrapper<SysDepart> queryWrapper = new QueryWrapper<>(); |
193 | dataList.add(targetStatisticsVO_wh ); | 160 | //三个分区域 |
194 | dataList.add(targetStatisticsVO_ef ); | 161 | queryWrapper.eq("depart_type", "0"); |
195 | 162 | List<SysDepart> departList = departService.list(queryWrapper); | |
196 | targetStatisticsVO.setDataList( dataList ); | 163 | for (SysDepart depart : departList) { |
164 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts(),depart.getId(),"1"); | ||
165 | ReportTargetStatisticsVO qyTargetStatisticsVO = targetStatisticsService.targetCostStatistics(departIds,year,startTime,endTime); | ||
166 | qyTargetStatisticsVO.setDepartName(depart.getDepartName()); qyTargetStatisticsVO.setDepartId(depart.getId()); | ||
167 | dataList.add(qyTargetStatisticsVO); | ||
168 | } | ||
169 | targetStatisticsVO.setDataList(dataList); | ||
197 | result.setSuccess(true); | 170 | result.setSuccess(true); |
198 | result.setResult(targetStatisticsVO); | 171 | result.setResult(targetStatisticsVO); |
199 | } catch (Exception e) { | 172 | } catch (Exception e) { | ... | ... |
... | @@ -86,7 +86,7 @@ spring: | ... | @@ -86,7 +86,7 @@ spring: |
86 | # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 | 86 | # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 |
87 | filters: stat,wall,slf4j | 87 | filters: stat,wall,slf4j |
88 | # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 | 88 | # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 |
89 | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 | 89 | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
90 | datasource: | 90 | datasource: |
91 | master: | 91 | master: |
92 | url: jdbc:mysql://47.104.179.187:6003/sk-zhangfa?characterEncoding=UTF-8&useUnicode=true&useSSL=false | 92 | url: jdbc:mysql://47.104.179.187:6003/sk-zhangfa?characterEncoding=UTF-8&useUnicode=true&useSSL=false | ... | ... |
... | @@ -20,6 +20,12 @@ public interface IInspectionAnalysisService { | ... | @@ -20,6 +20,12 @@ public interface IInspectionAnalysisService { |
20 | * @return | 20 | * @return |
21 | */ | 21 | */ |
22 | InspectionTaskIndicatorsVO getInspectionTaskIndicators(String startDate, String endDate); | 22 | InspectionTaskIndicatorsVO getInspectionTaskIndicators(String startDate, String endDate); |
23 | /*** | ||
24 | * 巡检分析-巡检任务指标 | ||
25 | * @param startDate | ||
26 | * @param endDate | ||
27 | * @return | ||
28 | */ | ||
23 | InspectionTaskIndicatorsVO getInspectionTaskIndicatorsNew(String startDate, String endDate); | 29 | InspectionTaskIndicatorsVO getInspectionTaskIndicatorsNew(String startDate, String endDate); |
24 | /*** | 30 | /*** |
25 | * 巡检分析-巡检任务指标-详情 | 31 | * 巡检分析-巡检任务指标-详情 | ... | ... |
... | @@ -71,7 +71,6 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -71,7 +71,6 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
71 | numberFormat.setMaximumFractionDigits(2); | 71 | numberFormat.setMaximumFractionDigits(2); |
72 | } | 72 | } |
73 | 73 | ||
74 | |||
75 | @Override | 74 | @Override |
76 | public Map<String, Object> getAllInspectionHistoryAnalysis(String moduleType, String startTime, String endTime, String departId) throws Exception { | 75 | public Map<String, Object> getAllInspectionHistoryAnalysis(String moduleType, String startTime, String endTime, String departId) throws Exception { |
77 | 76 | ||
... | @@ -491,19 +490,21 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -491,19 +490,21 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
491 | return inspectionTaskIndicatorsVO; | 490 | return inspectionTaskIndicatorsVO; |
492 | } | 491 | } |
493 | 492 | ||
494 | 493 | @Override | |
495 | public InspectionTaskIndicatorsVO getInspectionTaskIndicatorsNew(String startDate, String endDate){ | 494 | public InspectionTaskIndicatorsVO getInspectionTaskIndicatorsNew(String startDate, String endDate){ |
496 | InspectionTaskOverviewVO inspectionTaskOverviewVO = getInspectionTaskOverviewNew( startDate, endDate); | 495 | InspectionTaskOverviewVO inspectionTaskOverviewVO = getInspectionTaskOverviewNew( startDate, endDate); |
497 | InspectionTaskIndicatorsVO inspectionTaskIndicatorsVO = new InspectionTaskIndicatorsVO(); | 496 | InspectionTaskIndicatorsVO inspectionTaskIndicatorsVO = new InspectionTaskIndicatorsVO(); |
498 | //完成率 | 497 | //完成率 |
499 | String completionRate = "0"; | 498 | String completionRate = "0"; |
500 | completionRate = numberFormat.format(inspectionTaskOverviewVO.getCheckedInspectionTaskCount() / (double) inspectionTaskOverviewVO.getTotalInspectionTaskCount() * 100); | ||
501 | //未检率 | 499 | //未检率 |
502 | String unCompletionRate = "0"; | 500 | String unCompletionRate = "0"; |
503 | unCompletionRate = numberFormat.format( inspectionTaskOverviewVO.getNotCheckedInspectionTaskCount()/ (double) inspectionTaskOverviewVO.getTotalInspectionTaskCount() * 100); | ||
504 | //异常率 | 501 | //异常率 |
505 | String abnormalRate = "0"; | 502 | String abnormalRate = "0"; |
503 | if(inspectionTaskOverviewVO.getCheckedInspectionTaskCount() > 0){ | ||
506 | abnormalRate = numberFormat.format(inspectionTaskOverviewVO.getAbnormalInspectionTaskCount() / (double) inspectionTaskOverviewVO.getCheckedInspectionTaskCount() * 100); | 504 | abnormalRate = numberFormat.format(inspectionTaskOverviewVO.getAbnormalInspectionTaskCount() / (double) inspectionTaskOverviewVO.getCheckedInspectionTaskCount() * 100); |
505 | completionRate = numberFormat.format(inspectionTaskOverviewVO.getCheckedInspectionTaskCount() / (double) inspectionTaskOverviewVO.getTotalInspectionTaskCount() * 100); | ||
506 | unCompletionRate = numberFormat.format( inspectionTaskOverviewVO.getNotCheckedInspectionTaskCount()/ (double) inspectionTaskOverviewVO.getTotalInspectionTaskCount() * 100); | ||
507 | } | ||
507 | //异常项处理率 | 508 | //异常项处理率 |
508 | // String processedAbnormalRate = "0"; | 509 | // String processedAbnormalRate = "0"; |
509 | // if (abnormalItemsCount != 0) { | 510 | // if (abnormalItemsCount != 0) { |
... | @@ -524,6 +525,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -524,6 +525,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
524 | * @param endDate | 525 | * @param endDate |
525 | * @return | 526 | * @return |
526 | */ | 527 | */ |
528 | @Override | ||
527 | public List<InspectionEquipIndicatorsDetailVO> getInspectionTaskIndicatorsDetail(String departIds, String startDate, String endDate){ | 529 | public List<InspectionEquipIndicatorsDetailVO> getInspectionTaskIndicatorsDetail(String departIds, String startDate, String endDate){ |
528 | return inspectionAnalysisMapper.getInspectionEquipIndicatorsDetail(departIds, startDate, endDate); | 530 | return inspectionAnalysisMapper.getInspectionEquipIndicatorsDetail(departIds, startDate, endDate); |
529 | } | 531 | } |
... | @@ -659,24 +661,30 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -659,24 +661,30 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
659 | return inspectionEquipIndicatorsVO; | 661 | return inspectionEquipIndicatorsVO; |
660 | } | 662 | } |
661 | 663 | ||
664 | @Override | ||
662 | public InspectionEquipIndicatorsVO getInspectionEquipIndicatorsNew(String startDate, String endDate) { | 665 | public InspectionEquipIndicatorsVO getInspectionEquipIndicatorsNew(String startDate, String endDate) { |
663 | InspectionEquipIndicatorsVO inspectionEquipIndicatorsVO = new InspectionEquipIndicatorsVO(); | 666 | InspectionEquipIndicatorsVO inspectionEquipIndicatorsVO = new InspectionEquipIndicatorsVO(); |
664 | 667 | ||
665 | |||
666 | InspectionEquipOverviewVO inspectionEquipOverviewNew = getInspectionEquipOverviewNew(startDate, endDate); | 668 | InspectionEquipOverviewVO inspectionEquipOverviewNew = getInspectionEquipOverviewNew(startDate, endDate); |
667 | //完成率 | 669 | //完成率 |
668 | String finishRate = "0"; | 670 | String finishRate = "0"; |
669 | finishRate = numberFormat.format( inspectionEquipOverviewNew.getCheckedInspectionEquipCount() / (double) inspectionEquipOverviewNew.getTotalInspectionEquipCount() * 100); | ||
670 | //覆盖率 | 671 | //覆盖率 |
671 | String completionRate = "0"; | 672 | String completionRate = "0"; |
672 | completionRate = numberFormat.format( inspectionEquipOverviewNew.getCheckedInspectionEquipCount() / (double) inspectionEquipOverviewNew.getTotalInspectionEquipCount() * 100); | ||
673 | |||
674 | //未检率 | 673 | //未检率 |
675 | String unCompletionRate = "0"; | 674 | String unCompletionRate = "0"; |
675 | |||
676 | if(inspectionEquipOverviewNew.getTotalInspectionEquipCount()>0){ | ||
677 | finishRate = numberFormat.format( inspectionEquipOverviewNew.getCheckedInspectionEquipCount() / (double) inspectionEquipOverviewNew.getTotalInspectionEquipCount() * 100); | ||
678 | completionRate = numberFormat.format( inspectionEquipOverviewNew.getCheckedInspectionEquipCount() / (double) inspectionEquipOverviewNew.getTotalInspectionEquipCount() * 100); | ||
676 | unCompletionRate = numberFormat.format(inspectionEquipOverviewNew.getNotCheckedInspectionEquipCount() / (double) inspectionEquipOverviewNew.getTotalInspectionEquipCount() * 100); | 679 | unCompletionRate = numberFormat.format(inspectionEquipOverviewNew.getNotCheckedInspectionEquipCount() / (double) inspectionEquipOverviewNew.getTotalInspectionEquipCount() * 100); |
680 | } | ||
681 | |||
677 | //异常率 | 682 | //异常率 |
678 | String abnormalRate = "0"; | 683 | String abnormalRate = "0"; |
684 | if(inspectionEquipOverviewNew.getCheckedInspectionEquipCount()>0){ | ||
679 | abnormalRate = numberFormat.format( inspectionEquipOverviewNew.getAbnormalInspectionEquipCount() / (double) inspectionEquipOverviewNew.getCheckedInspectionEquipCount() * 100); | 685 | abnormalRate = numberFormat.format( inspectionEquipOverviewNew.getAbnormalInspectionEquipCount() / (double) inspectionEquipOverviewNew.getCheckedInspectionEquipCount() * 100); |
686 | } | ||
687 | |||
680 | //异常项处理率 | 688 | //异常项处理率 |
681 | String processedAbnormalRate = "0"; | 689 | String processedAbnormalRate = "0"; |
682 | /* if (abnormalItemsCount != 0) { | 690 | /* if (abnormalItemsCount != 0) { |
... | @@ -696,6 +704,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -696,6 +704,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
696 | * @param endDate | 704 | * @param endDate |
697 | * @return | 705 | * @return |
698 | */ | 706 | */ |
707 | @Override | ||
699 | public List<InspectionEquipIndicatorsDetailVO> getInspectionEquipIndicatorsDetail(String departIds, String startDate, String endDate){ | 708 | public List<InspectionEquipIndicatorsDetailVO> getInspectionEquipIndicatorsDetail(String departIds, String startDate, String endDate){ |
700 | return inspectionAnalysisMapper.getInspectionEquipIndicatorsDetail( departIds, startDate, endDate); | 709 | return inspectionAnalysisMapper.getInspectionEquipIndicatorsDetail( departIds, startDate, endDate); |
701 | } | 710 | } |
... | @@ -812,7 +821,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -812,7 +821,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
812 | } | 821 | } |
813 | return inspectionTaskOverviewVO; | 822 | return inspectionTaskOverviewVO; |
814 | } | 823 | } |
815 | 824 | @Override | |
816 | public InspectionTaskOverviewVO getInspectionTaskOverviewNew(String startDate, String endDate) { | 825 | public InspectionTaskOverviewVO getInspectionTaskOverviewNew(String startDate, String endDate) { |
817 | String departIds = BaseContextHandler.getDeparts(); | 826 | String departIds = BaseContextHandler.getDeparts(); |
818 | InspectionTaskOverviewVO inspectionTaskOverviewVO = new InspectionTaskOverviewVO(); | 827 | InspectionTaskOverviewVO inspectionTaskOverviewVO = new InspectionTaskOverviewVO(); |
... | @@ -846,6 +855,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -846,6 +855,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
846 | * @param endDate | 855 | * @param endDate |
847 | * @return | 856 | * @return |
848 | */ | 857 | */ |
858 | @Override | ||
849 | public List<InspectionTaskOverviewDetailVO> getInspectionTaskOverviewDetail(String departIds, String startDate, String endDate){ | 859 | public List<InspectionTaskOverviewDetailVO> getInspectionTaskOverviewDetail(String departIds, String startDate, String endDate){ |
850 | return inspectionAnalysisMapper.getInspectionTaskOverviewDetail(departIds, startDate, endDate); | 860 | return inspectionAnalysisMapper.getInspectionTaskOverviewDetail(departIds, startDate, endDate); |
851 | } | 861 | } |
... | @@ -962,7 +972,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -962,7 +972,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
962 | return inspectionEquipOverviewVO; | 972 | return inspectionEquipOverviewVO; |
963 | } | 973 | } |
964 | 974 | ||
965 | 975 | @Override | |
966 | public InspectionEquipOverviewVO getInspectionEquipOverviewNew(String startDate, String endDate){ | 976 | public InspectionEquipOverviewVO getInspectionEquipOverviewNew(String startDate, String endDate){ |
967 | String departIds = BaseContextHandler.getDeparts(); | 977 | String departIds = BaseContextHandler.getDeparts(); |
968 | InspectionEquipOverviewVO inspectionEquipOverviewVO = new InspectionEquipOverviewVO(); | 978 | InspectionEquipOverviewVO inspectionEquipOverviewVO = new InspectionEquipOverviewVO(); |
... | @@ -991,9 +1001,8 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -991,9 +1001,8 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
991 | * @param endDate | 1001 | * @param endDate |
992 | * @return | 1002 | * @return |
993 | */ | 1003 | */ |
1004 | @Override | ||
994 | public List<InspectionEquipIndicatorsDetailVO> getInspectionEquipOverviewDetail(String departIds, String startDate, String endDate){ | 1005 | public List<InspectionEquipIndicatorsDetailVO> getInspectionEquipOverviewDetail(String departIds, String startDate, String endDate){ |
995 | // return inspectionAnalysisMapper.getInspectionEquipIndicatorsDetail( departIds, startDate, endDate); | ||
996 | //return null; | ||
997 | String sql = "select d.depart_name, d.id 'departId' , ifnull(kkk.total_count,0) 'totalInspectionEquipCount' , ifnull(kkk.yj_count,0) 'checkedInspectionEquipCount' ,ifnull(kkk.yc_count,0) 'abnormalInspectionEquipCount' ,(ifnull(kkk.yj_count,0) - ifnull(kkk.yc_count,0) ) 'normalInspectionEquipCount' , " + | 1006 | String sql = "select d.depart_name, d.id 'departId' , ifnull(kkk.total_count,0) 'totalInspectionEquipCount' , ifnull(kkk.yj_count,0) 'checkedInspectionEquipCount' ,ifnull(kkk.yc_count,0) 'abnormalInspectionEquipCount' ,(ifnull(kkk.yj_count,0) - ifnull(kkk.yc_count,0) ) 'normalInspectionEquipCount' , " + |
998 | " (ifnull(kkk.total_count,0) - ifnull(kkk.yj_count,0) ) 'notCheckedInspectionEquipCount' " + | 1007 | " (ifnull(kkk.total_count,0) - ifnull(kkk.yj_count,0) ) 'notCheckedInspectionEquipCount' " + |
999 | " from sys_depart d "; | 1008 | " from sys_depart d "; |
... | @@ -1099,6 +1108,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -1099,6 +1108,7 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
1099 | * @param endDate | 1108 | * @param endDate |
1100 | * @return | 1109 | * @return |
1101 | */ | 1110 | */ |
1111 | @Override | ||
1102 | public List<InspectionAbnormalItemsTrendVO> getInspectionAbnormalItemsTrendDetail(String departIds, String startDate, String endDate){ | 1112 | public List<InspectionAbnormalItemsTrendVO> getInspectionAbnormalItemsTrendDetail(String departIds, String startDate, String endDate){ |
1103 | return inspectionAnalysisMapper.getInspectionAbnormalItemsTrendDetail( departIds, startDate, endDate); | 1113 | return inspectionAnalysisMapper.getInspectionAbnormalItemsTrendDetail( departIds, startDate, endDate); |
1104 | } | 1114 | } | ... | ... |
-
请 注册 或 登录 后发表评论