whycxzp
2025-06-11 639d62cb082962f0969b986569ec25bf3005a318
故障工单和巡检备忘录
4个文件已修改
14 ■■■■ 已修改文件
src/main/java/com/whyc/controller/AlarmInspectionController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/AlarmInspectionMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/AlarmInspectionService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/AlarmInspectionMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
    }
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);
}
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);
    }
}
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>