Jelajahi Sumber

自定义流程-BUG修改

wangliang 3 tahun lalu
induk
melakukan
1c5aec25ef

+ 8 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ActivitiServiceImpl.java

@@ -1640,6 +1640,14 @@ public class ActivitiServiceImpl implements ActivitiService {
         //获取流程审批历史
         List<TFFlowLogResult> tfFlowLogResultList = tfFlowLogService.findByObjectId(tfFlowJoinList.get(0).getObjectId());
         if (Objects.nonNull(tfFlowLogResultList) && tfFlowLogResultList.size() > 0) {
+            for (TFFlowLogResult t : tfFlowLogResultList) {
+                if (Objects.nonNull(t.getPendApproveId()) && !Objects.equals(t.getPendApproveId().trim(), "")) {
+                    Set<String> set = new LinkedHashSet(Arrays.asList(t.getPendApproveId().split(", ")));
+                    ApproveUserResult approveUserResult = sysUserService.findByIds(set.stream().map(x -> SystemConstant.convertIdToLong(x)).collect(Collectors.toList()));
+                    t.setPendApproveUserName(approveUserResult.getPendApproveUsers());
+                }
+            }
+
             List<TFFlowViewLogResult> flowViewTaskResultList = gson.fromJson(gson.toJson(tfFlowLogResultList), new TypeToken<List<TFFlowViewLogResult>>() {
             }.getType());
             if (Objects.nonNull(currFlowTaskResult)) {

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

@@ -30,16 +30,7 @@
             su.org_id as orgId,
             so.name as orgName,
             so.`type` as orgType,
-             (
-                 select
-                     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, ', ', ',')) order by field(su.id, replace(tffl.pend_approve_id, ', ', ','))) as pendApproveUserName,
-             (
+            (
                  select
                      CONCAT(su.real_name, '(', so.name, ')')
                  from