完善 BPM 代码,补充工作流的视频教程

This commit is contained in:
YunaiV 2022-07-23 21:43:19 +08:00
parent 9b267746ab
commit 7ab0dfbe6e
5 changed files with 6 additions and 14 deletions

2
.gitignore vendored
View File

@ -47,3 +47,5 @@ nbdist/
rebel.xml rebel.xml
application-my.yaml application-my.yaml
/yudao-ui-app/unpackage/

View File

@ -12,7 +12,7 @@ import java.util.Date;
/** /**
* Bpm 流程任务的拓展表 * Bpm 流程任务的拓展表
* 主要解决 Activiti Task HistoricTaskInstance 不支持拓展字段所以新建拓展表 * 主要解决 Flowable Task HistoricTaskInstance 不支持拓展字段所以新建拓展表
* *
* @author 芋道源码 * @author 芋道源码
*/ */

View File

@ -144,5 +144,4 @@ public interface BpmProcessInstanceService {
*/ */
void updateProcessInstanceExtReject(String id, String reason); void updateProcessInstanceExtReject(String id, String reason);
} }

View File

@ -7,10 +7,7 @@ import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
import cn.iocoder.yudao.framework.common.util.object.PageUtils; import cn.iocoder.yudao.framework.common.util.object.PageUtils;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*;
import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert;
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO;
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO;
import cn.iocoder.yudao.module.bpm.dal.mysql.definition.BpmTaskAssignRuleMapper;
import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmActivityMapper;
import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmTaskExtMapper; import cn.iocoder.yudao.module.bpm.dal.mysql.task.BpmTaskExtMapper;
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceDeleteReasonEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceDeleteReasonEnum;
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum;
@ -67,10 +64,6 @@ public class BpmTaskServiceImpl implements BpmTaskService {
private BpmTaskExtMapper taskExtMapper; private BpmTaskExtMapper taskExtMapper;
@Resource @Resource
private BpmMessageService messageService; private BpmMessageService messageService;
@Resource
private BpmTaskAssignRuleMapper taskAssignRuleMapper;
@Resource
private BpmActivityMapper bpmActivityMapper;
@Override @Override
public PageResult<BpmTaskTodoPageItemRespVO> getTodoTaskPage(Long userId, BpmTaskTodoPageReqVO pageVO) { public PageResult<BpmTaskTodoPageItemRespVO> getTodoTaskPage(Long userId, BpmTaskTodoPageReqVO pageVO) {
@ -194,10 +187,6 @@ public class BpmTaskServiceImpl implements BpmTaskService {
taskExtMapper.updateByTaskId( taskExtMapper.updateByTaskId(
new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.APPROVE.getResult()) new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.APPROVE.getResult())
.setReason(reqVO.getReason())); .setReason(reqVO.getReason()));
// 判断任务是否为或签或签时删除其余不用审批的任务
List<BpmTaskAssignRuleDO> bpmTaskAssignRuleList =
taskAssignRuleMapper.selectListByProcessDefinitionId(task.getProcessDefinitionId(),
task.getTaskDefinitionKey());
} }
@Override @Override
@ -216,7 +205,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
// 更新任务拓展表为不通过 // 更新任务拓展表为不通过
taskExtMapper.updateByTaskId( taskExtMapper.updateByTaskId(
new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.REJECT.getResult()) new BpmTaskExtDO().setTaskId(task.getId()).setResult(BpmProcessInstanceResultEnum.REJECT.getResult())
.setReason(reqVO.getReason())); .setEndTime(new Date()).setReason(reqVO.getReason()));
} }
@Override @Override

View File

@ -45,6 +45,8 @@
</router-link> </router-link>
</div> </div>
</el-card> </el-card>
<!-- 审批记录 -->
<el-card class="box-card" v-loading="tasksLoad"> <el-card class="box-card" v-loading="tasksLoad">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="el-icon-picture-outline">审批记录</span> <span class="el-icon-picture-outline">审批记录</span>