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/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()) 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()) 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 921130f11..5d6e440d2 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