From 14b0417bca9050a11792248f5c5c7e7c86e4744f Mon Sep 17 00:00:00 2001 From: 刘小明 <liuxm_a@163.com> Date: 星期三, 21 八月 2024 16:47:45 +0800 Subject: [PATCH] 排班功能 --- pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml index bb7f745..8a0a22c 100644 --- a/pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml +++ b/pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml @@ -56,6 +56,7 @@ column="process_id"/> </resultMap> + <sql id="Base_Column_List"> id,order_id ,pro_id,batch_id, @@ -404,4 +405,33 @@ set deleted = 1 where id = #{id} </update> + + <select id="countByPlanIdAndNodeId" resultType="java.lang.Long"> + select count(1) from pr_assembly_plan ap + left join pr_production_node pn on ap.process_id = pn.process_id + where ap.id = #{planId} and pn.id= #{nodeId} + </select> + + + <resultMap id="jsonResultMap" type="java.util.HashMap"> + <id column="planId" property="planId"/> + <result column="planName" property="planName"/> + <result column="status" property="status"/> + + <collection property="nodes" javaType="java.util.HashMap"> + <result column="content" property="content"/> + <result column="nodeId" property="nodeId"/> + </collection> + </resultMap> + <select id="selectByPlanName" resultMap="jsonResultMap"> + select ap.id planId,ap.name planName,ap.`status`,pn.id nodeId,pn.content from pr_assembly_plan ap + left join pr_production_node pn on ap.process_id = pn.process_id + where status != -1 + <if test="planName != null and planName!= null"> + and ap.name like concat('%', #{planName}, '%') + </if> + </select> + + + </mapper> -- Gitblit v1.8.0