|
|
@@ -68,11 +68,6 @@ public class QueryWarningRecordListByWarningIdService { |
|
|
|
|
|
|
|
// 构造返回结果对象 |
|
|
|
List<WarningRecordVo> warningRecordVoList = this.buildWarningRecordVoList(warningRecordList); |
|
|
|
|
|
|
|
for (WarningRecordVo warningRecordVo : warningRecordVoList) { |
|
|
|
log.info("预警记录, warningRecordVo = {}", warningRecordVo); |
|
|
|
} |
|
|
|
|
|
|
|
return JsonResult.success(warningRecordVoList); |
|
|
|
} |
|
|
|
|
|
|
@@ -100,24 +95,12 @@ public class QueryWarningRecordListByWarningIdService { |
|
|
|
|
|
|
|
private List<WarningRecordVo> buildWarningRecordVoList(List<WarningRecord> warningRecordList) { |
|
|
|
List<WarningRecordVo> warningRecordVoList = WarningRecordConverMapper.INSTANCE.fromWarningRecordListToWarningRecordListVoList(warningRecordList); |
|
|
|
ThMission oldMission; |
|
|
|
ThMission newMission; |
|
|
|
ThMission mission; |
|
|
|
for (WarningRecordVo warningRecordVo : warningRecordVoList) { |
|
|
|
oldMission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getId, warningRecordVo.getMissionId()) |
|
|
|
.eq(ThMission::getMark, MarkTypeEnum.VALID.getCode())); |
|
|
|
newMission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
mission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getId, warningRecordVo.getEmergencyMissionId()) |
|
|
|
.eq(ThMission::getMark, MarkTypeEnum.VALID.getCode())); |
|
|
|
if (oldMission.getAirportId().equals(newMission.getAirportId())) { |
|
|
|
if (0 == oldMission.getEmergencyDataMissionId()) { |
|
|
|
warningRecordVo.setStatus(oldMission.getStatus()); |
|
|
|
} else { |
|
|
|
warningRecordVo.setStatus(newMission.getStatus()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
warningRecordVo.setStatus(newMission.getStatus()); |
|
|
|
} |
|
|
|
warningRecordVo.setStatus(mission.getStatus()); |
|
|
|
} |
|
|
|
return warningRecordVoList; |
|
|
|
} |