Explorar el Código

待办添加当前节点耗时

yzc hace 11 meses
padre
commit
65ae47815d

+ 4 - 0
hx-flow/src/main/java/com/fjhx/flow/entity/flow/vo/FlowExampleVo.java

@@ -4,6 +4,8 @@ import com.fjhx.flow.entity.flow.po.FlowExample;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.util.Date;
+
 /**
  * 流程实例列表查询返回值实体
  *
@@ -50,4 +52,6 @@ public class FlowExampleVo extends FlowExample {
     private Long duration;
     private String durationStr;
 
+    private Date durationBeginTime;
+
 }

+ 1 - 1
hx-flow/src/main/java/com/fjhx/flow/service/flow/impl/FlowExampleServiceImpl.java

@@ -491,7 +491,7 @@ public class FlowExampleServiceImpl extends ServiceImpl<FlowExampleMapper, FlowE
 
         //赋值节点耗时
         for (FlowExampleVo record : records) {
-            record.setDurationStr(DateUtil.formatBetween(new Date(), record.getCreateTime(), BetweenFormatter.Level.MINUTE));
+            record.setDurationStr(DateUtil.formatBetween(new Date(), record.getDurationBeginTime(), BetweenFormatter.Level.MINUTE));
         }
 
         // 赋值流程发起人名称

+ 1 - 1
hx-flow/src/main/resources/mapper/flow/FlowExampleMapper.xml

@@ -15,7 +15,7 @@
                fdn.node_name,
                fdn.node_handle_type,
                fec.handle_user_id,
-               fec.create_time,
+               fec.create_time                              AS duration_begin_time,
                TIMESTAMPDIFF(MINUTE,fec.create_time, now()) AS duration,
                su.nick_name                                 AS handle_user_name
         from flow_info fi