From 6d74f1ae83bf63c21c112d8f85710585bc03a302 Mon Sep 17 00:00:00 2001 From: faramita <1246063744@qq.com> Date: Fri, 13 Dec 2024 12:03:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8):=20=E5=A2=9E=E5=8A=A0=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6(=E5=BA=93=E5=AD=98=E5=A4=A7=E4=BA=8E0),?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mom/wms/dto/InventoryQueryReportDto.java | 2 ++ .../service/impl/InventoryQueryReportServiceImpl.java | 10 +++++----- .../mom/wms/mapper/InventoryQueryReportMapper.java | 6 +++--- .../resources/mapper/InventoryQueryReportMapper.xml | 10 ++++++++-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/mom-wms-api/src/main/java/com/foreverwin/mom/wms/dto/InventoryQueryReportDto.java b/mom-wms-api/src/main/java/com/foreverwin/mom/wms/dto/InventoryQueryReportDto.java index b37f762..8f95697 100644 --- a/mom-wms-api/src/main/java/com/foreverwin/mom/wms/dto/InventoryQueryReportDto.java +++ b/mom-wms-api/src/main/java/com/foreverwin/mom/wms/dto/InventoryQueryReportDto.java @@ -172,4 +172,6 @@ public class InventoryQueryReportDto { private String createTime; private BigDecimal totalQty; + + private boolean allowZero; } 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 120d29b..f64e54b 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 @@ -45,11 +45,11 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ String rollType = inventoryQueryReportDto.getRollType(); List storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin()); List storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation()); - - IPage inventoryQueryReportDtoIPage = inventoryQueryReportMapper.retrieve(iPage, site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList); + boolean allowZero = inventoryQueryReportDto.isAllowZero(); + IPage inventoryQueryReportDtoIPage = inventoryQueryReportMapper.retrieve(iPage, site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero); if (CollectionUtil.isNotEmpty(inventoryQueryReportDtoIPage.getRecords())) { - BigDecimal totalQty = inventoryQueryReportMapper.retrieveTotalQty(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList); + BigDecimal totalQty = inventoryQueryReportMapper.retrieveTotalQty(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero); inventoryQueryReportDtoIPage.getRecords().get(0).setTotalQty(totalQty); } return inventoryQueryReportDtoIPage; @@ -77,9 +77,9 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ String rollType = inventoryQueryReportDto.getRollType(); List storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin()); List storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation()); + boolean allowZero = inventoryQueryReportDto.isAllowZero(); - - List inventoryQueryReportList = inventoryQueryReportMapper.retrieve(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList); + List inventoryQueryReportList = inventoryQueryReportMapper.retrieve(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero); for (InventoryQueryReportDto record : inventoryQueryReportList) { String state = record.getStatus(); 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 73229ba..b4ae1c0 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 @@ -23,11 +23,11 @@ import java.util.List; */ @Mapper public interface InventoryQueryReportMapper extends BaseMapper { - IPage retrieve(IPage iPage, @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); + IPage retrieve(IPage iPage, @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); - 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("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List storageBinList, @Param("storageLocationList") List storageLocationList); + 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("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List storageBinList, @Param("storageLocationList") List storageLocationList, @Param("allowZero")boolean allowZero); - 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); + 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); 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 e968796..b1ca225 100644 --- a/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml +++ b/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml @@ -143,8 +143,11 @@ #{storageLocation} + + AND WI.QTY_ON_HAND > 0 + - ORDER BY WI.CREATE_TIME DESC + ORDER BY WI.CREATE_TIME ASC, WI.INVENTORY_ID ASC, WI.STATUS ASC