|
|
@@ -168,15 +168,10 @@ public class PointFlightService { |
|
|
|
} |
|
|
|
|
|
|
|
if (mission.getAirportId() == request.getAirportId()) { |
|
|
|
WarningRecord warningRecord = warningRecordMapper.selectOne(new LambdaQueryWrapper<WarningRecord>() |
|
|
|
.eq(WarningRecord::getMissionId, mission.getId()) |
|
|
|
.eq(WarningRecord::getMark, MarkTypeEnum.VALID.getCode()) |
|
|
|
.orderByDesc(WarningRecord::getCreateTime) |
|
|
|
.last(" limit 1")); |
|
|
|
if (ObjectUtil.isNotNull(warningRecord)) { |
|
|
|
ThMission missionTmp = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getId, warningRecord.getEmergencyMissionId()) |
|
|
|
.eq(ThMission::getMark, MarkEnum.VALID.getCode())); |
|
|
|
ThMission missionTmp = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getEmergencyDataMissionId, mission.getId()) |
|
|
|
.eq(ThMission::getMark, MarkEnum.VALID.getCode())); |
|
|
|
if (ObjectUtil.isNotNull(missionTmp)) { |
|
|
|
if (TaskStatusEnum.FLIGHT.getCode() == missionTmp.getStatus()) { |
|
|
|
log.info("原机场正在执行任务"); |
|
|
|
throw new ServiceException("发现该问题的机场正在执行任务"); |
|
|
@@ -186,7 +181,8 @@ public class PointFlightService { |
|
|
|
ThMission missionTmp = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getAirportId, request.getAirportId()) |
|
|
|
.eq(ThMission::getStatus, TaskStatusEnum.FLIGHT.getCode()) |
|
|
|
.eq(ThMission::getMark, MarkEnum.VALID.getCode())); |
|
|
|
.eq(ThMission::getMark, MarkEnum.VALID.getCode()) |
|
|
|
.last(" limit 1")); |
|
|
|
if (ObjectUtil.isNotNull(missionTmp)) { |
|
|
|
log.info("新机场正在执行任务"); |
|
|
|
throw new ServiceException("该机场正在执行任务"); |