fix(库存查询报表):优化质检等级搜索条件;添加大批次字段

This commit is contained in:
chengzhaofeng 2025-03-18 14:13:57 +08:00 committed by liaohechuan
parent 50fb8811fd
commit 8f1ccf0353
4 changed files with 21 additions and 4 deletions

View File

@ -196,6 +196,12 @@ public class InventoryQueryReportDto {
@ExcelProperty("供应商条码")
private String supplierBarcode;
/**
* 大批次
*/
@ExcelProperty("大批次")
private String bigBatchNo;
/**
* 入库时间
*/

View File

@ -53,6 +53,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
List<String> storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation());
boolean allowZero = inventoryQueryReportDto.isAllowZero();
List<String> supplierBarcodeList = splitSearchField(inventoryQueryReportDto.getSupplierBarcode());
List<String> bigBatchNoList = splitSearchField(inventoryQueryReportDto.getBigBatchNo());
List<String> shopOrderList = splitSearchField(inventoryQueryReportDto.getShopOrder());
BigDecimal qtyOnHand = inventoryQueryReportDto.getQtyOnHand();
// 作业规则 IS_SECRCY为Y代表保密用IN;IS_SECRCY不为Y,不配置此作业规则,用 not in
@ -61,7 +62,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
if (StrUtil.isNotBlank(inventoryQueryReportDto.getIsSecrecy()) && "Y".equals(inventoryQueryReportDto.getIsSecrecy().toUpperCase())) {
isSecrecy = inventoryQueryReportDto.getIsSecrecy();
}
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, isSecrecy);
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);
@ -95,6 +96,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
List<String> storageLocationList = splitSearchField(inventoryQueryReportDto.getStorageLocation());
boolean allowZero = inventoryQueryReportDto.isAllowZero();
List<String> supplierBarcodeList = splitSearchField(inventoryQueryReportDto.getSupplierBarcode());
List<String> bigBatchNoList = splitSearchField(inventoryQueryReportDto.getBigBatchNo());
List<String> shopOrderList = splitSearchField(inventoryQueryReportDto.getShopOrder());
BigDecimal qtyOnHand = inventoryQueryReportDto.getQtyOnHand();
@ -105,7 +107,7 @@ public class InventoryQueryReportServiceImpl implements InventoryQueryReportServ
isSecrecy = inventoryQueryReportDto.getIsSecrecy();
}
List<InventoryQueryReportDto> inventoryQueryReportList = inventoryQueryReportMapper.retrieve(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder,qtyOnHand, dnOrderSeq,rollType, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, isSecrecy);
List<InventoryQueryReportDto> inventoryQueryReportList = inventoryQueryReportMapper.retrieve(site, erpStorageLocationList, inventoryIdList, carrierList, statusList, itemList, batchNoList, vendorBatchNoList, qualityInspectionStatusList, inventorySpecialMarking, dnOrder,qtyOnHand, dnOrderSeq,rollType, storageBinList, storageLocationList, allowZero, typeNo, shopOrderList, supplierBarcodeList, bigBatchNoList, isSecrecy);
for (InventoryQueryReportDto record : inventoryQueryReportList) {
String state = record.getStatus();

View File

@ -27,9 +27,9 @@ import java.util.List;
*/
@Mapper
public interface InventoryQueryReportMapper extends BaseMapper<Inventory> {
IPage<InventoryQueryReportDto> retrieve(IPage<InventoryQueryReportDto> iPage, @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("isSecrecy") String isSecrecy);
IPage<InventoryQueryReportDto> retrieve(IPage<InventoryQueryReportDto> iPage, @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);
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("isSecrecy") String isSecrecy);
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);

View File

@ -32,6 +32,7 @@
<result column="STORAGE_BIN" property="storageBin" />
<result column="STORAGE_LOCATION" property="storageLocation" />
<result column="CREATE_TIME" property="createTime" />
<result column="BIG_BATCH_NO" property="bigBatchNo" />
</resultMap>
<select id="retrieve" resultMap="BaseResultMap">
@ -67,6 +68,7 @@
, CF.FIELD_VALUE AS U_ITEM
, WI.ORIGINAL_QTY
, WI.SUPPLIER_BARCODE
, WI.BIG_BATCH_NO
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
@ -178,6 +180,13 @@
#{supplierBarcode}
</foreach>
</if>
<if test="bigBatchNoList != null and bigBatchNoList.size > 0">
AND WI.BIG_BATCH_NO IN
<foreach collection="bigBatchNoList" item="bigBatchNo" open="(" separator="," close=")">
#{bigBatchNo}
</foreach>
</if>
</where>
ORDER BY WI.CREATE_TIME ASC, WI.INVENTORY_ID ASC, WI.STATUS ASC
</select>