From 5f595a41465ced5504fe40a97dc06ae9ba14bf18 Mon Sep 17 00:00:00 2001 From: tangyu <1184163753@qq.com> Date: Wed, 19 Mar 2025 14:56:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(mom-wms-db):=E5=A2=9E=E5=8A=A0=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=9F=A5=E8=AF=A2=E6=97=B6=E6=8C=89=E4=BB=B6=E6=95=B0?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 InventoryQueryReportMapper 接口中调整了 retrieve 和 retrieveTotalQty 方法的参数列表,添加了 qtyOnHand 参数- 在 InventoryQueryReportMapper.xml 文件中更新了 retrieve 的 SQL 语句,增加了对 qtyOnHand 的判断条件 - 在 InventoryQueryReportServiceImpl 类中更新了调用 retrieve 和 retrieveTotalQty 方法的代码,传入了 qtyOnHand 参数 --- .../mom/wms/service/impl/InventoryQueryReportServiceImpl.java | 2 +- .../foreverwin/mom/wms/mapper/InventoryQueryReportMapper.java | 2 +- .../src/main/resources/mapper/InventoryQueryReportMapper.xml | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mom-wms-core/src/main/java/com/foreverwin/mom/wms/service/impl/InventoryQueryReportServiceImpl.java b/mom-wms-core/src/main/java/com/foreverwin/mom/wms/service/impl/InventoryQueryReportServiceImpl.java index 1024439..e2fd13d 100644 --- a/mom-wms-core/src/main/java/com/foreverwin/mom/wms/service/impl/InventoryQueryReportServiceImpl.java +++ b/mom-wms-core/src/main/java/com/foreverwin/mom/wms/service/impl/InventoryQueryReportServiceImpl.java @@ -65,7 +65,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ IPage inventoryQueryReportDtoIPage = inventoryQueryReportMapper.retrieve(iPage, site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder,qtyOnHand, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, bigBatchNoList, isSecrecy); if (CollectionUtil.isNotEmpty(inventoryQueryReportDtoIPage.getRecords())) { - BigDecimal totalQty = inventoryQueryReportMapper.retrieveTotalQty(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, isSecrecy); + BigDecimal totalQty = inventoryQueryReportMapper.retrieveTotalQty(site,qtyOnHand, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, isSecrecy); inventoryQueryReportDtoIPage.getRecords().get(0).setTotalQty(totalQty); } return inventoryQueryReportDtoIPage; diff --git a/mom-wms-db/src/main/java/com/foreverwin/mom/wms/mapper/InventoryQueryReportMapper.java b/mom-wms-db/src/main/java/com/foreverwin/mom/wms/mapper/InventoryQueryReportMapper.java index 0d00463..849792a 100644 --- a/mom-wms-db/src/main/java/com/foreverwin/mom/wms/mapper/InventoryQueryReportMapper.java +++ b/mom-wms-db/src/main/java/com/foreverwin/mom/wms/mapper/InventoryQueryReportMapper.java @@ -31,7 +31,7 @@ public interface InventoryQueryReportMapper extends BaseMapper { List retrieve(@Param("site") String site, @Param("erpStorageLocationList") List erpStorageLocationList, @Param("inventoryIdList") List inventoryIdList, @Param("carrierList") List carrierList, @Param("statusList") List statusList, @Param("itemList") List itemList, @Param("batchNoList") List batchNoList, @Param("vendorBatchNoList") List vendorBatchNoList, @Param("qualityInspectionStatusList") List qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder,@Param("qtyOnHand")BigDecimal qtyOnHand, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List storageBinList, @Param("storageLocationList") List storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List shopOrderList, @Param("supplierBarcodeList") List supplierBarcodeList, @Param("bigBatchNoList") List bigBatchNoList, @Param("isSecrecy") String isSecrecy); - BigDecimal retrieveTotalQty(@Param("site") String site, @Param("erpStorageLocationList") List erpStorageLocationList, @Param("inventoryIdList") List inventoryIdList, @Param("carrierList") List carrierList, @Param("statusList") List statusList, @Param("itemList") List itemList, @Param("batchNoList") List batchNoList, @Param("vendorBatchNoList") List vendorBatchNoList, @Param("qualityInspectionStatusList") List qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List storageBinList, @Param("storageLocationList") List storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List shopOrderList, @Param("supplierBarcodeList") List supplierBarcodeList, @Param("isSecrecy") String isSecrecy); + BigDecimal retrieveTotalQty(@Param("site") String site, @Param("qtyOnHand")BigDecimal qtyOnHand,@Param("erpStorageLocationList") List erpStorageLocationList, @Param("inventoryIdList") List inventoryIdList, @Param("carrierList") List carrierList, @Param("statusList") List statusList, @Param("itemList") List itemList, @Param("batchNoList") List batchNoList, @Param("vendorBatchNoList") List vendorBatchNoList, @Param("qualityInspectionStatusList") List qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List storageBinList, @Param("storageLocationList") List storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List shopOrderList, @Param("supplierBarcodeList") List supplierBarcodeList, @Param("isSecrecy") String isSecrecy); IPage doRetrieveInventoryDetailed(Page page, @Param("site") String site, @Param("palletList") List palletList, @Param("boxList") List boxList, @Param("volumeList") List volumeList, @Param("status") String status, @Param("itemList") List itemList, @Param("storageLocationList") List storageLocationList, @Param("storageBinList") List storageBinList, @Param("groesList") List groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List qualityInspectionStatusList, @Param("sequence") boolean sequence , @Param("diffValue") Integer diffValue, @Param("customerList") List customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List historyGroesList, @Param("rejudg") boolean rejudg, @Param("updateStartDateTime") LocalDateTime updateStartDateTime, @Param("updateEndDateTime") LocalDateTime updateEndDateTime, @Param("shopOrder") String shopOrder, @Param("shopOrderType") String shopOrderType, @Param("zypsqd") String zypsqd); diff --git a/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml b/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml index 8142963..171a051 100644 --- a/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml +++ b/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml @@ -205,6 +205,10 @@ LEFT JOIN WIP.CUSTOM_FIELDS CF ON CF.HANDLE = I.HANDLE AND CF.FIELD_NAME = 'U_ITEM' WI.SITE = #{site} + + + AND wi.qty_on_hand =#{qtyOnHand} + AND WI.ERP_STORAGE_LOCATION IN