Files
klp-oa/klp-aps/src/main/resources/mapper/aps/ApsPlanSheetMapper.xml
Joshi ba722e0439 refactor(aps): 重构排产单查询和导出功能
- 移除日期范围、产线ID和客户名称查询条件
- 修改排序规则为按业务序号升序排列
- 删除查询请求DTO中的废弃字段
- 优化Excel导出功能,添加标题动态显示和表头样式
- 实现前7列数据居中对齐和自动合并功能
- 修复POI依赖导入路径问题
- 更新转储订单项映射配置
2026-03-27 18:21:53 +08:00

78 lines
3.1 KiB
XML

<?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>
<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="planSheetId != null">
AND s.plan_sheet_id = #{planSheetId}
</if>
ORDER BY CAST(d.biz_seq_no AS UNSIGNED) ASC
</select>
</mapper>