From 02826fa5829598c2f8efbf4381e4048e5c20e5c7 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期一, 26 八月 2024 10:18:05 +0800
Subject: [PATCH] order status
---
pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 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..7a21c13 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml
@@ -29,6 +29,8 @@
select="com.dy.pmsGlobal.daoPr.PrBatchNumberMapper.selectBatchNoById" fetchType="eager"/>
<association property="processName" column="process_id" javaType="java.lang.Long"
select="com.dy.pmsGlobal.daoPr.PrProductionProcessMapper.selectProcessNameById" fetchType="eager"/>
+ <association property="orderName" column="order_id" javaType="java.lang.Long"
+ select="com.dy.pmsGlobal.daoPr.PrOrderMapper.selectOrderNameById" fetchType="eager" />
<collection property="process" ofType="com.dy.pmsGlobal.pojoPr.PrProductionProcess"
select="com.dy.pmsGlobal.daoPr.PrProductionProcessMapper.selectByPrimaryKey" fetchType="eager"
column="process_id"/>
@@ -55,6 +57,7 @@
select="com.dy.pmsGlobal.daoPr.PrProductionProcessMapper.selectByProcessId" fetchType="eager"
column="process_id"/>
</resultMap>
+
<sql id="Base_Column_List">
id,order_id
@@ -404,4 +407,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