|
|
|
|
|
|
|
|
import com.tuoheng.common.common.BaseServiceImpl; |
|
|
import com.tuoheng.common.common.BaseServiceImpl; |
|
|
import com.tuoheng.common.config.CommonConfig; |
|
|
import com.tuoheng.common.config.CommonConfig; |
|
|
import com.tuoheng.common.exception.ServiceException; |
|
|
import com.tuoheng.common.exception.ServiceException; |
|
|
import com.tuoheng.common.utils.HttpUtils; |
|
|
|
|
|
import com.tuoheng.common.utils.JacksonUtil; |
|
|
|
|
|
import com.tuoheng.common.utils.JsonResult; |
|
|
|
|
|
import com.tuoheng.common.utils.RedisUtils; |
|
|
|
|
|
|
|
|
import com.tuoheng.common.utils.*; |
|
|
import com.tuoheng.system.utils.ShiroUtils; |
|
|
import com.tuoheng.system.utils.ShiroUtils; |
|
|
import groovy.util.logging.Slf4j; |
|
|
import groovy.util.logging.Slf4j; |
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
|
|
|
|
|
|
jsonObject.put("taskId", taskId); |
|
|
jsonObject.put("taskId", taskId); |
|
|
|
|
|
|
|
|
String airPortStr = HttpUtils.doSend(url, jsonObject, null, "POST"); |
|
|
String airPortStr = HttpUtils.doSend(url, jsonObject, null, "POST"); |
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
|
|
|
|
|
|
JsonResult jsonResult = null; |
|
|
|
|
|
try { |
|
|
|
|
|
jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
return JsonResult.error(airPortStr); |
|
|
|
|
|
} |
|
|
if (ObjectUtil.isEmpty(jsonResult) || (!ObjectUtil.isEmpty(Objects.requireNonNull(jsonResult).getData()) && jsonResult.getCode() != 0)) { |
|
|
if (ObjectUtil.isEmpty(jsonResult) || (!ObjectUtil.isEmpty(Objects.requireNonNull(jsonResult).getData()) && jsonResult.getCode() != 0)) { |
|
|
assert jsonResult != null; |
|
|
assert jsonResult != null; |
|
|
return JsonResult.error(JSONObject.parseArray(JSONObject.parseObject(JSONObject.toJSONString(jsonResult.getData())).get("data").toString(), AirExecuteTaskVO.class), "执行任务失败!"); |
|
|
return JsonResult.error(JSONObject.parseArray(JSONObject.parseObject(JSONObject.toJSONString(jsonResult.getData())).get("data").toString(), AirExecuteTaskVO.class), "执行任务失败!"); |