From c635bba1ade73185540a3ee05990c1e169b99b5a Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 31 Jan 2024 17:16:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E4=BB=B6=E9=85=8D=E9=80=81=E6=B5=81?= =?UTF-8?q?=E8=BD=AC=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/DistributionParcelListNodeVO.java | 36 ++- .../mapper/DistributionParcelListMapper.java | 57 ++++- .../mapper/DistributionParcelListMapper.xml | 217 ++++++++++++++++++ .../DistributionParcelListServiceImpl.java | 85 +++++-- 4 files changed, 373 insertions(+), 22 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListNodeVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListNodeVO.java index f24292178..acb75becb 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListNodeVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListNodeVO.java @@ -36,15 +36,45 @@ import java.util.List; public class DistributionParcelListNodeVO { //节点名称 + private String nodeName; - //节点操作人 + //节点时间 + private Date nodeTime; - //节点修改人 + //节点操作人ID + private Long nodeControlsUserId; - //节点时间 + //节点操作人名称 + private String nodeControlsUserName; + + //仓库ID + private Long warehouseId; + //仓库名称 + private String warehouseName; //操作描述 + private String description; + + //数量 + private Integer quantity; + + //订单自编码 + private String orderCode; + + //包条码 + private String orderPackageCode; + + //库位名称 + private String allocationName; + + //托盘名称 + private String trayName; + + //车次号 + private String tranNumber; + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java index 8befcb639..17a53e89f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java @@ -22,10 +22,7 @@ import com.logpm.distribution.dto.DistributionParcelListDTO; import com.logpm.distribution.dto.app.StockupDTO; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.excel.DistributionParcelListExcel; -import com.logpm.distribution.vo.DistributionParcelListBaseVO; -import com.logpm.distribution.vo.DistributionParcelListVO; -import com.logpm.distribution.vo.DistributionStockListVO; -import com.logpm.distribution.vo.PackageStockupVO; +import com.logpm.distribution.vo.*; import org.apache.ibatis.annotations.Param; import java.util.ArrayList; @@ -178,4 +175,56 @@ public interface DistributionParcelListMapper extends BaseMapper packageIds); + + /** + * 查询包件打托和上架信息 + * @param orderPackageCode + * @param id + * @return + */ + List selectPackageAllocationAndTray(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId); + + /** + * 查询计划配送信息 + * @param orderPackageCode + * @param warehouseId + * @return + */ + List selectPackagePlanDelivery(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId); + + /** + * 查询取消配送节点信息 + * @param orderPackageCode + * @param id + * @return + */ + List selectPackageCancelPlanDelivery(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId); + + /** + * 查询装车节点信息 + * @param orderPackageCode + * @param id + * @return + */ + List selectPackageLoading(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId); + + List selectPackageCancelLoading(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId); + + /** + * 查询包件签收节点信息 + * @param orderPackageCode + * @param id + * @return + */ + DistributionParcelListNodeVO selectPackageCancelSigning(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId); + + List selectPackageStockUp(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId); + + /** + * 查询异常审核 + * @param orderPackageCode + * @param id + * @return + */ + DistributionParcelListNodeVO selectPackageExamineAbnormal(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml index 66af81800..ba0d3c684 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml @@ -1095,5 +1095,222 @@ SELECT ldpl.* FROM logpm_distribution_parcel_list ldpl WHERE ldpl.waybill_number = #{waybillNumber} + + + + + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java index a6fb89f40..fa8bdc364 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java @@ -37,10 +37,7 @@ import com.logpm.distribution.mapper.DistributionParcelListMapper; import com.logpm.distribution.mapper.DistributionParcelNumberMapper; import com.logpm.distribution.mapper.DistributionStockArticleMapper; import com.logpm.distribution.service.*; -import com.logpm.distribution.vo.DistributionParcelListBaseVO; -import com.logpm.distribution.vo.DistributionParcelListVO; -import com.logpm.distribution.vo.DistributionParcelListZeroVO; -import com.logpm.distribution.vo.PackageStockupVO; +import com.logpm.distribution.vo.*; import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient; @@ -51,6 +48,7 @@ import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.order.OrderStockupStatusConstant; import org.springblade.common.exception.CustomerException; +import org.springblade.common.node.PackageNode; import org.springblade.common.utils.CommonUtil; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; @@ -60,6 +58,7 @@ import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.system.cache.DictBizCache; +import org.springblade.system.feign.IUserClient; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -103,6 +102,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl parcelListNodeVOS = new ArrayList<>(); //对于配送包件节点 //1、入库 - //2、计划 - //3、备货 - //4、装车 - //5、滞留 - //6、异常 - //7、审核 - //8、签收 - - + DistributionParcelListNodeVO distributionParcelListNodeVO = new DistributionParcelListNodeVO(); + distributionParcelListNodeVO.setNodeName(PackageNode.ruku.getName()); + distributionParcelListNodeVO.setNodeTime(parcelListEntity.getCreateTime()); + distributionParcelListNodeVO.setNodeControlsUserName(userClient.userInfoById(parcelListEntity.getCreateUser()).getData().getName()); + distributionParcelListNodeVO.setNodeControlsUserId(parcelListEntity.getCreateUser()); + distributionParcelListNodeVO.setQuantity(parcelListEntity.getQuantity()); + distributionParcelListNodeVO.setOrderCode(parcelListEntity.getOrderCode()); + distributionParcelListNodeVO.setOrderPackageCode(parcelListEntity.getOrderPackageCode()); + distributionParcelListNodeVO.setDescription("入库"); + distributionParcelListNodeVO.setWarehouseName(parcelListEntity.getWarehouse()); + distributionParcelListNodeVO.setWarehouseId(parcelListEntity.getWarehouseId()); + distributionParcelListNodeVO.setTranNumber(parcelListEntity.getTrainNumber()); + parcelListNodeVOS.add(distributionParcelListNodeVO); + //2、上下架 + List allocationAndTrayPackage = baseMapper.selectPackageAllocationAndTray(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + if (Func.isNotEmpty(allocationAndTrayPackage)){ + parcelListNodeVOS.addAll(allocationAndTrayPackage); + } + //3、计划配送 + //查询计划配送件数 + List planDeliveryPackage =baseMapper.selectPackagePlanDelivery(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + if (Func.isNotEmpty(planDeliveryPackage)){ + parcelListNodeVOS.addAll(planDeliveryPackage); + } + //查询计划取消的包件 + List cancelPlanDeliveryPackage = baseMapper.selectPackageCancelPlanDelivery(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + if (Func.isNotEmpty(cancelPlanDeliveryPackage)){ + parcelListNodeVOS.addAll(cancelPlanDeliveryPackage); + } + //查询备货 + List StockUpPackage = baseMapper.selectPackageStockUp(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + if (Func.isNotEmpty(StockUpPackage)){ + parcelListNodeVOS.addAll(StockUpPackage); + } + //4、装车扫描 + List loadingPackage =baseMapper.selectPackageLoading(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + if (Func.isNotEmpty(loadingPackage)){ + parcelListNodeVOS.addAll(loadingPackage); + } + //查询取消装车 + List cancelLoadingPackage =baseMapper.selectPackageCancelLoading(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + if (Func.isNotEmpty(cancelLoadingPackage)){ + parcelListNodeVOS.addAll(cancelLoadingPackage); + } + //5、签收扫描 + DistributionParcelListNodeVO signingPackage =baseMapper.selectPackageCancelSigning(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + if (Func.isNotEmpty(signingPackage)){ + parcelListNodeVOS.add(signingPackage); + } + //查询异常审核记录 + DistributionParcelListNodeVO examineAbnormalPackage =baseMapper.selectPackageExamineAbnormal(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + if (Func.isNotEmpty(examineAbnormalPackage)){ + parcelListNodeVOS.add(examineAbnormalPackage); + } + List listNodeVOS = null; + if (Func.isNotEmpty(parcelListNodeVOS)){ + parcelListNodeVOS.forEach(p->{ + if (Func.isNotEmpty(p.getNodeControlsUserId()) && Func.isEmpty(p.getNodeControlsUserName())){ + p.setNodeControlsUserName(userClient.userInfoById(p.getNodeControlsUserId()).getData().getName()); + } + }); + listNodeVOS = parcelListNodeVOS.stream().sorted(Comparator.comparing(DistributionParcelListNodeVO::getNodeTime)).collect(Collectors.toList()); + } - return null; + //6、异常审核 + return R.data(listNodeVOS); } }