定时任务添加散租过滤条件;

This commit is contained in:
王奎兴
2026-09-15 14:52:28 +08:00
parent 0d9ea32f85
commit 5c4e460cac
3 changed files with 9 additions and 2 deletions
@@ -1021,6 +1021,8 @@ public class MaterialInventoryApplicationService {
//未查询到库存记录 //未查询到库存记录
if (materialInventoryPOS==null || materialInventoryPOS.size()==0) return; if (materialInventoryPOS==null || materialInventoryPOS.size()==0) return;
for (MaterialInventoryPO materialInventoryPO : materialInventoryPOS) { for (MaterialInventoryPO materialInventoryPO : materialInventoryPOS) {
String businessChargeType = materialInventoryPO.getBusinessChargeType();
if (!"散租".equals(businessChargeType)) continue;
Date createTime = materialInventoryPO.getCreateTime(); Date createTime = materialInventoryPO.getCreateTime();
Long materialBaseInfoId = materialInventoryPO.getMaterialBaseInfoId(); Long materialBaseInfoId = materialInventoryPO.getMaterialBaseInfoId();
String lotNumber = materialInventoryPO.getLotNumber(); String lotNumber = materialInventoryPO.getLotNumber();
@@ -277,4 +277,7 @@ public class MaterialInventoryPO extends MaterialBasePO {
@ApiModelProperty("半月仓租单位") @ApiModelProperty("半月仓租单位")
@Excel(name = "半月仓租单位") @Excel(name = "半月仓租单位")
private String halfMonthWarehouseRentUnit; private String halfMonthWarehouseRentUnit;
@ApiModelProperty("业务计价类型")
private String businessChargeType;
} }
@@ -75,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="halfMonthWarehouseRentUnit" column="half_month_warehouse_rent_unit" /> <result property="halfMonthWarehouseRentUnit" column="half_month_warehouse_rent_unit" />
<result property="halfMonthWarehouseRent" column="half_month_warehouse_rent" /> <result property="halfMonthWarehouseRent" column="half_month_warehouse_rent" />
<result property="monthlyWarehouseRent" column="monthly_warehouse_rent" /> <result property="monthlyWarehouseRent" column="monthly_warehouse_rent" />
<result property="businessChargeType" column="BUSINESS_CHARGE_TYPE" />
</resultMap> </resultMap>
@@ -1822,8 +1823,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="queryPushBms" resultMap="MaterialInventoryResult"> <select id="queryPushBms" resultMap="MaterialInventoryResult">
SELECT * SELECT *,
FROM MATERIAL_INVENTORY (SELECT BUSINESS_CHARGE_TYPE FROM NGWL_TEST_OMS.RESERVATION_STOCK_IN_ORDER WHERE EXECUTION_IN_ORDER_NUMBER = a.in_order_number) as BUSINESS_CHARGE_TYPE
FROM MATERIAL_INVENTORY a
WHERE EXTRACT(DAY FROM CREATE_TIME) = EXTRACT(DAY FROM SYSDATE - 1) AND INVENTORY_QUANTITY > 0 WHERE EXTRACT(DAY FROM CREATE_TIME) = EXTRACT(DAY FROM SYSDATE - 1) AND INVENTORY_QUANTITY > 0
AND DEL_FLAG = 1 AND SHIPPER_ID = #{shipperId} AND DEL_FLAG = 1 AND SHIPPER_ID = #{shipperId}
</select> </select>