From f4038e4445a11815de8dfea89ca05c46bbbc3678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=BE=99?= Date: Thu, 3 Apr 2025 10:27:33 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=86=E5=8D=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DistributionSplitOrderTaskServiceImpl.java | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java index c2c84e910..199b06d08 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java @@ -137,10 +137,9 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl packageAllowCount ? packageAllowCount : packageAllowCount - 1; if (packageAllowCount < taskNumber) { - return R.fail("拆单包件数量不足,请重新填写,目前可拆单数量:" + tipNumber); - } - if (packageAllCount <= taskNumber) { - return R.fail("拆单数需要小于订单总数量,请重新填写,目前可拆单数量:" + tipNumber); + return R.fail("拆单包件数量不足,请重新填写,目前可拆单数量:" + packageAllowCount); } taskLock(stockArticleId, () -> { @@ -272,7 +267,7 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpllambdaQuery() .in(DistributionParcelListEntity::getOrderPackageCode, packageCodes) - .ne(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue()) + .eq(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue()) .eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()) .eq(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.weizhuancghe.getValue()) .eq(DistributionParcelListEntity::getOrderPackageFreezeStatus, OrderPackageFreezeStatusConstant.weidongjie.getValue()) @@ -977,15 +972,19 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpllambdaQuery() .in(DistributionParcelListEntity::getStockArticleId, stockArticleId) - .ne(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue()) + .eq(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue()) .eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()) .eq(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.weizhuancghe.getValue()) .eq(DistributionParcelListEntity::getOrderPackageFreezeStatus, OrderPackageFreezeStatusConstant.weidongjie.getValue()) .eq(DistributionParcelListEntity::getIsTransfer, 0) ); + + return allowCount >= splitOrderAllCount ? allowCount - 1 : allowCount; } public long getSplitOrderAllCount(Long stockArticleId) { @@ -1020,10 +1019,9 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl Date: Thu, 3 Apr 2025 10:43:36 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=B9=BF=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/broadcast/FanoutConstants.java | 14 ++++++++ .../common/enums/BizOperationEnums.java | 1 + .../springblade/common/model/PackageData.java | 3 ++ .../service/IDistributionNodeWorkService.java | 6 ++++ .../impl/DistributionNodeWorkServiceImpl.java | 11 ++++++ .../DistributionReservationServiceImpl.java | 2 +- .../impl/DistributionSignforServiceImpl.java | 35 +++++++++++++++++-- 7 files changed, 69 insertions(+), 3 deletions(-) diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java b/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java index 13a14e86a..6dcb1551f 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java @@ -421,6 +421,20 @@ public abstract class FanoutConstants { } } + + /** + * 异常审核 + * @see org.springblade.common.model.workNode.FinishDistributionTrainVO + */ + interface DeliveryAbnormalReview { + + String EXCHANGE = "fanout.distribution.abnormal " + ModuleNameConstant.DEVAUTH; + + interface QUEUE { + String REPORT = "fanout.distribution.DeliveryAbnormalReview.report" + ModuleNameConstant.DEVAUTH; + } + } + } 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 0b744f973..9dbc4324d 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 @@ -14,6 +14,7 @@ public enum BizOperationEnums implements IDict { MODIFY(2, "修改"), DELETE(3, "删除"), REMOVE(4, "移除"), + ABNORMAL(5, "异常"), ; BizOperationEnums(Integer code, String value) { diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java b/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java index 6d1be8c22..06ccc8a95 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java +++ b/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java @@ -162,5 +162,8 @@ public class PackageData implements Serializable { private Long finalNodeId; private String finalNodeName; +// 0-否 1-是 + private Integer examine; + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionNodeWorkService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionNodeWorkService.java index db2c816e1..fbdfd7030 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionNodeWorkService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionNodeWorkService.java @@ -144,4 +144,10 @@ public interface IDistributionNodeWorkService { */ void fail(); + + /** + * 异常签收 + */ + void abnormalDeliveryAbnormalReview(NodeFanoutMsg nodeFanoutMsg, BladeUser user); + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java index e23426cc8..1abb8e02c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java @@ -275,6 +275,17 @@ public class DistributionNodeWorkServiceImpl implements IDistributionNodeWorkSer } + @Override + public void abnormalDeliveryAbnormalReview(NodeFanoutMsg nodeFanoutMsg, BladeUser user) { + try { + if (distributionProperties.getSendFanoutMsg()) { + rabbitTemplate.convertAndSend(FanoutConstants.distribution.DeliveryAbnormalReview.EXCHANGE, null, com.alibaba.fastjson.JSONObject.toJSONString(nodeFanoutMsg)); + } + } catch (AmqpException e) { + log.error(">>>>>>>>>>>>>>>>>>>>>>>>>> 消息推送失败~ 请联系管理员! ", e); + } + } + @Retryable(value = Exception.class, maxAttempts = 3, backoff = @Backoff(value = 3000, multiplier = 1.5)) private void sendFanoutMsg(FanoutMsg fanoutMsg) { 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 cd1cc884c..ed0f34446 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 @@ -3686,6 +3686,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl map = new HashMap<>(); map.put("1", Collections.singletonList(reservationPackageEntity)); - NodeFanoutMsg nodeFanoutMsg = distributionReservationService.buildNodeFanoutMsgByReservation(reservationEntity, map, BizOperationEnums.ADD); - distributionNodeWorkService.planReservation(nodeFanoutMsg,AuthUtil.getUser()); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByAbnormalPackage(reservationEntity, map,distributionLoadscanAbnormalEntity); + distributionNodeWorkService.abnormalDeliveryAbnormalReview(nodeFanoutMsg,AuthUtil.getUser()); //维护包件的预约状态 DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(distributionLoadscanAbnormalEntity.getPackageId()); parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue()); @@ -6902,6 +6902,37 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl buildNodeFanoutMsgByAbnormalPackage(DistributionReservationEntity reservationEntity, Map map,DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity) { + NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); + if (LoadingAbnormalTypeConstant.jihuayichang.getValue().equals(distributionLoadscanAbnormalEntity.getAbnormalType())){ + nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_ABNORMAL_LOADING); + }else if (LoadingAbnormalTypeConstant.qianshouyichang.getValue().equals(distributionLoadscanAbnormalEntity.getAbnormalType())){ + nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR); + }else { + nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_ABNORMAL_LOADING); + } + nodeFanoutMsg.setNode(WorkNodeEnums.PLANNED_RESERVATION); + nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); + nodeFanoutMsg.setOperator(AuthUtil.getNickName()); + nodeFanoutMsg.setOperatorTime(new Date()); + nodeFanoutMsg.setWarehouse(reservationEntity.getWarehouseName()); + nodeFanoutMsg.setWarehouseId(reservationEntity.getWarehouseId()); + nodeFanoutMsg.setTenantId(AuthUtil.getTenantId()); + ReservationVO reservationVO = distributionReservationService.getReservationVO(reservationEntity); + List packageDataList = new ArrayList<>(); + List list = map.get("1"); + for (DistributionReservationPackageEntity distributionReservationPackageEntity : list) { + PackageData packageData = new PackageData(); + packageData.setPackageCode(distributionReservationPackageEntity.getPacketBarCode()); + packageData.setPackageType(PackageTypeEnums.CMP); + packageData.setNumber(1); + packageDataList.add(packageData); + } + reservationVO.setPackageDataList(packageDataList); + nodeFanoutMsg.setMain(reservationVO); + return nodeFanoutMsg; + } + @NotNull private static DistributionReservationPackageEntity getDistributionReservationPackageEntity(DistributionReservationEntity reservationEntity, DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity) { DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity(); From a4dc8ca11e9bc040b1e3b708883bca43770b6c88 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Thu, 3 Apr 2025 10:53:26 +0800 Subject: [PATCH 03/13] =?UTF-8?q?feat(all):=20=E5=BC=82=E5=B8=B8=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1 修改广播消息 --- .../springblade/common/constant/broadcast/FanoutConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java b/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java index 6dcb1551f..f3c21af39 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java @@ -424,7 +424,7 @@ public abstract class FanoutConstants { /** * 异常审核 - * @see org.springblade.common.model.workNode.FinishDistributionTrainVO + * @see org.springblade.common.model.ReservationVO */ interface DeliveryAbnormalReview { From a78fa8fa10e410582b0b5f1322a6a9f339f9e493 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 3 Apr 2025 11:12:12 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=B9=BF=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springblade/common/model/PackageData.java | 2 - .../common/model/ReservationVO.java | 7 +++ .../model/workNode/AbnormalPackageData.java | 55 +++++++++++++++++++ .../impl/DistributionSignforServiceImpl.java | 11 ++++ 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 blade-biz-common/src/main/java/org/springblade/common/model/workNode/AbnormalPackageData.java diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java b/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java index 06ccc8a95..ab912cee3 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java +++ b/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java @@ -162,8 +162,6 @@ public class PackageData implements Serializable { private Long finalNodeId; private String finalNodeName; -// 0-否 1-是 - private Integer examine; } diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/ReservationVO.java b/blade-biz-common/src/main/java/org/springblade/common/model/ReservationVO.java index aa79446ff..415a9b777 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/model/ReservationVO.java +++ b/blade-biz-common/src/main/java/org/springblade/common/model/ReservationVO.java @@ -2,6 +2,7 @@ package org.springblade.common.model; import lombok.Data; +import org.springblade.common.model.workNode.AbnormalPackageData; import java.util.Date; import java.util.List; @@ -82,6 +83,12 @@ public class ReservationVO { */ private List packageDataList; + /** + * 预约异常包件列表 + * + */ + private List abnormalPackageDataList; + diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/workNode/AbnormalPackageData.java b/blade-biz-common/src/main/java/org/springblade/common/model/workNode/AbnormalPackageData.java new file mode 100644 index 000000000..967d10107 --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/model/workNode/AbnormalPackageData.java @@ -0,0 +1,55 @@ +package org.springblade.common.model.workNode; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springblade.common.enums.PackageTypeEnums; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 提送数据 + * + * @author zhaoqiaobo + * @create 2024-03-18 0:45 + */ +@Builder +@Data +@NoArgsConstructor +@AllArgsConstructor +public class AbnormalPackageData implements Serializable { + + /** + * 审核状态 1-未审核 2-已审核 3-已驳回 4-已取消 5 - 拒签 + */ + private Integer auditingStatus; + /** + * 包条码 + */ + private String packageCode; + /** + * 车次号 + */ + private String trainNumber; + /** + * 异常类型 1-装车异常(计划内 未装车) + * 2-计划异常(计划外进行装车) + * 3-签收异常(计划外未装车进行签收) + * 4-异常签收失败(满足异常签收但是进行拒签) + * 5-取消异常计划(取消此次配送计划) + */ + private Integer abnormalType; + /** + * 操作时间 + */ + private Date auditingTime; + /** + * 审核操作人 + */ + private String auditingUser; + + +} 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 de361ceff..c91d5a413 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 @@ -187,6 +187,7 @@ import org.springblade.common.enums.BizOperationEnums; import org.springblade.common.enums.PackageTypeEnums; import org.springblade.common.exception.CustomerException; import org.springblade.common.model.*; +import org.springblade.common.model.workNode.AbnormalPackageData; import org.springblade.common.node.BillLadingNode; import org.springblade.common.node.DeliveryNode; import org.springblade.common.node.ReservationNode; @@ -6928,6 +6929,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl abnormalPackageDataList = new ArrayList<>(); + AbnormalPackageData abnormalPackageData = new AbnormalPackageData(); + abnormalPackageData.setAbnormalType(distributionLoadscanAbnormalEntity.getAbnormalType()); + abnormalPackageData.setPackageCode(distributionLoadscanAbnormalEntity.getPackageCode()); + abnormalPackageData.setTrainNumber(distributionLoadscanAbnormalEntity.getTrainNumber()); + abnormalPackageData.setAuditingTime(distributionLoadscanAbnormalEntity.getAuditingTime()); + abnormalPackageData.setAuditingStatus(distributionLoadscanAbnormalEntity.getAuditingStatus()); + if (!abnormalPackageDataList.isEmpty()) { + reservationVO.setAbnormalPackageDataList(abnormalPackageDataList); + } reservationVO.setPackageDataList(packageDataList); nodeFanoutMsg.setMain(reservationVO); return nodeFanoutMsg; From 3852bbcf2818f76a35aaf917ba450a86ea3809d7 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 3 Apr 2025 11:19:40 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=B9=BF=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{workNode => }/AbnormalPackageData.java | 4 ++- .../common/model/ReservationVO.java | 6 ----- .../impl/DistributionSignforServiceImpl.java | 25 ++++++++----------- 3 files changed, 14 insertions(+), 21 deletions(-) rename blade-biz-common/src/main/java/org/springblade/common/model/{workNode => }/AbnormalPackageData.java (93%) diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/workNode/AbnormalPackageData.java b/blade-biz-common/src/main/java/org/springblade/common/model/AbnormalPackageData.java similarity index 93% rename from blade-biz-common/src/main/java/org/springblade/common/model/workNode/AbnormalPackageData.java rename to blade-biz-common/src/main/java/org/springblade/common/model/AbnormalPackageData.java index 967d10107..db7df85c0 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/model/workNode/AbnormalPackageData.java +++ b/blade-biz-common/src/main/java/org/springblade/common/model/AbnormalPackageData.java @@ -1,4 +1,4 @@ -package org.springblade.common.model.workNode; +package org.springblade.common.model; import lombok.AllArgsConstructor; import lombok.Builder; @@ -51,5 +51,7 @@ public class AbnormalPackageData implements Serializable { */ private String auditingUser; + private ReservationVO reservationVO; + } diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/ReservationVO.java b/blade-biz-common/src/main/java/org/springblade/common/model/ReservationVO.java index 415a9b777..23396d321 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/model/ReservationVO.java +++ b/blade-biz-common/src/main/java/org/springblade/common/model/ReservationVO.java @@ -2,7 +2,6 @@ package org.springblade.common.model; import lombok.Data; -import org.springblade.common.model.workNode.AbnormalPackageData; import java.util.Date; import java.util.List; @@ -83,11 +82,6 @@ public class ReservationVO { */ private List packageDataList; - /** - * 预约异常包件列表 - * - */ - private List abnormalPackageDataList; 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 c91d5a413..a41699a80 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 @@ -187,7 +187,7 @@ import org.springblade.common.enums.BizOperationEnums; import org.springblade.common.enums.PackageTypeEnums; import org.springblade.common.exception.CustomerException; import org.springblade.common.model.*; -import org.springblade.common.model.workNode.AbnormalPackageData; +import org.springblade.common.model.AbnormalPackageData; import org.springblade.common.node.BillLadingNode; import org.springblade.common.node.DeliveryNode; import org.springblade.common.node.ReservationNode; @@ -6903,8 +6903,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl buildNodeFanoutMsgByAbnormalPackage(DistributionReservationEntity reservationEntity, Map map,DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity) { - NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); + private NodeFanoutMsg buildNodeFanoutMsgByAbnormalPackage(DistributionReservationEntity reservationEntity, Map map,DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity) { + NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); if (LoadingAbnormalTypeConstant.jihuayichang.getValue().equals(distributionLoadscanAbnormalEntity.getAbnormalType())){ nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_ABNORMAL_LOADING); }else if (LoadingAbnormalTypeConstant.qianshouyichang.getValue().equals(distributionLoadscanAbnormalEntity.getAbnormalType())){ @@ -6919,6 +6919,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl packageDataList = new ArrayList<>(); List list = map.get("1"); @@ -6929,18 +6935,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl abnormalPackageDataList = new ArrayList<>(); - AbnormalPackageData abnormalPackageData = new AbnormalPackageData(); - abnormalPackageData.setAbnormalType(distributionLoadscanAbnormalEntity.getAbnormalType()); - abnormalPackageData.setPackageCode(distributionLoadscanAbnormalEntity.getPackageCode()); - abnormalPackageData.setTrainNumber(distributionLoadscanAbnormalEntity.getTrainNumber()); - abnormalPackageData.setAuditingTime(distributionLoadscanAbnormalEntity.getAuditingTime()); - abnormalPackageData.setAuditingStatus(distributionLoadscanAbnormalEntity.getAuditingStatus()); - if (!abnormalPackageDataList.isEmpty()) { - reservationVO.setAbnormalPackageDataList(abnormalPackageDataList); - } + abnormalPackageData.setReservationVO(reservationVO); reservationVO.setPackageDataList(packageDataList); - nodeFanoutMsg.setMain(reservationVO); + nodeFanoutMsg.setMain(abnormalPackageData); return nodeFanoutMsg; } From 89e3b9af6f034a652cd3aa9ee52c87b88cdda96c Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 3 Apr 2025 11:20:52 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=B9=BF=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lPackageData.java => AbnormalPackageVO.java} | 2 +- .../impl/DistributionSignforServiceImpl.java | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) rename blade-biz-common/src/main/java/org/springblade/common/model/{AbnormalPackageData.java => AbnormalPackageVO.java} (94%) diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/AbnormalPackageData.java b/blade-biz-common/src/main/java/org/springblade/common/model/AbnormalPackageVO.java similarity index 94% rename from blade-biz-common/src/main/java/org/springblade/common/model/AbnormalPackageData.java rename to blade-biz-common/src/main/java/org/springblade/common/model/AbnormalPackageVO.java index db7df85c0..7f5784cca 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/model/AbnormalPackageData.java +++ b/blade-biz-common/src/main/java/org/springblade/common/model/AbnormalPackageVO.java @@ -20,7 +20,7 @@ import java.util.Date; @Data @NoArgsConstructor @AllArgsConstructor -public class AbnormalPackageData implements Serializable { +public class AbnormalPackageVO implements Serializable { /** * 审核状态 1-未审核 2-已审核 3-已驳回 4-已取消 5 - 拒签 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 a41699a80..8713b4afa 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 @@ -6919,12 +6919,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl packageDataList = new ArrayList<>(); List list = map.get("1"); @@ -6935,9 +6936,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl Date: Thu, 3 Apr 2025 11:21:31 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=B9=BF=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistributionSignforServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 8713b4afa..690002f84 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 @@ -187,7 +187,6 @@ import org.springblade.common.enums.BizOperationEnums; import org.springblade.common.enums.PackageTypeEnums; import org.springblade.common.exception.CustomerException; import org.springblade.common.model.*; -import org.springblade.common.model.AbnormalPackageData; import org.springblade.common.node.BillLadingNode; import org.springblade.common.node.DeliveryNode; import org.springblade.common.node.ReservationNode; @@ -6903,8 +6902,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl buildNodeFanoutMsgByAbnormalPackage(DistributionReservationEntity reservationEntity, Map map,DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity) { - NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); + private NodeFanoutMsg buildNodeFanoutMsgByAbnormalPackage(DistributionReservationEntity reservationEntity, Map map,DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity) { + NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); if (LoadingAbnormalTypeConstant.jihuayichang.getValue().equals(distributionLoadscanAbnormalEntity.getAbnormalType())){ nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_ABNORMAL_LOADING); }else if (LoadingAbnormalTypeConstant.qianshouyichang.getValue().equals(distributionLoadscanAbnormalEntity.getAbnormalType())){ From ed6b9f706196397c784acb840735f5dc9f731a48 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 3 Apr 2025 11:24:05 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=B9=BF=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/IDistributionNodeWorkService.java | 2 +- .../impl/DistributionNodeWorkServiceImpl.java | 13 ++----------- .../impl/DistributionSignforServiceImpl.java | 6 +++--- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionNodeWorkService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionNodeWorkService.java index fbdfd7030..b238e9736 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionNodeWorkService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionNodeWorkService.java @@ -148,6 +148,6 @@ public interface IDistributionNodeWorkService { /** * 异常签收 */ - void abnormalDeliveryAbnormalReview(NodeFanoutMsg nodeFanoutMsg, BladeUser user); + void abnormalDeliveryAbnormalReview(NodeFanoutMsg nodeFanoutMsg, BladeUser user); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java index 1abb8e02c..b01707bd7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java @@ -12,16 +12,7 @@ import com.logpm.factorydata.vo.PushData; import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.WorkNodeEnums; import org.springblade.common.constant.broadcast.FanoutConstants; -import org.springblade.common.model.CarStartVO; -import org.springblade.common.model.ConsigneeArriveVO; -import org.springblade.common.model.DistributionLoadVO; -import org.springblade.common.model.DistributionReCheckSignVO; -import org.springblade.common.model.DistributionSignforVO; -import org.springblade.common.model.DistributionTaskVO; -import org.springblade.common.model.FanoutMsg; -import org.springblade.common.model.NodeFanoutMsg; -import org.springblade.common.model.ReservationVO; -import org.springblade.common.model.StockUpVO; +import org.springblade.common.model.*; import org.springblade.common.model.workNode.DeliveryOfPickupPlanVO; import org.springblade.common.model.workNode.FinishDistributionTrainVO; import org.springblade.common.model.workNode.PickUpByReCheckVO; @@ -276,7 +267,7 @@ public class DistributionNodeWorkServiceImpl implements IDistributionNodeWorkSer } @Override - public void abnormalDeliveryAbnormalReview(NodeFanoutMsg nodeFanoutMsg, BladeUser user) { + public void abnormalDeliveryAbnormalReview(NodeFanoutMsg nodeFanoutMsg, BladeUser user) { try { if (distributionProperties.getSendFanoutMsg()) { rabbitTemplate.convertAndSend(FanoutConstants.distribution.DeliveryAbnormalReview.EXCHANGE, null, com.alibaba.fastjson.JSONObject.toJSONString(nodeFanoutMsg)); 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 690002f84..118ff9ef8 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 @@ -6881,7 +6881,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl map = new HashMap<>(); map.put("1", Collections.singletonList(reservationPackageEntity)); - NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByAbnormalPackage(reservationEntity, map,distributionLoadscanAbnormalEntity); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByAbnormalPackage(reservationEntity, map,distributionLoadscanAbnormalEntity); distributionNodeWorkService.abnormalDeliveryAbnormalReview(nodeFanoutMsg,AuthUtil.getUser()); //维护包件的预约状态 DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(distributionLoadscanAbnormalEntity.getPackageId()); @@ -6902,8 +6902,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl buildNodeFanoutMsgByAbnormalPackage(DistributionReservationEntity reservationEntity, Map map,DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity) { - NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); + private NodeFanoutMsg buildNodeFanoutMsgByAbnormalPackage(DistributionReservationEntity reservationEntity, Map map,DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity) { + NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); if (LoadingAbnormalTypeConstant.jihuayichang.getValue().equals(distributionLoadscanAbnormalEntity.getAbnormalType())){ nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_ABNORMAL_LOADING); }else if (LoadingAbnormalTypeConstant.qianshouyichang.getValue().equals(distributionLoadscanAbnormalEntity.getAbnormalType())){ From f10ea6522bb59e8035a591c644d6d47637f2216d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=BE=99?= Date: Thu, 3 Apr 2025 14:05:44 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=86=E5=8D=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistributionSplitOrderTaskServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java index 199b06d08..24cb21dcd 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java @@ -963,10 +963,12 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl res = new HashMap<>(); + DistributionSplitOrderTaskEntity task = getById(taskId); res.put("packageList", PackageOrderList.getData()); res.put("logList", logList); - res.put("info", getById(taskId)); + res.put("info", task); + res.put("allInfo", distributionSplitOrderAllTaskService.getById(task.getSplitOrderAllTaskId())); return R.data(res); } From 035bef5e6880db2f2b64ae08f2966f611387f709 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 3 Apr 2025 14:29:54 +0800 Subject: [PATCH 10/13] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=8D=B8=E8=BD=A6?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CarsLoadAsyncServiceImpl.java | 17 ++++++++++------- .../impl/TrunklineCarsLoadServiceImpl.java | 13 +++++++++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java index 5946e2af6..17d636f55 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java @@ -547,17 +547,20 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { } + Map parcelMap = new HashMap<>(); List addList = new ArrayList<>(); List noUnloadList = trunklineCarsLoadScanService.findUnloadCheckAbnormalNoUnloadList(loadId, warehouseId); //把noUnloadList中所有元素的scanCode放入一个List List scanCodeList = noUnloadList.stream().map(TrunklineCarsLoadScanEntity::getScanCode).collect(Collectors.toList()); - FindParamterDTO findParamterDTO = new FindParamterDTO(); - findParamterDTO.setOrderPackageCodeList(scanCodeList); - findParamterDTO.setWarehouseId(warehouseId); - List parcelListEntityList = distributionParcelListClient.findListByOrderPackageCodeList(findParamterDTO); - //把parcelListEntityList转化成以orderPackageCode作为key的Map - Map parcelMap = parcelListEntityList.stream() - .collect(Collectors.toMap(DistributionParcelListEntity::getOrderPackageCode, Function.identity())); + if(CollUtil.isNotEmpty(scanCodeList)){ + FindParamterDTO findParamterDTO = new FindParamterDTO(); + findParamterDTO.setOrderPackageCodeList(scanCodeList); + findParamterDTO.setWarehouseId(warehouseId); + List parcelListEntityList = distributionParcelListClient.findListByOrderPackageCodeList(findParamterDTO); + //把parcelListEntityList转化成以orderPackageCode作为key的Map + parcelMap = parcelListEntityList.stream() + .collect(Collectors.toMap(DistributionParcelListEntity::getOrderPackageCode, Function.identity())); + } for (TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity : noUnloadList) { String loadCode = trunklineCarsLoadScanEntity.getLoadCode(); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 8aa67349c..e4a5a7055 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -13570,11 +13570,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl advanceMap = new HashMap<>(); //把allAdvanceDetailList中所有advanceId放入一个Set集合 Set advanceIdSet = allAdvanceDetailList.stream().map(TrunklineAdvanceDetailEntity::getAdvanceId).collect(Collectors.toSet()); - List advanceEntities = advanceService.findListByIds(new ArrayList<>(advanceIdSet)); - //把advanceEntities转化成id为key的Map - Map advanceMap = advanceEntities.stream().collect(Collectors.toMap(TrunklineAdvanceEntity::getId, Function.identity())); + if(CollUtil.isNotEmpty(advanceIdSet)){ + List advanceEntities = advanceService.findListByIds(new ArrayList<>(advanceIdSet)); + //把advanceEntities转化成id为key的Map + advanceMap = advanceEntities.stream().collect(Collectors.toMap(TrunklineAdvanceEntity::getId, Function.identity())); + } + //把allAdvanceDetailList转化成orderPackageCode为key的Map @@ -13586,6 +13590,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodeList = new ArrayList<>(); Set orderPackageCodeSet = new HashSet<>(); + Map finalAdvanceMap = advanceMap; carsLoadScanEntities.forEach(carsLoadScanEntity -> { String orderPackageCode = carsLoadScanEntity.getScanCode(); Date unloadTime = carsLoadScanEntity.getUnloadTime(); @@ -13610,7 +13615,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl Date: Thu, 3 Apr 2025 14:30:40 +0800 Subject: [PATCH 11/13] =?UTF-8?q?1.=E5=B8=AETJJ=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/springblade/common/model/PackageData.java | 1 + 1 file changed, 1 insertion(+) diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java b/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java index ab912cee3..b3877ef89 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java +++ b/blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java @@ -162,6 +162,7 @@ public class PackageData implements Serializable { private Long finalNodeId; private String finalNodeName; + private Integer examine; } From e62d3b822b36bd8933512e20837491b80095f63e Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 3 Apr 2025 14:30:58 +0800 Subject: [PATCH 12/13] =?UTF-8?q?1.=E6=8A=A5=E8=A1=A8=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/report/mapper/ReportTimeMapper.xml | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml index 976703731..191dd1dbf 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml @@ -246,11 +246,14 @@ left join logpm_warehouse_waybill lww on lww.id = lta.waybill_id left join logpm_warehouse_warehouse waw on waw.id = lta.warehouse_id left join ( - SELECT - t1.* - FROM logpm_trunkline_cars_load_scan t1 - LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code AND t1.create_time < t2.create_time - WHERE t2.scan_code IS NULL + SELECT + t1.* + FROM logpm_trunkline_cars_load_scan t1 + LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code + AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL) + OR(t1.warehouse_id IS NOT NULL = t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) + WHERE + t2.scan_code IS NULL ) ltcls on ltcls.scan_code = lta.order_package_code and ltcls.warehouse_id = lta.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4 left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id where lta.create_time > '2024-10-22 00:00:00' @@ -316,8 +319,11 @@ SELECT t1.* FROM logpm_trunkline_cars_load_scan t1 - LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code AND t1.create_time < t2.create_time - WHERE t2.scan_code IS NULL + LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code + AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL) + OR(t1.warehouse_id IS NOT NULL = t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) + WHERE + t2.scan_code IS NULL ) ltcls on ltcls.scan_code = lta.order_package_code and ltcls.warehouse_id = lta.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4 left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id where lta.create_time > '2024-10-22 00:00:00' @@ -2775,10 +2781,19 @@ else '未知' end isOverTime from logpm_trunkline_advance_detail ltad left join logpm_trunkline_advance lta on lta.id = ltad.advance_id - left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id - left join logpm_warehouse_warehouse waw on waw.id = ltad.warehouse_id - left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4 - left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id + left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id + left join logpm_warehouse_warehouse waw on waw.id = ltad.warehouse_id + left join ( + SELECT + t1.* + FROM logpm_trunkline_cars_load_scan t1 + LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code + AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL) + OR(t1.warehouse_id IS NOT NULL = t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) + WHERE + t2.scan_code IS NULL + ) ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4 + left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id where ltad.create_time > '2024-10-22 00:00:00' and lww.document_making_time > '2024-10-22 00:00:00' and lww.departure_warehouse_id != lww.destination_warehouse_id @@ -2879,7 +2894,16 @@ left join logpm_trunkline_advance lta on lta.id = ltad.advance_id left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id left join logpm_warehouse_warehouse waw on waw.id = ltad.warehouse_id - left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4 + left join ( + SELECT + t1.* + FROM logpm_trunkline_cars_load_scan t1 + LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code + AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL) + OR(t1.warehouse_id IS NOT NULL = t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) + WHERE + t2.scan_code IS NULL + ) ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4 left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcls.load_id and ltcll.node_id = ltcls.warehouse_id where ltad.create_time > '2024-10-22 00:00:00' and lww.document_making_time > '2024-10-22 00:00:00' From 7d56ef7e0b38b53d328bcbd105fde1baff3d71d2 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 3 Apr 2025 15:17:28 +0800 Subject: [PATCH 13/13] =?UTF-8?q?1.=E6=8A=A5=E8=A1=A8=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/logpm/report/mapper/ReportTimeMapper.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml index 191dd1dbf..48af6a82f 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml @@ -251,7 +251,7 @@ FROM logpm_trunkline_cars_load_scan t1 LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL) - OR(t1.warehouse_id IS NOT NULL = t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) + OR(t1.warehouse_id IS NOT NULL and t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) WHERE t2.scan_code IS NULL ) ltcls on ltcls.scan_code = lta.order_package_code and ltcls.warehouse_id = lta.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4 @@ -321,7 +321,7 @@ FROM logpm_trunkline_cars_load_scan t1 LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL) - OR(t1.warehouse_id IS NOT NULL = t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) + OR(t1.warehouse_id IS NOT NULL and t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) WHERE t2.scan_code IS NULL ) ltcls on ltcls.scan_code = lta.order_package_code and ltcls.warehouse_id = lta.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4 @@ -2789,7 +2789,7 @@ FROM logpm_trunkline_cars_load_scan t1 LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL) - OR(t1.warehouse_id IS NOT NULL = t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) + OR(t1.warehouse_id IS NOT NULL and t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) WHERE t2.scan_code IS NULL ) ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4 @@ -2900,7 +2900,7 @@ FROM logpm_trunkline_cars_load_scan t1 LEFT JOIN logpm_trunkline_cars_load_scan t2 ON t1.scan_code = t2.scan_code AND ((t2.warehouse_id IS NOT NULL AND t1.warehouse_id IS NULL) - OR(t1.warehouse_id IS NOT NULL = t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) + OR(t1.warehouse_id IS NOT NULL and t2.warehouse_id IS NOT NULL AND t1.create_time < t2.create_time)) WHERE t2.scan_code IS NULL ) ltcls on ltcls.scan_code = ltad.order_package_code and ltcls.warehouse_id = ltad.warehouse_id and ltcls.type = 1 and ltcls.scan_status != 4