diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java index c7de54f6..2161331f 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java @@ -11,6 +11,8 @@ import io.renren.common.utils.Result; import io.renren.modules.activiti.dto.BatchCompleteDTO; import io.renren.modules.activiti.dto.TaskDTO; import io.renren.modules.activiti.service.ActTaskService; +import io.renren.modules.audit_team.dto.SysAuditTeamDTO; +import io.renren.modules.audit_team.service.SysAuditTeamService; import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.UserDetail; import io.renren.modules.sys.dto.SysUserDTO; @@ -28,6 +30,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataAccessException; +import org.springframework.beans.factory.annotation.Value; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; @@ -64,6 +67,11 @@ public class ActTaskController { protected RepositoryService repositoryService; @Autowired protected TaskService taskService; + @Autowired + private SysAuditTeamService sysAuditTeamService; + + @Value("#{new Boolean(${auditteam.enable})}") + private Boolean auditteam; // 是否进行审核组 private JdbcTemplate lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate(); @@ -115,7 +123,7 @@ public class ActTaskController { if (userId.equals(taskDTO.getAssignee())) { taskDTO.setSynergism(Boolean.FALSE); } else { - taskDTO.setSynergism(Boolean.FALSE); + taskDTO.setSynergism(Boolean.TRUE); } } } @@ -165,7 +173,8 @@ public class ActTaskController { }) public Result> myToDoTaskNum(@ApiIgnore @RequestParam Map params) { Map result = new LinkedHashMap<>(); - params.put("userId", SecurityUser.getUserId().toString()); + String userId = SecurityUser.getUserId().toString(); + params.put("userId", userId); ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery() .orderByProcessDefinitionId().desc().orderByProcessDefinitionKey().desc(); processDefinitionQuery.latestVersion(); @@ -175,7 +184,28 @@ public class ActTaskController { taskQuery.processDefinitionKey(index.getKey()); // 流程模型key taskQuery.taskAssignee(SecurityUser.getUserId().toString()); taskQuery.active(); - result.put(index.getKey(), taskQuery.count()); + if (auditteam) { // 允许流程审核协作时 + List sysAuditTeamDTOS = sysAuditTeamService.selectByMemberOne(userId); + List groupUserId = sysAuditTeamDTOS + .stream() + .map(index_ -> index_.getMember()) + .filter(Objects::nonNull) + .flatMap(index_ -> index_.stream()) + .map(index_ -> (String) index_.get("id")) + .filter(index_ -> !userId.equals(index_)) // 过滤非本人 + .distinct() + .collect(Collectors.toList()); + long sum = groupUserId.stream().mapToLong(inedx_ -> { + TaskQuery taskQuery_ = taskService.createTaskQuery(); + taskQuery_.processDefinitionKey(index.getKey()); // 流程模型key + taskQuery_.taskAssignee(inedx_); // 协作组审核人 + taskQuery_.active(); + return taskQuery_.count(); + }).sum(); + result.put(index.getKey(), taskQuery.count() + sum); // 加上协作组任务数 + } else { + result.put(index.getKey(), taskQuery.count()); + } }); result.put("meetingroom_book", jdbcTemplate.queryForObject("SELECT COUNT(id) FROM t_meetingroom_book WHERE state = 1;", Long.class)); return new Result>().ok(result); @@ -252,7 +282,7 @@ public class ActTaskController { return new Result().error(ErrorCode.PARAMS_GET_ERROR); } actTaskService.completeTask(taskId, comment); - return new Result(); + return new Result().ok("审核通过"); } /** @@ -590,7 +620,6 @@ public class ActTaskController { CompletableFuture all = CompletableFuture.allOf(yzj, ysjk, dxcc, tgfw); all.join(); return new Result().ok(arrayList); - } @GetMapping("/getZwyVideoInfoById") @@ -624,9 +653,7 @@ public class ActTaskController { public Result batchBackToFirst(@RequestBody BatchCompleteDTO batchCompleteDTO) { batchCompleteDTO.getTaskIds().stream() .filter(index -> org.apache.commons.lang3.StringUtils.isNotEmpty(index)) - .forEach(taskId -> { - actTaskService.backToFirst(taskId, batchCompleteDTO.getComment()); - }); + .forEach(taskId -> actTaskService.backToFirst(taskId, batchCompleteDTO.getComment())); return new Result().ok("批量驳回成功"); } diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java b/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java index c666d17a..41bf5d18 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java @@ -102,6 +102,8 @@ public class TaskDTO { private String provideDept; @ApiModelProperty(value = "是否为审核组内协助任务") private Boolean synergism; + @ApiModelProperty(value = "审核组名称") + private String auditTeamName; @Override diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java index c6b90442..e41e9f5d 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java @@ -425,7 +425,7 @@ public class ActHistoryService { } } } else { - logger.info("不存在正在进行流程节点"); + logger.info("不存在正在进行流程节点:" + index.getProcessInstanceId()); index.setAllowReminders(Boolean.FALSE); index.setDoneReminders(Boolean.FALSE); index.setNextRemindersDays(0); diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java index cdef7742..e2a759ff 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java @@ -11,6 +11,8 @@ import io.renren.common.page.PageData; import io.renren.common.service.impl.BaseServiceImpl; import io.renren.common.utils.MessageUtils; import io.renren.modules.activiti.dto.TaskDTO; +import io.renren.modules.audit_team.dto.SysAuditTeamDTO; +import io.renren.modules.audit_team.service.SysAuditTeamService; import io.renren.modules.demanData.dto.TDemandDataDTO; import io.renren.modules.demanData.service.TDemandDataService; import io.renren.modules.demandComment.dto.TDemandCommentDTO; @@ -60,6 +62,7 @@ import org.codehaus.jackson.map.ObjectMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -81,6 +84,8 @@ public class ActTaskService extends BaseServiceImpl { private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors(); private static final ExecutorService executor = Executors.newWorkStealingPool(CPUNUM * 2); + private static final ExecutorService executor_task = Executors.newCachedThreadPool(); + public static String Task_HANDLE_STATE = "handleState"; //任务节点处理状态key public static String Task_HANDLE_STATE_AGREE = "agree"; //同意 public static String Task_HANDLE_STATE_REJECTED = "rejected"; //驳回 @@ -123,6 +128,11 @@ public class ActTaskService extends BaseServiceImpl { private SysNoticeService sysNoticeService; @Autowired private JdbcTemplate jdbcTemplate; + @Autowired + private SysAuditTeamService sysAuditTeamService; + + @Value("#{new Boolean(${auditteam.enable})}") + private Boolean auditteam; // 是否进行审核组 /** * 根据参数获取当前运行的任务信息 @@ -131,11 +141,23 @@ public class ActTaskService extends BaseServiceImpl { * @return */ public PageData page(Map params) { - // TODO 同一审核组内成员 - List groupUserId = new ArrayList() {{ // 测试 - - }}; String userId = (String) params.get("userId"); + // 同一审核组内成员 + List groupUserId = new ArrayList<>(); + List sysAuditTeamDTOS = new ArrayList<>(); + if (auditteam) { + sysAuditTeamDTOS = sysAuditTeamService.selectByMemberOne(userId); + groupUserId = sysAuditTeamDTOS + .stream() + .map(index -> index.getMember()) + .filter(Objects::nonNull) + .flatMap(index -> index.stream()) + .map(index -> (String) index.get("id")) + .filter(index -> !userId.equals(index)) // 过滤非本人 + .distinct() + .collect(Collectors.toList()); + } + Integer curPage = 1; Integer limit = 10; if (params.get(Constant.PAGE) != null) { @@ -158,9 +180,11 @@ public class ActTaskService extends BaseServiceImpl { if (StringUtils.isNotEmpty(userId)) { where.append("AND ( RES.ASSIGNEE_ = #{userId} "); // 处理同一工作组内 - groupUserId.stream().forEach(index -> { - where.append(String.format(" OR RES.ASSIGNEE_ = '%s' ", index)); - }); + if (auditteam) { // 进行审核组协作时 + groupUserId.stream().forEach(index -> { + where.append(String.format(" OR RES.ASSIGNEE_ = '%s' ", index)); + }); + } where.append(")"); } @@ -193,7 +217,7 @@ public class ActTaskService extends BaseServiceImpl { List completableFutures = new ArrayList(); final TaskQuery taskQuery = taskService.createTaskQuery(); List list_ = tasks.stream().map(index -> { - CompletableFuture tempTask = CompletableFuture.supplyAsync(() -> taskQuery.taskId(index.getId()).includeProcessVariables().singleResult(), executor); + CompletableFuture tempTask = CompletableFuture.supplyAsync(() -> taskQuery.taskId(index.getId()).includeProcessVariables().singleResult(), executor_task); Task temp = null; try { temp = (Task) tempTask.get(); @@ -205,7 +229,8 @@ public class ActTaskService extends BaseServiceImpl { return temp; }).filter(Objects::nonNull).collect(Collectors.toList()); CompletableFuture.allOf(completableFutures.toArray(new CompletableFuture[completableFutures.size()])).join(); - return new PageData<>(tasks2TaskDtos(list_), (int) count); + String name = sysAuditTeamDTOS.stream().map(index -> index.getName()).findFirst().orElse(""); + return new PageData<>(tasks2TaskDtos(list_, name), (int) count); // 以下注释为原实现方案 // TaskQuery taskQuery = taskService.createTaskQuery(); // if (StringUtils.isNotEmpty(userId)) { @@ -266,7 +291,7 @@ public class ActTaskService extends BaseServiceImpl { .listPage((finalCurPage - 1) * finalLimit, finalCurPage * finalLimit); count.add(taskQuery.taskAssignee(index.getId().toString()) .orderByTaskCreateTime().desc().count()); - taskDtoList.addAll(tasks2TaskDtos(list)); + taskDtoList.addAll(tasks2TaskDtos(list, "")); }); return completableFuture; }).collect(Collectors.toList()); @@ -287,11 +312,13 @@ public class ActTaskService extends BaseServiceImpl { return page; } - private List tasks2TaskDtos(List list) { + private List tasks2TaskDtos(List list, String audioTeamName) { List listDto = new ArrayList<>(); for (Task task : list) { TaskDTO dto = new TaskDTO(); this.convertTaskInfo(task, dto); + // 填入审核协作组名称 + dto.setAuditTeamName(audioTeamName); Map processVariable = new LinkedHashMap<>(); if (task.getProcessVariables().containsKey("tAbilityApplicationDTOList")) { @@ -497,8 +524,10 @@ public class ActTaskService extends BaseServiceImpl { public void completeTask(String taskId, String comment) { String userId = SecurityUser.getUserId().toString(); Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); - if (StringUtils.isNotEmpty(task.getAssignee())) { - taskService.setAssignee(taskId, userId); + if (StringUtils.isNotEmpty(task.getAssignee()) + && !task.getAssignee().equals(userId)) { + taskService.setVariable(taskId, "autoApply", taskId); // 配置不发送审核人分配通知 + taskService.setAssignee(taskId, userId); //与原任务审核人员不一致时,换成实际通过的人 } if (StringUtils.isNotEmpty(comment)) { taskService.addComment(taskId, task.getProcessInstanceId(), comment); diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/controller/SysAuditTeamController.java b/renren-admin/src/main/java/io/renren/modules/audit_team/controller/SysAuditTeamController.java new file mode 100644 index 00000000..7d78e58d --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/controller/SysAuditTeamController.java @@ -0,0 +1,137 @@ +package io.renren.modules.audit_team.controller; + +import io.renren.common.annotation.LogOperation; +import io.renren.common.constant.Constant; +import io.renren.common.page.PageData; +import io.renren.common.utils.ExcelUtils; +import io.renren.common.utils.Result; +import io.renren.common.validator.AssertUtils; +import io.renren.common.validator.ValidatorUtils; +import io.renren.common.validator.group.AddGroup; +import io.renren.common.validator.group.DefaultGroup; +import io.renren.common.validator.group.UpdateGroup; +import io.renren.modules.audit_team.dto.SysAuditTeamDTO; +import io.renren.modules.audit_team.excel.SysAuditTeamExcel; +import io.renren.modules.audit_team.service.SysAuditTeamService; +import io.renren.modules.category.util.CommonUtils; +import io.renren.modules.sys.dto.SysUserDTO; +import io.renren.modules.sys.service.SysUserService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; + + +/** + * 流程审核组组员 + * + * @author wangliwen wangliwen2@hisense.com + * @since 1.0 2022-12-12 + */ +@RestController +@RequestMapping("audit_team/sysauditteam") +@Api(tags = "流程审核组组员") +public class SysAuditTeamController { + @Autowired + private SysAuditTeamService sysAuditTeamService; + @Autowired + private SysUserService sysUserService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String") + }) +// @RequiresPermissions("audit_team:sysauditteam:page") + public Result> page(@ApiIgnore @RequestParam Map params) { + PageData page = sysAuditTeamService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") +// @RequiresPermissions("audit_team:sysauditteam:info") + public Result get(@PathVariable("id") Long id) { + SysAuditTeamDTO data = sysAuditTeamService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") +// @RequiresPermissions("audit_team:sysauditteam:save") + public Result save(@RequestBody SysAuditTeamDTO dto) { + // 效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setIndex(CommonUtils.getPinYinHeadChar(dto.getName())); // 索引设置为名称拼音 + dto.setMember(dto.getMember().stream().map(index -> { + Optional sysUserDTO = Optional.ofNullable(sysUserService.get(Long.parseLong((String) index.get("id")))); + if (sysUserDTO.isPresent()) { + index.put("name", sysUserDTO.get().getRealName()); + index.put("dept_name", sysUserDTO.get().getDeptName()); + } + return index; + }).collect(Collectors.toList())); + sysAuditTeamService.save(dto); + return new Result().ok("保存成功"); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") +// @RequiresPermissions("audit_team:sysauditteam:update") + public Result update(@RequestBody SysAuditTeamDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + dto.setIndex(CommonUtils.getPinYinHeadChar(dto.getName())); // 索引设置为名称拼音 + dto.setMember(dto.getMember().stream().map(index -> { + Optional sysUserDTO = Optional.ofNullable(sysUserService.get((long) index.get("id"))); + if (sysUserDTO.isPresent()) { + index.put("name", sysUserDTO.get().getRealName()); + index.put("dept_name", sysUserDTO.get().getDeptName()); + } + return index; + }).collect(Collectors.toList())); + sysAuditTeamService.update(dto); + + return new Result().ok("修改成功"); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") +// @RequiresPermissions("audit_team:sysauditteam:delete") + public Result delete(@RequestBody Long[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + sysAuditTeamService.delete(ids); + + return new Result().ok("删除成功"); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") +// @RequiresPermissions("audit_team:sysauditteam:export") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = sysAuditTeamService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, "流程审核组组员", list, SysAuditTeamExcel.class); + } + +} \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/dao/SysAuditTeamDao.java b/renren-admin/src/main/java/io/renren/modules/audit_team/dao/SysAuditTeamDao.java new file mode 100644 index 00000000..0bb304c2 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/dao/SysAuditTeamDao.java @@ -0,0 +1,27 @@ +package io.renren.modules.audit_team.dao; + +import io.renren.common.dao.BaseDao; +import io.renren.modules.audit_team.dto.SysAuditTeamDTO; +import io.renren.modules.audit_team.entity.SysAuditTeamEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 流程审核组组员 + * + * @author wangliwen wangliwen2@hisense.com + * @since 1.0 2022-12-12 + */ +@Mapper +public interface SysAuditTeamDao extends BaseDao { + + /** + * 根据审核组成员用户id,获取审核组列表 + * + * @param member + * @return + */ + List selectByMemberOne(@Param("member") String member); +} \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/dto/SysAuditTeamDTO.java b/renren-admin/src/main/java/io/renren/modules/audit_team/dto/SysAuditTeamDTO.java new file mode 100644 index 00000000..3e438067 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/dto/SysAuditTeamDTO.java @@ -0,0 +1,36 @@ +package io.renren.modules.audit_team.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 流程审核组组员 + * + * @author wangliwen wangliwen2@hisense.com + * @since 1.0 2022-12-12 + */ +@Data +@ApiModel(value = "流程审核组组员") +public class SysAuditTeamDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "主键ID") + private Long id; + @ApiModelProperty(value = "创建人") + private Long creator; + @ApiModelProperty(value = "创建时间") + private Date createDate; + @ApiModelProperty(value = "审核组名称") + private String name; + @ApiModelProperty(value = "审核组成员id数组") + private List member; + @ApiModelProperty(value = "审核组索引") + private String index; + +} \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/entity/SysAuditTeamEntity.java b/renren-admin/src/main/java/io/renren/modules/audit_team/entity/SysAuditTeamEntity.java new file mode 100644 index 00000000..20c0fb04 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/entity/SysAuditTeamEntity.java @@ -0,0 +1,42 @@ +package io.renren.modules.audit_team.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; +import io.renren.common.entity.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + * 流程审核组组员 + * + * @author wangliwen wangliwen2@hisense.com + * @since 1.0 2022-12-12 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "sys_audit_team", autoResultMap = true) +public class SysAuditTeamEntity extends BaseEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 审核组名称 + */ + private String name; + + /** + * 审核组成员id数组 + */ + @TableField(value = "member", typeHandler = FastjsonTypeHandler.class) + private List member; + + /** + * 审核组索引 + */ + @TableField(value = "`index`") + private String index; +} \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/excel/SysAuditTeamExcel.java b/renren-admin/src/main/java/io/renren/modules/audit_team/excel/SysAuditTeamExcel.java new file mode 100644 index 00000000..3ec03faa --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/excel/SysAuditTeamExcel.java @@ -0,0 +1,32 @@ +package io.renren.modules.audit_team.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +/** + * 流程审核组组员 + * + * @author wangliwen wangliwen2@hisense.com + * @since 1.0 2022-12-12 + */ +@Data +@ContentRowHeight(20) +@HeadRowHeight(20) +@ColumnWidth(25) +public class SysAuditTeamExcel { + @ExcelProperty(value = "主键ID", index = 0) + private Object id; + @ExcelProperty(value = "创建人", index = 1) + private Object creator; + @ExcelProperty(value = "创建时间", index = 2) + private Object createDate; + @ExcelProperty(value = "审核组名称", index = 3) + private Object name; + @ExcelProperty(value = "审核组成员id数组", index = 4) + private Object member; + @ExcelProperty(value = "审核组索引", index = 5) + private Object index; +} \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/service/SysAuditTeamService.java b/renren-admin/src/main/java/io/renren/modules/audit_team/service/SysAuditTeamService.java new file mode 100644 index 00000000..2cf6c23d --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/service/SysAuditTeamService.java @@ -0,0 +1,17 @@ +package io.renren.modules.audit_team.service; + +import io.renren.common.service.CrudService; +import io.renren.modules.audit_team.dto.SysAuditTeamDTO; +import io.renren.modules.audit_team.entity.SysAuditTeamEntity; + +import java.util.List; + +/** + * 流程审核组组员 + * + * @author wangliwen wangliwen2@hisense.com + * @since 1.0 2022-12-12 + */ +public interface SysAuditTeamService extends CrudService { + List selectByMemberOne(String member); +} \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/service/impl/SysAuditTeamServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/audit_team/service/impl/SysAuditTeamServiceImpl.java new file mode 100644 index 00000000..86e9ce48 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/service/impl/SysAuditTeamServiceImpl.java @@ -0,0 +1,36 @@ +package io.renren.modules.audit_team.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import io.renren.common.service.impl.CrudServiceImpl; +import io.renren.modules.audit_team.dao.SysAuditTeamDao; +import io.renren.modules.audit_team.dto.SysAuditTeamDTO; +import io.renren.modules.audit_team.entity.SysAuditTeamEntity; +import io.renren.modules.audit_team.service.SysAuditTeamService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * 流程审核组组员 + * + * @author wangliwen wangliwen2@hisense.com + * @since 1.0 2022-12-12 + */ +@Service +public class SysAuditTeamServiceImpl extends CrudServiceImpl implements SysAuditTeamService { + + @Override + public QueryWrapper getWrapper(Map params) { + QueryWrapper wrapper = new QueryWrapper<>(); + + + return wrapper; + } + + + @Override + public List selectByMemberOne(String member) { + return baseDao.selectByMemberOne(member); + } +} \ No newline at end of file diff --git a/renren-admin/src/main/resources/application.yml b/renren-admin/src/main/resources/application.yml index 853b9125..afad6a31 100644 --- a/renren-admin/src/main/resources/application.yml +++ b/renren-admin/src/main/resources/application.yml @@ -182,4 +182,7 @@ reminders: # 恩科会议 enke: enable: true +# 开启审核组成员支持 +auditteam: + enable: true diff --git a/renren-admin/src/main/resources/db/V8.3__add_table.sql b/renren-admin/src/main/resources/db/V8.3__add_table.sql new file mode 100644 index 00000000..46928079 --- /dev/null +++ b/renren-admin/src/main/resources/db/V8.3__add_table.sql @@ -0,0 +1,13 @@ +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`) +) comment = '流程审核组组员'; +SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/audit_team/SysAuditTeamDao.xml b/renren-admin/src/main/resources/mapper/audit_team/SysAuditTeamDao.xml new file mode 100644 index 00000000..c830806f --- /dev/null +++ b/renren-admin/src/main/resources/mapper/audit_team/SysAuditTeamDao.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file