|
|
|
|
@@ -174,6 +174,14 @@
|
|
|
|
|
<result property="planId" column="plan_id"/>
|
|
|
|
|
<result property="planName" column="plan_name"/>
|
|
|
|
|
<result property="planDate" column="plan_date"/>
|
|
|
|
|
|
|
|
|
|
<!-- 原材料/产品信息 -->
|
|
|
|
|
<result property="itemName" column="item_name"/>
|
|
|
|
|
<result property="itemSpecification" column="item_specification"/>
|
|
|
|
|
<result property="itemMaterial" column="item_material"/>
|
|
|
|
|
<result property="manufacturer" column="item_manufacturer"/>
|
|
|
|
|
<result property="itemSurfaceTreatmentDesc" column="item_surface_treatment_desc"/>
|
|
|
|
|
<result property="itemZincLayer" column="item_zinc_layer"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<select id="selectDetailVoList" resultMap="WmsDeliveryWaybillDetailVoResult">
|
|
|
|
|
@@ -183,6 +191,14 @@
|
|
|
|
|
c.enter_coil_no,
|
|
|
|
|
c.current_coil_no,
|
|
|
|
|
aw.actual_warehouse_name,
|
|
|
|
|
(CASE c.status WHEN 0 THEN '在库' WHEN 1 THEN '在途' WHEN 2 THEN '已出库' ELSE CAST(c.status AS CHAR) END) AS status_desc,
|
|
|
|
|
|
|
|
|
|
(CASE WHEN c.item_type = 'raw_material' THEN rm.raw_material_name WHEN c.item_type = 'product' THEN pdt.product_name ELSE NULL END) AS item_name,
|
|
|
|
|
(CASE WHEN c.item_type = 'raw_material' THEN rm.specification WHEN c.item_type = 'product' THEN pdt.specification ELSE NULL END) AS item_specification,
|
|
|
|
|
(CASE WHEN c.item_type = 'raw_material' THEN rm.material WHEN c.item_type = 'product' THEN pdt.material ELSE NULL END) AS item_material,
|
|
|
|
|
(CASE WHEN c.item_type = 'raw_material' THEN rm.manufacturer WHEN c.item_type = 'product' THEN pdt.manufacturer ELSE NULL END) AS item_manufacturer,
|
|
|
|
|
(CASE WHEN c.item_type = 'raw_material' THEN rm.surface_treatment_desc WHEN c.item_type = 'product' THEN pdt.surface_treatment_desc ELSE NULL END) AS item_surface_treatment_desc,
|
|
|
|
|
(CASE WHEN c.item_type = 'raw_material' THEN rm.zinc_layer WHEN c.item_type = 'product' THEN pdt.zinc_layer ELSE NULL END) AS item_zinc_layer,
|
|
|
|
|
|
|
|
|
|
w.waybill_no,
|
|
|
|
|
w.waybill_name,
|
|
|
|
|
@@ -203,6 +219,8 @@
|
|
|
|
|
FROM wms_delivery_waybill_detail d
|
|
|
|
|
LEFT JOIN wms_material_coil c ON c.coil_id = d.coil_id AND c.del_flag = 0
|
|
|
|
|
LEFT JOIN wms_actual_warehouse aw ON aw.actual_warehouse_id = c.actual_warehouse_id AND aw.del_flag = 0
|
|
|
|
|
LEFT JOIN wms_raw_material rm ON c.item_type = 'raw_material' AND c.item_id = rm.raw_material_id AND rm.del_flag = 0
|
|
|
|
|
LEFT JOIN wms_product pdt ON c.item_type = 'product' AND c.item_id = pdt.product_id AND pdt.del_flag = 0
|
|
|
|
|
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
|
|
|
|
|
WHERE d.del_flag = 0
|
|
|
|
|
@@ -247,4 +265,5 @@
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|
|