From 1a9124b0b70d6eba6a64bb4a52105381d9b0b171 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 28 Mar 2024 18:07:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90=E6=A3=80=E6=B5=8B=E5=8C=85?= =?UTF-8?q?=E4=BB=B6=E8=B0=83=E6=95=B4=E3=80=81=E5=B7=B2=E7=AD=BE=E6=94=B6?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3=E3=80=81?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E5=95=86=E5=9C=BA=E5=AD=97=E6=AE=B5BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E3=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/DistributionSignforStockArticleVO.java | 226 ++++++++++++++++++ .../DistributionStockArticleController.java | 14 ++ .../DistributionSignforStockArticleDTO.java | 32 +++ .../DistributionStockArticleMapper.java | 8 + .../mapper/DistributionStockArticleMapper.xml | 98 ++++++++ .../mapper/DistributionStockupMapper.xml | 2 +- .../mapper/DistrilbutionBillLadingMapper.java | 7 + .../mapper/DistrilbutionBillLadingMapper.xml | 8 +- .../IDistributionStockArticleService.java | 10 + .../DistributionReservationServiceImpl.java | 2 + .../DistributionStockArticleServiceImpl.java | 65 ++++- .../DistrilbutionBillLadingServiceImpl.java | 11 +- 12 files changed, 476 insertions(+), 7 deletions(-) create mode 100644 blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java create mode 100644 blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforStockArticleDTO.java diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java new file mode 100644 index 000000000..8c4a893b1 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforStockArticleVO.java @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.logpm.distribution.vo; + +import com.logpm.distribution.entity.DistributionStockArticleEntity; +import com.logpm.distribution.vo.DistributionParcelListVO; +import com.logpm.distribution.vo.DistributionParcelNumberVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.lang.reflect.Field; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 已签收订单视图类 + * + * @author tjj + * @since 2023-06-13 + */ +@Data +public class DistributionSignforStockArticleVO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 运单号 + */ + @ApiModelProperty(value = "运单号") + private String waybillNumber; + + /** + * 服务号 + */ + @ApiModelProperty(value = "服务号") + private String serviceNumber; + + /** + * 订单自编号 + */ + @ApiModelProperty(value = "订单自编号") + private String orderCode; + + /** + * 商场名称 + */ + @ApiModelProperty(value = "商场名称") + private String mallName; + + /** + * 仓库名称 + */ + @ApiModelProperty(value = "仓库名称") + private String warehouseName; + + /** + * 最新入库时间 + */ + @ApiModelProperty(value = "最新入库时间") + private Date warehouseEntryTime; + + /** + * 收货单位 + */ + @ApiModelProperty(value = "收货单位") + private String consigneeUnit; + + /** + * 运单收货人 + */ + @ApiModelProperty(value = "运单收货人") + private String consigneePerson; + + /** + * 品牌 + */ + @ApiModelProperty(value = "品牌") + private String brand; + + /** + * 总数量 + */ + @ApiModelProperty(value = "总数量") + private Integer totalNumber; + + /** + * 在库数 + */ + @ApiModelProperty(value = "在库数") + private Integer handQuantity; + /** + * 出库数 + */ + @ApiModelProperty(value = "出库数") + private Integer deliveryNumber; + + /** + * 出库数 + */ + @ApiModelProperty(value = "签收数") + private Integer signForNumber; + + /** + * 备货数 + */ + @ApiModelProperty(value = "备货数") + private Integer stockUpNumber; + + /** + * 预约数 + */ + @ApiModelProperty(value = "预约数") + private Integer reservationNumber; + + /** + * 订单状态 + */ + @ApiModelProperty(value = "订单状态") + private String orderStatusName; + + /** + * 是否零担 + */ + @ApiModelProperty(value = "是否零担") + private String isZeroName; + + /** + * 预约状态 + */ + @ApiModelProperty(value = "预约状态") + private String orderReservationStatusName; + + /** + * 是否齐套 + */ + @ApiModelProperty(value = "是否齐套") + private String isCompleteSet; + + /** + * 是否齐套 + */ + @ApiModelProperty(value = "服务类型") + private String typeServiceName; + + /** + * 预约信息 + */ + @ApiModelProperty(value = "预约信息") + private String reservationInfo; + + /** + * 车次信息 + */ + @ApiModelProperty(value = "车次信息") + private String deliveryListInfo; + + /** + * 司机信息 + */ + @ApiModelProperty(value = "司机信息") + private String driverName; + + /** + * 车辆信息 + */ + @ApiModelProperty(value = "车辆信息") + private String vehicleName; + + /** + * 审核人 + */ + @ApiModelProperty(value = "审核人") + private String examineUserNames; + + /** + * 最早入库时间 + */ + @ApiModelProperty(value = "最早入库时间") + private Date earliestWarehouseEntryTime; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private Date createTime; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建人") + private Long createUser; + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建人") + private String createUserName; + + + /** + * 创建时间 + */ + @ApiModelProperty(value = "签收时间") + private Date signinTime; + + + + + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java index b177ac64b..4a5829c2a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java @@ -498,4 +498,18 @@ public class DistributionStockArticleController extends BladeController { } + + + /** + * 配送在库订单 分页 + */ + @GetMapping("/signforList") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入distributionStockArticle") + public R> signforList(@ApiIgnore @RequestParam Map distributionStockArticle, Query query) { + IPage pages = distributionStockArticleService.pageSignforListtOwe(Condition.getPage(query), distributionStockArticle); + return R.data(pages); + } + + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforStockArticleDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforStockArticleDTO.java new file mode 100644 index 000000000..53948dca4 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionSignforStockArticleDTO.java @@ -0,0 +1,32 @@ +package com.logpm.distribution.dto; + +import com.logpm.distribution.entity.DistributionStockArticleEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * @program: LogisticsPlatform-Service + * @description: + * @author: cyz + * @create: 2023-09-06 20:57 + **/ +@Data +@EqualsAndHashCode(callSuper = true) +public class DistributionSignforStockArticleDTO extends DistributionStockArticleEntity { + private static final long serialVersionUID = 1L; + private String orderCodeNum; //订单号 + private List orderCodeNumList; + private String orderCodeNumLike; + private String waybillNum; //订单号 + private List waybillNumList; + private String waybillNumLike; + private String ids; + private List idsList; + private String idsLike; + private String reservation; + private String startDate; + private String entDate; + private List warehouseIdList; +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java index 10d707bd9..3da519b5c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java @@ -183,4 +183,12 @@ public interface DistributionStockArticleMapper extends BaseMapper pageSignforListOwe(IPage page,@Param("param") DistributionStockArticleOweDTO stockArticleEntity); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index fb141d441..afe23dd90 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -1102,5 +1102,103 @@ from logpm_distribution_stock_article ldsa where ldsa.id = #{orderId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml index 7bd25f6d3..9be21af98 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml @@ -98,7 +98,7 @@ LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldrzp.stock_article_id and lwug.association_type = '1' - ldsi.stockup_id = #{param.stockupId} and lwug.allocation_id = #{param.allocationId} + ldsi.stockup_id = #{param.stockupId} and lwug.allocation_id = #{param.allocationId} AND ldrzp.reservation_id = #{param.reservationId} and ldrzp.stock_article_id = #{param.stockArticleId} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java index 12aa6e236..cddea5d78 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java @@ -128,6 +128,13 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java index e0e8969d3..21cf5b01e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java @@ -241,4 +241,14 @@ public interface IDistributionStockArticleService extends BaseService params) throws Exception; + + /** + * 查询签收订单 + * @param page + * @param distributionStockArticle + * @return + */ + IPage pageSignforListtOwe(IPage page, Map distributionStockArticle); + + } 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 bf5d4452b..638b52799 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 @@ -1897,6 +1897,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl !OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())) .filter(f->OrderPackageLoadingStatusConstant.weizhuancghe.getValue().equals(f.getOrderPackageLoadingStatus())) - .filter(f->OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(f.getOrderPackageReservationStatus()) + .filter(f->!OrderPackageReservationStatusConstant.daiyuyue.getValue().equals(f.getOrderPackageReservationStatus()) ).mapToInt(DistributionParcelListEntity::getQuantity).sum(); inWarehouseQuantity = a; @@ -1888,6 +1889,68 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl pageSignforListtOwe(IPage page, Map distributionSignforStockArticle) { + DistributionStockArticleOweDTO stockArticleEntity = JSONObject.parseObject(JSONObject.toJSONString(distributionSignforStockArticle), DistributionStockArticleOweDTO.class); + if (Func.isNotEmpty(distributionSignforStockArticle.get("typeServer"))){ + stockArticleEntity.setTypeService((String) distributionSignforStockArticle.get("typeServer")); + } + if (Func.isNotEmpty(stockArticleEntity.getOrderCodeNum())) { + String anumbering = stockArticleEntity.getOrderCodeNum().trim(); + List list = CommonUtil.stringNum(anumbering); + if (list.size() > 1) { + stockArticleEntity.setOrderCodeNumList(list); + } else { + stockArticleEntity.setOrderCodeNumLike(anumbering); + } + } + if (Func.isNotEmpty(stockArticleEntity.getWaybillNum())) { + String waybill = stockArticleEntity.getWaybillNum().trim(); + List list = CommonUtil.stringNum(waybill); + if (list.size() > 1) { + stockArticleEntity.setWaybillNumList(list); + } else { + stockArticleEntity.setWaybillNumLike(waybill); + } + } + if (ObjectUtil.isNotEmpty(stockArticleEntity.getIds())) { + String ids = stockArticleEntity.getIds().trim(); + List list = CommonUtil.stringNum(ids); + if (list.size() > 1) { + stockArticleEntity.setIdsList(list); + } else { + stockArticleEntity.setIdsLike(ids); + } + } + +// if(Func.isNotEmpty(stockArticleEntity.getReservation())){ +// stockArticleEntity.setReservationStatus("10"); +// } + List myWarehouseList = warehouseClient.getMyWatchWarehouse(); + List collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); + + if (collect.size() > 1) { + stockArticleEntity.setWarehouseIdList(collect); + } else if (collect.size() == 1) { + stockArticleEntity.setWarehouseId(collect.get(0)); + } + IPage distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity); + //处理创建人 + distributionStockArticleEntityIPage.getRecords().forEach(a->{ + if (Func.isNotEmpty(a.getCreateUser())){ + R userR = userClient.userInfoById(a.getCreateUser()); + a.setCreateUserName(userR.getData().getName()); + } + }); + + return distributionStockArticleEntityIPage; + } + @Override public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) { diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java index f7efb4fc4..28fb96429 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java @@ -719,12 +719,17 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl ladingScanEntities = distributionBillLadingScanService.list(Wrappers.query().lambda() - .eq(DistributionBillLadingScanEntity::getBillLadingId, billLadingId)); + .eq(DistributionBillLadingScanEntity::getBillLadingId, billLadingId) + .eq(DistributionBillLadingScanEntity::getMaterialType, "2") + ); boolean a = false; - if (Func.isEmpty(ladingScanEntities)) { + if (Func.isNotEmpty(ladingScanEntities)) { int sum = ladingScanEntities.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum(); //提货扫描数量和计划保持一致无需进行资源释放 if (integer == sum) {