From 523d8cf68615134c7780f74933e70a14edb60f01 Mon Sep 17 00:00:00 2001 From: skyouc <958836976@qq.com> Date: 星期五, 05 九月 2025 17:00:39 +0800 Subject: [PATCH] wcs联调功能优化 --- rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java index 58b8709..2e83811 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java @@ -2,7 +2,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.vincent.rsf.framework.exception.CoolException; -import com.vincent.rsf.server.api.controller.params.TaskInParam; +import com.vincent.rsf.server.api.controller.erp.params.TaskInParam; import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto; import com.vincent.rsf.server.api.service.WcsService; import com.vincent.rsf.server.api.utils.LocUtils; @@ -49,6 +49,8 @@ private OutStockService outStockService; @Autowired private WaveService waveService; + @Autowired + private BasStationService basStationService; /** @@ -70,7 +72,6 @@ if (Objects.isNull(map.getItems()) || map.getItems().isEmpty()) { throw new CoolException("鏄庣粏涓嶈兘涓虹┖锛�"); } - String siteNo = map.getSiteNo(); List<LocItem> items = map.getItems(); Map<Long, List<LocItem>> listMap = items.stream().collect(Collectors.groupingBy(LocItem::getLocId)); @@ -117,7 +118,8 @@ .setCreateTime(new Date()) .setUpdateTime(new Date()) .setTaskStatus(TaskStsType.GENERATE_OUT.id) - .setBarcode(loc.getBarcode()); + .setBarcode(loc.getBarcode()) + .setMemo(map.getMemo()); List<LocItem> locItems = this.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, key)); if (locItems.isEmpty()) { @@ -135,7 +137,7 @@ //鎷f枡鍑哄簱 -- 鐩樼偣鍑哄簱 DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() .eq(DeviceSite::getSite, siteNo) - .eq(DeviceSite::getChannel, loc.getChannel()) + .eq(!Objects.isNull(loc.getChannel()),DeviceSite::getChannel, loc.getChannel()) .eq(DeviceSite::getType, TaskType.TASK_TYPE_PICK_AGAIN_OUT.type)); if (Objects.isNull(deviceSite)) { throw new CoolException("绔欑偣涓嶆敮鎸佹嫞鏂欏嚭搴擄紒锛�"); @@ -144,7 +146,7 @@ } else { //鍏ㄦ澘鍑哄簱 DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() - .eq(DeviceSite::getChannel, loc.getChannel()) + .eq(!Objects.isNull(loc.getChannel()), DeviceSite::getChannel, loc.getChannel()) .eq(DeviceSite::getSite, siteNo).eq(DeviceSite::getType, TaskType.TASK_TYPE_OUT.type)); if (Objects.isNull(deviceSite)) { throw new CoolException("绔欑偣涓嶆敮鎸佸叏鏉垮嚭搴擄紒锛�"); @@ -155,7 +157,7 @@ } else if (map.getType().equals(Constants.TASK_TYPE_OUT_CHECK)) { //鐩樼偣鍑哄簱 DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() - .eq(DeviceSite::getChannel, loc.getChannel()) + .eq(!Objects.isNull(loc.getChannel()), DeviceSite::getChannel, loc.getChannel()) .eq(DeviceSite::getSite, siteNo) .eq(DeviceSite::getType, TaskType.TASK_TYPE_CHECK_OUT.type)); if (Objects.isNull(deviceSite)) { @@ -292,14 +294,14 @@ //鐩爣搴撲綅涓虹┖锛岃嚜鍔ㄨ幏鍙栨柊搴撲綅 DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() .eq(DeviceSite::getType, TaskType.TASK_TYPE_LOC_MOVE.type) - .eq(DeviceSite::getChannel, orgLoc.getChannel()), false); + .eq(!Objects.isNull(orgLoc.getChannel()), DeviceSite::getChannel, orgLoc.getChannel()), false); if (Objects.isNull(deviceSite)) { throw new CoolException("绔欑偣淇℃伅涓嶅瓨鍦紒锛�"); } TaskInParam param = new TaskInParam(); param.setIoType(TaskType.TASK_TYPE_OUT.type) .setOrgLoc(map.getOrgLoc()) - .setSourceStaNo(Integer.parseInt(deviceSite.getSite())) + .setSourceStaNo(deviceSite.getSite()) .setLocType1(Integer.parseInt(orgLoc.getType()) ); InTaskMsgDto locNo; @@ -334,7 +336,8 @@ .setSort(Constants.TASK_SORT_DEFAULT_VALUE) .setUpdateTime(new Date()) .setTaskStatus(TaskStsType.GENERATE_IN.id) - .setBarcode(orgLoc.getBarcode()); + .setBarcode(orgLoc.getBarcode()) + .setMemo(map.getMemo()); if (!taskService.save(task)) { throw new CoolException("鏂板缓绉诲簱浠诲姟澶辫触锛侊紒"); -- Gitblit v1.9.1