From ace15a130ae529880324b5d3449c241d7f4d5172 Mon Sep 17 00:00:00 2001 From: xs Date: Thu, 19 Sep 2024 17:51:50 +0800 Subject: [PATCH] =?UTF-8?q?3.1.0=20WMS:=20PDA=E6=8E=A5=E5=8F=A3=E2=80=94?= =?UTF-8?q?=E2=80=94=E7=9B=98=E5=BA=93=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/domain/WmsInventoryCheckDetail.java | 61 ++++++++++++++++--- .../impl/WmsInventoryCheckServiceImpl.java | 28 +++++---- .../wms/WmsInventoryCheckDetailMapper.xml | 24 +++++--- .../mapper/wms/WmsInventoryCheckMapper.xml | 8 +-- 4 files changed, 86 insertions(+), 35 deletions(-) diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsInventoryCheckDetail.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsInventoryCheckDetail.java index d5d60ba..390756b 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsInventoryCheckDetail.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsInventoryCheckDetail.java @@ -33,9 +33,11 @@ public class WmsInventoryCheckDetail extends BaseEntity @Excel(name = "库位编码") private String locationCode; - /** 物料批次号 */ - @Excel(name = "物料批次号") - private String materialBatch; + /**物料条码*/ + private String materialBarcode; + + + /** 库存类型(1原材料,2半成品,3成品) */ @Excel(name = "库存类型(1原材料,2半成品,3成品)") @@ -83,6 +85,15 @@ public class WmsInventoryCheckDetail extends BaseEntity private String materialName; + private String materialSpec; + + private String poNo; + + private String saleorderCode; + + private String materialBatch; + + /** 盘点状态(0待盘点,1盘点中,2盘点完成); 多个以,隔开 */ private String checkStatusStr; @@ -122,15 +133,15 @@ public class WmsInventoryCheckDetail extends BaseEntity { return locationCode; } - public void setMaterialBatch(String materialBatch) - { - this.materialBatch = materialBatch; + + public String getMaterialBarcode() { + return materialBarcode; } - public String getMaterialBatch() - { - return materialBatch; + public void setMaterialBarcode(String materialBarcode) { + this.materialBarcode = materialBarcode; } + public void setStockType(String stockType) { this.stockType = stockType; @@ -239,6 +250,38 @@ public class WmsInventoryCheckDetail extends BaseEntity this.materialName = materialName; } + public String getMaterialSpec() { + return materialSpec; + } + + public void setMaterialSpec(String materialSpec) { + this.materialSpec = materialSpec; + } + + public String getPoNo() { + return poNo; + } + + public void setPoNo(String poNo) { + this.poNo = poNo; + } + + public String getSaleorderCode() { + return saleorderCode; + } + + public void setSaleorderCode(String saleorderCode) { + this.saleorderCode = saleorderCode; + } + + public String getMaterialBatch() { + return materialBatch; + } + + public void setMaterialBatch(String materialBatch) { + this.materialBatch = materialBatch; + } + public String getCheckStatusStr() { return checkStatusStr; } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsInventoryCheckServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsInventoryCheckServiceImpl.java index 79dd029..be0e332 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsInventoryCheckServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsInventoryCheckServiceImpl.java @@ -149,15 +149,17 @@ public class WmsInventoryCheckServiceImpl implements IWmsInventoryCheckService { List wmsRawStocks = wmsRawStockMapper.selectWmsRawStockInList(queryRawStock); if (wmsRawStocks != null && !wmsRawStocks.isEmpty()) { //需要根据materialid过滤聚合,盘点是盘点某个物料,不能按物料条码进行盘点 - Map> wmsRawStockMap = wmsRawStocks.stream() - .collect(Collectors.groupingBy(WmsRawStock::getMaterialId)); +// Map> wmsRawStockMap = wmsRawStocks.stream() +// .collect(Collectors.groupingBy(WmsRawStock::getMaterialId)); - for (Long materialId : wmsRawStockMap.keySet()) { + + for (WmsRawStock wmsRawStock : wmsRawStocks) { WmsInventoryCheckDetail wmsInventoryCheckDetail = new WmsInventoryCheckDetail(); - wmsInventoryCheckDetail.setMaterialId(materialId); + wmsInventoryCheckDetail.setMaterialId(wmsRawStock.getMaterialId()); + wmsInventoryCheckDetail.setMaterialBarcode(wmsRawStock.getInstockBatch()); wmsInventoryCheckDetail.setInventoryTime(0L); wmsInventoryCheckDetail.setStockType(WmsConstants.RWA_STOCK_STOCK_TYPE_RAW); -// wmsInventoryCheckDetail.setStockId(wmsRawStock.getRawStockId()); + wmsInventoryCheckDetail.setStockId(wmsRawStock.getRawStockId()); wmsInventoryCheckDetail.setLocationCode(locationCode); wmsInventoryCheckDetail.setCheckStatus(WmsConstants.WMS_INVENTORY_CHECK_DETAIL_STATUS_INVENTORYING); wmsInventoryCheckDetail.setCreateDate(currentDate); @@ -183,16 +185,16 @@ public class WmsInventoryCheckServiceImpl implements IWmsInventoryCheckService { List wmsProductStocks = wmsProductStockMapper.selectWmsProductStockInList(queryProductStock); if (wmsProductStocks != null && !wmsProductStocks.isEmpty()) { //需要根据materialid过滤聚合,盘点是盘点某个物料,不能按物料条码进行盘点 - Map> wmsProductStockMap = wmsProductStocks.stream() - .collect(Collectors.groupingBy(WmsProductStock::getProductId)); - for (Long productId : wmsProductStockMap.keySet()) { - List wmsProductStockList = wmsProductStockMap.get(productId); - WmsProductStock wmsProductStock = wmsProductStockList.get(0); +// Map> wmsProductStockMap = wmsProductStocks.stream() +// .collect(Collectors.groupingBy(WmsProductStock::getProductId)); + for (WmsProductStock wmsProductStock : wmsProductStocks) { +// List wmsProductStockList = wmsProductStockMap.get(productId); +// WmsProductStock wmsProductStock = wmsProductStockList.get(0); WmsInventoryCheckDetail wmsInventoryCheckDetail = new WmsInventoryCheckDetail(); - wmsInventoryCheckDetail.setMaterialId(productId); -// wmsInventoryCheckDetail.setMaterialBatch(wmsProductStock.getProductBatch()); + wmsInventoryCheckDetail.setMaterialId(wmsProductStock.getProductId()); + wmsInventoryCheckDetail.setMaterialBarcode(wmsProductStock.getProductBatch()); wmsInventoryCheckDetail.setStockType(wmsProductStock.getStockType()); -// wmsInventoryCheckDetail.setStockId(wmsProductStock.getProductStockId()); + wmsInventoryCheckDetail.setStockId(wmsProductStock.getProductStockId()); wmsInventoryCheckDetail.setInventoryTime(0L); wmsInventoryCheckDetail.setLocationCode(locationCode); wmsInventoryCheckDetail.setCheckStatus(WmsConstants.WMS_INVENTORY_CHECK_DETAIL_STATUS_INVENTORYING); diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckDetailMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckDetailMapper.xml index 17884cd..9823614 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckDetailMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckDetailMapper.xml @@ -9,7 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -26,10 +26,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + - select inventory_check_detail_id, inventory_check_id, material_id, location_code, material_batch, stock_type, stock_id, stock_amount, real_amount, check_status, inventory_time, erp_status, erp_amount, remark, create_by, create_date, update_by, update_date from wms_inventory_check_detail + select inventory_check_detail_id, inventory_check_id, material_id, location_code, material_barcode, stock_type, stock_id, stock_amount, real_amount, check_status, inventory_time, erp_status, erp_amount, remark, create_by, create_date, update_by, update_date from wms_inventory_check_detail @@ -157,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and wicd.inventory_check_id = #{inventoryCheckId} and wicd.material_id = #{materialId} and wicd.location_code = #{locationCode} - and wicd.material_batch = #{materialBatch} + and wicd.material_barcode = #{materialBarcode} and wicd.stock_type = #{stockType} and wicd.check_status = #{checkStatus} and wicd.check_status in (${checkStatusStr}) diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckMapper.xml index 5678867..4ba1289 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsInventoryCheckMapper.xml @@ -32,7 +32,7 @@ - + @@ -70,7 +70,7 @@