Commit 8429a04dd34d3573ca5895a1109dfd2015bcb19f
Merge remote-tracking branch 'origin/dev' into dev
Showing
7 changed files
with
50 additions
and
10 deletions
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/service/task/BpmTaskServiceImpl.java
| ... | ... | @@ -286,7 +286,14 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 286 | 286 | || task.getCreateTime().before(DateUtils.of(pageVO.getCreateTime()[0])) |
| 287 | 287 | || task.getCreateTime().after(DateUtils.of(pageVO.getCreateTime()[1]))); |
| 288 | 288 | } |
| 289 | - return new PageResult<>(tasks, count); | |
| 289 | + | |
| 290 | + // 过滤掉所有deleteReason = MI_END的任务,再进行遍历 解决管理端 或签任务展示 系统自动取消的问题 | |
| 291 | + List<HistoricTaskInstance> nonMIEndTaskList = tasks.stream() | |
| 292 | + .filter(task -> !"MI_END".equals(task.getDeleteReason())) | |
| 293 | + .collect(Collectors.toList()); | |
| 294 | + | |
| 295 | + | |
| 296 | + return new PageResult<>(nonMIEndTaskList, count); | |
| 290 | 297 | } |
| 291 | 298 | |
| 292 | 299 | @Override | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmAIServiceImpl.java
| ... | ... | @@ -213,7 +213,9 @@ public class BpmAIServiceImpl implements BpmAIService{ |
| 213 | 213 | .map(AdminUserRespDTO::getId) |
| 214 | 214 | // 收集结果到List |
| 215 | 215 | .collect(Collectors.toList()); |
| 216 | - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0)); | |
| 216 | + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0)); | |
| 217 | + //养护组张角色多人模式 | |
| 218 | + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables); | |
| 217 | 219 | } |
| 218 | 220 | |
| 219 | 221 | String processInstanceId = processInstanceApi.createProcessInstance(userId, |
| ... | ... | @@ -260,7 +262,9 @@ public class BpmAIServiceImpl implements BpmAIService{ |
| 260 | 262 | .map(AdminUserRespDTO::getId) |
| 261 | 263 | // 收集结果到List |
| 262 | 264 | .collect(Collectors.toList()); |
| 263 | - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 265 | + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 266 | + //养护组张角色多人模式 | |
| 267 | + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables); | |
| 264 | 268 | //流程变量重新赋值 |
| 265 | 269 | runtimeService.setVariables(instanceId,processInstanceVariables); |
| 266 | 270 | |
| ... | ... | @@ -316,7 +320,9 @@ public class BpmAIServiceImpl implements BpmAIService{ |
| 316 | 320 | .map(AdminUserRespDTO::getId) |
| 317 | 321 | // 收集结果到List |
| 318 | 322 | .collect(Collectors.toList()); |
| 319 | - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 323 | + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 324 | + //养护组张角色多人模式 | |
| 325 | + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables); | |
| 320 | 326 | //流程变量重新赋值 |
| 321 | 327 | runtimeService.setVariables(instanceId,processInstanceVariables); |
| 322 | 328 | } | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
| ... | ... | @@ -53,6 +53,7 @@ import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; |
| 53 | 53 | import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum; |
| 54 | 54 | import com.zteits.urbanops.module.workorder.enums.BusiLineWorkerRoleCodeEnum; |
| 55 | 55 | import com.zteits.urbanops.module.workorder.enums.EventSourceEnum; |
| 56 | +import com.zteits.urbanops.module.workorder.util.RoleListUtils; | |
| 56 | 57 | import com.zteits.urbanops.module.workorder.util.TaskNodeUtils; |
| 57 | 58 | import jakarta.annotation.Resource; |
| 58 | 59 | import jodd.util.StringUtil; |
| ... | ... | @@ -647,7 +648,10 @@ public class BpmGardenServiceImpl implements BpmGardenService{ |
| 647 | 648 | .map(AdminUserRespDTO::getId) |
| 648 | 649 | // 收集结果到List |
| 649 | 650 | .collect(Collectors.toList()); |
| 650 | - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0)); | |
| 651 | + | |
| 652 | + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0)); | |
| 653 | + //养护组张角色多人模式 | |
| 654 | + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables); | |
| 651 | 655 | String processInstanceId = processInstanceApi.createProcessInstance(userId, |
| 652 | 656 | // new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO) |
| 653 | 657 | new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_WORKORDER_COMMON_PROD) | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmInspectorServiceImpl.java
| ... | ... | @@ -205,7 +205,9 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{ |
| 205 | 205 | .map(AdminUserRespDTO::getId) |
| 206 | 206 | // 收集结果到List |
| 207 | 207 | .collect(Collectors.toList()); |
| 208 | - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0)); | |
| 208 | + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0)); | |
| 209 | + //养护组张角色多人模式 | |
| 210 | + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables); | |
| 209 | 211 | } |
| 210 | 212 | |
| 211 | 213 | String processInstanceId = processInstanceApi.createProcessInstance(userId, |
| ... | ... | @@ -252,7 +254,9 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{ |
| 252 | 254 | .map(AdminUserRespDTO::getId) |
| 253 | 255 | // 收集结果到List |
| 254 | 256 | .collect(Collectors.toList()); |
| 255 | - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 257 | + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 258 | + //养护组张角色多人模式 | |
| 259 | + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables); | |
| 256 | 260 | //流程变量重新赋值 |
| 257 | 261 | runtimeService.setVariables(instanceId,processInstanceVariables); |
| 258 | 262 | |
| ... | ... | @@ -308,7 +312,9 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{ |
| 308 | 312 | .map(AdminUserRespDTO::getId) |
| 309 | 313 | // 收集结果到List |
| 310 | 314 | .collect(Collectors.toList()); |
| 311 | - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 315 | + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 316 | + //养护组张角色多人模式 | |
| 317 | + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables); | |
| 312 | 318 | //流程变量重新赋值 |
| 313 | 319 | runtimeService.setVariables(instanceId,processInstanceVariables); |
| 314 | 320 | } | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmRegionMgrServiceImpl.java
| ... | ... | @@ -187,7 +187,9 @@ public class BpmRegionMgrServiceImpl implements BpmRegionMgrService{ |
| 187 | 187 | .map(AdminUserRespDTO::getId) |
| 188 | 188 | // 收集结果到List |
| 189 | 189 | .collect(Collectors.toList()); |
| 190 | - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0)); | |
| 190 | + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0)); | |
| 191 | + //养护组张角色多人模式 | |
| 192 | + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables); | |
| 191 | 193 | String processInstanceId = processInstanceApi.createProcessInstance(userId, |
| 192 | 194 | // new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO) |
| 193 | 195 | new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_REGION_MGR_WO) | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmUniversalServiceImpl.java
| ... | ... | @@ -214,7 +214,9 @@ public class BpmUniversalServiceImpl implements BpmUniversalService{ |
| 214 | 214 | .map(AdminUserRespDTO::getId) |
| 215 | 215 | // 收集结果到List |
| 216 | 216 | .collect(Collectors.toList()); |
| 217 | - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 217 | + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配 | |
| 218 | + //养护组张角色多人模式 | |
| 219 | + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables); | |
| 218 | 220 | //流程变量重新赋值 |
| 219 | 221 | runtimeService.setVariables(instanceId,processInstanceVariables); |
| 220 | 222 | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/util/RoleListUtils.java
| 1 | 1 | package com.zteits.urbanops.module.workorder.util; |
| 2 | 2 | |
| 3 | +import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; | |
| 3 | 4 | import com.zteits.urbanops.module.system.controller.admin.permission.vo.role.RoleRespVO; |
| 4 | 5 | |
| 5 | 6 | import java.util.List; |
| 7 | +import java.util.Map; | |
| 6 | 8 | import java.util.Objects; |
| 7 | 9 | import java.util.Set; |
| 8 | 10 | import java.util.stream.Collectors; |
| 9 | 11 | |
| 12 | +import static com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant.BPM_COMMON_PROD_LEADERID; | |
| 13 | + | |
| 10 | 14 | /** |
| 11 | 15 | * 类描述:判断角色包含关系工具类 |
| 12 | 16 | * 创建人:yanhuiqing |
| ... | ... | @@ -77,4 +81,13 @@ public class RoleListUtils { |
| 77 | 81 | |
| 78 | 82 | return containsCode1 && containsCode2; |
| 79 | 83 | } |
| 84 | + | |
| 85 | + public static void teamLeaderByRoleAssign(List<AdminUserRespDTO> userList, Map<String, Object> processInstanceVariables){ | |
| 86 | + //养护组长指派为多人 | |
| 87 | + String assigneeIdStr = userList.stream() | |
| 88 | + .map(AdminUserRespDTO::getId) // 取Long类型ID | |
| 89 | + .map(String::valueOf) // 转String | |
| 90 | + .collect(Collectors.joining(",")); // 拼接成1001,1002,1003 | |
| 91 | + processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, assigneeIdStr); | |
| 92 | + } | |
| 80 | 93 | } |
| 81 | 94 | \ No newline at end of file | ... | ... |