|
|
|
@ -50,9 +50,7 @@ import org.springblade.core.log.exception.ServiceException;
|
|
|
|
|
import org.springblade.core.log.logger.BladeLogger; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.CollectionUtil; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
|
import org.springblade.core.tool.utils.*; |
|
|
|
|
import org.springblade.flow.core.entity.BladeFlow; |
|
|
|
|
import org.springblade.flow.core.feign.IFlowClient; |
|
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
@ -529,7 +527,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
workTicket.setProcessInstanceId(response.getProcessInstanceId()); |
|
|
|
|
this.saveWorkTicket(workTicket,response); |
|
|
|
|
this.fillCurrentFlowName(workTicket,response); |
|
|
|
|
firstWorkTicketService.updateById(workTicket); |
|
|
|
|
List<WorkTicketSafetyMeasureEntity> 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"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 获取描述信息 |
|
|
|
|
* |
|
|
|
|