|
|
|
|
|
|
|
|
Assert.notNull(thMission,"任务不能为空!"); |
|
|
Assert.notNull(thMission,"任务不能为空!"); |
|
|
taskId=thMission.getInspectionLine().toString(); |
|
|
taskId=thMission.getInspectionLine().toString(); |
|
|
|
|
|
|
|
|
|
|
|
//林场加判断,不允许存在同时一个机场同时存在两个飞行中任务 |
|
|
|
|
|
Integer flyCount = missionMapper.selectCount(new LambdaQueryWrapper<ThMission>() |
|
|
|
|
|
.eq(ThMission::getAirportId, thMission.getAirportId()) |
|
|
|
|
|
.eq(ThMission::getStatus, TaskStatusEnum.FLIGHT) |
|
|
|
|
|
.eq(ThMission::getMark, 1)); |
|
|
|
|
|
if(flyCount > 0){ |
|
|
|
|
|
return JsonResult.error("该机场已有飞行中的任务"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
int status = (Integer)redisUtils.get("status"); |
|
|
int status = (Integer)redisUtils.get("status"); |
|
|
//1:开,2:关 |
|
|
//1:开,2:关 |
|
|
if(status==1) { |
|
|
if(status==1) { |