diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/accessTicket/entity/AccessTicketEntity.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/accessTicket/entity/AccessTicketEntity.java index 183fbb0..017c2da 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/accessTicket/entity/AccessTicketEntity.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/accessTicket/entity/AccessTicketEntity.java @@ -111,6 +111,9 @@ public class AccessTicketEntity extends TenantEntity implements Serializable { @ApiModelProperty("当前步骤处理人员名称") private String nextStepOperator; + @ApiModelProperty("当前步骤处理人员账号") + private String nextStepExecutor; + @ApiModelProperty("流程实例Id") private String processInstanceId; diff --git a/hzims-service/inspect/pom.xml b/hzims-service/inspect/pom.xml index 401e4d8..e97a11d 100644 --- a/hzims-service/inspect/pom.xml +++ b/hzims-service/inspect/pom.xml @@ -92,24 +92,6 @@ ehcache-core 2.6.9 - - - - - - - - - - - - - - - - - - cn.afterturn easypoi-spring-boot-starter @@ -121,7 +103,6 @@ itextpdf 5.5.13 - com.itextpdf.tool xmlworker @@ -137,7 +118,7 @@ javase 2.2 - + org.springframework spring-test diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/controller/AccessTicketController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/controller/AccessTicketController.java index a6a8708..e0d838f 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/controller/AccessTicketController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/controller/AccessTicketController.java @@ -111,4 +111,11 @@ public class AccessTicketController extends BladeController { public R> roleQueryUser(@RequestParam("roleAlias") String roleAlias) { return R.data(accessTicketService.roleQueryUser(roleAlias)); } + + @GetMapping("/stageExecutor") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "阶段执行人查询") + public R> stageExecutor(@RequestParam("processInstanceId") String processInstanceId) { + return R.data(accessTicketService.stageExecutor(processInstanceId)); + } } \ No newline at end of file diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/AccessTicketService.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/AccessTicketService.java index fc5480f..b192e1b 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/AccessTicketService.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/AccessTicketService.java @@ -37,4 +37,6 @@ public interface AccessTicketService extends IService { List roleQueryUser(String roleAlias); AccessTicketTaskCountVo taskCount(AccessTicketTaskCountReqDTO param); + + List stageExecutor(String processInstanceId); } \ No newline at end of file diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java index e544340..87d211c 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java @@ -104,6 +104,8 @@ public class AccessTicketServiceImpl extends ServiceImpl> result = userClient.relationUserListByRoleAlias(tenantId, deptId, alias); - if(!result.isSuccess()){ - throw new ServiceException("查询角色用户信息失败!"); - } - return result.getData().get(0); - } - /** * 检修工作票列表分页查询 @@ -314,7 +298,10 @@ public class AccessTicketServiceImpl extends ServiceImpl!"流程结束".equals(o.getTaskName())).count()); return task; } + + /** + * 阶段执行人查询 + * @param processInstanceId + * @return + */ + @Override + public List stageExecutor(String processInstanceId) { + AccessTicketEntity entity = this.getOne(Wrappers.lambdaQuery() + .eq(AccessTicketEntity::getProcessInstanceId,processInstanceId) + ); + if(ObjectUtil.isEmpty(entity) || StringUtils.isEmpty(entity.getNextStepExecutor())){ + return new ArrayList<>(); + } + List users = new ArrayList<>(); + Arrays.stream(entity.getNextStepExecutor().split(",")).forEach(account->{ + User user = UserCache.getUser(Long.valueOf(account)); + if(ObjectUtil.isNotEmpty(user)){ + users.add(user); + } + }); + return users; + } } \ No newline at end of file