Files
klp-oa/klp-wms/src/main/resources/mapper/klp/WmsSchedulePlanDetailMapper.xml
2025-07-30 15:35:38 +08:00

47 lines
1.8 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.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="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>
<select id="selectVoPagePlus" resultType="com.klp.domain.vo.WmsSchedulePlanDetailVo">
SELECT *,
wpl.line_name AS lineName
FROM wms_schedule_plan_detail wspd
left join wms_production_line wpl on wspd.line_id = wpl.line_id
${ew.customSqlSegment}
</select>
</mapper>