From a651c1bc4c2ff33aafc5f85899ecc4718f5ac20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Fri, 24 Oct 2025 13:23:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(wcs):=20=E5=A2=9E=E5=8A=A0sortFlag?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=B9=B6=E4=BC=98=E5=8C=96=E6=A0=88=E6=9D=BF?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增sortFlag参数用于区分分拣与非分拣场景 - 在非分拣状态下,若条码已传输给WCS则禁止转移操作- 删除栈板明细时更新空标志并记录操作用户- 优化重复扫描条码的提示逻辑 - 增强参数校验以确保sortFlag正确解析- 改进异常处理机制提升系统稳定性 --- .../service/impl/WcsIntegrationServiceImpl.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java index 9e0ff1a..ad5fecd 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java @@ -395,7 +395,8 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { String position = (String) params.get("position"); Integer layer = Integer.valueOf(params.get("layer").toString()); String serialNo = (String) params.get("serialNo"); - + Object sortFlagObj = params.get("sortFlag"); + Integer sortFlag = (sortFlagObj != null) ? Integer.parseInt(sortFlagObj.toString()) : 0; if (!StringUtils.hasText(site) || !StringUtils.hasText(palletId) || !StringUtils.hasText(position) || layer == null || !StringUtils.hasText(serialNo)) { throw new Exception("参数不能为空"); @@ -453,11 +454,15 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { Map existingPalletInfo = wcsIntegrationMapper.findPalletByLabel(site, serialNo); if (existingPalletInfo != null) { String existingPalletId = (String) existingPalletInfo.get("palletId"); - + String wcsFlag = (String) existingPalletInfo.get("wcsFlag"); + // 如果标签在当前栈板,提示不要重复扫描 if (palletId.equals(existingPalletId)) { throw new Exception("该条码已在本栈板上,请不要重复扫描"); } + if (sortFlag==0&&"0".equals(wcsFlag)) {//非分拣时判断 + throw new Exception("该条码已经组盘传输给WCS,不能进行转移操作,请先取消组盘!"); + } // 如果标签在其他栈板,先删除旧记录(可能是从别的栈板扫到这里) System.out.println("条码" + serialNo + "在栈板" + existingPalletId + "中,先删除旧记录"); @@ -2174,9 +2179,10 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { if (detailCount == 0) { throw new RuntimeException("栈板无明细数据"); } - + SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); // 删除所有明细 - rqrq wcsIntegrationMapper.deleteAllPalletDetail(site, palletId); + updatePalletEmptyFlag(site, palletId, currentUser.getUsername()); System.out.println("已删除所有栈板明细 - rqrq"); System.out.println("移出全部物料完成 - rqrq");