Merge branch 'dev'

This commit is contained in:
wangliwen 2022-12-12 09:54:49 +08:00
commit 66e0e637d3
3 changed files with 21 additions and 8 deletions

View File

@ -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("数据查询异常,请联系云资源数据库管理人员!");
} }

View File

@ -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);

View File

@ -0,0 +1,14 @@
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
drop table IF EXISTS `sys_audit_team`;
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;