|  |  | 
 |  |  | import com.zy.asrs.framework.exception.CoolException;
 | 
 |  |  | import com.zy.asrs.wms.apis.wcs.entity.domain.EssTaskStatus;
 | 
 |  |  | import com.zy.asrs.wms.apis.wcs.entity.request.*;
 | 
 |  |  | import com.zy.asrs.wms.apis.wcs.entity.response.CommonReponse;
 | 
 |  |  | import com.zy.asrs.wms.apis.wcs.services.WcsApiService;
 | 
 |  |  | import com.zy.asrs.wms.asrs.entity.Task;
 | 
 |  |  | import com.zy.asrs.wms.asrs.entity.WaitPakin;
 | 
 |  |  | import com.zy.asrs.wms.asrs.entity.enums.TaskStsType;
 | 
 |  |  | import com.zy.asrs.wms.asrs.service.TaskService;
 | 
 |  |  | import com.zy.asrs.wms.asrs.service.WaitPakinService;
 | 
 |  |  | 
 |  |  | import org.springframework.stereotype.Service;
 | 
 |  |  | import org.springframework.transaction.annotation.Transactional;
 | 
 |  |  | 
 | 
 |  |  | import java.util.ArrayList;
 | 
 |  |  | import java.util.List;
 | 
 |  |  | import java.util.Map;
 | 
 |  |  | import java.util.stream.Collectors;
 | 
 |  |  | 
 | 
 |  |  | @Slf4j
 | 
 |  |  | @Service
 | 
 |  |  | 
 |  |  |     /**
 | 
 |  |  |      * 容器到达接收
 | 
 |  |  |      * 根据ESS返回的容器编码修改任务档中的输送线起始位置节点,及任务档执行状态
 | 
 |  |  |      *              * 当前问题:
 | 
 |  |  |      *              * //TODO 1. 目前任务下发接口沟通下来,是需要目标位置的,这里我们只是刚组拖完成,并不是通知流动,没有目标位置
 | 
 |  |  |      *              * //TODO 2. 文档上的搬运任务下发指的都是多任务,多容器搬运,而不是我们需要物料信息同步功能
 | 
 |  |  |      *              * //TODO 3. 流程走不通暂时先跳过,确认是否需要WMS触发料箱滚动至扫码区
 | 
 |  |  |      * * 当前问题:
 | 
 |  |  |      * * //TODO 1. 目前任务下发接口沟通下来,是需要目标位置的,这里我们只是刚组拖完成,并不是通知流动,没有目标位置
 | 
 |  |  |      * * //TODO 2. 文档上的搬运任务下发指的都是多任务,多容器搬运,而不是我们需要物料信息同步功能
 | 
 |  |  |      * * //TODO 3. 流程走不通暂时先跳过,确认是否需要WMS触发料箱滚动至扫码区
 | 
 |  |  |      *
 | 
 |  |  |      * @param arrivedParam
 | 
 |  |  |      * @param hostId
 | 
 |  |  |      * @return
 | 
 |  |  |      */
 | 
 |  |  |     @Override
 | 
 |  |  |     @Transactional(rollbackFor = Exception.class)
 | 
 |  |  |     public R containerArrivedNotify(ContainerArrivedParam arrivedParam, String taskType) {
 | 
 |  |  |     public R containerArrivedNotify(ContainerArrivedParam arrivedParam, String taskType, Long hostId) {
 | 
 |  |  |         List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, arrivedParam.getContainerCode()));
 | 
 |  |  |         if (Collections.isEmpty(tasks)) {
 | 
 |  |  |             return R.error("任务不存在!!");
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  |     @Override
 | 
 |  |  |     @Transactional(rollbackFor = Exception.class)
 | 
 |  |  |     public void receiveTaskStatus(TasksStatusCallbackParam callbackParam, String stockType) {
 | 
 |  |  |     public void receiveTaskStatus(TasksStatusCallbackParam callbackParam, String stockType, Long hostId) {
 | 
 |  |  |         List<Task> list = taskService.list(new LambdaQueryWrapper<Task>()
 | 
 |  |  |                 .eq(Task::getBarcode, callbackParam.getContainerCode())
 | 
 |  |  |                 .eq(Task::getTaskNo, callbackParam.getTaskCode()));
 | 
 |  |  | 
 |  |  |                     }
 | 
 |  |  | 
 | 
 |  |  |                 });
 | 
 |  |  |         } else {
 | 
 |  |  |             throw new CoolException("更新内容不存在!!");
 | 
 |  |  |         }
 | 
 |  |  |     }
 | 
 |  |  | 
 |