|
@@ -84,7 +84,7 @@ public class MsgAlarmController extends BaseController {
|
|
|
@ApiOperation(value = "报警信息分页")
|
|
|
@PostMapping("/list")
|
|
|
public AjaxResult selectMsgAlarm(@RequestBody MsgAlarmVo msgAlarmVo) {
|
|
|
- BaseCameraManagement baseCameraManagement=new BaseCameraManagement();
|
|
|
+ List<BaseCameraManagement> baseCameraManagementList=new ArrayList<>();
|
|
|
LambdaQueryWrapper<BaseCameraManagement> wrapper = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getRailwayCode())) {
|
|
|
wrapper.eq(BaseCameraManagement::getRailwayCode, msgAlarmVo.getRailwayCode());
|
|
@@ -96,14 +96,15 @@ public class MsgAlarmController extends BaseController {
|
|
|
wrapper.le(BaseCameraManagement::getEndMile, msgAlarmVo.getEndMile());
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getRailwayCode())||!ObjectUtils.isEmpty(msgAlarmVo.getBeginMile())||!ObjectUtils.isEmpty(msgAlarmVo.getEndMile())) {
|
|
|
- baseCameraManagement = baseCameraManagementService.getOne(wrapper);
|
|
|
+ baseCameraManagementList = baseCameraManagementService.list(wrapper);
|
|
|
}
|
|
|
LambdaQueryWrapper<MsgAlarm> lw = new LambdaQueryWrapper<MsgAlarm>();
|
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getLineDir())) {
|
|
|
lw.eq(MsgAlarm::getLineDir, msgAlarmVo.getLineDir());
|
|
|
}
|
|
|
- if (!ObjectUtils.isEmpty(baseCameraManagement.getCameraCode())) {
|
|
|
- lw.eq(MsgAlarm::getCameraCode, baseCameraManagement.getCameraCode());
|
|
|
+ if (baseCameraManagementList.size()>0) {
|
|
|
+ List<String> collect = baseCameraManagementList.stream().map(BaseCameraManagement::getCameraCode).collect(Collectors.toList());
|
|
|
+ lw.in(MsgAlarm::getCameraCode, collect);
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(msgAlarmVo.getAlarmType())) {
|
|
|
lw.eq(MsgAlarm::getAlarmType, msgAlarmVo.getAlarmType());
|