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 8f95697..0c26eac 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 @@ -165,6 +165,9 @@ public class InventoryQueryReportDto { @ExcelProperty("区域") private String storageLocation; + @ExcelProperty("物料类别") + private String typeNo; + /** * 入库时间 */ 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 f64e54b..a073283 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 @@ -43,10 +43,11 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ String dnOrder = inventoryQueryReportDto.getDnOrder(); Integer dnOrderSeq = inventoryQueryReportDto.getDnOrderSeq(); String rollType = inventoryQueryReportDto.getRollType(); + String typeNo = inventoryQueryReportDto.getTypeNo(); List storageBinList = splitSearchField(inventoryQueryReportDto.getStorageBin()); List storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation()); 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); + IPage inventoryQueryReportDtoIPage = inventoryQueryReportMapper.retrieve(iPage, site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder, dnOrderSeq, rollType, storageBinList, storageLocationList, allowZero,typeNo); 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); 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 b4ae1c0..3ad1b67 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,7 +23,7 @@ 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, @Param("allowZero")boolean allowZero); + 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, @Param("typeNo") String typeNo); 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); diff --git a/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml b/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml index b1ca225..5c2b382 100644 --- a/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml +++ b/mom-wms-db/src/main/resources/mapper/InventoryQueryReportMapper.xml @@ -40,6 +40,7 @@ , WC.CARRIER , WI.STATUS , I.ITEM + , ITY.TYPE_NO , I.DESCRIPTION AS ITEM_DESCRIPTION , WI.BATCH_NO , WI.VENDOR_BATCH_NO @@ -64,6 +65,7 @@ , WI.CREATE_TIME FROM WMS_INVENTORY WI INNER JOIN WIP.ITEM I ON I.HANDLE = WI.ITEM_BO + LEFT JOIN WIP.ITEM_TYPE ITY ON ITY.HANDLE = I.ITEM_TYPE_BO AND ITY.SITE = I.SITE LEFT JOIN WMS_CARRIER_MEMBER WCM ON WCM.CARRIER_OR_INVENTORY_BO = WI.HANDLE LEFT JOIN WMS_CARRIER WC ON WC.HANDLE = WCM.CARRIER_BO LEFT JOIN WMS_INVENTORY WI2 ON WI.PARENT_INVENTORY_BO = WI2.HANDLE @@ -146,6 +148,9 @@ AND WI.QTY_ON_HAND > 0 + + AND ITY.TYPE_NO = #{typeNo} + ORDER BY WI.CREATE_TIME ASC, WI.INVENTORY_ID ASC, WI.STATUS ASC