2025-11-25 15:44:19 +08:00
|
|
|
<?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">
|
|
|
|
|
<mapper namespace="com.klp.mapper.WmsDeliveryWaybillDetailMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.klp.domain.WmsDeliveryWaybillDetail" id="WmsDeliveryWaybillDetailResult">
|
|
|
|
|
<result property="detailId" column="detail_id"/>
|
|
|
|
|
<result property="waybillId" column="waybill_id"/>
|
|
|
|
|
<result property="coilId" column="coil_id"/>
|
|
|
|
|
<result property="productName" column="product_name"/>
|
|
|
|
|
<result property="edgeType" column="edge_type"/>
|
|
|
|
|
<result property="packaging" column="packaging"/>
|
|
|
|
|
<result property="settlementType" column="settlement_type"/>
|
|
|
|
|
<result property="rawMaterialFactory" column="raw_material_factory"/>
|
|
|
|
|
<result property="coilNo" column="coil_no"/>
|
|
|
|
|
<result property="specification" column="specification"/>
|
|
|
|
|
<result property="material" column="material"/>
|
|
|
|
|
<result property="quantity" column="quantity"/>
|
|
|
|
|
<result property="weight" column="weight"/>
|
|
|
|
|
<result property="unitPrice" column="unit_price"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
2026-01-27 14:47:31 +08:00
|
|
|
<resultMap type="com.klp.domain.vo.WmsCoilBindInfoVo" id="WmsCoilBindInfoResult">
|
|
|
|
|
<result property="coilId" column="coil_id"/>
|
|
|
|
|
<result property="detailId" column="detail_id"/>
|
2026-01-29 16:51:00 +08:00
|
|
|
|
|
|
|
|
<!-- 发货计划 -->
|
2026-01-27 14:47:31 +08:00
|
|
|
<result property="planId" column="plan_id"/>
|
|
|
|
|
<result property="planName" column="plan_name"/>
|
|
|
|
|
<result property="planDate" column="plan_date"/>
|
2026-01-29 16:51:00 +08:00
|
|
|
|
|
|
|
|
<!-- 发货单主表 -->
|
|
|
|
|
<result property="waybillId" column="waybill_id"/>
|
|
|
|
|
<result property="waybillNo" column="waybill_no"/>
|
|
|
|
|
<result property="waybillName" column="waybill_name"/>
|
|
|
|
|
<result property="licensePlate" column="license_plate"/>
|
|
|
|
|
<result property="consigneeUnit" column="consignee_unit"/>
|
|
|
|
|
<result property="senderUnit" column="sender_unit"/>
|
|
|
|
|
<result property="deliveryTime" column="delivery_time"/>
|
|
|
|
|
<result property="weighbridge" column="weighbridge"/>
|
|
|
|
|
<result property="salesPerson" column="sales_person"/>
|
|
|
|
|
<result property="principal" column="principal"/>
|
|
|
|
|
<result property="principalPhone" column="principal_phone"/>
|
|
|
|
|
<result property="waybillStatus" column="status"/>
|
|
|
|
|
<result property="waybillRemark" column="remark"/>
|
|
|
|
|
|
|
|
|
|
<!-- 发货单明细补充字段 -->
|
|
|
|
|
<result property="detailSettlementType" column="settlement_type"/>
|
|
|
|
|
<result property="detailUnitPrice" column="unit_price"/>
|
2026-01-27 14:47:31 +08:00
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<select id="selectBindInfoByCoilIds" resultMap="WmsCoilBindInfoResult">
|
|
|
|
|
SELECT
|
|
|
|
|
d.coil_id,
|
|
|
|
|
d.detail_id,
|
2026-01-29 16:51:00 +08:00
|
|
|
|
|
|
|
|
-- 发货单主表
|
2026-01-27 14:47:31 +08:00
|
|
|
w.waybill_id,
|
|
|
|
|
w.waybill_no,
|
|
|
|
|
w.waybill_name,
|
2026-01-29 16:51:00 +08:00
|
|
|
w.license_plate,
|
|
|
|
|
w.consignee_unit,
|
|
|
|
|
w.sender_unit,
|
|
|
|
|
w.delivery_time,
|
|
|
|
|
w.weighbridge,
|
|
|
|
|
w.sales_person,
|
|
|
|
|
w.principal,
|
|
|
|
|
w.principal_phone,
|
|
|
|
|
w.status,
|
|
|
|
|
w.remark,
|
|
|
|
|
|
|
|
|
|
-- 发货计划
|
2026-01-27 14:47:31 +08:00
|
|
|
p.plan_id,
|
|
|
|
|
p.plan_name,
|
2026-01-29 16:51:00 +08:00
|
|
|
p.plan_date,
|
|
|
|
|
|
|
|
|
|
-- 发货单明细补充字段
|
|
|
|
|
d.settlement_type,
|
|
|
|
|
d.unit_price
|
2026-01-27 14:47:31 +08:00
|
|
|
FROM wms_delivery_waybill_detail d
|
2026-01-29 17:28:37 +08:00
|
|
|
LEFT JOIN wms_delivery_waybill w ON w.waybill_id = d.waybill_id AND w.del_flag = 0
|
|
|
|
|
LEFT JOIN wms_delivery_plan p ON p.plan_id = w.plan_id AND p.del_flag = 0
|
2026-01-27 14:47:31 +08:00
|
|
|
WHERE d.del_flag = 0
|
|
|
|
|
AND d.coil_id IN
|
|
|
|
|
<foreach collection="coilIds" item="id" open="(" close=")" separator=",">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBindInfoByCoilId" resultMap="WmsCoilBindInfoResult">
|
|
|
|
|
SELECT
|
|
|
|
|
d.coil_id,
|
|
|
|
|
d.detail_id,
|
2026-01-29 16:51:00 +08:00
|
|
|
|
|
|
|
|
-- 发货单主表
|
2026-01-27 14:47:31 +08:00
|
|
|
w.waybill_id,
|
|
|
|
|
w.waybill_no,
|
|
|
|
|
w.waybill_name,
|
2026-01-29 16:51:00 +08:00
|
|
|
w.license_plate,
|
|
|
|
|
w.consignee_unit,
|
|
|
|
|
w.sender_unit,
|
|
|
|
|
w.delivery_time,
|
|
|
|
|
w.weighbridge,
|
|
|
|
|
w.sales_person,
|
|
|
|
|
w.principal,
|
|
|
|
|
w.principal_phone,
|
|
|
|
|
w.status,
|
|
|
|
|
w.remark,
|
|
|
|
|
|
|
|
|
|
-- 发货计划
|
2026-01-27 14:47:31 +08:00
|
|
|
p.plan_id,
|
|
|
|
|
p.plan_name,
|
2026-01-29 16:51:00 +08:00
|
|
|
p.plan_date,
|
|
|
|
|
|
|
|
|
|
-- 发货单明细补充字段
|
|
|
|
|
d.settlement_type,
|
|
|
|
|
d.unit_price
|
2026-01-27 14:47:31 +08:00
|
|
|
FROM wms_delivery_waybill_detail d
|
|
|
|
|
INNER JOIN wms_delivery_waybill w ON w.waybill_id = d.waybill_id AND w.del_flag = 0
|
|
|
|
|
INNER JOIN wms_delivery_plan p ON p.plan_id = w.plan_id AND p.del_flag = 0
|
|
|
|
|
WHERE d.del_flag = 0
|
|
|
|
|
AND d.coil_id = #{coilId}
|
|
|
|
|
LIMIT 1
|
|
|
|
|
</select>
|
2025-11-25 15:44:19 +08:00
|
|
|
|
|
|
|
|
</mapper>
|