feat(inspection): 新增巡检设备概况接口和相关功能
- 在 IInspectionAnalysisService 接口中添加 getInspectionEquipByStatus 方法 - 在 InspectionAnalysisController 中添加 getInspectionEquipByStatus 控制器方法 - 在 InspectionAnalysisServiceImpl 中实现 getInspectionEquipByStatus 方法 - 新增 InspectionEquipInfoListVO 类用于巡检设备信息展示
正在显示
4 个修改的文件
包含
61 行增加
和
1 行删除
... | @@ -266,4 +266,14 @@ public class InspectionAnalysisController { | ... | @@ -266,4 +266,14 @@ public class InspectionAnalysisController { |
266 | result.setResult(dataList); | 266 | result.setResult(dataList); |
267 | return result; | 267 | return result; |
268 | } | 268 | } |
269 | |||
270 | @ApiOperation(value = "巡检分析-巡检设备概况[未检、异常])", notes = "巡检分析-巡检设备概况[未检、异常]") | ||
271 | @GetMapping("/getInspectionEquipByStatus") | ||
272 | public Result<Map<String,Object>> getInspectionEquipByStatus(String startDate, String endDate){ | ||
273 | Result<Map<String,Object>> result = new Result<>(); | ||
274 | Map<String,Object> map = inspectionAnalysisService.getInspectionEquipByStatus(startDate,endDate); | ||
275 | result.setSuccess(true); | ||
276 | result.setResult(map); | ||
277 | return result; | ||
278 | } | ||
269 | } | 279 | } | ... | ... |
... | @@ -96,5 +96,5 @@ public interface IInspectionAnalysisService { | ... | @@ -96,5 +96,5 @@ public interface IInspectionAnalysisService { |
96 | List<InspectionAbnormalItemsTrendVO> getInspectionAbnormalItemsTrendDetail(String departIds, String startDate, String endDate); | 96 | List<InspectionAbnormalItemsTrendVO> getInspectionAbnormalItemsTrendDetail(String departIds, String startDate, String endDate); |
97 | 97 | ||
98 | 98 | ||
99 | 99 | Map<String,Object> getInspectionEquipByStatus(String startDate, String endDate); | |
100 | } | 100 | } | ... | ... |
... | @@ -969,6 +969,22 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService | ... | @@ -969,6 +969,22 @@ public class InspectionAnalysisServiceImpl implements IInspectionAnalysisService |
969 | public List<InspectionAbnormalItemsTrendVO> getInspectionAbnormalItemsTrendDetail(String departIds, String startDate, String endDate){ | 969 | public List<InspectionAbnormalItemsTrendVO> getInspectionAbnormalItemsTrendDetail(String departIds, String startDate, String endDate){ |
970 | return inspectionAnalysisMapper.getInspectionAbnormalItemsTrendDetail( departIds, startDate, endDate); | 970 | return inspectionAnalysisMapper.getInspectionAbnormalItemsTrendDetail( departIds, startDate, endDate); |
971 | } | 971 | } |
972 | |||
973 | //InspectionEquipInfoListVO | ||
974 | @Override | ||
975 | public Map<String,Object> getInspectionEquipByStatus(String startDate, String endDate) { | ||
976 | Map<String,Object> map = new HashMap<>(); | ||
977 | List<InspectionEquipInfoListVO> noCheckinList = new ArrayList<>(); | ||
978 | List<InspectionEquipInfoListVO> falutList = new ArrayList<>(); | ||
979 | map.put("nocheckCount",noCheckinList.size()); | ||
980 | map.put("abnormalCount",falutList.size()); | ||
981 | map.put("nocheckList",noCheckinList); | ||
982 | map.put("abnormalList",falutList); | ||
983 | //查询时间内已巡检任务信息 | ||
984 | |||
985 | return map; | ||
986 | } | ||
987 | |||
972 | public static List<String[]> getCycleList(int cycleNum, String startTime, String endTime) throws ParseException { | 988 | public static List<String[]> getCycleList(int cycleNum, String startTime, String endTime) throws ParseException { |
973 | // System.out.println("统计的时间段为:从" + startTime + "到" + endTime); | 989 | // System.out.println("统计的时间段为:从" + startTime + "到" + endTime); |
974 | Date endParse = new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(endTime); | 990 | Date endParse = new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(endTime); | ... | ... |
sk-module-inspection/src/main/java/com/skua/modules/inspection/vo/InspectionEquipInfoListVO.java
0 → 100644
1 | package com.skua.modules.inspection.vo; | ||
2 | |||
3 | import com.skua.tool.util.JSUtils; | ||
4 | import io.swagger.annotations.ApiModel; | ||
5 | import io.swagger.annotations.ApiModelProperty; | ||
6 | import lombok.Data; | ||
7 | import lombok.EqualsAndHashCode; | ||
8 | |||
9 | /** | ||
10 | * <pre> | ||
11 | * 巡检设备指标--详情 | ||
12 | * </pre> | ||
13 | * @author zhanglei | ||
14 | * @version 1.0,4/23/23 4:21 PM | ||
15 | */ | ||
16 | @Data | ||
17 | @EqualsAndHashCode(callSuper = false) | ||
18 | @ApiModel(value="巡检设备信息", description="巡检设备信息") | ||
19 | public class InspectionEquipInfoListVO { | ||
20 | @ApiModelProperty(value = "厂站编号") | ||
21 | private String departId; | ||
22 | @ApiModelProperty(value = "厂站名称") | ||
23 | private String departName; | ||
24 | @ApiModelProperty(value = "设备名称") | ||
25 | private String equipName; | ||
26 | @ApiModelProperty(value = "设备类别") | ||
27 | private String equipType; | ||
28 | @ApiModelProperty(value = "上级名称") | ||
29 | private String parentId; | ||
30 | @ApiModelProperty(value = "上级名称") | ||
31 | private String parentName; | ||
32 | |||
33 | |||
34 | } |
-
请 注册 或 登录 后发表评论