feat(wms): 添加配送单详情中的原材料和产品信息字段
- 在 WmsDeliveryWaybillDetailVo 中新增物品名称、规格、材质等属性 - 添加厂家、表面处理描述、镀层等原材料/产品相关信息 - 在 Mapper 中增加原材料和产品的关联查询逻辑 - 实现原材料和产品表的左连接查询支持 - 添加状态描述字段用于显示库存状态信息 - 完善 Excel 导出功能中的新字段映射配置
This commit is contained in:
@@ -217,4 +217,43 @@ public class WmsDeliveryWaybillDetailVo extends BaseEntity {
|
||||
*/
|
||||
private Date planDate;
|
||||
|
||||
// ==================== 原材料/产品信息 ====================
|
||||
/**
|
||||
* 物品名称(原材料/产品)
|
||||
*/
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 物品规格(原材料/产品)
|
||||
*/
|
||||
private String itemSpecification;
|
||||
|
||||
/**
|
||||
* 物品材质(原材料/产品)
|
||||
*/
|
||||
private String itemMaterial;
|
||||
|
||||
/**
|
||||
* 厂家
|
||||
*/
|
||||
private String manufacturer;
|
||||
|
||||
/**
|
||||
* 表面处理描述
|
||||
*/
|
||||
@ExcelProperty(value = "表面处理")
|
||||
private String itemSurfaceTreatmentDesc;
|
||||
|
||||
/**
|
||||
* 镀层
|
||||
*/
|
||||
@ExcelProperty(value = "镀层")
|
||||
private String itemZincLayer;
|
||||
|
||||
/**
|
||||
* 状态描述
|
||||
*/
|
||||
@ExcelProperty(value = "状态")
|
||||
private String statusDesc;
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user