|
@@ -414,7 +414,7 @@ public class TaskController extends BladeController {
|
|
//预设流程,获取对应任务人id
|
|
//预设流程,获取对应任务人id
|
|
String resultString = "";
|
|
String resultString = "";
|
|
if (ObjectUtil.isNotEmpty(archiveTaskBatchReportDTO.getFixedFlowId())) {
|
|
if (ObjectUtil.isNotEmpty(archiveTaskBatchReportDTO.getFixedFlowId())) {
|
|
- List<FixedFlowLink> fixedFlowLinks = jdbcTemplate.query("select fixed_flow_link_user,fixed_flow_link_sort from u_fixed_flow_link where fixed_flow_id = " + archiveTaskBatchReportDTO.getFixedFlowId(), new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
|
|
|
+ List<FixedFlowLink> fixedFlowLinks = jdbcTemplate.query("select fixed_flow_link_user,fixed_flow_link_sort from u_fixed_flow_link where is_deleted = 0 AND fixed_flow_id = " + archiveTaskBatchReportDTO.getFixedFlowId(), new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
if (fixedFlowLinks.size() > 0) {
|
|
if (fixedFlowLinks.size() > 0) {
|
|
fixedFlowLinks.sort(Comparator.comparingInt(FixedFlowLink::getFixedFlowLinkSort));
|
|
fixedFlowLinks.sort(Comparator.comparingInt(FixedFlowLink::getFixedFlowLinkSort));
|
|
StringBuilder sortStr = new StringBuilder();
|
|
StringBuilder sortStr = new StringBuilder();
|
|
@@ -445,8 +445,6 @@ public class TaskController extends BladeController {
|
|
//创建上报任务
|
|
//创建上报任务
|
|
Map<Long, String> nameMap = jdbcTemplate.query("select id,name from blade_user where is_deleted = 0", new BeanPropertyRowMapper<>(User.class)).stream().collect(Collectors.toMap(User::getId, User::getName, (key1, key2) -> key1));
|
|
Map<Long, String> nameMap = jdbcTemplate.query("select id,name from blade_user where is_deleted = 0", new BeanPropertyRowMapper<>(User.class)).stream().collect(Collectors.toMap(User::getId, User::getName, (key1, key2) -> key1));
|
|
String[] userIds = archiveTaskBatchReportDTO.getUserIds().split(",");
|
|
String[] userIds = archiveTaskBatchReportDTO.getUserIds().split(",");
|
|
- Set<String> uniqueUserIdsSet = new LinkedHashSet<>(Arrays.asList(userIds));
|
|
|
|
- String[] uniqueUserIdsArray = uniqueUserIdsSet.toArray(new String[0]);
|
|
|
|
String[] dataArr = archiveTaskBatchReportDTO.getDataIds().split(",");
|
|
String[] dataArr = archiveTaskBatchReportDTO.getDataIds().split(",");
|
|
if (dataArr.length > 0) {
|
|
if (dataArr.length > 0) {
|
|
for (String id : dataArr) {
|
|
for (String id : dataArr) {
|
|
@@ -509,7 +507,7 @@ public class TaskController extends BladeController {
|
|
taskService.save(task);
|
|
taskService.save(task);
|
|
|
|
|
|
//创建任务相关信息
|
|
//创建任务相关信息
|
|
- for (String userId : uniqueUserIdsArray) {
|
|
|
|
|
|
+ for (String userId : userIds) {
|
|
TaskParallel taskParallel = new TaskParallel();
|
|
TaskParallel taskParallel = new TaskParallel();
|
|
taskParallel.setId(SnowFlakeUtil.getId());
|
|
taskParallel.setId(SnowFlakeUtil.getId());
|
|
taskParallel.setProcessInstanceId(processInstanceId.toString());
|
|
taskParallel.setProcessInstanceId(processInstanceId.toString());
|
|
@@ -541,8 +539,8 @@ public class TaskController extends BladeController {
|
|
}
|
|
}
|
|
|
|
|
|
Set<String> aopParamsSet = new HashSet<>();
|
|
Set<String> aopParamsSet = new HashSet<>();
|
|
- if (uniqueUserIdsArray.length > 0) {
|
|
|
|
- for (String userId : uniqueUserIdsArray) {
|
|
|
|
|
|
+ if (userIds.length > 0) {
|
|
|
|
+ for (String userId : userIds) {
|
|
String param = userId + "," + archiveTaskBatchReportDTO.getProjectId() + "," + archiveTaskBatchReportDTO.getContractId();
|
|
String param = userId + "," + archiveTaskBatchReportDTO.getProjectId() + "," + archiveTaskBatchReportDTO.getContractId();
|
|
aopParamsSet.add(param);
|
|
aopParamsSet.add(param);
|
|
}
|
|
}
|