feat(oms):出库明细查询

This commit is contained in:
zhaoqing
2026-07-24 11:24:10 +08:00
parent 60bc140195
commit 49f6832d3f
10 changed files with 324 additions and 0 deletions
@@ -448,4 +448,99 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getkcIdByUniqueId" parameterType="java.lang.Long" resultType="java.lang.Long">
select MATERIAL_INVENTORY_ID from "NGWL_TEST_WMS".OUT_MATERIAL_DETAIL where UNIQUE_ID = #{uniqueId}
</select>
<!-- ========== 出库明细查询(关联出库执行单) ========== -->
<resultMap type="com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailWithOrderPO"
id="OutMaterialDetailWithOrderResult" extends="MaterialDetailResult">
<result property="outOrderStatus" column="out_order_status" />
<result property="outOrderAuditStatus" column="out_order_audit_status" />
</resultMap>
<select id="queryOutOrderDetailList"
parameterType="com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO"
resultMap="OutMaterialDetailWithOrderResult">
select
a.material_detail_id, a.organization_id, a.organization_name, a.top_organization_id, a.unique_id,
a.out_order_number, a.material_base_info_id, a.material_code, a.material_name, a.bar_code,
a.weight_limit, a.volume_limit, a.quantity, a.allocation_quantity, a.picking_quantity, a.check_quantity,
a.pack_id, a.pack_code, a.pack_name, a.pack_detail_id, a.unit_code, a.unit_name,
a.material_warehouse_control_id, a.serial_number_manage,
a.material_inventory_id, a.batch_number,
a.warehouse_id, a.warehouse_code, a.warehouse_name,
a.storage_section_id, a.storage_code, a.storage_name,
a.storage_location_id, a.storage_location_code, a.storage_location_name,
a.level, a.parent_unique_id, a.allow_modify,
a.container_id, a.container_code, a.container_type, a.container_type_name,
a.material_status_code, a.material_status_name,
a.remark, a.create_time, a.create_by, a.create_by_name, a.gen_picking_order,
a.update_time, a.update_by, a.update_by_name, a.del_flag,
a.over_stock_id, a.over_stock_status, a.over_stock_type,
a.COMMODITY_NAME, a.COMMODITY_NO, a.MATERIAL_NO,
a.SPECIFICATION_MODEL, a.SKUCODE, a.INVOICE_NO, a.LITER, a.SIZE,
a.DECLARE_UNIT, a.BATCH_REF_NO, a.SHEET_REF_NO,
a.COUNTRY_OF_ORIGIN, a.BOX_PALLET_NO, a.CURRENCY,
a.DECLARE_QUANTITY, a.CASE_COUNT, a.PIECE_COUNT, a.OUTBOUND_QUANTITY,
a.TOTAL_NET_WEIGHT, a.TOTAL_GROSS_WEIGHT, a.TOTAL_VOLUME, a.TOTAL_AREA, a.TOTAL_AMOUNT,
a.UNIT, a.EXT_ATTR_1, a.EXT_ATTR_2, a.PRODUCTION_DATE, a.EXPIRY_DATE, a.INVENTORY_DATE,
a.EXT_ATTR_3, a.EXT_ATTR_4, a.INVENTORY_QUANTITY,
a.contract_fee, a.monthly_warehouse_fee, a.half_month_wh_fee, a.discount_rate,
a.single_volume, a.single_gross_weight, a.lot_no, a.in_order_number,
a.stock_unit, a.stock_quantity, a.inventory_quantity,
a.line_num_gw, a.spec_gw, a.unit_gw, a.qty_gw,
a.erp_curr_gw, a.erp_price_gw, a.amount_gw, a.in_order_number_gw, a.in_line_num_gw,
b.status as out_order_status,
b.audit_status as out_order_audit_status
from execution_out_material_detail a
left join execution_stock_out_order b on a.out_order_number = b.out_order_number
<where>
<if test="organizationId != null ">
and a.organization_id = #{organizationId}
</if>
<if test="topOrganizationId != null ">
and a.top_organization_id = #{topOrganizationId}
</if>
<if test="materialBaseInfoId != null ">
and a.material_base_info_id = #{materialBaseInfoId}
</if>
<if test="materialCode != null and materialCode != ''">
and a.material_code = #{materialCode}
</if>
<if test="materialName != null and materialName != ''">
and a.material_name like concat('%', #{materialName}, '%')
</if>
<if test="outOrderNumber != null and outOrderNumber != ''">
and b.out_order_number like concat('%', #{outOrderNumber}, '%')
</if>
<if test="warehouseId != null ">
and b.warehouse_id = #{warehouseId}
</if>
<if test="warehouseCode != null and warehouseCode != ''">
and b.warehouse_code = #{warehouseCode}
</if>
<if test="warehouseName != null and warehouseName != ''">
and b.warehouse_name like concat('%', #{warehouseName}, '%')
</if>
<if test="shipperId != null ">
and b.shipper_id = #{shipperId}
</if>
<if test="shipperName != null and shipperName != ''">
and b.shipper_name like concat('%', #{shipperName}, '%')
</if>
<if test="outOrderTypeCode != null and outOrderTypeCode != ''">
and b.order_type_code = #{outOrderTypeCode}
</if>
<if test="outStatus != null ">
and b.status = #{outStatus}
</if>
<if test="outOrderExpectStartTime != null">
and b.expect_time &gt;= #{outOrderExpectStartTime}
</if>
<if test="outOrderExpectEndTime != null">
and b.expect_time &lt;= #{outOrderExpectEndTime}
</if>
and a.del_flag = 1
and b.del_flag = 1
</where>
order by a.create_time desc
</select>
</mapper>