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