Files
klp-oa/klp-wms/src/main/resources/mapper/klp/WmsSchedulePlanDetailMapper.xml

50 lines
1.9 KiB
XML
Raw Normal View History

2025-07-18 10:12:48 +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.mapper.WmsSchedulePlanDetailMapper">
<resultMap type="com.klp.domain.WmsSchedulePlanDetail" id="WmsSchedulePlanDetailResult">
<result property="detailId" column="detail_id"/>
<result property="planId" column="plan_id"/>
<result property="lineId" column="line_id"/>
<result property="batchId" column="batch_id"/>
2025-07-18 10:12:48 +08:00
<result property="productId" column="product_id"/>
<result property="quantity" column="quantity"/>
<result property="startDate" column="start_date"/>
<result property="endDate" column="end_date"/>
<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>
<select id="selectPlanTimeAgg" resultType="com.klp.domain.vo.PlanTimeAgg">
SELECT
plan_id,
MIN(start_date) AS startDate,
MAX(end_date) AS endDate
FROM
wms_schedule_plan_detail
WHERE
plan_id IN
<foreach collection="planIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
GROUP BY
plan_id
</select>
2025-07-30 15:27:07 +08:00
<select id="selectVoPagePlus" resultType="com.klp.domain.vo.WmsSchedulePlanDetailVo">
SELECT *,
wpl.line_name AS lineName,
wbt.batch_no AS batchNo
2025-07-30 15:27:07 +08:00
FROM wms_schedule_plan_detail wspd
left join wms_production_line wpl on wspd.line_id = wpl.line_id
left join wms_batch wbt on wspd.batch_id = wbt.batch_id
2025-07-30 15:27:07 +08:00
${ew.customSqlSegment}
</select>
2025-07-18 10:12:48 +08:00
</mapper>