From f2bd9e0a80b17138fe235b4eb090869b634ec6e0 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Thu, 21 Sep 2023 17:31:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E5=BA=93=E6=93=8D?= =?UTF-8?q?=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/DistributionStockupSelfVO.java | 1 + .../vo/DistributionStockupStockListVO.java | 6 +- .../vo/DistributionStockupTrayVO.java | 4 + .../DistributionStockupAppController.java | 29 ++- .../dto/DistributionStockDTO.java | 2 +- .../distribution/dto/app/StockupDTO.java | 1 + .../mapper/DistributionStockMapper.xml | 8 +- .../mapper/DistributionStockupMapper.java | 16 +- .../mapper/DistributionStockupMapper.xml | 63 ++++-- .../mapper/DistrilbutionBillStockMapper.xml | 2 +- .../service/IDistributionStockupService.java | 14 +- .../DistributionParcelListServiceImpl.java | 2 +- .../impl/DistributionStockServiceImpl.java | 5 +- .../impl/DistributionStockupServiceImpl.java | 46 +++- .../WarehouseWarehousingEntryController.java | 1 + .../dto/WarehouseWarehousingEntryDTO.java | 1 + .../WarehouseWarehousingEntryServiceImpl.java | 199 +++++++++++------- 17 files changed, 278 insertions(+), 122 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupSelfVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupSelfVO.java index 33a660f71..fa93c1a9e 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupSelfVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupSelfVO.java @@ -22,6 +22,7 @@ public class DistributionStockupSelfVO { private Long ldsId; // 扫码ID private Long allocationId; // 货位ID private Long parcelListId; // 包件ID + private Long stockArticleId; // 订单ID } diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java index e9ae58cef..e22c85bb8 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java @@ -7,10 +7,12 @@ import java.io.Serializable; @Data public class DistributionStockupStockListVO implements Serializable { - private Long stockListId; + private Long stockListId;//库存品id - private String allocation;//货位 + private Long deliveryDetailsId; //自提库存品id + private String allocation;//货位 + private boolean completeStact;//货位配货状态 private String materialName;//物品名称 private String sku;//sku diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupTrayVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupTrayVO.java index facffd46d..4bb93619c 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupTrayVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupTrayVO.java @@ -14,5 +14,9 @@ import java.io.Serializable; public class DistributionStockupTrayVO implements Serializable { private String associationId; //包件ID private String associationValue; // 包件编码 + private String positionCode; // 包件编码 + private String allocationId; // 包件编码 + private String allocationTitle; // 包件编码 + private String num; // 包件编码 } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java index 247ccbaa2..278f23c18 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java @@ -30,6 +30,7 @@ import com.logpm.distribution.service.*; import com.logpm.distribution.vo.*; import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity; import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; +import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity; import com.logpm.warehouse.feign.IWarehouseGoodsAllocationClient; import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient; import com.logpm.warehouse.feign.IWarehouseUpdownGoodsLogClient; @@ -197,14 +198,18 @@ public class DistributionStockupAppController extends BladeController { Long reservationId = stockupDTO.getReservationId(); if (stockupDTO.getTypeService().equals("3")) { //自提 - //查询备货区信息 - DistributionStockupSelfVO distributionStockupSelfVO = distributionStockupService.selectStockupDetails(reservationId); - map = convertObjectToMap(distributionStockupSelfVO); + if (orderStatus.equals(1)) { + //查询备货区信息 + DistributionStockupSelfVO distributionStockupSelfVO = distributionStockupService.selectStockupDetails(reservationId); + map = convertObjectToMap(distributionStockupSelfVO); //客户订单 List list = distributionStockupService.selectStockupOrderList(stockupDTO); map.put("orderList", list); } else { + //查询备货区信息 + DistributionStockupSelfVO distributionStockupSelfVO = distributionStockupService.selectStockupStockListDetails(reservationId); + map = convertObjectToMap(distributionStockupSelfVO); //库存品 List list = distributionStockupService.selectStockupStockList(stockupDTO); map.put("stockList", list); @@ -276,7 +281,7 @@ public class DistributionStockupAppController extends BladeController { return R.fail(3002, "备货任务Id为空"); } if (ObjectUtils.isNull(status)) { - log.warn("##############status: 货位状态为空 allocation={}", stockupId); + log.warn("##############status: 货位状态为空 status={}", status); return R.fail(3002, "货位状态为空"); } //查询自提还是商 市 @@ -304,6 +309,10 @@ public class DistributionStockupAppController extends BladeController { } else if (orderStatus == 2) { //库存品 Long stockListId = stockupDTO.getStockListId();//库存品id + if (ObjectUtils.isNull(allocationId)) { + log.warn("##############allocationId: 货位状态为空 allocationId={}", allocationId); + return R.fail(3002, "货位id为空"); + } if (Objects.isNull(stockListId)) { return R.fail(3002, "库存品id为空"); @@ -311,7 +320,7 @@ public class DistributionStockupAppController extends BladeController { //查询自提还是商 市 if (byId.getTypeService().equals("3")) { //自 - DistributionStockupStockListInfoVO infoVO = distributionStockupService.selectStockListInfoSelf(reservationId, stockListId); + DistributionStockupStockListInfoVO infoVO = distributionStockupService.selectStockListInfoSelf(reservationId, stockListId,allocationId); return R.data(infoVO); } else { DistributionStockupStockListInfoVO infoVO = distributionStockupService.selectStockListInfo(reservationId, stockListId); @@ -365,6 +374,16 @@ public class DistributionStockupAppController extends BladeController { R b = distributionStockupService.addPackTrayList(stockupDTO); return b; } + @PostMapping("/locationSelection") + @ApiOperation(value = "库存品选择货位展示") + public R> locationSelection(@RequestBody StockupDTO stockupDTO) { + if (ObjectUtils.isNull(stockupDTO.getDeliveryDetailsId())) { + log.warn("############备货库存品ID为空:{}",stockupDTO.getDeliveryDetailsId()); + return R.fail(3002, "备货库存品ID不能为空"); + } + List list = distributionStockupService.getLocationSelection(stockupDTO); + return R.data(list); + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockDTO.java index 53379bb5b..ddd5f1378 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockDTO.java @@ -34,7 +34,7 @@ public class DistributionStockDTO extends DistributionStockEntity { private static final long serialVersionUID = 1L; private List ids; //包件ID private String goodsAreaId; //备货区 -// private String stockupId; //配货id + private Long stockupId; //配货id private String stockupArea; //名称 private String stockupType; //标识 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java index a77b79855..a313d4400 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java @@ -43,6 +43,7 @@ public class StockupDTO implements Serializable { private String cargoUnit;//单位 private Long userId;//当前操作人 + private String deliveryDetailsId;//当前操作人 //扫码参数 private Integer scanType;//备货扫码类型 1 包件 2库存品 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml index 3a8cdaf64..e4954f3c0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml @@ -97,19 +97,15 @@ ) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java index d1fb051fb..f91c486a3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java @@ -22,10 +22,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.dto.app.StockupDTO; import com.logpm.distribution.entity.DistributionStockupEntity; import com.logpm.distribution.excel.DistributionStockupExcel; -import com.logpm.distribution.vo.DistributionStockupListVO; -import com.logpm.distribution.vo.DistributionStockupSelfVO; -import com.logpm.distribution.vo.DistributionStockupStockListVO; -import com.logpm.distribution.vo.DistributionStockupVO; +import com.logpm.distribution.vo.*; +import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -145,6 +143,9 @@ public interface DistributionStockupMapper extends BaseMapper selectStockupSelf(@Param("reservationId")Long reservationId); /** @@ -184,4 +185,11 @@ public interface DistributionStockupMapper extends BaseMapper stockupOffShelf(@Param("param")StockupDTO stockupDTO); + + /** + * + * @param stockupDTO + * @return + */ + List getLocationSelection(StockupDTO stockupDTO); } 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 0c9ac3a85..bd352e9b1 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 @@ -67,6 +67,15 @@ ldbs.order_status in (1,2) and ldbs.bill_lading_id = #{param.reservationId} + @@ -407,6 +418,30 @@ where ldsi.reservation_id = #{reservationId} +