| | |
| | | @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); |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | public interface AlarmInspectionMapper extends CustomMapper<AlarmInspection>{ |
| | | List<AlarmInspection> getList(Integer stationId); |
| | | List<AlarmInspection> getList(Integer stationId, Integer inspectionType); |
| | | |
| | | } |
| | |
| | | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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> |