From 9dd6a70bd68db40304b5dc975bc6005051add465 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Thu, 19 Dec 2024 15:34:06 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=80=8E=E5=8A=A0=E5=8F=96=E6=B6=88=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/enums/BizOperationEnums.java | 1 + .../DistributionReservationServiceImpl.java | 41 ++++++++++------ .../impl/DistributionSignforServiceImpl.java | 48 +++++++++++-------- 3 files changed, 57 insertions(+), 33 deletions(-) diff --git a/blade-biz-common/src/main/java/org/springblade/common/enums/BizOperationEnums.java b/blade-biz-common/src/main/java/org/springblade/common/enums/BizOperationEnums.java index 47fba69cb..0b744f973 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/enums/BizOperationEnums.java +++ b/blade-biz-common/src/main/java/org/springblade/common/enums/BizOperationEnums.java @@ -13,6 +13,7 @@ public enum BizOperationEnums implements IDict { ADD(1, "新增"), MODIFY(2, "修改"), DELETE(3, "删除"), + REMOVE(4, "移除"), ; BizOperationEnums(Integer code, String value) { 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 3f58afdab..4970f22d4 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 @@ -46,14 +46,7 @@ import com.logpm.distribution.mapper.DistributionStockMapper; import com.logpm.distribution.mapper.DistributionStockupInfoMapper; import com.logpm.distribution.mapper.DistributionStockupMapper; import com.logpm.distribution.service.*; -import com.logpm.distribution.vo.DistributionParcelListVO; -import com.logpm.distribution.vo.DistributionParcelNumberVO; -import com.logpm.distribution.vo.DistributionReservationOrderPackageVO; -import com.logpm.distribution.vo.DistributionReservationVO; -import com.logpm.distribution.vo.DistributionStockArticleVO; -import com.logpm.distribution.vo.DistributionStockListVO; -import com.logpm.distribution.vo.DistributionStockupOrderListVO; -import com.logpm.distribution.vo.DistributionStockupStockListVO; +import com.logpm.distribution.vo.*; import com.logpm.distribution.wrapper.DistributionParcelListWrapper; import com.logpm.distribution.wrapper.DistributionReservationWrapper; import com.logpm.distribution.wrapper.DistributionStockArticleWrapper; @@ -3966,6 +3959,12 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl list = Func.toLongList(distributionCancelReservationPackageDTO.getPackageIds()); log.info(method + "取消包件>>>>:{}", distributionCancelReservationPackageDTO.getPackageIds()); + + + Map map = new HashMap<>(); + List allPackageEntityList = new ArrayList<>(); + List allZeroPackageEntityList = new ArrayList<>(); + List allStockListEntityList = new ArrayList<>(); switch (distributionCancelReservationPackageDTO.getType()) { case 1: @@ -3996,6 +3995,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl nodeFanoutMsg = distributionDeliveryListService.buildNodeFanoutMsgForPlan(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY); - distributionNodeWorkService.planDelivery(nodeFanoutMsg, AuthUtil.getUser()); - + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByReservation(reservationEntity,map,BizOperationEnums.REMOVE); + distributionNodeWorkService.planReservation(nodeFanoutMsg,AuthUtil.getUser()); return R.status(true); } 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 7af40a89c..86cf18451 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 @@ -193,10 +193,7 @@ import org.springblade.common.constant.stockup.StockAssignStatusConstant; import org.springblade.common.enums.BizOperationEnums; import org.springblade.common.enums.PackageTypeEnums; import org.springblade.common.exception.CustomerException; -import org.springblade.common.model.ConsigneeArriveVO; -import org.springblade.common.model.GAddressVo; -import org.springblade.common.model.NodeFanoutMsg; -import org.springblade.common.model.PackageData; +import org.springblade.common.model.*; import org.springblade.common.node.BillLadingNode; import org.springblade.common.node.DeliveryNode; import org.springblade.common.node.ReservationNode; @@ -383,7 +380,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl selectDistributionSignforPage(IPage page, DistributionSignforVO distributionSignfor) { @@ -840,7 +838,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByReCheck(deliveryListEntity,reservationEntity); - iDistributionNodeWorkService.signForCheck(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signForCheck(nodeFanoutMsg, AuthUtil.getUser()); // // 复核作业节点推送 // iDistributionNodeWorkService.signForCheck(DistributionSignforEntity distributionSignforEntity,DistributionReservationEntity reservationEntity); @@ -1167,7 +1165,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildDistributionSignforVOByStock(deliveryListEntity, pushList, OperatModeConstant.CLERK); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); } //维护签收数量 @@ -1546,7 +1544,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList,OperatModeConstant.BATCH); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); //查询计划和是否进行装车 @@ -1845,6 +1843,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl map = new HashMap<>(); List list = Func.toLongList(distrilbutionloadingscanDTO.getZeroPackageIds()); //查询是否进行装车或者签收 List loadscanEntityList = distributionLoadscanService.list(Wrappers.query().lambda() @@ -1868,6 +1868,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl> planMap; if (Func.isNotEmpty(planZeroPackageEntities)) { planMap = planZeroPackageEntities.stream().collect(Collectors.groupingBy(DistributionReservationZeroPackageEntity::getStockArticleId)); + map.put("2", planZeroPackageEntities); + } else { planMap = null; } @@ -1921,6 +1923,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = distributionReservationService.buildNodeFanoutMsgByReservation(reservationEntity,map,BizOperationEnums.REMOVE); + distributionNodeWorkService.planReservation(nodeFanoutMsg,AuthUtil.getUser()); + + } else { log.error(method + "查询原计划零担信息错误reservationId:{},ids:{}", distrilbutionloadingscanDTO.getReservationId(), list); return R.fail("计划查询错误"); @@ -3165,7 +3175,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushList, OperatModeConstant.SCAN); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); return Resp.scanSuccessWithData("签收成功", str, orderPackageCodes); @@ -3329,7 +3339,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl>>> 签收作业节点广播报错", e); @@ -3637,7 +3647,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushDatas, OperatModeConstant.CLERK); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); return R.data(orderpackages, "签收成功"); } catch (Exception e) { @@ -4078,7 +4088,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildDistributionSignforVO(distributionDeliveryListEntity, reservationEntity, pushList, OperatModeConstant.SCAN); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); return Resp.scanSuccess("操作成功", s); } else { @@ -4471,7 +4481,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildDistributionSignforVOByStock(deliveryListEntity, pushList, OperatModeConstant.SCAN); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); return Resp.scanSuccess("签收成功", str); @@ -5000,7 +5010,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildConsigneeArriveVO(deliveryListEntity, reservationEntity, add, user); - iDistributionNodeWorkService.carArrived(nodeFanoutMsg, user); + distributionNodeWorkService.carArrived(nodeFanoutMsg, user); return Resp.scanSuccess("打卡成功", "打卡成功"); } else { return Resp.scanSuccess("打卡失败", "打卡失败,请重试"); @@ -5528,7 +5538,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); return R.data(map); } @@ -6104,7 +6114,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); Integer num = baseMapper.signforNum(distributionSignforEntity.getReservationId()); return Resp.scanSuccess(num + "件", num + "件"); } @@ -7153,7 +7163,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList, OperatModeConstant.SCAN); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); return Resp.scanSuccess("签收成功", str); @@ -8514,12 +8524,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildDistributionSignforVOByStock(deliveryListEntity, pushInventoryList, OperatModeConstant.SCAN); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); } if (!pushList.isEmpty()) { // 构建新作业节点回传 NodeFanoutMsg nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, reservationEntity, pushList, OperatModeConstant.SCAN); - iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); + distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); } if (!orderCodes.isEmpty()) { String collect = orderCodes.stream().distinct().collect(Collectors.joining(","));