|
|
@@ -30,6 +30,7 @@ import com.tuoheng.admin.third.dsp.IDspService; |
|
|
|
import com.tuoheng.admin.utils.*; |
|
|
|
import com.tuoheng.admin.vo.AirWeatherVO; |
|
|
|
import com.tuoheng.admin.vo.DspCallbackVo; |
|
|
|
import com.tuoheng.admin.vo.DspInspection.AirPortVO; |
|
|
|
import com.tuoheng.admin.vo.LiveChannelVo; |
|
|
|
import com.tuoheng.common.core.common.BaseEntity; |
|
|
|
import com.tuoheng.common.core.enums.MarkEnum; |
|
|
@@ -169,13 +170,22 @@ public class InspectionServiceImpl extends ServiceImpl<InspectionMapper, Inspect |
|
|
|
* 判断机场是否空闲,如果不空闲,直接返回 |
|
|
|
*/ |
|
|
|
JsonResult result = airportService.airport(); |
|
|
|
JSONObject jsonObject = (JSONObject) result.getData(); |
|
|
|
Integer status = jsonObject.getIntValue("status"); |
|
|
|
//2表示不可用 |
|
|
|
if(status == 2){ |
|
|
|
return JsonResult.success(status, "该机场正在执行任务"); |
|
|
|
|
|
|
|
if(ObjectUtils.isNull(result.getData())){ |
|
|
|
return JsonResult.success("没有可用的机场!"); |
|
|
|
} |
|
|
|
System.out.println(result.getData().getClass()); |
|
|
|
boolean isFree = false;//机场是否空闲的标记 |
|
|
|
List<AirPortVO> airpotVoList = (List<AirPortVO>) result.getData(); |
|
|
|
for (AirPortVO airPortVO : airpotVoList) { |
|
|
|
if(airPortVO.getStatus().equals(1)){//status=1:空闲, |
|
|
|
isFree = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
if(!isFree){ |
|
|
|
return JsonResult.success("所有机场正在执行任务"); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
新增一条巡检任务数据, 默认状态为待飞行, 同时更新对应的入侵事件, 绑定这个任务的id |
|
|
|
*/ |