feat(aps): 添加排产单导出功能

- 新增 ApsPlanSheetQueryReq 查询参数类
- 新增 ApsPlanSheetRowVo 数据传输对象
- 实现 controller 层 exportAll 接口
- 实现 service 层 exportExcel 导出逻辑
- 添加 mapper 层 selectList 查询方法
- 配置 mybatis xml 查询映射
- 优化 Excel 导出样式和数据处理
This commit is contained in:
2026-03-26 14:59:33 +08:00
parent 281f86ca8c
commit 38862cf0ea
8 changed files with 345 additions and 0 deletions

View File

@@ -19,6 +19,71 @@
<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="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>
</mapper>