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.WmsProductionLineMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.klp.domain.WmsProductionLine" id="WmsProductionLineResult">
|
|
|
|
|
<result property="lineId" column="line_id"/>
|
|
|
|
|
<result property="lineCode" column="line_code"/>
|
|
|
|
|
<result property="lineName" column="line_name"/>
|
|
|
|
|
<result property="capacity" column="capacity"/>
|
|
|
|
|
<result property="unit" column="unit"/>
|
|
|
|
|
<result property="isEnabled" column="is_enabled"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
<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>
|
|
|
|
|
|
2025-07-30 16:42:34 +08:00
|
|
|
<select id="selectLineLoadInfo" resultType="com.klp.domain.vo.LineLoadInfo">
|
|
|
|
|
SELECT
|
|
|
|
|
line_id AS lineId,
|
|
|
|
|
COUNT(*) AS planDetailCount,
|
2025-07-30 17:18:56 +08:00
|
|
|
SUM(DATEDIFF(end_date, GREATEST(start_date, CURDATE())) + 1) AS totalPlanDays
|
2025-07-30 16:42:34 +08:00
|
|
|
FROM
|
|
|
|
|
wms_schedule_plan_detail
|
|
|
|
|
WHERE
|
|
|
|
|
line_id IN
|
|
|
|
|
<foreach collection="lineIds" item="lineId" open="(" separator="," close=")">
|
|
|
|
|
#{lineId}
|
|
|
|
|
</foreach>
|
2025-07-30 17:18:56 +08:00
|
|
|
AND end_date >= CURDATE()
|
2025-07-30 16:42:34 +08:00
|
|
|
AND del_flag = 0
|
|
|
|
|
GROUP BY
|
|
|
|
|
line_id
|
|
|
|
|
</select>
|
2025-07-18 10:12:48 +08:00
|
|
|
|
|
|
|
|
</mapper>
|