2026-03-26 11:35:33 +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.aps.mapper.ApsPlanSheetMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.klp.aps.domain.entity.ApsPlanSheet" id="ApsPlanSheetResult">
|
|
|
|
|
<result property="planSheetId" column="plan_sheet_id"/>
|
|
|
|
|
<result property="planDate" column="plan_date"/>
|
|
|
|
|
<result property="lineId" column="line_id"/>
|
|
|
|
|
<result property="lineName" column="line_name"/>
|
|
|
|
|
<result property="planCode" column="plan_code"/>
|
|
|
|
|
<result property="planType" column="plan_type"/>
|
|
|
|
|
<result property="scheduler" column="scheduler"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
</resultMap>
|
2026-03-26 14:59:33 +08:00
|
|
|
<select id="selectList" parameterType="com.klp.aps.domain.dto.ApsPlanSheetQueryReq" resultType="com.klp.aps.domain.vo.ApsPlanSheetRowVo">
|
|
|
|
|
SELECT
|
|
|
|
|
d.plan_detail_id AS detailSheetId,
|
|
|
|
|
s.plan_date AS planDate,
|
|
|
|
|
s.line_id AS lineId,
|
|
|
|
|
s.line_name AS lineName,
|
|
|
|
|
s.plan_code AS planCode,
|
|
|
|
|
s.plan_type AS planType,
|
|
|
|
|
s.scheduler AS scheduler,
|
|
|
|
|
s.remark AS masterRemark,
|
|
|
|
|
d.remark AS detailRemark,
|
|
|
|
|
s.update_by AS updateBy,
|
|
|
|
|
d.biz_seq_no AS bizSeqNo,
|
|
|
|
|
d.order_code AS orderCode,
|
|
|
|
|
d.contract_code AS contractCode,
|
|
|
|
|
d.customer_name AS customerName,
|
|
|
|
|
d.salesman AS salesman,
|
|
|
|
|
d.product_name AS productName,
|
|
|
|
|
d.product_material AS productMaterial,
|
|
|
|
|
d.coating_g AS coatingG,
|
|
|
|
|
d.product_width AS productWidth,
|
|
|
|
|
d.rolling_thick AS rollingThick,
|
|
|
|
|
d.mark_coat_thick AS markCoatThick,
|
|
|
|
|
d.ton_steel_length_range AS tonSteelLengthRange,
|
|
|
|
|
d.plan_qty AS planQty,
|
|
|
|
|
d.plan_weight AS planWeight,
|
|
|
|
|
d.surface_treatment AS surfaceTreatment,
|
|
|
|
|
d.width_req AS widthReq,
|
|
|
|
|
d.usage_req AS usageReq,
|
|
|
|
|
d.post_process AS postProcess,
|
|
|
|
|
d.next_process AS nextProcess,
|
|
|
|
|
d.sample_req AS sampleReq,
|
|
|
|
|
d.raw_manufacturer AS rawManufacturer,
|
|
|
|
|
d.raw_material AS rawMaterial,
|
|
|
|
|
d.raw_thick AS rawThick,
|
|
|
|
|
d.raw_width AS rawWidth,
|
|
|
|
|
CAST(d.raw_material_id AS CHAR) AS rawMaterialId,
|
|
|
|
|
d.raw_coil_nos AS rawCoilNos,
|
|
|
|
|
d.raw_location AS rawLocation,
|
|
|
|
|
d.raw_packaging AS rawPackaging,
|
|
|
|
|
d.raw_edge_req AS rawEdgeReq,
|
|
|
|
|
d.raw_coating_type AS rawCoatingType,
|
|
|
|
|
d.raw_net_weight AS rawNetWeight,
|
|
|
|
|
d.start_time AS startTime,
|
|
|
|
|
d.end_time AS endTime
|
|
|
|
|
FROM aps_plan_sheet s
|
|
|
|
|
INNER JOIN aps_plan_detail d ON d.plan_sheet_id = s.plan_sheet_id AND d.del_flag = 0
|
|
|
|
|
WHERE s.del_flag = 0
|
|
|
|
|
<if test="startDate != null">
|
|
|
|
|
AND d.start_time <![CDATA[>=]]> CONCAT(#{startDate}, ' 00:00:00')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endDate != null">
|
|
|
|
|
AND d.start_time <![CDATA[<=]]> CONCAT(#{endDate}, ' 23:59:59')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="lineId != null">
|
|
|
|
|
AND s.line_id = #{lineId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="planSheetId != null">
|
|
|
|
|
AND s.plan_sheet_id = #{planSheetId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="customerName != null and customerName != ''">
|
|
|
|
|
AND d.customer_name LIKE CONCAT('%', #{customerName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
ORDER BY d.plan_detail_id DESC
|
|
|
|
|
</select>
|
2026-03-26 11:35:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|