| | |
| | | import com.zy.asrs.wms.apis.wcs.services.WcsApiService; |
| | | import com.zy.asrs.wms.asrs.entity.CacheSite; |
| | | import com.zy.asrs.wms.asrs.entity.Task; |
| | | import com.zy.asrs.wms.asrs.entity.WaveSeed; |
| | | import com.zy.asrs.wms.asrs.entity.param.BindPlatformParam; |
| | | import com.zy.asrs.wms.asrs.service.CacheSiteService; |
| | | import com.zy.asrs.wms.asrs.service.PlatformService; |
| | | import com.zy.asrs.wms.asrs.service.TaskService; |
| | | import com.zy.asrs.wms.asrs.service.WaveSeedService; |
| | | import com.zy.asrs.wms.asrs.service.impl.WaveSeedServiceImpl; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import io.netty.util.internal.StringUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | |
| | | @Resource |
| | | private TaskService taskService; |
| | | |
| | | @Autowired |
| | | private WaveSeedService waveSeedService; |
| | | |
| | | |
| | | /** |
| | |
| | | if (Objects.isNull(cacheSite)) { |
| | | throw new CoolException("当前站点不存在!!"); |
| | | } |
| | | |
| | | List<WaveSeed> waveSeed = waveSeedService.list(new LambdaQueryWrapper<WaveSeed>().eq(WaveSeed::getSiteNo, request.get("tagCode").toString())); |
| | | if (Objects.isNull(waveSeed)) { |
| | | throw new CoolException("播种墙地标未绑定!!"); |
| | | } |
| | | |
| | | List<Long> taskIds = waveSeed.stream().map(WaveSeed::getTaskId).collect(Collectors.toList()); |
| | | |
| | | // 根据播种站点信息条码,查任务 |
| | | Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, cacheSite.getBarcode())); |
| | | if (Objects.isNull(task)) { |
| | | List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>().in(Task::getId, taskIds)); |
| | | if (tasks.isEmpty()) { |
| | | throw new CoolException("当前站点任务不存在!!"); |
| | | } |
| | | |
| | | List<String> taskNos = tasks.stream().map(Task::getTaskNo).collect(Collectors.toList()); |
| | | |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("taskNo", task.getTaskNo()); |
| | | param.put("taskNo", taskNos); |
| | | param.put("siteNo", cacheSite.getSiteNo()); |
| | | param.put("orderNo",cacheSite.getOrderNo()); |
| | | |