bms改造;

This commit is contained in:
王奎兴
2026-09-04 11:11:39 +08:00
parent 2c60dc8f84
commit 6108606daa
54 changed files with 1052 additions and 81 deletions
@@ -69,6 +69,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="chargeStandard" column="charge_standard" />
<result property="chargeStandardClass" column="charge_standard_class" />
<result property="isNormalMaterial" column="is_normal_material" />
<result property="monthlyWarehouseRent" column="monthly_warehouse_rent" />
<result property="halfMonthWarehouseRent" column="half_month_warehouse_rent" />
<result property="monthlyWarehouseRentUnit" column="monthly_warehouse_rent_unit" />
<result property="halfMonthWarehouseRentUnit" column="half_month_warehouse_rent_unit" />
</resultMap>
@@ -78,7 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
material_shape_name, a.material_size, a.material_length, a.material_width, a.material_height, a.remark, a.nullify, a.create_time, a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag, a.common,
sku_code, a.unit_price, a.currency, a.origin_country, a.hs_code, a.declaration_unit, a.statutory_unit, a.statutory_second_unit, a.copy_code,
a.push_status,a.push_time,a.push_by,a.goods_type,a.gross_weight,a.push_by_name,a.unit,a.INSURE_AMOUNT,a.CHARGE_STANDARD,
specification_model as specification_model,nvl(b.stock_qty,0) as stock_quantity,c.charge_standard as charge_standard_class,a.is_normal_material
specification_model as specification_model,nvl(b.stock_qty,0) as stock_quantity,c.charge_standard as charge_standard_class,a.is_normal_material,
a.monthly_warehouse_rent, a.half_month_warehouse_rent, a.monthly_warehouse_rent_unit, a.half_month_warehouse_rent_unit
from material_base_info a left join (
select material_base_info_id, sum(INVENTORY_QUANTITY) as stock_qty from MATERIAL_INVENTORY group by material_base_info_id
@@ -65,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="inOrderNumber" column="in_order_number" />
<result property="lotNumber" column="lot_number" />
<result property="specificationModel" column="specification_model" />
<result property="lastBillingTime" column="last_billing_time" />
</resultMap>
@@ -88,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.BATCH_REF_NO, a.SHEET_REF_NO, a.BOX_PALLET_NO,nvl(a.unit_name,b.unit_name) as unit_name,
a.bar_code as inv_bar_code,
a.in_order_number,a.lot_number,
a.last_billing_time,
CASE WHEN IFNULL(sum(a.inventory_quantity), 0) = 0 THEN 1 ELSE 0 END as sort_order
</sql>
@@ -112,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.BATCH_REF_NO, a.SHEET_REF_NO, a.BOX_PALLET_NO,nvl(a.unit_name,b.unit_name) as unit_name,
a.bar_code as inv_bar_code,
a.in_order_number,a.lot_number,
a.last_billing_time,
CASE WHEN IFNULL(sum(a.inventory_quantity), 0) = 0 THEN 1 ELSE 0 END as sort_order
</sql>
@@ -263,6 +266,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="expiryDateEnd != null and expiryDateEnd != ''">
and a.expiry_date <![CDATA[ < ]]> DATEADD(DAY, 1, #{expiryDateEnd})
</if>
<if test="lastBillingTimeStart != null and lastBillingTimeStart != ''">
and a.last_billing_time >= #{lastBillingTimeStart}
</if>
<if test="lastBillingTimeEnd != null and lastBillingTimeEnd != ''">
and a.last_billing_time <![CDATA[ < ]]> DATEADD(DAY, 1, #{lastBillingTimeEnd})
</if>
</sql>
<!-- 与 selectMaterialInventoryPo1 相同条件,表别名为 mi(用于 queryListByWl 最新明细子查询) -->
@@ -381,6 +390,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="boxPalletNo != null and boxPalletNo != ''">
and mi.BOX_PALLET_NO like concat('%', #{boxPalletNo}, '%')
</if>
<if test="lastBillingTimeStart != null and lastBillingTimeStart != ''">
and mi.last_billing_time >= #{lastBillingTimeStart}
</if>
<if test="lastBillingTimeEnd != null and lastBillingTimeEnd != ''">
and mi.last_billing_time <![CDATA[ < ]]> DATEADD(DAY, 1, #{lastBillingTimeEnd})
</if>
</sql>
<select id="queryList" parameterType="com.mhd.wms.domain.materialInventory.repository.todo.MaterialInventoryDO" resultMap="MaterialInventoryResult">
@@ -537,6 +552,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
MAX(a.batch_ref_no) AS batch_ref_no, MAX(a.sheet_ref_no) AS sheet_ref_no, MAX(a.box_pallet_no) AS box_pallet_no,
MAX(a.bar_code) AS inv_bar_code,
MAX(a.in_order_number) AS in_order_number, MAX(a.lot_number) AS lot_number,
MAX(a.last_billing_time) AS last_billing_time,
MAX(b.specification_model) AS specification_model,
MAX(b.material_code) AS material_code, MAX(b.material_name) AS material_name,
CASE WHEN IFNULL(SUM(a.inventory_quantity), 0) = 0 THEN 1 ELSE 0 END AS sort_order
@@ -629,6 +645,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
IFNULL(SUM(a.VOLUME), 0) AS VOLUME,
MIN(a.create_time) AS create_time,
MAX(a.update_time) AS update_time,
MAX(a.last_billing_time) AS last_billing_time,
CASE WHEN IFNULL(SUM(a.inventory_quantity), 0) = 0 THEN 1 ELSE 0 END AS sort_order
</sql>
@@ -728,6 +745,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateByName" column="update_by_name" />
<result property="delFlag" column="del_flag" />
<result property="lastBillingTime" column="last_billing_time" />
</resultMap>
<!-- 1-按货主 2-按物料 3-按批次 4-按库位 5-按物料/库位 6-按容器 0-全部 -->
@@ -1705,7 +1723,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT *
FROM MATERIAL_INVENTORY
WHERE EXTRACT(DAY FROM CREATE_TIME) = EXTRACT(DAY FROM SYSDATE - 1) AND INVENTORY_QUANTITY > 0
AND DEL_FLAG = 1 AND SHIIPER_ID = #{shipperId}
AND DEL_FLAG = 1 AND SHIPPER_ID = #{shipperId}
</select>
@@ -1725,21 +1743,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="querySetlleByShipperId" parameterType="java.lang.Long" resultType="java.util.Map">
SELECT
SETTLEMENT_ENTITY as settlementEntity,
SETTLEMENT_ENTITY_ID as settlementEntityId,
SETTLEMENT_CUSTOMERS_CODE as settlementCustomersCode,
SETTLEMENT_CUSTOMERS_ID as settlementCustomersId
FROM NGWL_TEST_OMS.SETTLEMENT_CUSTOMERS where 1=1 and
SETTLEMENT_ENTITY_ID = #{settlementEntityId}
SETTLEMENT_ENTITY as "settlementEntity",
SETTLEMENT_ENTITY_ID as "settlementEntityId",
SETTLEMENT_CUSTOMERS_CODE as "settlementCustomersCode",
SETTLEMENT_CUSTOMERS_ID as "settlementCustomersId"
FROM NGWL_TEST_BMS.SETTLEMENT_CUSTOMERS where 1=1 and
SETTLEMENT_ENTITY_ID = #{shipperId} AND DEL_FLAG = 1
</select>
<select id="queryContract" parameterType="java.lang.Long" resultType="java.util.Map">
SELECT
CONTRACT_MANAGE_ID as contractManageId,
ORIGINAL_CONTRACT_NUMBER as originalContractNumber,
CONTRACT_NUMBER as contractNumber,
CONTRACT_NAME as contractName
FROM NGWL_TEST_SYSTEM.CONTRACT_MANAGE where 1=1 and
SETTLEMENT_CUSTOMERS_ID = #{shipperId}
CONTRACT_MANAGE_ID AS "contractManageId",
ORIGINAL_CONTRACT_NUMBER AS "originalContractNumber",
CONTRACT_NUMBER AS "contractNumber",
CONTRACT_NAME AS "contractName"
FROM
NGWL_TEST_SYSTEM.CONTRACT_MANAGE sys
LEFT JOIN NGWL_TEST_BMS.SETTLEMENT_CUSTOMERS bms ON sys.SETTLEMENT_CUSTOMERS_ID = bms.SETTLEMENT_CUSTOMERS_ID
WHERE
1 = 1
AND CONTRACT_MANAGE_ID = #{contractManageId} AND DEL_FLAG = 1
</select>
<select id="queryShipperParameters" resultType="java.util.Map">
SELECT
PARAMETERS_NAME AS "parametersName",
CONTENT AS "content",
CONTRACT_NUMBER AS "contractNumber",
SETTLEMENT_CUSTOMERS_ID AS "settlementCustomersId",
CONTRACT_MANAGE_ID AS "contractManageId"
FROM
NGWL_TEST_BMS.SETTLEMENT_CUSTOMERS_PARAMETERS
WHERE
1 = 1
AND SETTLEMENT_ENTITY_ID = #{shipperId} and PARAMETERS_NAME = #{parametersName}
</select>
<select id="queryMaterialClassify" resultType="java.util.Map">
SELECT
MONTHLY_WAREHOUSE_RENT AS "monthlyWarehouseRent",
HALF_MONTH_WAREHOUSE_RENT AS "halfMonthWarehouseRent",
MONTHLY_WAREHOUSE_RENT_UNIT AS "monthlyWarehouseRentUnit",
HALF_MONTH_WAREHOUSE_RENT_UNIT AS "halfMonthWarehouseRentUnit"
FROM
NGWL_TEST_SYSTEM.MATERIAL_CLASSIFY
WHERE
1 = 1
AND MATERIAL_CLASSIFY_ID = #{id} AND DEL_FLAG = 1
</select>
</mapper>