提货单打印修改
This commit is contained in:
@@ -1,67 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mhd.wms.domain.stockOutOrder.repository.mapper.StockOutOrderMapper">
|
||||
|
||||
|
||||
<resultMap type="com.mhd.wms.domain.stockOutOrder.repository.po.StockOutOrderPO" id="StockOutOrderResult">
|
||||
<result property="outOrderId" column="out_order_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="noticeNumber" column="notice_number" />
|
||||
<result property="outOrderNumber" column="out_order_number" />
|
||||
<result property="status" column="status" />
|
||||
<result property="auditStatus" column="audit_status" />
|
||||
<result property="auditRemark" column="audit_remark" />
|
||||
<result property="auditBy" column="audit_by" />
|
||||
<result property="auditByName" column="audit_by_name" />
|
||||
<result property="auditTime" column="audit_time" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseCode" column="warehouse_code" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="shipperId" column="shipper_id" />
|
||||
<result property="shipperName" column="shipper_name" />
|
||||
<result property="orderTypeCode" column="order_type_code" />
|
||||
<result property="orderTypeName" column="order_type_name" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="expectTime" column="expect_time" />
|
||||
<result property="supplyChainNumber" column="supply_chain_number" />
|
||||
<result property="priorityLevelCode" column="priority_level_code" />
|
||||
<result property="priorityLevelName" column="priority_level_name" />
|
||||
<result property="directWarehouse" column="direct_warehouse" />
|
||||
<result property="review" column="review" />
|
||||
<result property="annexUrl" column="annex_url" />
|
||||
<result property="materialQuantity" column="material_quantity" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="weightLimit" column="weight_limit" />
|
||||
<result property="volumeLimit" column="volume_limit" />
|
||||
<result property="allocationQuantity" column="allocation_quantity" />
|
||||
<result property="alreadyAllocationQuantity" column="already_allocation_quantity" />
|
||||
<result property="pickingQuantity" column="picking_quantity" />
|
||||
<result property="checkQuantity" column="check_quantity" />
|
||||
<result property="cancelOrder" column="cancel_order" />
|
||||
<result property="cancelRemark" column="cancel_remark" />
|
||||
<result property="cancelBy" column="cancel_by" />
|
||||
<result property="cancelByName" column="cancel_by_name" />
|
||||
<result property="cancelTime" column="cancel_time" />
|
||||
<result property="closeOrder" column="close_order" />
|
||||
<result property="closeRemark" column="close_remark" />
|
||||
<result property="closeBy" column="close_by" />
|
||||
<result property="closeByName" column="close_by_name" />
|
||||
<result property="closeTime" column="close_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="overStockId" column="over_stock_id" />
|
||||
<result property="overStockStatus" column="over_stock_status" />
|
||||
<result property="overStockType" column="over_stock_type" />
|
||||
<result property="outOrderId" column="out_order_id"/>
|
||||
<result property="organizationId" column="organization_id"/>
|
||||
<result property="organizationName" column="organization_name"/>
|
||||
<result property="topOrganizationId" column="top_organization_id"/>
|
||||
<result property="noticeNumber" column="notice_number"/>
|
||||
<result property="outOrderNumber" column="out_order_number"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="auditStatus" column="audit_status"/>
|
||||
<result property="auditRemark" column="audit_remark"/>
|
||||
<result property="auditBy" column="audit_by"/>
|
||||
<result property="auditByName" column="audit_by_name"/>
|
||||
<result property="auditTime" column="audit_time"/>
|
||||
<result property="warehouseId" column="warehouse_id"/>
|
||||
<result property="warehouseCode" column="warehouse_code"/>
|
||||
<result property="warehouseName" column="warehouse_name"/>
|
||||
<result property="shipperId" column="shipper_id"/>
|
||||
<result property="shipperName" column="shipper_name"/>
|
||||
<result property="orderTypeCode" column="order_type_code"/>
|
||||
<result property="orderTypeName" column="order_type_name"/>
|
||||
<result property="customerId" column="customer_id"/>
|
||||
<result property="customerName" column="customer_name"/>
|
||||
<result property="expectTime" column="expect_time"/>
|
||||
<result property="supplyChainNumber" column="supply_chain_number"/>
|
||||
<result property="priorityLevelCode" column="priority_level_code"/>
|
||||
<result property="priorityLevelName" column="priority_level_name"/>
|
||||
<result property="directWarehouse" column="direct_warehouse"/>
|
||||
<result property="review" column="review"/>
|
||||
<result property="annexUrl" column="annex_url"/>
|
||||
<result property="materialQuantity" column="material_quantity"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="weightLimit" column="weight_limit"/>
|
||||
<result property="volumeLimit" column="volume_limit"/>
|
||||
<result property="allocationQuantity" column="allocation_quantity"/>
|
||||
<result property="alreadyAllocationQuantity" column="already_allocation_quantity"/>
|
||||
<result property="pickingQuantity" column="picking_quantity"/>
|
||||
<result property="checkQuantity" column="check_quantity"/>
|
||||
<result property="cancelOrder" column="cancel_order"/>
|
||||
<result property="cancelRemark" column="cancel_remark"/>
|
||||
<result property="cancelBy" column="cancel_by"/>
|
||||
<result property="cancelByName" column="cancel_by_name"/>
|
||||
<result property="cancelTime" column="cancel_time"/>
|
||||
<result property="closeOrder" column="close_order"/>
|
||||
<result property="closeRemark" column="close_remark"/>
|
||||
<result property="closeBy" column="close_by"/>
|
||||
<result property="closeByName" column="close_by_name"/>
|
||||
<result property="closeTime" column="close_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createByName" column="create_by_name"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateByName" column="update_by_name"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="overStockId" column="over_stock_id"/>
|
||||
<result property="overStockStatus" column="over_stock_status"/>
|
||||
<result property="overStockType" column="over_stock_type"/>
|
||||
<result property="to" column="to"/>
|
||||
<result property="contactPerson" column="contact_person"/>
|
||||
<result property="vehicleModelPlate" column="vehicle_model_plate"/>
|
||||
@@ -89,16 +89,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="needDeclareFlag" column="need_declare_flag"/>
|
||||
<result property="needTransportFlag" column="need_transport_flag"/>
|
||||
<result property="pictureApp" column="picture_app"/>
|
||||
<result property="billingJson" column="billing_json" />
|
||||
<result property="salesmanId" column="SALESMAN_ID" />
|
||||
<result property="salesmanName" column="SALESMAN_NAME" />
|
||||
<result property="settlementCurrency" column="SETTLEMENT_CURRENCY" />
|
||||
<result property="businessOrderNo" column="business_order_no" />
|
||||
<result property="billingJson" column="billing_json"/>
|
||||
<result property="salesmanId" column="SALESMAN_ID"/>
|
||||
<result property="salesmanName" column="SALESMAN_NAME"/>
|
||||
<result property="settlementCurrency" column="SETTLEMENT_CURRENCY"/>
|
||||
<result property="businessOrderNo" column="business_order_no"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectStockOutOrderPo">
|
||||
a.out_order_id, a.organization_id, a.organization_name, a.top_organization_id, a.receipt_notice_id, a.notice_number, a.out_order_number, a.status,
|
||||
a
|
||||
.
|
||||
out_order_id
|
||||
, a.organization_id, a.organization_name, a.top_organization_id, a.receipt_notice_id, a.notice_number, a.out_order_number, a.status,
|
||||
a.audit_status, a.audit_remark, a.audit_by, a.audit_by_name, a.audit_time, a.warehouse_id, a.warehouse_code, a.warehouse_name, a.shipper_id, a.shipper_code,
|
||||
a.shipper_name, a.order_type_code, a.order_type_name, a.customer_id, a.customer_code, a.customer_name, a.expect_time, a.supply_chain_number, a.priority_level_code,
|
||||
a.priority_level_name, a.direct_warehouse, a.review, a.annex_url, a.material_quantity, a.quantity, a.weight_limit, a.volume_limit,
|
||||
@@ -303,34 +306,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<!-- 出库明细:物料名称、物料编码(同一明细行同时满足;与出库明细口径一致)。关联 material_base_info 避免明细冗余名称与主档不一致时筛不到 -->
|
||||
<if test="(materialName != null and materialName != '') or (materialCode != null and materialCode != '')">
|
||||
and exists (
|
||||
select 1 from out_material_detail omd
|
||||
left join material_base_info mb on omd.material_base_info_id = mb.material_base_info_id and mb.del_flag = 1
|
||||
where omd.out_order_number = a.out_order_number
|
||||
and omd.del_flag = 1
|
||||
and (omd.level is null or omd.level = 1)
|
||||
<if test="materialName != null and materialName != ''">
|
||||
and (
|
||||
omd.material_name like concat('%', #{materialName}, '%')
|
||||
or mb.material_name like concat('%', #{materialName}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="materialCode != null and materialCode != ''">
|
||||
and (
|
||||
omd.material_code like concat('%', #{materialCode}, '%')
|
||||
or mb.material_code like concat('%', #{materialCode}, '%')
|
||||
)
|
||||
</if>
|
||||
select 1 from out_material_detail omd
|
||||
left join material_base_info mb on omd.material_base_info_id = mb.material_base_info_id and mb.del_flag = 1
|
||||
where omd.out_order_number = a.out_order_number
|
||||
and omd.del_flag = 1
|
||||
and (omd.level is null or omd.level = 1)
|
||||
<if test="materialName != null and materialName != ''">
|
||||
and (
|
||||
omd.material_name like concat('%', #{materialName}, '%')
|
||||
or mb.material_name like concat('%', #{materialName}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="materialCode != null and materialCode != ''">
|
||||
and (
|
||||
omd.material_code like concat('%', #{materialCode}, '%')
|
||||
or mb.material_code like concat('%', #{materialCode}, '%')
|
||||
)
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and a.del_flag = #{delFlag} </when>
|
||||
<otherwise> and a.del_flag = 1 </otherwise>
|
||||
<when test="delFlag != null">and a.del_flag = #{delFlag}</when>
|
||||
<otherwise>and a.del_flag = 1</otherwise>
|
||||
</choose>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.wms.domain.stockOutOrder.repository.todo.StockOutOrderDO" resultMap="StockOutOrderResult">
|
||||
<select id="queryList" parameterType="com.mhd.wms.domain.stockOutOrder.repository.todo.StockOutOrderDO"
|
||||
resultMap="StockOutOrderResult">
|
||||
select
|
||||
<include refid="selectStockOutOrderPo"/>
|
||||
<include refid="selectStockOutOrderPo"/>
|
||||
from stock_out_order a
|
||||
<where>
|
||||
<include refid="selectStockOutOrderPo1"/>
|
||||
@@ -340,40 +344,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<select id="queryOutStockNoticePrint" resultMap="StockOutOrderResult">
|
||||
SELECT
|
||||
a.notice_number,
|
||||
a.out_order_number,
|
||||
a.supply_chain_number,
|
||||
a.shipper_name,
|
||||
a.expect_time,
|
||||
a.document_creator_name,
|
||||
a.document_creator,
|
||||
a.document_date,
|
||||
a.warehouse_name,
|
||||
a.remark
|
||||
SELECT a.notice_number,
|
||||
a.out_order_number,
|
||||
a.business_order_no,
|
||||
a.supply_chain_number,
|
||||
a.shipper_name,
|
||||
a.expect_time,
|
||||
a.document_creator_name,
|
||||
a.document_creator,
|
||||
a.document_date,
|
||||
a.warehouse_name,
|
||||
a.remark
|
||||
FROM stock_out_order a
|
||||
WHERE a.del_flag = 1
|
||||
AND a.out_order_id = #{outOrderId}
|
||||
</select>
|
||||
|
||||
<select id="queryOutStockNoticePrintDetail" resultMap="OutMaterialDetailPOResult">
|
||||
SELECT
|
||||
b.lot_no,
|
||||
b.warehouse_code,
|
||||
b.warehouse_name,
|
||||
b.material_name,
|
||||
b.storage_location_name,
|
||||
b.storage_location_code,
|
||||
b.piece_count,
|
||||
b.unit_name
|
||||
SELECT b.lot_no,
|
||||
b.warehouse_code,
|
||||
b.warehouse_name,
|
||||
b.material_name,
|
||||
b.storage_location_name,
|
||||
b.storage_location_code,
|
||||
b.piece_count,
|
||||
b.unit_name
|
||||
FROM out_material_detail b
|
||||
WHERE b.del_flag = 1
|
||||
AND b.out_order_number = (SELECT out_order_number FROM stock_out_order WHERE out_order_id = #{outOrderId} AND del_flag = 1)
|
||||
AND b.out_order_number =
|
||||
(SELECT out_order_number FROM stock_out_order WHERE out_order_id = #{outOrderId} AND del_flag = 1)
|
||||
ORDER BY b.material_detail_id
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap type="com.mhd.wms.domain.outMaterialDetail.repository.po.OutMaterialDetailPO" id="OutMaterialDetailPOResult">
|
||||
<resultMap type="com.mhd.wms.domain.outMaterialDetail.repository.po.OutMaterialDetailPO"
|
||||
id="OutMaterialDetailPOResult">
|
||||
<result property="lotNo" column="lot_no"/>
|
||||
<result property="warehouseCode" column="warehouse_code"/>
|
||||
<result property="warehouseName" column="warehouse_name"/>
|
||||
@@ -395,8 +400,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap type="com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO" id="CopyCodeWeightResult">
|
||||
<result property="netWeight" column="net_weight"/>
|
||||
<result property="grossWeight" column="gross_weight"/>
|
||||
@@ -406,12 +409,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<select id="queryCopyCodeWeightListByBatch" resultMap="CopyCodeWeightResult">
|
||||
SELECT
|
||||
ccr.net_weight,
|
||||
ccr.gross_weight,
|
||||
ccr.inventory_quantity,
|
||||
ccr.lot_number,
|
||||
ccr.box_pallet_no
|
||||
SELECT ccr.net_weight,
|
||||
ccr.gross_weight,
|
||||
ccr.inventory_quantity,
|
||||
ccr.lot_number,
|
||||
ccr.box_pallet_no
|
||||
FROM copy_code_reference ccr
|
||||
WHERE ccr.del_flag = 1
|
||||
AND ccr.batch_number = #{batchNumber}
|
||||
@@ -422,27 +424,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<select id="queryOutStockNoticePrintDetailGF" resultMap="OutMaterialDetailPOResult">
|
||||
SELECT
|
||||
b.batch_number,
|
||||
b.material_code,
|
||||
b.material_name,
|
||||
b.specification_model,
|
||||
b.quantity,
|
||||
b.unit_name,
|
||||
b.pack_name,
|
||||
b.warehouse_code,
|
||||
b.warehouse_id,
|
||||
b.storage_location_name,
|
||||
b.lot_no,
|
||||
b.piece_count,
|
||||
b.material_base_info_id,
|
||||
b.outbound_quantity,
|
||||
b.box_pallet_no,
|
||||
mbi.copy_code
|
||||
SELECT b.batch_number,
|
||||
b.material_code,
|
||||
b.material_name,
|
||||
COALESCE(b.specification_model, b.size, b.liter, mbi.specification_model) AS specification_model,
|
||||
b.quantity,
|
||||
b.unit_name,
|
||||
b.pack_name,
|
||||
b.warehouse_code,
|
||||
b.warehouse_name,
|
||||
b.warehouse_id,
|
||||
b.storage_location_name,
|
||||
b.lot_no,
|
||||
b.piece_count,
|
||||
b.material_base_info_id,
|
||||
b.outbound_quantity,
|
||||
b.box_pallet_no,
|
||||
mbi.copy_code
|
||||
FROM out_material_detail b
|
||||
LEFT JOIN material_base_info mbi ON b.material_base_info_id = mbi.material_base_info_id
|
||||
WHERE b.del_flag = 1
|
||||
AND b.out_order_number = (SELECT out_order_number FROM stock_out_order WHERE out_order_id = #{outOrderId} AND del_flag = 1)
|
||||
AND b.out_order_number =
|
||||
(SELECT out_order_number FROM stock_out_order WHERE out_order_id = #{outOrderId} AND del_flag = 1)
|
||||
ORDER BY b.material_detail_id
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user