diff --git a/youchain-system/src/main/java/com/youchain/businessdata/service/impl/LesServiceImpl.java b/youchain-system/src/main/java/com/youchain/businessdata/service/impl/LesServiceImpl.java index 4ecbf50..7bff36f 100644 --- a/youchain-system/src/main/java/com/youchain/businessdata/service/impl/LesServiceImpl.java +++ b/youchain-system/src/main/java/com/youchain/businessdata/service/impl/LesServiceImpl.java @@ -8,6 +8,8 @@ import com.youchain.businessdata.domain.Les; import com.youchain.businessdata.inputJson.LesRequest; import com.youchain.businessdata.inputJson.PositionCodeRequest; import com.youchain.businessdata.repository.LesRepository; +import com.youchain.businessdata.service.AgvTaskService; +import com.youchain.businessdata.service.KMReService; import com.youchain.businessdata.service.LesService; import com.youchain.businessdata.service.dto.LesDto; import com.youchain.businessdata.service.dto.LesQueryCriteria; @@ -52,6 +54,8 @@ public class LesServiceImpl implements LesService { private final DictService dictService; + private final KMReService kmReService; + private final LesMapper lesMapper; @Override @@ -412,24 +416,7 @@ public class LesServiceImpl implements LesService { } private void sendLesTask(String json) { - Dict dict = dictService.findDictByName("OPEN"); - String resultJson; - if (dict != null) { - resultJson = HttpPostUtil.sendPostReq(UrlApi.submitMission(), json); - if (StringUtils.isEmpty(resultJson)) { - throw new BadRequestException("AGV返回信息:下发任务接口调用失败"); - } - JSONObject resulObject = JSON.parseObject(resultJson); - if (resulObject == null) { - throw new BadRequestException("AGV返回信息:下发任务接口返回为空"); - } - - String code = resulObject.getString("code"); - String message = resulObject.getString("message"); - if (!"0".equals(code)) { - throw new BadRequestException("AGV返回消息:" + message); - } - } + kmReService.sendAgvTaskToContainer(UrlApi.submitMission(), json); } }