This commit is contained in:
lijiaqi 2023-10-25 14:12:27 +08:00
parent bf461d7880
commit d09ad1f29a
1 changed files with 4 additions and 0 deletions

View File

@ -152,13 +152,16 @@ public class WorkFlowService extends BaseService<WorkFlowMapper, WorkFlow> {
switch (vo.getStatus()) { switch (vo.getStatus()) {
case "PASS": case "PASS":
// 4.1 同意 // 4.1 同意
workFlow.setData(vo.getData());
return workFlowTypeFactory.getWorkFlowType(workFlow.getType()).execute(vo, workFlow); return workFlowTypeFactory.getWorkFlowType(workFlow.getType()).execute(vo, workFlow);
case "REFUSE": case "REFUSE":
//4.2 驳回 //4.2 驳回
workFlow.setData(vo.getData());
return this.refuse(workFlow, vo.getRemarks()); return this.refuse(workFlow, vo.getRemarks());
case "SUBMIT": case "SUBMIT":
// 4.3 提交 // 4.3 提交
if (StrUtil.isBlank(vo.getData())) return AjaxResult.fail("表单数据不能为空"); if (StrUtil.isBlank(vo.getData())) return AjaxResult.fail("表单数据不能为空");
workFlow.setData(vo.getData());
if (workFlow.getStep() == 1) { if (workFlow.getStep() == 1) {
// 4.3.1 如果是第一步则修改流程提交数据 // 4.3.1 如果是第一步则修改流程提交数据
workFlow.setData(vo.getData()); workFlow.setData(vo.getData());
@ -182,6 +185,7 @@ public class WorkFlowService extends BaseService<WorkFlowMapper, WorkFlow> {
return workFlowTypeFactory.getWorkFlowType(workFlow.getType()).execute(vo, workFlow); return workFlowTypeFactory.getWorkFlowType(workFlow.getType()).execute(vo, workFlow);
case "REFUSE_SUPERIOR": case "REFUSE_SUPERIOR":
// 4.4 驳回上级 // 4.4 驳回上级
workFlow.setData(vo.getData());
return this.refuseSuperior(workFlow, vo.getRemarks()); return this.refuseSuperior(workFlow, vo.getRemarks());
default: default:
return AjaxResult.fail("执行状态类型错误"); return AjaxResult.fail("执行状态类型错误");