Эх сурвалжийг харах

fix:修改流程配置接口,更新字段

xuezizhuo 1 жил өмнө
parent
commit
6d6152572f

+ 59 - 70
ruoyi-system/src/main/java/com/ruoyi/system/entity/BpmProcessConfiguration.java

@@ -19,162 +19,151 @@ public class BpmProcessConfiguration extends BaseEntity
     private Long id;
 
     /** 节点编号 */
-    @Excel(name = "节点编号")
     private String nodeKey;
 
+    /** 节点名称 */
+    private String nodeName;
+
     /** 表单编号 */
-    @Excel(name = "表单编号")
     private String nodeFormKey;
 
     /** 流程编号 */
-    @Excel(name = "流程编号")
     private String nodeProcessKey;
 
     /** 节点类型 */
-    @Excel(name = "节点类型")
     private String nodeType;
 
     /** 节点前 */
-    @Excel(name = "节点前")
     private String nodeBefor;
 
     /** 节点后 */
-    @Excel(name = "节点后")
     private String nodeAfter;
 
     /** 角色权限 */
-    @Excel(name = "角色权限")
     private String nodeRolePermission;
 
     /** 备用字段1 */
-    @Excel(name = "备用字段1")
     private String spare1;
 
     /** 备用字段2 */
-    @Excel(name = "备用字段2")
     private String spare2;
 
     /** 备用字段3 */
-    @Excel(name = "备用字段3")
     private String spare3;
 
     /** 删除标志(0代表存在 2代表删除) */
     private String delFlag;
 
-    public void setId(Long id) 
-    {
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
-        return id;
+    public String getNodeKey() {
+        return nodeKey;
     }
-    public void setNodeKey(String nodeKey) 
-    {
+
+    public void setNodeKey(String nodeKey) {
         this.nodeKey = nodeKey;
     }
 
-    public String getNodeKey() 
-    {
-        return nodeKey;
+    public String getNodeName() {
+        return nodeName;
     }
-    public void setNodeFormKey(String nodeFormKey)
-    {
-        this.nodeFormKey = nodeFormKey;
+
+    public void setNodeName(String nodeName) {
+        this.nodeName = nodeName;
     }
 
-    public String getNodeFormKey()
-    {
+    public String getNodeFormKey() {
         return nodeFormKey;
     }
-    public void setNodeProcessKey(String nodeProcessKey)
-    {
-        this.nodeProcessKey = nodeProcessKey;
+
+    public void setNodeFormKey(String nodeFormKey) {
+        this.nodeFormKey = nodeFormKey;
     }
 
-    public String getNodeProcessKey()
-    {
+    public String getNodeProcessKey() {
         return nodeProcessKey;
     }
-    public void setNodeType(String nodeType) 
-    {
-        this.nodeType = nodeType;
+
+    public void setNodeProcessKey(String nodeProcessKey) {
+        this.nodeProcessKey = nodeProcessKey;
     }
 
-    public String getNodeType() 
-    {
+    public String getNodeType() {
         return nodeType;
     }
-    public void setNodeBefor(String nodeBefor) 
-    {
-        this.nodeBefor = nodeBefor;
+
+    public void setNodeType(String nodeType) {
+        this.nodeType = nodeType;
     }
 
-    public String getNodeBefor() 
-    {
+    public String getNodeBefor() {
         return nodeBefor;
     }
-    public void setNodeAfter(String nodeAfter) 
-    {
-        this.nodeAfter = nodeAfter;
+
+    public void setNodeBefor(String nodeBefor) {
+        this.nodeBefor = nodeBefor;
     }
 
-    public String getNodeAfter() 
-    {
+    public String getNodeAfter() {
         return nodeAfter;
     }
-    public void setNodeRolePermission(String nodeRolePermission) 
-    {
-        this.nodeRolePermission = nodeRolePermission;
+
+    public void setNodeAfter(String nodeAfter) {
+        this.nodeAfter = nodeAfter;
     }
 
-    public String getNodeRolePermission() 
-    {
+    public String getNodeRolePermission() {
         return nodeRolePermission;
     }
-    public void setSpare1(String spare1) 
-    {
-        this.spare1 = spare1;
+
+    public void setNodeRolePermission(String nodeRolePermission) {
+        this.nodeRolePermission = nodeRolePermission;
     }
 
-    public String getSpare1() 
-    {
+    public String getSpare1() {
         return spare1;
     }
-    public void setSpare2(String spare2) 
-    {
-        this.spare2 = spare2;
+
+    public void setSpare1(String spare1) {
+        this.spare1 = spare1;
     }
 
-    public String getSpare2() 
-    {
+    public String getSpare2() {
         return spare2;
     }
-    public void setSpare3(String spare3) 
-    {
-        this.spare3 = spare3;
+
+    public void setSpare2(String spare2) {
+        this.spare2 = spare2;
     }
 
-    public String getSpare3() 
-    {
+    public String getSpare3() {
         return spare3;
     }
-    public void setDelFlag(String delFlag) 
-    {
-        this.delFlag = delFlag;
+
+    public void setSpare3(String spare3) {
+        this.spare3 = spare3;
     }
 
-    public String getDelFlag() 
-    {
+    public String getDelFlag() {
         return delFlag;
     }
 
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
             .append("nodeKey", getNodeKey())
+            .append("nodeName",getNodeName())
             .append("nodeFormKey", getNodeFormKey())
             .append("nodeProcessKey", getNodeProcessKey())
             .append("nodeType", getNodeType())

+ 4 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/IBpmProcessConfigurationService.java

@@ -1,8 +1,9 @@
 package com.ruoyi.system.service;
 
-import java.util.List;
 import com.ruoyi.system.entity.BpmProcessConfiguration;
 
+import java.util.List;
+
 /**
  * 流程配置Service接口
  * 
@@ -30,7 +31,7 @@ public interface IBpmProcessConfigurationService
     /**
      * 新增流程配置
      * 
-     * @param bpmProcessConfiguration 流程配置
+     * @param bpmProcessConfigurationList 流程配置
      * @return 结果
      */
     public int insertBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList);
@@ -38,7 +39,7 @@ public interface IBpmProcessConfigurationService
     /**
      * 修改流程配置
      * 
-     * @param bpmProcessConfiguration 流程配置
+     * @param bpmProcessConfigurationList 流程配置
      * @return 结果
      */
     public int updateBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList);

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BpmProcessConfigurationServiceImpl.java

@@ -66,7 +66,7 @@ public class BpmProcessConfigurationServiceImpl implements IBpmProcessConfigurat
     @Override
     public int updateBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList)
     {
-
+        bpmProcessConfigurationList.stream().forEach(node -> node.setUpdateTime(DateUtils.getNowDate()));
         return bpmProcessConfigurationMapper.updateBpmProcessConfiguration(bpmProcessConfigurationList);
     }
 

+ 9 - 7
ruoyi-system/src/main/resources/mapper/BpmProcessConfigurationMapper.xml

@@ -7,6 +7,7 @@
     <resultMap type="com.ruoyi.system.entity.BpmProcessConfiguration" id="BpmProcessConfigurationResult">
         <result property="id"    column="id"    />
         <result property="nodeKey"    column="node_key"    />
+        <result property="nodeName" column="node_name"/>
         <result property="nodeFormKey"    column="node_form_key"    />
         <result property="nodeProcessKey"    column="node_process_key"    />
         <result property="nodeType"    column="node_type"    />
@@ -25,13 +26,14 @@
     </resultMap>
 
     <sql id="selectBpmProcessConfigurationVo">
-        select id, node_key, node_form_key, node_process_key, node_type, node_befor, node_after, node_role_permission, spare1, spare2, spare3, del_flag, create_by, create_time, update_by, update_time, remark from bpm_process_configuration
+        select id, node_key, , node_name,node_form_key, node_process_key, node_type, node_befor, node_after, node_role_permission, spare1, spare2, spare3, del_flag, create_by, create_time, update_by, update_time, remark from bpm_process_configuration
     </sql>
 
     <select id="selectBpmProcessConfigurationList" parameterType="com.ruoyi.system.entity.BpmProcessConfiguration" resultMap="BpmProcessConfigurationResult">
         <include refid="selectBpmProcessConfigurationVo"/>
-        <where>
+        where del_flag = '0'
             <if test="nodeKey != null  and nodeKey != ''"> and node_key = #{nodeKey}</if>
+            <if test="nodeName != null">  and node_name = #{nodeName}</if>
             <if test="nodeFormKey != null "> and node_form_key = #{nodeFormKey}</if>
             <if test="nodeProcessKey != null "> and node_process_key = #{nodeProcessKey}</if>
             <if test="nodeType != null  and nodeType != ''"> and node_type = #{nodeType}</if>
@@ -41,7 +43,6 @@
             <if test="spare1 != null  and spare1 != ''"> and spare1 = #{spare1}</if>
             <if test="spare2 != null  and spare2 != ''"> and spare2 = #{spare2}</if>
             <if test="spare3 != null  and spare3 != ''"> and spare3 = #{spare3}</if>
-        </where>
     </select>
 
     <select id="selectBpmProcessConfigurationById" parameterType="Long" resultMap="BpmProcessConfigurationResult">
@@ -61,7 +62,7 @@
             (#{item.nodeKey}, #{item.nodeFormKey}, #{item.nodeProcessKey}, #{item.nodeType}, #{item.nodeBefor},
             #{item.nodeAfter},
             #{item.nodeRolePermission}, #{item.spare1}, #{item.spare2}, #{item.spare3}, '0', #{item.createBy},
-            NOW(),#{item.remark})
+            #{item.createTime},#{item.remark})
         </foreach>
     </insert>
 
@@ -83,19 +84,20 @@
                 <if test="item.createBy != null">create_by = #{item.createBy},</if>
                 <if test="item.createTime != null">create_time = #{item.createTime},</if>
                 <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
+                <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                 <if test="item.remark != null">remark = #{item.remark},</if>
-                update_time = NOW()
+
             </trim>
             where id = #{item.id}
         </foreach>
     </update>
 
     <delete id="deleteBpmProcessConfigurationById" parameterType="Long">
-        delete from bpm_process_configuration where id = #{id}
+        update bpm_process_configuration set del_flag = '2' where id = #{id}
     </delete>
 
     <delete id="deleteBpmProcessConfigurationByIds" parameterType="String">
-        delete from bpm_process_configuration where id in
+        update bpm_process_configuration set del_flag = '2' where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>