From e7a88cb9dc90c87ae958c8d3423306201d3529fb Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 9 Nov 2023 15:32:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B8=82=E9=85=8D=E5=8D=95=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionReservationPackageMapper.java | 2 ++ .../DistributionReservationPackageMapper.xml | 11 ++++++ ...DistributionReservationPackageService.java | 3 +- .../DistributionDeliveryListServiceImpl.java | 35 +++++++++++-------- ...ributionReservationPackageServiceImpl.java | 5 +++ 5 files changed, 41 insertions(+), 15 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java index 7702e285e..c919fee82 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java @@ -143,6 +143,8 @@ public interface DistributionReservationPackageMapper extends BaseMapper listPackageTray(@Param("reservationId") Long reservationId); + String getConcatThirdProductByOrderId(@Param("reservationId") Long reservationId,@Param("stockArticleId") Long stockArticleId); + // /** // * 根据预约ID和订单ID查询预约包件中间表 // * @param id diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml index 862a81983..2509a2d4c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml @@ -388,4 +388,15 @@ WHERE + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationPackageService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationPackageService.java index 3921983d3..a04bca40f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationPackageService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationPackageService.java @@ -16,7 +16,6 @@ */ package com.logpm.distribution.service; -import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.dto.DistributionReservationPackageDTO; import com.logpm.distribution.dto.DistributionStockArticleDTO; @@ -91,4 +90,6 @@ public interface IDistributionReservationPackageService extends BaseService getStockArticlePackageList(List reservationPackageEntity); List selectClientStockupPackTray(Long reservationId); + + String getConcatThirdProductByOrderId(Long reservationId, Long stockArticleId); } 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 7339cccb8..9ead95988 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 @@ -17,7 +17,6 @@ package com.logpm.distribution.service.impl; import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; @@ -39,12 +38,13 @@ import com.logpm.distribution.excel.DistributionDeliveryListExcel; import com.logpm.distribution.mapper.*; import com.logpm.distribution.service.*; import com.logpm.distribution.vo.*; -import com.logpm.distribution.vo.app.*; +import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; +import com.logpm.distribution.vo.app.DistributionAppDeliverySelfVO; +import com.logpm.distribution.vo.app.DistributionAppParcelListVO; +import com.logpm.distribution.vo.app.DistributionAppReservationVO; import com.logpm.distribution.vo.print.PrintPreviewVO; import com.logpm.distribution.wrapper.*; -import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity; -import com.logpm.warehouse.feign.IWarehouseRetentionScanClient; import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient; import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; @@ -52,7 +52,6 @@ import com.logpm.warehouse.vo.TrayTypeDataVO; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; import org.apache.commons.lang.StringUtils; -import org.apache.ibatis.scripting.xmltags.ForEachSqlNode; import org.jetbrains.annotations.NotNull; import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.DistributionTypeConstant; @@ -65,7 +64,10 @@ import org.springblade.common.constant.loading.LoadingIsInsertConstant; import org.springblade.common.constant.loading.LoadingStatusConstant; import org.springblade.common.constant.order.OrderReservationStatusConstant; import org.springblade.common.constant.order.OrderStatusConstant; -import org.springblade.common.constant.orderpackage.*; +import org.springblade.common.constant.orderpackage.OrderPackageFreezeStatusConstant; +import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant; +import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant; +import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant; import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant; import org.springblade.common.constant.reservation.*; import org.springblade.common.constant.stockup.StockAssignStatusConstant; @@ -88,19 +90,14 @@ import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.system.cache.DictBizCache; import org.springblade.system.feign.IDictBizClient; import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Lazy; -import org.springframework.data.redis.connection.ReactiveListCommands; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Transactional; -import org.springframework.transaction.interceptor.TransactionAspectSupport; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.stream.Collectors; @@ -155,6 +152,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl temp = new HashMap<>(); - DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleMapper.selectById(distributionReservationStockarticleEntity.getStockArticleId()); - temp.put("合同号", distributionStockArticleEntity.getOrderCode()); - temp.put("产品名称", distributionStockArticleEntity.getDescriptionGoods()); + Long stockArticleId = distributionReservationStockarticleEntity.getStockArticleId(); + Long reservationId = distributionReservationStockarticleEntity.getReservationId(); + DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleMapper.selectById(stockArticleId); + String orderCode = distributionStockArticleEntity.getOrderCode(); + + + temp.put("合同号", orderCode); + + //查询产品名称拼接 + String productName = distributionReservationPackageService.getConcatThirdProductByOrderId(reservationId,stockArticleId); + + temp.put("产品名称", productName); //todo 单位是否需要查询物料表 temp.put("单位", getUnit(distributionStockArticleEntity.getId())); temp.put("数量", distributionReservationStockarticleEntity.getReservationNum()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationPackageServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationPackageServiceImpl.java index 7b286c8c7..a817078fd 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationPackageServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationPackageServiceImpl.java @@ -148,5 +148,10 @@ public class DistributionReservationPackageServiceImpl extends BaseServiceImpl