2025-11-03 17:03:03 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
2025-11-13 13:24:09 +08:00
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
2025-11-03 17:03:03 +08:00
|
|
|
<mapper namespace="com.klp.mapper.WmsCoilPendingActionMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.klp.domain.WmsCoilPendingAction" id="WmsCoilPendingActionResult">
|
|
|
|
|
<result property="actionId" column="action_id" />
|
|
|
|
|
<result property="coilId" column="coil_id" />
|
|
|
|
|
<result property="currentCoilNo" column="current_coil_no" />
|
|
|
|
|
<result property="actionType" column="action_type" />
|
|
|
|
|
<result property="actionStatus" column="action_status" />
|
|
|
|
|
<result property="scanTime" column="scan_time" />
|
|
|
|
|
<result property="scanDevice" column="scan_device" />
|
|
|
|
|
<result property="priority" column="priority" />
|
|
|
|
|
<result property="sourceType" column="source_type" />
|
|
|
|
|
<result property="warehouseId" column="warehouse_id" />
|
|
|
|
|
<result property="operatorId" column="operator_id" />
|
|
|
|
|
<result property="operatorName" column="operator_name" />
|
|
|
|
|
<result property="processTime" column="process_time" />
|
|
|
|
|
<result property="completeTime" column="complete_time" />
|
|
|
|
|
<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>
|
2025-11-18 14:44:52 +08:00
|
|
|
<select id="selectVoPagePlus" resultType="com.klp.domain.vo.WmsCoilPendingActionVo">
|
|
|
|
|
select
|
|
|
|
|
wcpa.action_id as actionId,
|
|
|
|
|
wcpa.coil_id as coilId,
|
|
|
|
|
wcpa.current_coil_no as currentCoilNo,
|
|
|
|
|
wcpa.action_type as actionType,
|
|
|
|
|
wcpa.action_status as actionStatus,
|
|
|
|
|
wcpa.scan_time as scanTime,
|
|
|
|
|
wcpa.scan_device as scanDevice,
|
|
|
|
|
wcpa.priority as priority,
|
|
|
|
|
wcpa.source_type as sourceType,
|
|
|
|
|
wcpa.warehouse_id as warehouseId,
|
|
|
|
|
wcpa.operator_id as operatorId,
|
|
|
|
|
wcpa.operator_name as operatorName,
|
|
|
|
|
wcpa.process_time as processTime,
|
|
|
|
|
wcpa.complete_time as completeTime,
|
2025-11-18 15:24:21 +08:00
|
|
|
wcpa.remark as remark,
|
|
|
|
|
wcpa.create_time as createTime,
|
|
|
|
|
wcpa.create_by as createBy,
|
|
|
|
|
wcpa.update_time as updateTime,
|
|
|
|
|
wcpa.update_by as updateBy,
|
2025-11-18 14:44:52 +08:00
|
|
|
wmc.enter_coil_no as enterCoilNo,
|
|
|
|
|
wmc.supplier_coil_no as supplierCoilNo,
|
|
|
|
|
wmc.item_id as itemId,
|
2026-01-14 17:34:58 +08:00
|
|
|
wmc.item_type as itemType,
|
|
|
|
|
w.warehouse_name AS warehouseName,
|
|
|
|
|
aw.actual_warehouse_name AS actualWarehouseName,
|
|
|
|
|
CASE WHEN wmc.item_type = 'raw_material' THEN rm.specification
|
|
|
|
|
WHEN wmc.item_type = 'product' THEN p.specification
|
|
|
|
|
ELSE NULL END AS specification,
|
|
|
|
|
CASE WHEN wmc.item_type = 'raw_material' THEN rm.material
|
|
|
|
|
WHEN wmc.item_type = 'product' THEN p.material
|
|
|
|
|
ELSE NULL END AS material,
|
|
|
|
|
CASE WHEN wmc.item_type = 'raw_material' THEN rm.manufacturer
|
|
|
|
|
WHEN wmc.item_type = 'product' THEN p.manufacturer
|
|
|
|
|
ELSE NULL END AS manufacturer,
|
|
|
|
|
CASE WHEN wmc.item_type = 'raw_material' THEN rm.surface_treatment_desc
|
|
|
|
|
WHEN wmc.item_type = 'product' THEN p.surface_treatment_desc
|
|
|
|
|
ELSE NULL END AS surfaceTreatmentDesc,
|
|
|
|
|
CASE WHEN wmc.item_type = 'raw_material' THEN rm.zinc_layer
|
|
|
|
|
WHEN wmc.item_type = 'product' THEN p.zinc_layer
|
|
|
|
|
ELSE NULL END AS zincLayer,
|
|
|
|
|
CASE
|
|
|
|
|
WHEN wmc.item_type = 'raw_material' THEN rm.raw_material_name
|
|
|
|
|
WHEN wmc.item_type = 'product' THEN p.product_name
|
|
|
|
|
ELSE NULL
|
|
|
|
|
END as itemName,
|
|
|
|
|
CASE
|
|
|
|
|
WHEN wmc.item_type = 'raw_material' THEN rm.raw_material_code
|
|
|
|
|
WHEN wmc.item_type = 'product' THEN p.product_code
|
|
|
|
|
ELSE NULL
|
|
|
|
|
END as itemCode
|
2025-11-18 14:44:52 +08:00
|
|
|
from wms_coil_pending_action wcpa
|
2025-11-18 15:18:57 +08:00
|
|
|
inner join wms_material_coil wmc ON wcpa.coil_id = wmc.coil_id AND wmc.del_flag = 0
|
2026-01-14 17:34:58 +08:00
|
|
|
LEFT JOIN wms_warehouse w ON wmc.warehouse_id = w.warehouse_id
|
|
|
|
|
LEFT JOIN wms_actual_warehouse aw ON wmc.actual_warehouse_id = aw.actual_warehouse_id
|
|
|
|
|
LEFT JOIN wms_raw_material rm ON wmc.item_type = 'raw_material' AND wmc.item_id = rm.raw_material_id
|
|
|
|
|
LEFT JOIN wms_product p ON wmc.item_type = 'product' AND wmc.item_id = p.product_id
|
2025-11-18 14:44:52 +08:00
|
|
|
${ew.customSqlSegment}
|
|
|
|
|
</select>
|
2025-11-03 17:03:03 +08:00
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|
|