From 8780ed6c89e87575d6ac9c97c92a3cee6ffea21e Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Tue, 23 Apr 2024 15:28:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=BA=BF=E4=B8=8B=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=A5=A8=E4=BD=9C=E5=BA=9F=E7=8E=AF=E8=8A=82=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FirstWorkTicketServiceImpl.java | 4 +- .../service/impl/TicketProcessServiceImpl.java | 44 +++++++++++++++++++--- 2 files changed, 42 insertions(+), 6 deletions(-) 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"); + } + } /** * 获取描述信息 *