| | |
| | | /** |
| | | * 流程实例 Convert |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | @Mapper |
| | | public interface BpmProcessInstanceConvert { |
| | |
| | | BpmProcessInstanceRespVO respVO = BeanUtils.toBean(processInstance, BpmProcessInstanceRespVO.class); |
| | | respVO.setStatus(FlowableUtils.getProcessInstanceStatus(processInstance)) |
| | | .setFormVariables(FlowableUtils.getProcessInstanceFormVariable(processInstance)); |
| | | // definition |
| | | respVO.setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class)); |
| | | copyTo(processDefinitionInfo, respVO.getProcessDefinition()); |
| | | // definition(流程定义可能已被删除,需要容错,否则前端拿到 500) |
| | | if (processDefinition != null) { |
| | | respVO.setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class)); |
| | | if (respVO.getProcessDefinition() != null && processDefinitionInfo != null) { |
| | | copyTo(processDefinitionInfo, respVO.getProcessDefinition()); |
| | | } |
| | | } |
| | | // user |
| | | if (startUser != null) { |
| | | respVO.setStartUser(BeanUtils.toBean(startUser, UserSimpleBaseVO.class)); |