From 639d62cb082962f0969b986569ec25bf3005a318 Mon Sep 17 00:00:00 2001 From: whycxzp <glperry@163.com> Date: 星期三, 11 六月 2025 20:10:36 +0800 Subject: [PATCH] 故障工单和巡检备忘录 --- src/main/java/com/whyc/service/AlarmInspectionService.java | 2 +- src/main/java/com/whyc/controller/AlarmInspectionController.java | 4 ++-- src/main/java/com/whyc/mapper/AlarmInspectionMapper.java | 2 +- src/main/resources/mapper/AlarmInspectionMapper.xml | 6 ++++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/whyc/controller/AlarmInspectionController.java b/src/main/java/com/whyc/controller/AlarmInspectionController.java index e7d672e..3467b3e 100644 --- a/src/main/java/com/whyc/controller/AlarmInspectionController.java +++ b/src/main/java/com/whyc/controller/AlarmInspectionController.java @@ -26,8 +26,8 @@ @Autowired private AlarmInspectionService service; - @ApiOperation("鏌ヨ绔欑偣瀵瑰簲鐨勫贰妫�鍗�") - @GetMapping("") + @ApiOperation(value = "鏌ヨ绔欑偣瀵瑰簲鐨勫贰妫�鍗�",notes = "inspectionType=1琛ㄧず鍛婅绾у埆涓�1鐨勬晠闅滃伐鍗�,inspectionType=2琛ㄧず鍛婅绾у埆涓�2鐨勫贰妫�澶囧繕褰�") + @GetMapping("getList") public Response getList(@RequestParam Integer stationId,@RequestParam Integer inspectionType){ return service.getList(stationId,inspectionType); } diff --git a/src/main/java/com/whyc/mapper/AlarmInspectionMapper.java b/src/main/java/com/whyc/mapper/AlarmInspectionMapper.java index 9fa5b5d..7a9d35b 100644 --- a/src/main/java/com/whyc/mapper/AlarmInspectionMapper.java +++ b/src/main/java/com/whyc/mapper/AlarmInspectionMapper.java @@ -5,6 +5,6 @@ import java.util.List; public interface AlarmInspectionMapper extends CustomMapper<AlarmInspection>{ - List<AlarmInspection> getList(Integer stationId); + List<AlarmInspection> getList(Integer stationId, Integer inspectionType); } diff --git a/src/main/java/com/whyc/service/AlarmInspectionService.java b/src/main/java/com/whyc/service/AlarmInspectionService.java index 8fe391e..ae05a78 100644 --- a/src/main/java/com/whyc/service/AlarmInspectionService.java +++ b/src/main/java/com/whyc/service/AlarmInspectionService.java @@ -16,7 +16,7 @@ public Response getList(Integer stationId, Integer inspectionType) { //闇�瑕侀檮鍔犲~鍏� 璐熻矗鐝粍淇℃伅 鍙� 鍛婅璇婃柇淇℃伅 - List<AlarmInspection> list = mapper.getList(stationId); + List<AlarmInspection> list = mapper.getList(stationId,inspectionType); return new Response().set(1,list); } } diff --git a/src/main/resources/mapper/AlarmInspectionMapper.xml b/src/main/resources/mapper/AlarmInspectionMapper.xml index 55790d4..dbba3f1 100644 --- a/src/main/resources/mapper/AlarmInspectionMapper.xml +++ b/src/main/resources/mapper/AlarmInspectionMapper.xml @@ -68,5 +68,11 @@ and ai.station_id = bgp.station_id and bg.baoji_group_id = bgp.baoji_group_id and ai.station_id = #{stationId} + <if test="inspectionType == 1"> + and ai.alm_level = 1 + </if> + <if test="inspectionType == 2"> + and ai.alm_level != 1 + </if> </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1