创建流程审核组成员表
This commit is contained in:
parent
2059a69538
commit
82ec4b4da5
|
@ -1,6 +1,5 @@
|
||||||
package io.renren.modules.activiti.controller;
|
package io.renren.modules.activiti.controller;
|
||||||
|
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.renren.common.annotation.LogOperation;
|
import io.renren.common.annotation.LogOperation;
|
||||||
|
@ -12,7 +11,6 @@ import io.renren.common.utils.Result;
|
||||||
import io.renren.modules.activiti.dto.BatchCompleteDTO;
|
import io.renren.modules.activiti.dto.BatchCompleteDTO;
|
||||||
import io.renren.modules.activiti.dto.TaskDTO;
|
import io.renren.modules.activiti.dto.TaskDTO;
|
||||||
import io.renren.modules.activiti.service.ActTaskService;
|
import io.renren.modules.activiti.service.ActTaskService;
|
||||||
import io.renren.modules.resource.service.impl.ResourceServiceImpl;
|
|
||||||
import io.renren.modules.security.user.SecurityUser;
|
import io.renren.modules.security.user.SecurityUser;
|
||||||
import io.renren.modules.security.user.UserDetail;
|
import io.renren.modules.security.user.UserDetail;
|
||||||
import io.renren.modules.sys.dto.SysUserDTO;
|
import io.renren.modules.sys.dto.SysUserDTO;
|
||||||
|
@ -252,7 +250,7 @@ public class ActTaskController {
|
||||||
return new Result().error(ErrorCode.PARAMS_GET_ERROR);
|
return new Result().error(ErrorCode.PARAMS_GET_ERROR);
|
||||||
}
|
}
|
||||||
actTaskService.completeTask(taskId, comment);
|
actTaskService.completeTask(taskId, comment);
|
||||||
return new Result();
|
return new Result().ok("审核通过");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -473,7 +471,7 @@ public class ActTaskController {
|
||||||
return new Result().ok(resultMap);
|
return new Result().ok(resultMap);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("浪潮数据查询异常", e);
|
logger.error("浪潮数据查询异常", e);
|
||||||
|
|
||||||
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -580,7 +578,7 @@ public class ActTaskController {
|
||||||
return new Result().ok(arrayList);
|
return new Result().ok(arrayList);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("浪潮数据查询异常", e);
|
logger.error("浪潮数据查询异常", e);
|
||||||
|
|
||||||
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -603,7 +601,7 @@ public class ActTaskController {
|
||||||
return new Result().ok(list);
|
return new Result().ok(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("浪潮数据查询异常", e);
|
logger.error("浪潮数据查询异常", e);
|
||||||
|
|
||||||
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -497,8 +497,9 @@ public class ActTaskService extends BaseServiceImpl {
|
||||||
public void completeTask(String taskId, String comment) {
|
public void completeTask(String taskId, String comment) {
|
||||||
String userId = SecurityUser.getUserId().toString();
|
String userId = SecurityUser.getUserId().toString();
|
||||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||||
if (StringUtils.isNotEmpty(task.getAssignee())) {
|
if (StringUtils.isNotEmpty(task.getAssignee())
|
||||||
taskService.setAssignee(taskId, userId);
|
&& !task.getAssignee().equals(userId)) {
|
||||||
|
taskService.setAssignee(taskId, userId); //与原任务审核人员不一致时,换成实际通过的人
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(comment)) {
|
if (StringUtils.isNotEmpty(comment)) {
|
||||||
taskService.addComment(taskId, task.getProcessInstanceId(), comment);
|
taskService.addComment(taskId, task.getProcessInstanceId(), comment);
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
CREATE TABLE `sys_audit_team` (
|
||||||
|
`id` bigint NOT NULL COMMENT '主键ID',
|
||||||
|
`creator` bigint NOT NULL COMMENT '创建人',
|
||||||
|
`create_date` datetime NOT NULL COMMENT '创建时间',
|
||||||
|
`name` longtext NOT NULL COMMENT '审核组名称',
|
||||||
|
`member` json NOT NULL COMMENT '审核组成员id数组',
|
||||||
|
`index` varchar(255) NULL COMMENT '审核组索引',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
INDEX `name`(`name`) USING BTREE COMMENT '审核组名称索引'
|
||||||
|
) COMMENT = '流程审核组组员';
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
Loading…
Reference in New Issue