|
|
@@ -25,7 +25,7 @@ import com.tuoheng.common.config.CommonConfig; |
|
|
|
import com.tuoheng.common.exception.ServiceException; |
|
|
|
import com.tuoheng.common.utils.*; |
|
|
|
import com.tuoheng.system.utils.ShiroUtils; |
|
|
|
import groovy.util.logging.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@@ -132,7 +132,7 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResult executeTask(String taskId,PushAndPullURLRequest pushAndPull) throws ServiceException{ |
|
|
|
|
|
|
|
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId()); |
|
|
|
ThMission thMission = missionMapper.selectById(taskId); |
|
|
|
Assert.notNull(thMission,"任务不能为空!"); |
|
|
|
taskId=thMission.getInspectionLine().toString(); |
|
|
@@ -140,8 +140,11 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
//这边需要配置到yml文件里面 |
|
|
|
String url = CommonConfig.airportUrl + "/api/airportInterface/executeTask"; |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
jsonObject.put("code", "hhz"); |
|
|
|
jsonObject.put("tenantName", tenant.getName()); |
|
|
|
jsonObject.put("taskId", taskId); |
|
|
|
|
|
|
|
jsonObject.put("requestId", String.valueOf(thMission.getId())); |
|
|
|
log.info("***** executeTask url:{};param:{}", url, jsonObject.toJSONString()); |
|
|
|
String airPortStr = HttpUtils.doSend(url, jsonObject, null, "POST"); |
|
|
|
if(StringUtils.isEmpty(airPortStr)){ |
|
|
|
return JsonResult.error("机场接口返回数据为空"); |