From abfc2a9cded7fb48900d3a5056e1cdacbe9089db Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期二, 09 七月 2024 15:08:03 +0800
Subject: [PATCH] 名称统一

---
 pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml |   27 ++++++++++++++++++---------
 1 files changed, 18 insertions(+), 9 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 80d9752..11c5616 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml
@@ -13,7 +13,7 @@
         <result property="isStart" column="is_start" jdbcType="TINYINT"/>
         <result property="isEnd" column="is_end" jdbcType="TINYINT"/>
         <result property="isRecord" column="is_record" jdbcType="TINYINT"/>
-        <result property="equipCycleContent" column="equip_cycle_content" jdbcType="VARCHAR"/>
+        <result property="deviceCycleContent" column="device_cycle_content" jdbcType="VARCHAR"/>
         <result property="deleted" column="deleted" jdbcType="TINYINT"/>
         <result property="remark" column="remark" jdbcType="VARCHAR"/>
         <association property="instruction"
@@ -23,7 +23,7 @@
     <sql id="Base_Column_List">
         id,process_id,sort,
         content,node_type,is_start,is_end,
-        is_record,equip_cycle_content,deleted,
+        is_record,device_cycle_content,deleted,
         remark
     </sql>
 
@@ -38,7 +38,9 @@
         from pr_production_node
         where  id = #{id,jdbcType=BIGINT} 
     </select>
-
+    <select id="selectNameByNodeId" parameterType="java.lang.Long" resultType="String">
+        select content from pr_production_node where id = #{id}
+    </select>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
         delete from pr_production_node
         where  id = #{id,jdbcType=BIGINT} 
@@ -58,7 +60,7 @@
                 <if test="isStart != null">is_start,</if>
                 <if test="isEnd != null">is_end,</if>
                 <if test="isRecord != null">is_record,</if>
-                <if test="equipCycleContent != null">equip_cycle_content,</if>
+                <if test="deviceCycleContent != null">device_cycle_content,</if>
                 <if test="deleted != null">deleted,</if>
                 <if test="remark != null">remark,</if>
         </trim>
@@ -71,7 +73,7 @@
                 <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="equipCycleContent != null">#{equipCycleContent,jdbcType=VARCHAR},</if>
+                <if test="deviceCycleContent != null">#{deviceCycleContent,jdbcType=VARCHAR},</if>
                 <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                 <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
         </trim>
@@ -80,7 +82,7 @@
     <insert id="insertMany" parameterType="java.util.List">
        INSERT INTO pr_production_node (id,process_id,sort,
         content,node_type,is_start,is_end,
-        is_record,equip_cycle_content,deleted,
+        is_record,device_cycle_content,deleted,
         remark) VALUES
        <foreach item="item" index="index" collection="list" open="(" separator="),(" close=")">
            #{item.id},
@@ -91,7 +93,7 @@
            #{item.isStart},
            #{item.isEnd},
            #{item.isRecord},
-           #{item.equipCycleContent},
+           #{item.deviceCycleContent},
            #{item.deleted},
            #{item.remark}
        </foreach>
@@ -122,8 +124,8 @@
                 <if test="isRecord != null">
                     is_record = #{isRecord,jdbcType=TINYINT},
                 </if>
-                <if test="equipCycleContent != null">
-                    equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR},
+                <if test="deviceCycleContent != null">
+                    device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR},
                 </if>
                 <if test="deleted != null">
                     deleted = #{deleted,jdbcType=TINYINT},
@@ -151,6 +153,13 @@
             </if>
         </trim>
     </select>
+    <select id="isEndNode" resultType="java.lang.Boolean">
+        select
+            n.sort >=n1.sort
+        from pr_production_node n
+                 left join pr_production_node n1 on n.process_id = n1.process_id
+        where n1.id = #{id} and n.is_end=1
+    </select>
 
     <update id="deleteLogicById" parameterType="java.lang.Long">
         update pr_production_node set deleted = 1

--
Gitblit v1.8.0