feat(mom-wms-db):增加库存查询时按件数过滤功能

- 在 InventoryQueryReportMapper 接口中调整了 retrieve 和 retrieveTotalQty 方法的参数列表,添加了 qtyOnHand 参数- 在 InventoryQueryReportMapper.xml 文件中更新了 retrieve 的 SQL 语句,增加了对 qtyOnHand 的判断条件
- 在 InventoryQueryReportServiceImpl 类中更新了调用 retrieve 和 retrieveTotalQty 方法的代码,传入了 qtyOnHand 参数
This commit is contained in:
tangyu 2025-03-19 14:56:30 +08:00
parent 8f1ccf0353
commit 5f595a4146
3 changed files with 6 additions and 2 deletions

View File

@ -65,7 +65,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
IPage<InventoryQueryReportDto> 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;

View File

@ -31,7 +31,7 @@ public interface InventoryQueryReportMapper extends BaseMapper<Inventory> {
List<InventoryQueryReportDto> retrieve(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder,@Param("qtyOnHand")BigDecimal qtyOnHand, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List<String> shopOrderList, @Param("supplierBarcodeList") List<String> supplierBarcodeList, @Param("bigBatchNoList") List<String> bigBatchNoList, @Param("isSecrecy") String isSecrecy);
BigDecimal retrieveTotalQty(@Param("site") String site, @Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List<String> shopOrderList, @Param("supplierBarcodeList") List<String> supplierBarcodeList, @Param("isSecrecy") String isSecrecy);
BigDecimal retrieveTotalQty(@Param("site") String site, @Param("qtyOnHand")BigDecimal qtyOnHand,@Param("erpStorageLocationList") List<String> erpStorageLocationList, @Param("inventoryIdList") List<String> inventoryIdList, @Param("carrierList") List<String> carrierList, @Param("statusList") List<String> statusList, @Param("itemList") List<String> itemList, @Param("batchNoList") List<String> batchNoList, @Param("vendorBatchNoList") List<String> vendorBatchNoList, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("inventorySpecialMarking") String inventorySpecialMarking, @Param("dnOrder") String dnOrder, @Param("dnOrderSeq") Integer dnOrderSeq, @Param("rollType") String rollType, @Param("storageBinList") List<String> storageBinList, @Param("storageLocationList") List<String> storageLocationList, @Param("allowZero") boolean allowZero, @Param("typeNo") String typeNo, @Param("shopOrderList") List<String> shopOrderList, @Param("supplierBarcodeList") List<String> supplierBarcodeList, @Param("isSecrecy") String isSecrecy);
IPage<InventoryQueryReportDto> doRetrieveInventoryDetailed(Page<InventoryQueryReportDto> page, @Param("site") String site, @Param("palletList") List<String> palletList, @Param("boxList") List<String> boxList, @Param("volumeList") List<String> volumeList, @Param("status") String status, @Param("itemList") List<String> itemList, @Param("storageLocationList") List<String> storageLocationList, @Param("storageBinList") List<String> storageBinList, @Param("groesList") List<String> groesList, @Param("width") BigDecimal width, @Param("bismt") String bismt, @Param("qualityInspectionStatusList") List<String> qualityInspectionStatusList, @Param("sequence") boolean sequence
, @Param("diffValue") Integer diffValue, @Param("customerList") List<String> customerList, @Param("startDateTime") LocalDateTime startDateTime, @Param("endDateTime") LocalDateTime endDateTime, @Param("itemGroupList") List<String> itemGroupList, @Param("disparitySelect") String disparitySelect, @Param("packageType") String packageType, @Param("historyGroesList") List<String> 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);

View File

@ -205,6 +205,10 @@
LEFT JOIN WIP.CUSTOM_FIELDS CF ON CF.HANDLE = I.HANDLE AND CF.FIELD_NAME = 'U_ITEM'
<where>
WI.SITE = #{site}
<if test="qtyOnHand != null">
AND wi.qty_on_hand =#{qtyOnHand}
</if>
<if test="erpStorageLocationList != null and erpStorageLocationList.size > 0">
AND WI.ERP_STORAGE_LOCATION IN
<foreach collection="erpStorageLocationList" item="erpStorageLocation" open="(" separator="," close=")">