|
@@ -9,15 +9,14 @@ import com.aizuda.boot.modules.flw.entity.vo.*;
|
|
|
import com.aizuda.boot.modules.flw.flow.FlowForm;
|
|
|
import com.aizuda.boot.modules.flw.flow.FlowHelper;
|
|
|
import com.aizuda.boot.modules.flw.mapper.FlowlongMapper;
|
|
|
-import com.aizuda.boot.modules.flw.service.IFlwProcessApprovalService;
|
|
|
-import com.aizuda.boot.modules.flw.service.IFlwProcessConfigureService;
|
|
|
-import com.aizuda.boot.modules.flw.service.IFlwProcessFormService;
|
|
|
-import com.aizuda.boot.modules.flw.service.IProcessTaskService;
|
|
|
+import com.aizuda.boot.modules.flw.service.*;
|
|
|
import com.aizuda.bpm.engine.FlowDataTransfer;
|
|
|
import com.aizuda.bpm.engine.FlowLongEngine;
|
|
|
+import com.aizuda.bpm.engine.ProcessService;
|
|
|
import com.aizuda.bpm.engine.TaskService;
|
|
|
import com.aizuda.bpm.engine.core.FlowCreator;
|
|
|
import com.aizuda.bpm.engine.core.enums.PerformType;
|
|
|
+import com.aizuda.bpm.engine.core.enums.ProcessType;
|
|
|
import com.aizuda.bpm.engine.core.enums.TaskType;
|
|
|
import com.aizuda.bpm.engine.entity.*;
|
|
|
import com.aizuda.bpm.engine.model.ModelHelper;
|
|
@@ -53,6 +52,7 @@ public class ProcessTaskServiceImpl implements IProcessTaskService {
|
|
|
private FlowLongEngine flowLongEngine;
|
|
|
private IFlwProcessApprovalService flwProcessApprovalService;
|
|
|
private IFlwProcessFormService flwProcessFormService;
|
|
|
+ private IFlwFormTemplateService flwFormTemplateService;
|
|
|
private IFlwProcessConfigureService flwProcessConfigureService;
|
|
|
|
|
|
@Override
|
|
@@ -98,17 +98,6 @@ public class ProcessTaskServiceImpl implements IProcessTaskService {
|
|
|
vo.setCreateBy(hisInstance.getCreateBy());
|
|
|
vo.setCreateTime(hisInstance.getCreateTime());
|
|
|
|
|
|
- // 表单填写内容,子流程需要获取主流程表单
|
|
|
- FlwProcessForm flwProcessForm;
|
|
|
- if (null != hisInstance.getParentInstanceId()) {
|
|
|
- flwProcessForm = flwProcessFormService.getByInstanceId(hisInstance.getParentInstanceId());
|
|
|
- } else {
|
|
|
- flwProcessForm = flwProcessFormService.getByInstanceId(instanceId);
|
|
|
- }
|
|
|
- if (null != flwProcessForm) {
|
|
|
- vo.setFormContent(flwProcessForm.getContent());
|
|
|
- }
|
|
|
-
|
|
|
// 获取当前流程模型
|
|
|
FlwExtInstance flwExtInstance = extInstanceMapper.selectById(instanceId);
|
|
|
vo.setModelContent(flwExtInstance.getModelContent());
|
|
@@ -134,12 +123,31 @@ public class ProcessTaskServiceImpl implements IProcessTaskService {
|
|
|
vo.setAllowRollback(nodeModel.getAllowRollback());
|
|
|
}
|
|
|
|
|
|
- // 流程设置
|
|
|
FlwProcessConfigure configure = flwProcessConfigureService.getByProcessId(hisInstance.getProcessId());
|
|
|
if (null != configure) {
|
|
|
+ // 流程设置
|
|
|
vo.setProcessSetting(configure.getProcessSetting());
|
|
|
+
|
|
|
+ // 表单设置
|
|
|
+ FlwProcess flwProcess = flowLongEngine.processService().getProcessById(hisInstance.getProcessId());
|
|
|
+ if (ProcessType.business.eq(flwProcess.getProcessType())) {
|
|
|
+ // 业务流程,加载表单模板内容
|
|
|
+ vo.setFormTemplate(flwFormTemplateService.getByConfigure(configure.getProcessForm()));
|
|
|
+ } else {
|
|
|
+ // 普通流程,表单填写内容,子流程需要获取主流程表单
|
|
|
+ FlwProcessForm flwProcessForm;
|
|
|
+ if (null != hisInstance.getParentInstanceId()) {
|
|
|
+ flwProcessForm = flwProcessFormService.getByInstanceId(hisInstance.getParentInstanceId());
|
|
|
+ } else {
|
|
|
+ flwProcessForm = flwProcessFormService.getByInstanceId(instanceId);
|
|
|
+ }
|
|
|
+ if (null != flwProcessForm) {
|
|
|
+ vo.setFormContent(flwProcessForm.getContent());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
// 审批记录列表
|
|
|
List<FlwProcessApproval> processApprovals = flwProcessApprovalService.listByInstanceId(instanceId);
|
|
|
|