From 307d29c392132642fa3a6d4e043189c05981ea73 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Fri, 6 Sep 2024 17:01:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(all):=20=E5=A2=9E=E5=8A=A0=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/distribution/receiver/report/PlanReportListener.java | 1 + 1 file changed, 1 insertion(+) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java index 930795604..6b1d3a784 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java @@ -87,6 +87,7 @@ public class PlanReportListener { QualityDeliverEntity qualityDeliverEntity = QualityDeliverEntity.builder() .warehouseName(bean.getWarehouse()) .warehouseId(warehouseId) + .orderPackageCode(detail.getPackageCode()) .planTrainNumber(vo.getTrainNumber()) .deliveryTime(DateUtil.parseDate(vo.getTaskTime())) .deliveryType(vo.getType()) From 3f49c9b965728c6b2994925ea63f88c278e1065c Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Fri, 6 Sep 2024 17:02:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(all):=20=E5=A2=9E=E5=8A=A0=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/distribution/receiver/report/StockReportListener.java | 1 + 1 file changed, 1 insertion(+) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java index 0b15ca473..26e1ad5c9 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/StockReportListener.java @@ -83,6 +83,7 @@ public class StockReportListener { QualityDeliverEntity qualityDeliverEntity = QualityDeliverEntity.builder() .warehouseName(bean.getWarehouse()) .warehouseId(warehouseId) + .orderPackageCode(detail.getPackageCode()) .stockupCode(vo.getStockupCode()) .stockupUserName(bean.getOperator()) .stockupFinishTime(vo.getStockupDate()) From 51fffa5250d9f9bde7bbc24892ec3f9b24871c0e Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Fri, 6 Sep 2024 17:16:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?add:=20=E5=A4=87=E8=B4=A7=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=87=E8=B4=A7=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springblade/common/model/StockUpVO.java | 5 ++++ .../mapper/DistributionPlanLogMapper.java | 3 +-- .../mapper/DistributionPlanLogMapper.xml | 5 ++++ .../receiver/log/ReservationLogListener.java | 27 ++++++++++++++----- .../service/IDistributionPlanLogService.java | 1 + .../DistributionDeliveryListServiceImpl.java | 2 ++ .../impl/DistributionNodeWorkServiceImpl.java | 20 +++----------- .../impl/DistributionPlanLogServiceImpl.java | 5 +++- .../DistributionReservationServiceImpl.java | 1 + .../impl/DistributionSignforServiceImpl.java | 2 ++ .../impl/DistributionStockupServiceImpl.java | 2 +- 11 files changed, 45 insertions(+), 28 deletions(-) diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/StockUpVO.java b/blade-biz-common/src/main/java/org/springblade/common/model/StockUpVO.java index 1d7c6ee69..b40ebbdbc 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/model/StockUpVO.java +++ b/blade-biz-common/src/main/java/org/springblade/common/model/StockUpVO.java @@ -25,4 +25,9 @@ public class StockUpVO implements Serializable { */ private Date stockupDate; + /** + * 备货区 + */ + private String stockupArea; + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPlanLogMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPlanLogMapper.java index d718cc55c..7ddc7c74b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPlanLogMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPlanLogMapper.java @@ -41,6 +41,5 @@ import java.util.Map; public interface DistributionPlanLogMapper extends BaseMapper { - - + DistributionPlanLogEntity findLastLogByRefCode(@Param("reservationCode") String reservationCode); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPlanLogMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPlanLogMapper.xml index a4e5116c7..2b8e87f03 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPlanLogMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionPlanLogMapper.xml @@ -26,5 +26,10 @@ + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/log/ReservationLogListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/log/ReservationLogListener.java index 1eee6006a..c8971dc67 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/log/ReservationLogListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/log/ReservationLogListener.java @@ -2,6 +2,8 @@ package com.logpm.distribution.receiver.log; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; import com.logpm.distribution.entity.DistributionPlanLogEntity; import com.logpm.distribution.service.IDistributionPlanLogService; import lombok.AllArgsConstructor; @@ -10,7 +12,6 @@ import org.springblade.common.constant.DistributionTypeConstant; import org.springblade.common.constant.broadcast.FanoutConstants; import org.springblade.common.enums.BizOperationEnums; import org.springblade.common.model.NodeFanoutMsg; -import org.springblade.common.model.PackageData; import org.springblade.common.model.ReservationVO; import org.springframework.amqp.core.ExchangeTypes; import org.springframework.amqp.rabbit.annotation.Exchange; @@ -19,8 +20,6 @@ import org.springframework.amqp.rabbit.annotation.QueueBinding; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; -import java.util.List; - @Slf4j @Component @AllArgsConstructor @@ -37,22 +36,23 @@ public class ReservationLogListener { if (StrUtil.isEmpty(msg)) { return; } - NodeFanoutMsg bean = JSONUtil.toBean(msg, NodeFanoutMsg.class); + NodeFanoutMsg bean = JSONObject.parseObject(msg, new TypeReference>(){}); if (bean == null) { return; } BizOperationEnums bizOperation = bean.getBizOperation(); if(bizOperation.equals(BizOperationEnums.ADD)){ -// addLog(bean); + addLog(bean); }else if (bizOperation.equals(BizOperationEnums.MODIFY)){ - - log.warn("修改预约信息未记录日志"); + updataLog(bean); } } private void addLog(NodeFanoutMsg bean) { + + log.info(" bean: {}",bean.getMain().toString()); ReservationVO main = bean.getMain(); if (main == null) { return; @@ -77,5 +77,18 @@ public class ReservationLogListener { distributionPlanLogService.save(distributionPlanLogEntity); } + private void updataLog(NodeFanoutMsg bean) { + + ReservationVO main = bean.getMain(); + if (main == null) { + return; + } + + log.info(" 这里对日志记录的处理存在问题 bean: {}",bean.getMain()); + // todo 这里对日志记录的处理存在问题 + + + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionPlanLogService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionPlanLogService.java index d5cdcabec..05f36182f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionPlanLogService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionPlanLogService.java @@ -28,4 +28,5 @@ import org.springblade.core.mp.base.BaseService; public interface IDistributionPlanLogService extends BaseService { + DistributionPlanLogEntity findLastLogByRefCode(String reservationCode); } 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 b97964687..b6c04519d 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 @@ -1181,6 +1181,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl implements IDistributionPlanLogService { - + @Override + public DistributionPlanLogEntity findLastLogByRefCode(String reservationCode) { + return baseMapper.findLastLogByRefCode(reservationCode); + } } 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 84e0e93fd..3b9580cc9 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 @@ -3535,6 +3535,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl