소스 검색

bug

Signed-off-by: liuyc <56808083@qq.com>
liuyc 1 년 전
부모
커밋
4babde758c

+ 4 - 6
blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskController.java

@@ -414,7 +414,7 @@ public class TaskController extends BladeController {
         //预设流程,获取对应任务人id
         String resultString = "";
         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) {
                 fixedFlowLinks.sort(Comparator.comparingInt(FixedFlowLink::getFixedFlowLinkSort));
                 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));
         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(",");
         if (dataArr.length > 0) {
             for (String id : dataArr) {
@@ -509,7 +507,7 @@ public class TaskController extends BladeController {
                 taskService.save(task);
 
                 //创建任务相关信息
-                for (String userId : uniqueUserIdsArray) {
+                for (String userId : userIds) {
                     TaskParallel taskParallel = new TaskParallel();
                     taskParallel.setId(SnowFlakeUtil.getId());
                     taskParallel.setProcessInstanceId(processInstanceId.toString());
@@ -541,8 +539,8 @@ public class TaskController extends BladeController {
             }
 
             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();
                     aopParamsSet.add(param);
                 }

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java

@@ -481,7 +481,7 @@ public class TaskController extends BladeController {
         /*预设流程*/
         String resultString = "";
         if (ObjectUtil.isNotEmpty(approvalDTO.getFixedFlowId())) {
-            List<FixedFlowLink> fixedFlowLinks = jdbcTemplate.query("select fixed_flow_link_user,fixed_flow_link_sort from u_fixed_flow_link where fixed_flow_id = " + approvalDTO.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 = " + approvalDTO.getFixedFlowId(), new BeanPropertyRowMapper<>(FixedFlowLink.class));
             if (fixedFlowLinks.size() > 0) {
                 fixedFlowLinks.sort(Comparator.comparingInt(FixedFlowLink::getFixedFlowLinkSort));
                 StringBuilder sortStr = new StringBuilder();