diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java index 901c0ed20..d82ee6aa3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java @@ -1468,7 +1468,7 @@ public class DistributionStockupAppController extends BladeController { jsonObject.put("type", 2); jsonObject.put("num", 1); //TODO -// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject); + warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject); //扫码成功 return Resp.scanSuccess(PdaAudioLingoStatus.saomiaochenggong.getName(), audioValue); case 2: @@ -1534,7 +1534,7 @@ public class DistributionStockupAppController extends BladeController { String packetBarCode = stockupDTO.getPacketBarCode();//包件码 Long stockupId = stockupDTO.getStockupId();//备货任务ID Long reservationId = stockupDTO.getReservationId();//预约单id -// Long stockUpAllocationId = stockupDTO.getStockupAllocationId();//备货库位ID + Long stockUpAllocationId = stockupDTO.getStockupAllocationId();//备货库位ID if (Objects.isNull(myCurrentWarehouse)) { log.warn("##################stockupScan: 未选择仓库,订单自编号为空"); return R.fail(403,"未授权!!"); @@ -1555,10 +1555,10 @@ public class DistributionStockupAppController extends BladeController { log.warn("##################stockupScan: 包件扫码,预约单id为空"); return R.fail("包件扫码:预约单id不能为空"); } -// if (Objects.isNull(stockUpAllocationId)) { -// log.warn("##################stockupScan: 备货库位不存在,stockUpAllocationId:{}",stockUpAllocationId); -// return Resp.scanFail("请扫描备货库位","请扫描备货库位"); -// } + if (Objects.isNull(stockUpAllocationId)) { + log.warn("##################stockupScan: 备货库位不存在,stockUpAllocationId:{}",stockUpAllocationId); + return Resp.scanFail("请扫描备货库位","请扫描备货库位"); + } Integer integer = distributionStockupService.selectPackage(stockupDTO); switch (integer) { @@ -1662,7 +1662,7 @@ public class DistributionStockupAppController extends BladeController { jsonObject.put("num", 1); //进行了备货库位的选择才进行备货库位的上架 //TODO -// warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject); + warehouseUpdownStockUpAreaClient.upStockUpShelf(jsonObject); //修改包件备货状态 DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity(); parcelListEntity.setId(entity.getParcelListId()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java index 6d3de9076..4c9d87751 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java @@ -13,8 +13,8 @@ public class StockupDTO implements Serializable { private String stockupDateEnd;//备货日期 private Integer status;//0未完成 1已完成 -// private Long stockupAllocationId;//0未完成 1已完成 -// private String stockupAllocationName;//0未完成 1已完成 + private Long stockupAllocationId;//0未完成 1已完成 + private String stockupAllocationName;//0未完成 1已完成 /** * 客户名城 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml index 8d5ec4e8d..54299a035 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml @@ -832,7 +832,7 @@ IFNULL(SUM(ldbls.quantity),0) AS actual_plan, IFNULL(SUM(ldbls.quantity),0) AS delivery, IFNULL(SUM(ldbls.quantity),0) AS sign, - (SELECT GROUP_CONCAT(site) FROM logpm_distribution_print WHERE bill_lading_id = ldbl.id GROUP BY bill_lading_id) + (SELECT GROUP_CONCAT(site) FROM logpm_distribution_print WHERE bill_lading_id = ldbl.id GROUP BY bill_lading_id) AS image FROM logpm_distrilbution_bill_lading AS ldbl LEFT JOIN logpm_distribution_bill_lading_scan AS ldbls ON ldbls.bill_lading_id = ldbl.id AND ldbls.is_deleted = 0 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 9c704d1c3..a0c329244 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -595,20 +595,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.query().lambda() - .eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode()) - ); - if (!abnormalEntities.isEmpty()) { - //判断异常是否属于自身 - boolean flag = abnormalEntities.stream().allMatch(a -> !distributionDeliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId())); - if (flag){ - //该异常属于其他车次 - String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); - log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",distributionDeliveryListEntity.getTrainNumber(),collect); - return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); - } - } //异步确认包条扫描信息 // distributionAsyncService.changeOrderSignforStatus(distrilbutionloadingscanDTO.getBarcode()); List packageLockIds = new ArrayList<>(); @@ -657,6 +644,22 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.query().lambda() + .eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode()) + .eq(DistributionLoadscanAbnormalEntity::getPackageId, parcelList.getId()) + ); + + if (!abnormalEntities.isEmpty()) { + //判断异常是否属于自身 + boolean flag = abnormalEntities.stream().allMatch(a -> !distributionDeliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId())); + if (flag){ + //该异常属于其他车次 + String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); + log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",distributionDeliveryListEntity.getTrainNumber(),collect); + return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); + } + } + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index ce8506380..bdd45f70d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -2424,34 +2424,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.query().lambda() - .eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode()) -// .eq(DistributionLoadscanAbnormalEntity::getAuditingStatus, 1) - //修改 状态 - ); - if (!abnormalEntities.isEmpty()) { - //判断此包件的异常是否是当前扫描车次和客户 - //首先判断存在异常是否不属于当前车次和客户 - boolean flag = abnormalEntities.stream().allMatch(a -> !deliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId())); - if (flag){ - //该异常属于其他车次 - String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); - log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),collect); - return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); - } - //判断具体的装车信息 - - -// boolean flag = abnormalEntities.stream().filter(f->f.getAuditingStatus() == 1).allMatch(a -> deliveryListEntity.getId().equals(a.getDeliveryListId()) && distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId())); -// if (flag){ -// //存在异常 进行异常签收还是异常装车区分 -// return Resp.scanFail("包件已存在异常", "包件已存在异常"); -// } -// String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); -// log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),collect); -// return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); - } if (Func.isNotEmpty(list)) { //满足条件此码必定为库存品 //判断该库存品是否属于当前客户 @@ -2466,6 +2439,25 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl collect = parcelListEntityList.stream().filter(p -> p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList()); if (Func.isNotEmpty(collect) && collect.size() == 1) { + List abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.query().lambda() + .eq(DistributionLoadscanAbnormalEntity::getPackageCode, distrilbutionloadingscanDTO.getBarcode()) + .eq(DistributionLoadscanAbnormalEntity::getPackageId, collect.get(0).getId()) + //修改 状态 + ); + if (!abnormalEntities.isEmpty()) { + //判断此包件的异常是否是当前扫描车次和客户 + //首先判断存在异常是否不属于当前车次和客户 + boolean flag = abnormalEntities.stream().allMatch(a -> !deliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId())); + if (flag){ + //该异常属于其他车次 + String info = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); + log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",deliveryListEntity.getTrainNumber(),info); + return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); + } + //判断具体的装车信息 + } + + //存在则查询该包件是否进行装车 DistributionLoadscanEntity loadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.query().lambda() .ne(DistributionLoadscanEntity::getScanStatus, 1) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index f0ec92aa5..5ea0ac7ad 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -2004,7 +2004,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl '40' + where obj.reservation_status '40' and lddl.customers_number > 0 ) t ${ew.customSqlSegment} diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java index 1ed0de94d..5efb0c3dd 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java @@ -171,7 +171,7 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl