Browse Source

#检修工作票拨打电话

zhongwei
yang_shj 2 weeks ago
parent
commit
dd37429e52
  1. 3
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/accessTicket/entity/AccessTicketEntity.java
  2. 21
      hzims-service/inspect/pom.xml
  3. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/controller/AccessTicketController.java
  4. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/AccessTicketService.java
  5. 48
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java

3
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("当前步骤处理人员名称") @ApiModelProperty("当前步骤处理人员名称")
private String nextStepOperator; private String nextStepOperator;
@ApiModelProperty("当前步骤处理人员账号")
private String nextStepExecutor;
@ApiModelProperty("流程实例Id") @ApiModelProperty("流程实例Id")
private String processInstanceId; private String processInstanceId;

21
hzims-service/inspect/pom.xml

@ -92,24 +92,6 @@
<artifactId>ehcache-core</artifactId> <artifactId>ehcache-core</artifactId>
<version>2.6.9</version> <version>2.6.9</version>
</dependency> </dependency>
<!-- <dependency>-->
<!-- <groupId>io.minio</groupId>-->
<!-- <artifactId>minio</artifactId>-->
<!-- <version>6.0.7</version>-->
<!-- </dependency>-->
<!--短信发送平台 Start 引用后有druid版本冲突-->
<!--<dependency>-->
<!--<groupId>com.hnac.hzinfo</groupId>-->
<!--<artifactId>hzinfo-sms-aliyun-new</artifactId>-->
<!--<version>1.0-SNAPSHOT</version>-->
<!--</dependency>-->
<!--短信发送平台 End-->
<!-- <dependency>-->
<!-- <groupId>com.alibaba</groupId>-->
<!-- <artifactId>easyexcel</artifactId>-->
<!-- <version>2.2.7</version>-->
<!-- </dependency>-->
<dependency> <dependency>
<groupId>cn.afterturn</groupId> <groupId>cn.afterturn</groupId>
<artifactId>easypoi-spring-boot-starter</artifactId> <artifactId>easypoi-spring-boot-starter</artifactId>
@ -121,7 +103,6 @@
<artifactId>itextpdf</artifactId> <artifactId>itextpdf</artifactId>
<version>5.5.13</version> <version>5.5.13</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/com.itextpdf.tool/xmlworker -->
<dependency> <dependency>
<groupId>com.itextpdf.tool</groupId> <groupId>com.itextpdf.tool</groupId>
<artifactId>xmlworker</artifactId> <artifactId>xmlworker</artifactId>
@ -137,7 +118,7 @@
<artifactId>javase</artifactId> <artifactId>javase</artifactId>
<version>2.2</version> <version>2.2</version>
</dependency> </dependency>
<!-- 用于创建multipartfile对象 start--> <!-- 用于创建multipart-file对象 start-->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId> <artifactId>spring-test</artifactId>

7
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<List<User>> roleQueryUser(@RequestParam("roleAlias") String roleAlias) { public R<List<User>> roleQueryUser(@RequestParam("roleAlias") String roleAlias) {
return R.data(accessTicketService.roleQueryUser(roleAlias)); return R.data(accessTicketService.roleQueryUser(roleAlias));
} }
@GetMapping("/stageExecutor")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "阶段执行人查询")
public R<List<User>> stageExecutor(@RequestParam("processInstanceId") String processInstanceId) {
return R.data(accessTicketService.stageExecutor(processInstanceId));
}
} }

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/AccessTicketService.java

@ -37,4 +37,6 @@ public interface AccessTicketService extends IService<AccessTicketEntity> {
List<User> roleQueryUser(String roleAlias); List<User> roleQueryUser(String roleAlias);
AccessTicketTaskCountVo taskCount(AccessTicketTaskCountReqDTO param); AccessTicketTaskCountVo taskCount(AccessTicketTaskCountReqDTO param);
List<User> stageExecutor(String processInstanceId);
} }

48
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java

@ -104,6 +104,8 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
entity.setTaskName(processWorkFlowResponse.getTaskName()); entity.setTaskName(processWorkFlowResponse.getTaskName());
// 流程阶段执行人员名称 // 流程阶段执行人员名称
entity.setNextStepOperator(processWorkFlowResponse.getNextStepOperator()); entity.setNextStepOperator(processWorkFlowResponse.getNextStepOperator());
// 流程阶段执行人员账号
entity.setNextStepExecutor(processWorkFlowResponse.getUserId());
// 流程步骤 // 流程步骤
if(variables.containsKey("processReversalStep")){ if(variables.containsKey("processReversalStep")){
@ -262,24 +264,6 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
return this.updateById(entity); return this.updateById(entity);
} }
/**
* 获取当前机构指定角色的用户
* @param tenantId
* @param deptId
* @param alias
* @return
*/
public User queryRoleUser(String tenantId, Long deptId, String alias){
if(Func.isEmpty(tenantId)){
tenantId = AuthUtil.getTenantId();
}
R<List<User>> 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<AccessTicketMapper, Acc
@Override @Override
public void preview(Long id) { public void preview(Long id) {
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletResponse response = servletRequestAttributes.getResponse(); HttpServletResponse response = null;
if (servletRequestAttributes != null) {
response = servletRequestAttributes.getResponse();
}
// 查询检修工作票记录 // 查询检修工作票记录
AccessTicketPreviewVo preview = this.previewParams(id); AccessTicketPreviewVo preview = this.previewParams(id);
// 参数对象 // 参数对象
@ -550,4 +537,27 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
task.setTaskIncomplete((int) entitys.stream().filter(o->!"流程结束".equals(o.getTaskName())).count()); task.setTaskIncomplete((int) entitys.stream().filter(o->!"流程结束".equals(o.getTaskName())).count());
return task; return task;
} }
/**
* 阶段执行人查询
* @param processInstanceId
* @return
*/
@Override
public List<User> stageExecutor(String processInstanceId) {
AccessTicketEntity entity = this.getOne(Wrappers.<AccessTicketEntity>lambdaQuery()
.eq(AccessTicketEntity::getProcessInstanceId,processInstanceId)
);
if(ObjectUtil.isEmpty(entity) || StringUtils.isEmpty(entity.getNextStepExecutor())){
return new ArrayList<>();
}
List<User> 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;
}
} }
Loading…
Cancel
Save