diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java index 66f6b0a..41d0b30 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java @@ -373,7 +373,9 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl safetyMeasuresList = workTicketVo.getSafetyMeasuresList(); if(CollectionUtil.isNotEmpty(safetyMeasuresList)) { @@ -643,7 +641,43 @@ public class TicketProcessServiceImpl implements TicketProcessService { } } - + /** + * 填充工作票当前流程环节名称 + * @param workTicket 工作票 + * @param response redis订阅消息 + * @return 当前流程环节名称 + */ + private void fillCurrentFlowName(WorkTicketInfoEntity workTicket, ProcessWorkFlowResponse response) { + String taskId = response.getTaskId(); + Object variablesObj = response.getVariables(); + JSONObject variable = JSONObject.parseObject(JSON.toJSONString(variablesObj)); + Boolean signFlag = Func.isNotEmpty(variable.getBoolean("signFlag")) ? variable.getBoolean("signFlag") : true; + Boolean receiveFlag = Func.isNotEmpty(variable.getBoolean("recieveFlag")) ? variable.getBoolean("recieveFlag") : true; + if(StringUtil.isNotBlank(taskId)) { + workTicket.setFlowUserId(response.getUserId()); + workTicket.setNextStepOperator(response.getNextStepOperator()); + String flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批"); + workTicket.setFlowDescription(flowDescription); + workTicket.setFlowTaskId(taskId); + workTicket.setFlowTaskName(response.getTaskName()); + } + else if(!signFlag || !receiveFlag ) { + // 作废 + workTicket.setFlowDescription("作废"); + workTicket.setFlowTaskName("作废"); + workTicket.setNextStepOperator(null); + workTicket.setStepOperator(null); + } + else { + // 结束 + workTicket.setFlowDescription("结束"); + workTicket.setFlowTaskName("结束"); + workTicket.setNextStepOperator(null); + workTicket.setStepOperator(null); + workTicket.setFlowStatus(999); + workTicket.setImplementStatus("3"); + } + } /** * 获取描述信息 *