From a6ff2411877e07cb4e1142747ca513d09ad45c35 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 22 May 2024 18:07:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E6=89=93=E6=89=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicdata/feign/IBasicdataTrayClient.java | 8 +++ .../WarehouseWarehousingDetailEntity.java | 31 +++++++++ .../IWarehouseGoodsAllocationClient.java | 2 + .../basicdata/feign/BasicdataTrayClient.java | 7 ++ .../WarehouseWarehousingEntryController.java | 1 + .../excel/WarehousingEntryDetailExcel.java | 14 ++++ .../feign/WarehouseGoodsAllocationClient.java | 8 +++ .../WarehouseWarehousingEntryServiceImpl.java | 65 ++++++++++++++++++- 8 files changed, 133 insertions(+), 3 deletions(-) diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTrayClient.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTrayClient.java index f79d9a4c2..14f2f6a31 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTrayClient.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTrayClient.java @@ -71,4 +71,12 @@ public interface IBasicdataTrayClient { @GetMapping(API_PREFIX+"/getTrayByTrayNo") BasicdataTrayEntity getTrayByTrayNo(@RequestParam String trayNo); + + /** + * 查询托盘 + * @param positions + * @return + */ + @GetMapping(API_PREFIX+"/findByTrayName") + BasicdataTrayEntity findByTrayName(@RequestParam String positions); } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWarehousingDetailEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWarehousingDetailEntity.java index 0e3b2c4a3..863381b1c 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWarehousingDetailEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWarehousingDetailEntity.java @@ -127,4 +127,35 @@ public class WarehouseWarehousingDetailEntity extends TenantEntity { @ApiModelProperty(value = "品牌ID") private Long brandId; + + /** + * 库位Id + */ + @ApiModelProperty(value = "库位Id") + private Long allocationId; + + /** + * 库位名称 + */ + @ApiModelProperty(value = "库位名称") + private String allocationName; + + /** + * 托盘ID + */ + @ApiModelProperty(value = "托盘ID") + private Long trayId; + + /** + * 托盘名称 + */ + @ApiModelProperty(value = "托盘名称") + private String trayName; + + /** + * 装载类型 + */ + @ApiModelProperty(value = "装载类型") + private Integer loadingType; + } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java index 53fe7bebb..84da5f512 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java @@ -62,4 +62,6 @@ public interface IWarehouseGoodsAllocationClient { List getAllocationInforByIds(@RequestParam("ids") String [] ids); + @GetMapping(TOP+ "/findByAllocationQrCode") + WarehouseGoodsAllocationEntity findByAllocationQrCode(@RequestParam String positions); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTrayClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTrayClient.java index 19344b550..252d32087 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTrayClient.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTrayClient.java @@ -109,4 +109,11 @@ public class BasicdataTrayClient implements IBasicdataTrayClient { return basicdataTrayService.getOne(queryWrapper); } + @Override + public BasicdataTrayEntity findByTrayName(String positions) { + return basicdataTrayService.list(Wrappers.query().lambda() + .eq(BasicdataTrayEntity::getPalletName,positions) + ).get(0); + } + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java index 699b4ef11..a6a1833d4 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java @@ -218,6 +218,7 @@ public class WarehouseWarehousingEntryController extends BladeController { warehousingEntryDetailExcel.setPackagingSpecifications("1"); warehousingEntryDetailExcel.setCreateInventory(100); warehousingEntryDetailExcel.setPositions("存放位置 选填"); + warehousingEntryDetailExcel.setLoadingType("存放类型 1-库位 2-托盘 "); warehousingEntryDetailExcel.setRemark("备注 选填"); list.add(warehousingEntryDetailExcel); ExcelUtil.export(response, "仓库入库单数据" + DateUtil.time(), "仓库入库单数据表", list, WarehousingEntryDetailExcel.class); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java index 35a1e2463..5c64bbcbf 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java @@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ContentRowHeight; import com.alibaba.excel.annotation.write.style.HeadRowHeight; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -164,12 +165,22 @@ public class WarehousingEntryDetailExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("入库数量") private Integer createInventory; + + /** * 存放位置 */ @ColumnWidth(20) @ExcelProperty("存放位置") private String positions; + + /** + * 装载类型 1- 库位 2- 托盘 + */ + @ExcelProperty("存放类型") + @ApiModelProperty(value = "装载类型 1- 库位 2- 托盘") + private String loadingType; + /** * 备注 */ @@ -178,4 +189,7 @@ public class WarehousingEntryDetailExcel implements Serializable { private String remark; + + + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseGoodsAllocationClient.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseGoodsAllocationClient.java index 02a75eed6..d82ad97ee 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseGoodsAllocationClient.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseGoodsAllocationClient.java @@ -17,6 +17,7 @@ package com.logpm.warehouse.feign; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity; import com.logpm.warehouse.service.IWarehouseGoodsAllocationService; import lombok.AllArgsConstructor; @@ -70,4 +71,11 @@ public class WarehouseGoodsAllocationClient implements IWarehouseGoodsAllocation return warehouseGoodsAllocationService.selectAllocationInfo(lss); } + + @Override + public WarehouseGoodsAllocationEntity findByAllocationQrCode(String positions) { + return warehouseGoodsAllocationService.list(Wrappers.query().lambda() + .eq(WarehouseGoodsAllocationEntity::getQrCode,positions) + ).get(0); + } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java index 38cb4ccc5..f4fd2651e 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java @@ -28,22 +28,30 @@ import com.logpm.basic.entity.BasicMaterialEntity; import com.logpm.basic.feign.IBasicMaterialClient; import com.logpm.basicdata.entity.BasicdataClientEntity; import com.logpm.basicdata.entity.BasicdataStoreBrandEntity; +import com.logpm.basicdata.entity.BasicdataTrayEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataClientClient; import com.logpm.basicdata.feign.IBasicdataStoreBrandClient; +import com.logpm.basicdata.feign.IBasicdataTrayClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.distribution.entity.DistributionStockListEntity; import com.logpm.distribution.entity.DistributionStockListInfoEntity; import com.logpm.distribution.feign.IDistributionStockListClient; import com.logpm.distribution.feign.IDistributionStockListInfoClient; import com.logpm.distribution.vo.DistributionStockListVO; +import com.logpm.warehouse.dto.UpShelfPackageDTO; +import com.logpm.warehouse.dto.UpShelfStockDTO; import com.logpm.warehouse.dto.WarehouseWarehousingEntryDTO; +import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity; import com.logpm.warehouse.entity.WarehouseWarehouseEntity; import com.logpm.warehouse.entity.WarehouseWarehousingDetailEntity; import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity; import com.logpm.warehouse.excel.WarehouseWarehousingEntryExcel; import com.logpm.warehouse.excel.WarehousingEntryDetailExcel; +import com.logpm.warehouse.feign.IWarehouseGoodsAllocationClient; import com.logpm.warehouse.mapper.WarehouseWarehousingEntryMapper; +import com.logpm.warehouse.service.IWarehouseTrayTypeService; +import com.logpm.warehouse.service.IWarehouseUpdownTypeService; import com.logpm.warehouse.service.IWarehouseWarehousingDetailService; import com.logpm.warehouse.service.IWarehouseWarehousingEntryService; import com.logpm.warehouse.vo.WarehouseWarehousingEntryVO; @@ -86,6 +94,10 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl list = new ArrayList<>(); + UpShelfStockDTO upShelfStockDTO = new UpShelfStockDTO(); + upShelfStockDTO.setMaterialCode(entity.getCargoNumber()); + upShelfStockDTO.setMarketId(entity.getMarketId()); + upShelfStockDTO.setAllocationId(warehousingDetail.getAllocationId()); + upShelfStockDTO.setIncomingBatch(entity.getIncomingBatch()); + upShelfStockDTO.setMaterialName(entity.getDescriptionGoods()); + upShelfStockDTO.setNum(num); + upShelfStockDTO.setWarehouseId(entity.getWarehouseId()); + list.add(upShelfStockDTO); + warehouseUpdownTypeService.upShelfStockList(list,warehousingDetail.getAllocationId(),entity.getWarehouseId(),"入库单录入数量上架至"+warehousingDetail.getAllocationName()+num+"件"); + }else { + //进行打托操作 + warehouseTrayTypeService.enterStockNoDataMaterialCode(warehousingDetail.getTrayId().toString(),"100",entity.getCargoNumber(),entity.getMarketId(),num,entity.getIncomingBatch(),entity.getWarehouseId(),"入库单录入数量,打托至"+warehousingDetail.getTrayName()+num+"件"); + } + + } + + DistributionStockListInfoEntity distributionStockListInfo = new DistributionStockListInfoEntity(); BeanUtil.copyProperties(entity, distributionStockListInfo); @@ -396,9 +431,7 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl data, Boolean isCovered) { //分组 - Map> collect = data.stream().map(x -> { - return x; - }).collect(Collectors.groupingBy(o -> { + Map> collect = data.stream().collect(Collectors.groupingBy(o -> { System.out.println("====<<<<<<<<" + o); if (ObjectUtils.isEmpty(o) || ObjectUtils.isNull(o.getCustomerName()) || ObjectUtils.isNull(o.getCustomerCode())) { return ""; @@ -490,6 +523,28 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl