feat(oms):入库明细查询
This commit is contained in:
+101
@@ -358,4 +358,105 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="getkctzjl" resultType="com.mhd.oms.domain.executionInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO">
|
||||
select * from "NGWL_TEST_WMS".INVENTORY_ADJUSTMENT_RECORD where MATERIAL_BASE_INFO_ID = #{materialBaseInfoId} and RELATE_NO = #{orderNumber} and ADJUST_TYPE = #{adjustType}
|
||||
</select>
|
||||
|
||||
<!-- ========== 入库明细查询(关联入库执行单) ========== -->
|
||||
<resultMap type="com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailWithOrderPO" id="InMaterialDetailWithOrderResult" extends="MaterialDetailResult">
|
||||
<result property="inOrderStatus" column="in_order_status" />
|
||||
<result property="inOrderAuditStatus" column="in_order_audit_status" />
|
||||
</resultMap>
|
||||
|
||||
<select id="queryInOrderDetailList" parameterType="com.mhd.oms.domain.executionInMaterialDetail.repository.todo.QueryOrderOverStockDO"
|
||||
resultMap="InMaterialDetailWithOrderResult">
|
||||
select
|
||||
a.material_detail_id, a.organization_id, a.organization_name, a.top_organization_id, a.unique_id,
|
||||
a.in_order_number, a.material_base_info_id, a.material_code, a.material_name, a.bar_code,
|
||||
a.quantity, a.receipt_quantity, a.shelves_quantity,
|
||||
a.receipt_status, a.shelves_status, a.pack_id, a.pack_code, a.pack_name,
|
||||
a.pack_detail_id, a.unit_code, a.unit_name, a.unit_number, a.material_warehouse_control_id,
|
||||
a.serial_number_manage, a.quality_inspection_manage, a.quality_inspection_stage,
|
||||
a.quality_inspection_rule, a.quality_inspection_ratio, a.quality_inspection_term,
|
||||
a.quality_inspection_results, a.allow_overcharge, a.overcharge_ratio,
|
||||
a.batch_number, a.material_status_code, a.material_status_name,
|
||||
a.distribute_rule_id, a.distribute_rule_code, a.distribute_rule_name,
|
||||
a.container_id, a.container_code, a.container_type, a.container_type_name,
|
||||
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.remark, a.create_time, a.create_by, a.create_by_name,
|
||||
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.SPECIFICATION_MODEL, a.SKU_CODE, a.INVOICE_NO, a.LITER, a.DIMENSIONS,
|
||||
a.DECLARATION_UNIT, a.BATCH_REF_NO, a.SHEET_REF_NO,
|
||||
a.ORIGIN_COUNTRY, a.BOX_PALLET_NO, a.CURRENCY, a.UNIT,
|
||||
a.DECLARED_QUANTITY, a.BOX_COUNT, a.PIECE_COUNT, a.INBOUND_QUANTITY,
|
||||
a.TOTAL_NET_WEIGHT, a.TOTAL_GROSS_WEIGHT, a.TOTAL_VOLUME, a.TOTAL_AREA, a.TOTAL_PRICE,
|
||||
a.PRODUCTION_DATE, a.EXPIRY_DATE, a.INVENTORY_DATE,
|
||||
a.EXT_ATTR_1, a.EXT_ATTR_2, a.EXT_ATTR_3, a.EXT_ATTR_4,
|
||||
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.drink_date, a.fire_insure_fee, a.unit_price,
|
||||
a.inventory_before_quantity, a.allocation_before_quantity, a.freeze_before_quantity,
|
||||
a.inventory_after_quantity, a.allocation_after_quantity, a.freeze_after_quantity,
|
||||
a.net_weight, a.gross_weight, a.volume, a.area,
|
||||
a.adjusted_net_weight, a.adjusted_gross_weight, a.adjusted_volume, a.adjusted_area,
|
||||
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.lot_number, a.in_order_number_gw, a.in_line_num_gw,
|
||||
b.status as in_order_status,
|
||||
b.audit_status as in_order_audit_status
|
||||
from execution_in_material_detail a
|
||||
left join execution_stock_in_order b on a.in_order_number = b.in_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="inOrderNumber != null and inOrderNumber != ''">
|
||||
and b.in_order_number like concat('%', #{inOrderNumber}, '%')
|
||||
</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="inOrderTypeCode != null and inOrderTypeCode != ''">
|
||||
and b.order_type_code = #{inOrderTypeCode}
|
||||
</if>
|
||||
<if test="inStatus != null ">
|
||||
and b.status = #{inStatus}
|
||||
</if>
|
||||
<if test="inOrderExpectStartTime != null">
|
||||
and b.expect_time >= #{inOrderExpectStartTime}
|
||||
</if>
|
||||
<if test="inOrderExpectEndTime != null">
|
||||
and b.expect_time <= #{inOrderExpectEndTime}
|
||||
</if>
|
||||
and a.del_flag = 1
|
||||
and b.del_flag = 1
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user