|
|
@@ -19,6 +19,7 @@ import com.tuoheng.admin.enums.inspection.*; |
|
|
|
import com.tuoheng.admin.mapper.*; |
|
|
|
import com.tuoheng.admin.request.*; |
|
|
|
import com.tuoheng.admin.service.AsyncService; |
|
|
|
import com.tuoheng.admin.service.EventService; |
|
|
|
import com.tuoheng.admin.service.InspectionService; |
|
|
|
import com.tuoheng.admin.service.airport.AirportService; |
|
|
|
import com.tuoheng.admin.service.business.IBusinessService; |
|
|
@@ -98,6 +99,9 @@ public class InspectionServiceImpl extends ServiceImpl<InspectionMapper, Inspect |
|
|
|
|
|
|
|
@Resource |
|
|
|
private AsyncService asyncService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private EventService eventService; |
|
|
|
|
|
|
|
/** |
|
|
|
* DSP服务回调接口域名 |
|
|
@@ -158,11 +162,23 @@ public class InspectionServiceImpl extends ServiceImpl<InspectionMapper, Inspect |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 立即执行指点飞行任务,新增巡检任务数据 |
|
|
|
* 立即执行指点飞行任务,新增巡检任务数据,获取坐标拿生成航线文件相关,并调取机场进行指点飞行 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public JsonResult execute(String eventId, PushAndPullURLRequest pushAndPull) { |
|
|
|
|
|
|
|
/** |
|
|
|
* 判断机场是否空闲,如果不空闲,直接返回 |
|
|
|
*/ |
|
|
|
JsonResult result = eventService.airport(); |
|
|
|
JSONObject jsonObject = (JSONObject) result.getData(); |
|
|
|
Integer status = jsonObject.getIntValue("status"); |
|
|
|
//2表示不可用 |
|
|
|
if(status == 2){ |
|
|
|
return JsonResult.success(status, "该机场正在执行任务"); |
|
|
|
|
|
|
|
} |
|
|
|
/* |
|
|
|
新增一条巡检任务数据, 默认状态为待飞行, 同时更新对应的入侵事件, 绑定这个任务的id |
|
|
|
*/ |