From f88c07d7941a0c18bb097f20618c18b9d2418ccc Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期三, 11 九月 2024 15:42:51 +0800
Subject: [PATCH] next node

---
 pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml |   54 ++++++++++++++++++++++++++++++------------------------
 1 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml
index 646cb91..cd93f4c 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml
@@ -38,6 +38,12 @@
         from pr_production_node
         where  id = #{id,jdbcType=BIGINT} 
     </select>
+    <select id="selectNodeBySort" parameterType="java.lang.Long" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from pr_production_node
+        where  process_id = #{processId,jdbcType=BIGINT} and sort = #{sort,jdbcType=INTEGER}
+    </select>
     <select id="selectNameByNodeId" parameterType="java.lang.Long" resultType="String">
         select content from pr_production_node where id = #{id}
     </select>
@@ -59,29 +65,29 @@
     <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrProductionNode" useGeneratedKeys="true">
         insert into pr_production_node
         <trim prefix="(" suffix=")" suffixOverrides=",">
-                <if test="id != null and id !=''">id,</if>
-                <if test="isEnd!= null and isEnd !=''">process_id,</if>
-                <if test="sort != null and sort !=''">sort,</if>
+                <if test="id != null">id,</if>
+                <if test="processId!= null">process_id,</if>
+                <if test="sort != null">sort,</if>
                 <if test="content != null and content !=''">content,</if>
-                <if test="nodeType!= null and nodeType !=''">node_type,</if>
-                <if test="isStart!= null and isStart !=''">is_start,</if>
-                <if test="isEnd!= null and isEnd !=''">is_end,</if>
-                <if test="isRecord!= null and isRecord !=''">is_record,</if>
+                <if test="nodeType != null">node_type,</if>
+                <if test="isStart != null">is_start,</if>
+                <if test="isEnd != null">is_end,</if>
+                <if test="isRecord != null">is_record,</if>
                 <if test="deviceCycleContent != null and deviceCycleContent !=''">device_cycle_content,</if>
-                <if test="deleted != null and deleted !=''">deleted,</if>
+                <if test="deleted != null">deleted,</if>
                 <if test="remark != null and remark !=''">remark,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-                <if test="id != null and id !=''">#{id,jdbcType=BIGINT},</if>
-                <if test="isEnd!= null and isEnd !=''">#{processId,jdbcType=BIGINT},</if>
-                <if test="sort != null and sort !=''">#{sort,jdbcType=INTEGER},</if>
+                <if test="id != null">#{id,jdbcType=BIGINT},</if>
+                <if test="isEnd != null">#{processId,jdbcType=BIGINT},</if>
+                <if test="sort != null">#{sort,jdbcType=INTEGER},</if>
                 <if test="content != null and content !=''">#{content,jdbcType=VARCHAR},</if>
-                <if test="nodeType!= null and nodeType !=''">#{nodeType,jdbcType=INTEGER},</if>
-                <if test="isStart!= null and isStart !=''">#{isStart,jdbcType=TINYINT},</if>
-                <if test="isEnd!= null and isEnd !=''">#{isEnd,jdbcType=TINYINT},</if>
-                <if test="isRecord!= null and isRecord !=''">#{isRecord,jdbcType=TINYINT},</if>
+                <if test="nodeType != null">#{nodeType,jdbcType=INTEGER},</if>
+                <if test="isStart != null">#{isStart,jdbcType=TINYINT},</if>
+                <if test="isEnd != null">#{isEnd,jdbcType=TINYINT},</if>
+                <if test="isRecord != null">#{isRecord,jdbcType=TINYINT},</if>
                 <if test="deviceCycleContent != null and deviceCycleContent !=''">#{deviceCycleContent,jdbcType=VARCHAR},</if>
-                <if test="deleted != null and deleted !=''">#{deleted,jdbcType=TINYINT},</if>
+                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                 <if test="remark != null and remark !=''">#{remark,jdbcType=VARCHAR},</if>
         </trim>
     </insert>
@@ -110,31 +116,31 @@
     <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrProductionNode">
         update pr_production_node
         <set>
-                <if test="isEnd!= null and isEnd !=''">
+                <if test="processId != null">
                     process_id = #{processId,jdbcType=BIGINT},
                 </if>
-                <if test="sort != null and sort !=''">
+                <if test="sort != null">
                     sort = #{sort,jdbcType=INTEGER},
                 </if>
                 <if test="content != null and content !=''">
                     content = #{content,jdbcType=VARCHAR},
                 </if>
-                <if test="nodeType!= null and nodeType !=''">
+                <if test="nodeType != null">
                     node_type = #{nodeType,jdbcType=INTEGER},
                 </if>
-                <if test="isStart!= null and isStart !=''">
+                <if test="isStart != null">
                     is_start = #{isStart,jdbcType=TINYINT},
                 </if>
-                <if test="isEnd!= null and isEnd !=''">
+                <if test="isEnd != null">
                     is_end = #{isEnd,jdbcType=TINYINT},
                 </if>
-                <if test="isRecord!= null and isRecord !=''">
+                <if test="isRecord != null">
                     is_record = #{isRecord,jdbcType=TINYINT},
                 </if>
                 <if test="deviceCycleContent != null and deviceCycleContent !=''">
                     device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR},
                 </if>
-                <if test="deleted != null and deleted !=''">
+                <if test="deleted != null">
                     deleted = #{deleted,jdbcType=TINYINT},
                 </if>
                 <if test="remark != null and remark !=''">
@@ -149,7 +155,7 @@
         <include refid="Base_Column_List" />
         from pr_production_node
         <trim prefix="where" suffixOverrides="and">
-            <if test="processId!= null and processId !=''">
+            <if test="processId!= null">
                 process_id = #{processId,jdbcType=BIGINT} and
             </if>
         </trim>

--
Gitblit v1.8.0