Răsfoiți Sursa

自定义流程-BUG修改

wangliang 3 ani în urmă
părinte
comite
c94d316f77

+ 7 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TFCustomFlow.java

@@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.annotation.FieldStrategy;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.distributed.print.business.bean.flow.CustomFlowSaveDto;
 import com.qmth.teachcloud.common.base.BaseEntity;
 import com.qmth.teachcloud.common.enums.TFCustomModelTypeEnum;
 import com.qmth.teachcloud.common.enums.TFCustomTypeEnum;
+import com.qmth.teachcloud.common.util.JacksonUtil;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -87,6 +89,11 @@ public class TFCustomFlow extends BaseEntity implements Serializable {
         insertInfo(userId);
     }
 
+    public void setInfo(CustomFlowSaveDto customFlowSaveDto) {
+        this.setModelType(customFlowSaveDto.getModelType());
+        this.setObjectData(JacksonUtil.parseJson(customFlowSaveDto.getCustomFlowLists()));
+    }
+
     public TFCustomModelTypeEnum getModelType() {
         return modelType;
     }

+ 2 - 2
distributed-print-business/src/main/resources/mapper/TFFlowLogMapper.xml

@@ -32,13 +32,13 @@
             so.`type` as orgType,
              (
                  select
-                     group_concat(su.real_name, '(', so.name, ')' order by field(tffl.pend_approve_id,replace(tffl.pend_approve_id, ', ', ',')))
+                     group_concat(su.real_name, '(', so.name, ')')
                  from
                      sys_user su
                          join sys_org so on
                          so.id = su.org_id
                  where
-                     FIND_IN_SET(su.id, replace(tffl.pend_approve_id, ', ', ','))) as pendApproveUserName,
+                     FIND_IN_SET(su.id, replace(tffl.pend_approve_id, ', ', ',')) order by field(su.id, replace(tffl.pend_approve_id, ', ', ','))) as pendApproveUserName,
              (
                  select
                      CONCAT(su.real_name, '(', so.name, ')')

+ 1 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/TFCustomFlowController.java

@@ -112,8 +112,7 @@ public class TFCustomFlowController {
                 if (!tfCustomFlow.getEnable()) {
                     throw ExceptionResultEnum.ERROR.exception("自定义流程数据已删除");
                 }
-                tfCustomFlow.setModelType(customFlowSaveDto.getModelType());
-                tfCustomFlow.setObjectData(JacksonUtil.parseJson(customFlowSaveDto.getCustomFlowLists()));
+                tfCustomFlow.setInfo(customFlowSaveDto);
                 tfCustomFlow.updateInfo(sysUser.getId());
             }
             AtomicInteger atomicInteger = null;