diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java index 2ef7a12..7669242 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java @@ -54,6 +54,7 @@ public class OperationTicketController { operationTicketService.findPending(response); return true; } catch (Exception e) { + e.printStackTrace(); throw new ServiceException("操作票待处理:" + e.getMessage()); } } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java index af1d2bc..f2e930b 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java @@ -113,7 +113,6 @@ public class StandardTicketInfoController extends BladeController { /** * 根据月份,区域 获取操作详情数据 - * * @return */ @GetMapping("/areaMonthlyWithOperation/{page}/{size}") diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java index 7b94004..ed73e0c 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java @@ -41,6 +41,7 @@ import org.springblade.system.feign.ISysClient; import org.springblade.system.user.cache.UserCache; import org.springblade.system.user.entity.User; import org.springframework.beans.BeanUtils; +import org.springframework.beans.BeansException; import org.springframework.stereotype.Service; import javax.servlet.ServletOutputStream; @@ -157,7 +158,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { log.info("获取下一个审批人是: {} ", response.getNextStepOperator()); log.info("获取下一个用户Id是: {} ", response.getUserId()); log.info("获取当前任务名称是: {} ", response.getTaskName()); - log.info("获取根据handleType区分是用户还是候选组角色: {}", response.getHandleType()); + log.info("获取根据handleType区分是用户还是候选组角色: {}", response.getHandleType()); //json转换表单 String formData = JSON.toJSONString(response.getVariables()); log.info("获取表单的数据:{}", formData); @@ -177,6 +178,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { log.error("获取操作票不存在"); return; } + //设置id StandardTicketInfoEntity newStandardTicketInfoEntity = new StandardTicketInfoEntity(); BeanUtils.copyProperties(standardTicketInfoVo, newStandardTicketInfoEntity); @@ -186,6 +188,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { newStandardTicketInfoEntity.setProcessInstanceId(response.getProcessInstanceId()); standardTicketInfoService.updateById(newStandardTicketInfoEntity); + //更新安全措施 List standardTicketMeasureVos = standardTicketInfoVo.getStandardTicketMeasureVos(); if (CollectionUtils.isNotEmpty(standardTicketMeasureVos)) { @@ -196,6 +199,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { }).collect(Collectors.toList()); standardTicketMeasureService.updateBatchById(standardTicketMeasureEntities); } + //推送消息 if (response.getTaskId() != null) { MessagePushRecordDto message = new MessagePushRecordDto(); @@ -236,6 +240,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { } } + } @@ -247,19 +252,23 @@ public class OperationTicketServiceImpl implements OperationTicketService { */ private void saveStandardTicketInfoEntity(StandardTicketInfoEntity newStandardTicketInfoEntity, ProcessWorkFlowResponse response) { String flowDescription = ""; - //如果response.getHandleType() 是0使用户 - newStandardTicketInfoEntity.setFlowUserId(response.getUserId()); - newStandardTicketInfoEntity.setNextStepOperator(response.getNextStepOperator()); - flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批"); + + if (response.getNextStepOperator() != null) { + flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批"); + } //如果taskId为空 String taskId = response.getTaskId(); - if (StringUtils.isEmpty(taskId)) { + log.info("StringUtils.isBlank(taskId) = " + StringUtils.isBlank(taskId)); + if (StringUtils.isBlank(taskId)) { newStandardTicketInfoEntity.setFlowDescription("结束"); newStandardTicketInfoEntity.setFlowTaskId(" "); newStandardTicketInfoEntity.setFlowTaskName("结束"); newStandardTicketInfoEntity.setNextStepOperator(" "); newStandardTicketInfoEntity.setFlowStatus(999); } else { + //如果response.getHandleType() 是0使用户 + newStandardTicketInfoEntity.setFlowUserId(response.getUserId()); + newStandardTicketInfoEntity.setNextStepOperator(response.getNextStepOperator()); newStandardTicketInfoEntity.setFlowTaskId(taskId); newStandardTicketInfoEntity.setFlowTaskName(response.getTaskName()); newStandardTicketInfoEntity.setFlowDescription(flowDescription);