|
|
@@ -79,8 +79,10 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
ThMission mission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getId, id) |
|
|
|
.eq(ThMission::getMark, 1)); |
|
|
|
|
|
|
|
if (AirportFlyTypeEnum.POINTING_FLIGHT.getCode() == mission.getAirportFlyType()) { |
|
|
|
if (ObjectUtil.isNull(mission)) { |
|
|
|
throw new ServiceException("没有该任务记录"); |
|
|
|
} |
|
|
|
if (ObjectUtil.isNotNull(mission.getAirportFlyType()) && AirportFlyTypeEnum.POINTING_FLIGHT.getCode() == mission.getAirportFlyType()) { |
|
|
|
// 定点飞行 |
|
|
|
WarningRecord warningRecord = warningRecordMapper.selectOne(new LambdaQueryWrapper<WarningRecord>() |
|
|
|
.eq(WarningRecord::getEmergencyMissionId, id) |
|
|
@@ -169,7 +171,16 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
@Override |
|
|
|
public JsonResult executeTask(String missionId, PushAndPullURLRequest pushAndPull) throws ServiceException { |
|
|
|
log.info("executeTask准备就绪"); |
|
|
|
|
|
|
|
ThMission thMission = missionMapper.selectById(Integer.parseInt(missionId)); |
|
|
|
if (ObjectUtil.isNull(thMission)) { |
|
|
|
log.error("该任务不存在,missionId={}", missionId); |
|
|
|
return JsonResult.error("该任务不存在"); |
|
|
|
} |
|
|
|
if (2 == thMission.getExecutionStatus()) { |
|
|
|
log.error("该任务已经被执行,missionId={}", missionId); |
|
|
|
return JsonResult.error("该任务已经被执行"); |
|
|
|
} |
|
|
|
log.info("mission查询完成"); |
|
|
|
User user = userMapper.selectById(thMission.getCreateUser()); |
|
|
|
log.info("user查询完成"); |