|
@@ -46,6 +46,7 @@ import javax.annotation.Resource;
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
|
+import java.text.MessageFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -120,7 +121,11 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
for (Map.Entry<String, CustomFlowVarDto> entry : agginessMap.entrySet()) {
|
|
|
CustomFlowVarDto customFlowVarDto = gson.fromJson(gson.toJson(entry.getValue()), CustomFlowVarDto.class);
|
|
|
if (Objects.nonNull(customFlowVarDto.getFlowTaskVar()) && customFlowVarDto.getFlowTaskVar().contains(DefaultInstanceConvertToMultiInstance.DEFAULT_ASSIGNEE_LIST)) {
|
|
|
- varMap.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), s -> customFlowVarDto.getApproveIds());
|
|
|
+ if (customFlowVarDto.getMultipleUserApproveType() == CustomFlowMultipleUserApproveTypeEnum.SOME) {
|
|
|
+ varMap.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), s -> customFlowVarDto.getApproveIds().toString().replaceAll("\\[", "").replaceAll("\\]", "").trim());
|
|
|
+ } else {
|
|
|
+ varMap.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), s -> customFlowVarDto.getApproveIds());
|
|
|
+ }
|
|
|
} else {
|
|
|
varMap.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), s -> customFlowVarDto.getApproveIds().get(0));
|
|
|
}
|
|
@@ -530,7 +535,11 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
if (Objects.nonNull(agginessMap.get(nextFlowTaskResult.getTaskKey()))) {
|
|
|
CustomFlowVarDto customFlowVarDto = gson.fromJson(gson.toJson(agginessMap.get(nextFlowTaskResult.getTaskKey())), CustomFlowVarDto.class);
|
|
|
if (Objects.nonNull(customFlowVarDto.getFlowTaskVar()) && customFlowVarDto.getFlowTaskVar().contains(DefaultInstanceConvertToMultiInstance.DEFAULT_ASSIGNEE_LIST)) {
|
|
|
- map.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), v -> customFlowVarDto.getApproveIds());
|
|
|
+ if (customFlowVarDto.getMultipleUserApproveType() == CustomFlowMultipleUserApproveTypeEnum.SOME) {
|
|
|
+ map.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), s -> customFlowVarDto.getApproveIds().toString().replaceAll("\\[", "").replaceAll("\\]", "").trim());
|
|
|
+ } else {
|
|
|
+ map.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), s -> customFlowVarDto.getApproveIds());
|
|
|
+ }
|
|
|
} else {
|
|
|
map.computeIfAbsent(customFlowVarDto.getFlowTaskVar(), v -> customFlowVarDto.getApproveIds().get(0));
|
|
|
}
|
|
@@ -732,6 +741,7 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
flowTaskResultList.add(flowTaskResult);
|
|
|
}
|
|
|
}
|
|
|
+ Collections.sort(flowTaskResultList, Comparator.comparing(FlowTaskResult::getSetup));
|
|
|
return flowTaskResultList;
|
|
|
}
|
|
|
|
|
@@ -1521,7 +1531,8 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
} else if (customFlowMultipleUserApproveTypeEnum == CustomFlowMultipleUserApproveTypeEnum.ALL) {
|
|
|
userTask = multiWorkFlow.createMultiInstanceLoopCharacteristics(userTask, isSequential);
|
|
|
} else {
|
|
|
- userTask.setCandidateUsers(assignees);
|
|
|
+ String someId = userTask.getId().substring(userTask.getId().length() - 1, userTask.getId().length());
|
|
|
+ userTask.setCandidateUsers(Arrays.asList(new StringJoiner("").add(MessageFormat.format("{0}{1}{2}", DefaultInstanceConvertToMultiInstance.DEFAULT_ASSIGNEE_LIST_EXP, someId, DefaultInstanceConvertToMultiInstance.EXP_SUFFIX)).toString()));
|
|
|
}
|
|
|
return userTask;
|
|
|
}
|