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);