From 8354395d916633c357528e2f38785ab1f34b7165 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Thu, 21 Sep 2023 17:39:53 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1.=E9=9B=B6=E6=8B=85=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicdata/vo/BasicdataStockArticleVO.java | 5 ++- .../basicdata/mapper/BasicdataTrayMapper.xml | 35 +++++++++++-------- .../WarehouseGoodsAllocationController.java | 4 ++- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStockArticleVO.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStockArticleVO.java index 2d0795eb9..1bbd1ca7c 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStockArticleVO.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStockArticleVO.java @@ -145,7 +145,10 @@ public class BasicdataStockArticleVO extends BasicdataStockArticleEntity { @ApiModelProperty(value = "完整货位") private String positionCode; - + @ApiModelProperty(name = "数量",notes = "") + private Integer num; + @ApiModelProperty(name = "运单号",notes = "") + private String waybillNo; /** * 是否齐套名称 */ diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml index 3a3ec48f7..17a4eba76 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml @@ -206,20 +206,23 @@ SELECT CASE - WHEN lds.driver_signing = '2' THEN '司机签收' WHEN lds.signing_status = '2' THEN - '文员签收' ELSE '待签收' + '文员审核' ELSE '待签收' END signingStatusAll, CASE - WHEN ldr.is_urgent = '1' THEN '否' WHEN ldr.is_urgent = '2' THEN '是' @@ -511,6 +509,12 @@ lds.delivery_sign_pictures deliverySignPictures, ldr.reservation_date reservationDate, lds.positioning_adr positioningAdr, + lddl.train_number trainNumber, + lddl.vehicle_name vehicleName, + lddl.driver_name driverName, + lddl.driver_name driverName, + lddl.loading_team_name loadingTeamName, + lddl.unloading_team_name unLoadingTeamName, CASE WHEN ldr.delivery_type = '1' THEN '商配' diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java index fc89c988d..6d79177b1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java @@ -740,8 +740,8 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { @Override @Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class) public void checkStockArticleSignStatus(DistributionParcelListEntity parcelListEntity) { - parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); - distributionParcelListService.updateById(parcelListEntity); +// parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue()); +// distributionParcelListService.updateById(parcelListEntity); List parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.query().lambda().eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId())); boolean flag = parcelListEntityList.stream().allMatch(p -> p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())); DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index 0db34bb5a..c956a2916 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -35,6 +35,8 @@ import com.logpm.distribution.wrapper.DistributionParcelListWrapper; import com.logpm.distribution.wrapper.DistributionReservationWrapper; import com.logpm.distribution.wrapper.DistributionStockArticleWrapper; import com.logpm.distribution.wrapper.DistributionStockListWrapper; +import com.logpm.oldproject.entity.WayBillEntity; +import com.logpm.oldproject.feign.IWayBillClient; import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.feign.IWarehouseWaybillClient; import lombok.extern.slf4j.Slf4j; @@ -175,6 +177,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl storeName = new HashSet<>(); HashSet mallName = new HashSet<>(); HashSet receivingUnit = new HashSet<>(); + HashSet waybillNo = new HashSet<>(); + HashSet waybillId = new HashSet<>(); + HashSet marketPhone = new HashSet<>(); AtomicReference initTotal = new AtomicReference<>(BigDecimal.ZERO); //存在订单构建预约订单关联信息 if (!Func.isEmpty(stockArticleList)) { @@ -293,6 +301,17 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl { +// WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber()); + WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber()); + if (Func.isNotEmpty(wayBillEntity)){ + waybillId.add(wayBillEntity.getId().toString()); + } + if (Func.isNotEmpty(wayBillEntity.getTakePhone())){ + marketPhone.add(wayBillEntity.getTakePhone()); + } + if (Func.isNotEmpty(s.getWaybillNumber())){ + waybillNo.add(s.getWaybillNumber()); + } if (Func.isNotBlank(s.getServiceNumber())) { serviceNumber.add(s.getServiceNumber()); } @@ -458,6 +477,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl waybillNo = new HashSet<>(); //运单ID -------这里运单Id后续可能变更为运单号 HashSet waybillId = new HashSet<>(); + + HashSet waybillNo = new HashSet<>(); //订单服务号 HashSet serviceNumber = new HashSet<>(); //仓库名称 @@ -1449,6 +1473,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl mallName = new HashSet<>(); //门店名称 HashSet storeName = new HashSet<>(); + + //门店名称 + HashSet marketPhone = new HashSet<>(); //包件总数量 AtomicInteger packageTotal = new AtomicInteger(); // ------------------收货信息构建------------------- @@ -1461,6 +1488,25 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl consignee = new HashSet<>(); v.forEach(s->{ +// WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber()); +// if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeMobile())){ +// marketPhone.add(warehouseWaybillEntity.getConsigneeMobile()); +// } +// if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeAddress())){ +// consigneeAddress.add(warehouseWaybillEntity.getConsigneeMobile()); +// } + + WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber()); + if (Func.isNotEmpty(wayBillEntity)){ + waybillId.add(wayBillEntity.getId().toString()); + if (Func.isNotEmpty(wayBillEntity.getTakePhone())){ + marketPhone.add(wayBillEntity.getTakePhone()); + } + if (Func.isNotEmpty(wayBillEntity.getTakeAddress())){ + consigneeAddress.add(wayBillEntity.getTakeAddress()); + } + } + //预约单数据填充 if (Func.isNotEmpty(s.getMallName())){ mallName.add(s.getMallName()); @@ -1477,8 +1523,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl receivingUnit = new HashSet<>(); + HashSet waybillNo = new HashSet<>(); + + HashSet waybillId = new HashSet<>(); + + HashSet marketPhone = new HashSet<>(); + AtomicReference initTotal = new AtomicReference<>(BigDecimal.ZERO); //存在订单构建预约订单关联信息 @@ -2111,6 +2174,17 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl { +// WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(); +// String consigneeMobile = byWaybillNo.getConsigneeMobile(); + + + WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber()); + if (Func.isNotEmpty(wayBillEntity)) { + waybillId.add(wayBillEntity.getId().toString()); + } + if (Func.isNotEmpty(wayBillEntity.getTakePhone())){ + marketPhone.add(wayBillEntity.getTakePhone()); + } // storeName.add(s.getStoreName()); // mallName.add(s.getMallName()); // warehouseNames.add(s.getWarehouse()); @@ -2133,6 +2207,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl parcelListEntityList = distributionParcelListService.list(Wrappers.query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())); + if (Func.isNotEmpty(parcelListEntityList) && parcelListEntityList.size() == 1 ){ + DistributionParcelListEntity parcelListEntity = parcelListEntityList.get(0); + if (parcelListEntity.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())){ + return Resp.scanFail("操作失败","包件信息有误"); + } + //确认该包件确实不属于该配送任务 + List parcelListEntities = distributionDeliveryListMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId()); + boolean flag = parcelListEntities.stream().anyMatch(p -> p.getOrderPackageStatus().equals(distrilbutionloadingscanDTO.getBarcode())); + if (flag){ + log.error("##############包件存在该配送计划中:{}",distrilbutionloadingscanDTO.getBarcode()); + return Resp.scanFail("操作失败","包件信息有误"); + } + //查询这个包件是否满足该客户的要求 + DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(distrilbutionloadingscanDTO.getReservationId()); + DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); + switch (reservationEntity.getDeliveryType()){ + case "1": + //商配 + if (reservationEntity.getConsignee().equals(stockArticleEntity.getConsigneePerson()) && reservationEntity.getReceivingUnit().equals(stockArticleEntity.getConsigneeAddress())){ + //这里的订单才满足被异常签收 + }else { + return Resp.scanFail("操作失败","不属于该客户"); + } + break; + case "2": + //市配 + if (reservationEntity.getConsignee().equals(stockArticleEntity.getCustomerName()) + && reservationEntity.getDeliveryPhone().equals(stockArticleEntity.getCustomerTelephone()) + && reservationEntity.getDeliveryAddress().equals(stockArticleEntity.getCustomerAddress())){ + //这里的订单才满足被异常签收 + + }else { + return Resp.scanFail("操作失败","不属于该客户"); + } + break; + } + + + }else { + log.error("############出现相同的包件码:{}",distrilbutionloadingscanDTO.getBarcode()); + return Resp.scanFail("操作失败","包件信息有误"); + } + + //获取当前用户司机 DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId()); DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity(); @@ -868,8 +923,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl().lambda() .eq(DistributionSignforEntity::getDeliveryId, distributionSignfor.getDeliveryId()) @@ -954,7 +1007,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl parcelListEntityList = distributionReservationMapper.selectPackageListByReservationId(distributionSignforEntity.getReservationId()); //包件不需要考虑备货、装车直接可进行签收 过滤已装车的包件 List noLoadingPackage = parcelListEntityList.stream().filter(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())).collect(Collectors.toList()); - - for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) { - if (Func.equals(parcelListEntity.getOrderPackageStockupStatus(), OrderPackageStatusConstant.yiqianshou.getValue())) { + if (Func.equals(parcelListEntity.getOrderPackageStatus(), OrderPackageStatusConstant.yiqianshou.getValue())) { continue; } else if (Func.equals(parcelListEntity.getOrderPackageLoadingStatus(), OrderPackageLoadingStatusConstant.yizhuangche.getValue())) { //修改包件的状态为出库状态 @@ -1030,7 +1090,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl().lambda() + LambdaUpdateWrapper set = new UpdateWrapper().lambda() .eq(DistributionSignforEntity::getId, distributionSignforEntity.getId()) .set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures()) .set(StringUtils.isNotBlank(distributionSignfor.getSigningType()), DistributionSignforEntity::getSigningType, distributionSignfor.getSigningType()) - .set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningStatus, 1) - .set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2) + .set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningStatus, 2) + .set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2) .set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date())) + .set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date())) .set(distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getClerkSignRemarks()), DistributionSignforEntity::getClerkSignRemarks, distributionSignfor.getClerkSignRemarks()) .set(!distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getDriverRemarks()), DistributionSignforEntity::getDriverRemarks, distributionSignfor.getDriverRemarks()) .set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2) - .set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date())) - ); + .set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date())); + + + boolean update = this.update(set); return R.status(true); } From 5341de25b79b48ae0a597bdf8e64952aab28ff52 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Thu, 21 Sep 2023 18:47:15 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/logpm/basicdata/feign/BasicdataClientClient.java | 2 +- .../distribution/mapper/DistributionStockListMapper.java | 2 +- .../distribution/mapper/DistributionStockListMapper.xml | 4 +++- .../distribution/service/IDistributionStockListService.java | 4 +++- .../service/impl/DistributionStockListServiceImpl.java | 4 ++-- .../service/impl/DistributionStockupServiceImpl.java | 2 +- .../service/impl/WarehouseWarehousingEntryServiceImpl.java | 5 +++++ 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java index def091160..27df74000 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java @@ -75,7 +75,7 @@ public class BasicdataClientClient implements IBasicdataClientClient { public BasicdataClientEntity getCustomer(String customerName, String customerCode) { return basicdataClientService.getOne(Wrappers.query().lambda() .eq(StringUtils.isNotEmpty(customerName),BasicdataClientEntity::getClientName,customerName) - .eq(StringUtils.isNotEmpty(customerCode),BasicdataClientEntity::getReserve1,customerCode) + .eq(StringUtils.isNotEmpty(customerCode),BasicdataClientEntity::getClientCode,customerCode) ); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java index 1adf5ae3e..25668ae01 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java @@ -81,7 +81,7 @@ public interface DistributionStockListMapper extends BaseMapper getEntityByMarketIdAndMaterialName(@Param("marketId") Long marketId, @Param("materialName") String materialName, @Param("warehouseId") Long warehouseId); - DistributionStockupStockListInfoVO selectStockListInfoSelf(@Param("reservationId") Long reservationId,@Param("stockListId") Long stockListId); + DistributionStockupStockListInfoVO selectStockListInfoSelf(@Param("reservationId") Long reservationId,@Param("stockListId") Long stockListId,@Param("allocationId") Long allocationId); List getListByMarketIdAndMaterialName(@Param("marketId") Long marketId, @Param("materialName") String materialName, @Param("warehouseId") Long warehouseId); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml index d0f08714c..3df680d2e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml @@ -285,7 +285,9 @@