|
|
@@ -13,6 +13,7 @@ import com.tuoheng.admin.entity.request.warningrecord.QueryWarningRecordListByWa |
|
|
|
import com.tuoheng.admin.entity.vo.warning.WarningListVo; |
|
|
|
import com.tuoheng.admin.entity.vo.warning.WarningRecordVo; |
|
|
|
import com.tuoheng.admin.enums.MarkEnum; |
|
|
|
import com.tuoheng.admin.enums.MarkTypeEnum; |
|
|
|
import com.tuoheng.admin.enums.TaskStatusEnum; |
|
|
|
import com.tuoheng.admin.enums.UpdateOrCreateEnum; |
|
|
|
import com.tuoheng.admin.mapper.ThMissionMapper; |
|
|
@@ -68,6 +69,10 @@ public class QueryWarningRecordListByWarningIdService { |
|
|
|
// 构造返回结果对象 |
|
|
|
List<WarningRecordVo> warningRecordVoList = this.buildWarningRecordVoList(warningRecordList); |
|
|
|
|
|
|
|
for (WarningRecordVo warningRecordVo : warningRecordVoList) { |
|
|
|
log.info("预警记录, warningRecordVo = {}", warningRecordVo); |
|
|
|
} |
|
|
|
|
|
|
|
return JsonResult.success(warningRecordVoList); |
|
|
|
} |
|
|
|
|
|
|
@@ -100,12 +105,16 @@ public class QueryWarningRecordListByWarningIdService { |
|
|
|
for (WarningRecordVo warningRecordVo : warningRecordVoList) { |
|
|
|
oldMission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getId, warningRecordVo.getMissionId()) |
|
|
|
.eq(ThMission::getMark, 1)); |
|
|
|
.eq(ThMission::getMark, MarkTypeEnum.VALID.getCode())); |
|
|
|
newMission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getId, warningRecordVo.getEmergencyMissionId()) |
|
|
|
.eq(ThMission::getMark, 1)); |
|
|
|
.eq(ThMission::getMark, MarkTypeEnum.VALID.getCode())); |
|
|
|
if (oldMission.getAirportId().equals(newMission.getAirportId())) { |
|
|
|
warningRecordVo.setStatus(oldMission.getStatus()); |
|
|
|
if (0 == oldMission.getEmergencyDataMissionId()) { |
|
|
|
warningRecordVo.setStatus(oldMission.getStatus()); |
|
|
|
} else { |
|
|
|
warningRecordVo.setStatus(newMission.getStatus()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
warningRecordVo.setStatus(newMission.getStatus()); |
|
|
|
} |