完善 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
application-my.yaml
/yudao-ui-app/unpackage/

View File

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

View File

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

View File

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