From 7032e3c8e70da70fff52d70f46947d44fdeaa4aa Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 14 Nov 2024 18:30:02 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8D=B8=E5=88=86=E4=B8=80=E4=BD=93=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WarehouseTrayTypeServiceImpl.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java index 7083598da..709e5e189 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java @@ -1042,6 +1042,29 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl qw = new QueryWrapper<>(); + qw.eq("association_value", orderPackageCode); + WarehouseTrayGoodsEntity trayGoodsEntity = warehouseTrayGoodsService.getOne(qw); + if (!Objects.isNull(trayGoodsEntity)) { + + String oldTrayCode = trayGoodsEntity.getTrayCode(); + if (oldTrayCode.equals(trayCode)) { + log.warn("##############orderScanOrderPackageCode: 该包条已打托 trayCode={}", trayCode); + return R.fail(4001, "该包条已打托"); + } + + log.warn("#########orderScanOrderPackageCode: 包件已打托 orderPackageCode={}", orderPackageCode); + // 需要告知这个托盘名称 + + BasicdataTrayEntity trayByTray = basicdataTrayClient.getTrayByTrayCode(oldTrayCode); + if(!Objects.isNull(trayByTray)){ + return R.fail(4002, "包件已在"+trayByTray.getPalletName()+"进行打托"); + }else{ + return R.fail(4002, "包件已在"+trayGoodsEntity.getTrayCode()+"进行打托"); + } + } + DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId); if (Objects.isNull(parcelListEntity)) { log.warn("##############orderScanOrderPackageCodeSyncJd: 包件不存在 orderPackageCode={} warehouseId={}", orderPackageCode, warehouseId);