|
|
@@ -106,7 +106,7 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
public List<AirPortVO> airport() throws ServiceException, UnsupportedEncodingException { |
|
|
|
//这边需要配置到yml文件里面 |
|
|
|
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId()); |
|
|
|
String url = CommonConfig.airportUrl +"/api/airportInterface/airportList"; |
|
|
|
String url = tenant.getAirportUrl() +"/api/airportInterface/airportList"; |
|
|
|
String param = "page=1&limit=1000&tenantName=" + URLEncoder.encode(tenant.getName(), "UTF-8"); |
|
|
|
String airPortStr = HttpUtils.sendGet(url, param); |
|
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
@@ -118,9 +118,9 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<AirLineVO> airLine(Integer droneId) throws ServiceException { |
|
|
|
|
|
|
|
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId()); |
|
|
|
//这边需要配置到yml文件里面 |
|
|
|
String url = CommonConfig.airportUrl +"/api/airportInterface/taskByDroneId"; |
|
|
|
String url = tenant.getAirportUrl() +"/api/airportInterface/taskByDroneId"; |
|
|
|
String param="page=1&limit=100&droneId="+droneId; |
|
|
|
String airPortStr = HttpUtils.sendGet(url, param); |
|
|
|
JsonResult<AirLineVO> jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
@@ -138,7 +138,7 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
taskId=thMission.getInspectionLine().toString(); |
|
|
|
|
|
|
|
//这边需要配置到yml文件里面 |
|
|
|
String url = CommonConfig.airportUrl + "/api/airportInterface/executeTask"; |
|
|
|
String url = tenant.getAirportUrl() + "/api/airportInterface/executeTask"; |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
jsonObject.put("code", "hhz"); |
|
|
|
jsonObject.put("tenantName", tenant.getName()); |
|
|
@@ -168,8 +168,9 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
|
|
|
|
@Override |
|
|
|
public AirWeatherVO getWeather(Integer airportId) throws ServiceException{ |
|
|
|
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId()); |
|
|
|
//这边需要配置到yml文件里面 |
|
|
|
String url = CommonConfig.airportUrl + "/api/airportInterface/getWeather"; |
|
|
|
String url = tenant.getAirportUrl() + "/api/airportInterface/getWeather"; |
|
|
|
String param="airportId="+airportId; |
|
|
|
String weatherStr = HttpUtils.sendGet(url, param); |
|
|
|
JsonResult jsonResult; |
|
|
@@ -189,12 +190,12 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResult lineTrack(Integer missionId) { |
|
|
|
|
|
|
|
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId()); |
|
|
|
ThMission thMission = missionMapper.selectById(missionId); |
|
|
|
Assert.notNull(thMission,"任务不能为空!"); |
|
|
|
Integer taskId= thMission.getInspectionLine(); |
|
|
|
//解析标准srt文件里面的坐标,调用硬件接口,返回数据 |
|
|
|
String url = CommonConfig.airportUrl + "/api/airportInterface/getLocationById"; |
|
|
|
String url = tenant.getAirportUrl() + "/api/airportInterface/getLocationById"; |
|
|
|
String param="id="+taskId; |
|
|
|
String airportLine = HttpUtils.sendGet(url, param); |
|
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airportLine, JsonResult.class); |