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