Browse Source

[feat]

新增待办事项mapper查询多候选组待办人集合方法;
修改待办事项service插入待办事项接口,根据module不同分别查询候选用户组;
dev
王晓迪 3 months ago
parent
commit
b177b97625
  1. 4
      ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java
  2. 8
      ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java

4
ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java

@ -74,6 +74,10 @@ public interface BizTodoItemMapper {
@Select("SELECT USER_ID_ FROM ACT_ID_MEMBERSHIP WHERE GROUP_ID_ = (SELECT GROUP_ID_ FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ = #{taskId})")
List<String> selectTodoUserListByTaskId(@Param(value = "taskId") String taskId);
@Select("SELECT USER_ID_ FROM ACT_ID_MEMBERSHIP WHERE GROUP_ID_ in (SELECT GROUP_ID_ FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ = #{taskId})")
List<String> selectTodoUserListsByTaskId(@Param(value = "taskId") String taskId);
@Select("SELECT * FROM BIZ_TODO_ITEM WHERE TASK_ID = #{taskId} AND TODO_USER_ID = #{todoUserId}")
BizTodoItem selectTodoItemByCondition(@Param(value = "taskId") String taskId, @Param(value = "todoUserId") String todoUserId);

8
ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java

@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -182,7 +183,12 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService {
counter++;
} else {
// 查询候选用户组,系统用户角色视图,group是角色
List<String> todoUserIdList = bizTodoItemMapper.selectTodoUserListByTaskId(task.getId());
List<String> todoUserIdList = new ArrayList<>();
if("requisitioning".equals(module)){
todoUserIdList = bizTodoItemMapper.selectTodoUserListsByTaskId(task.getId());
}else{
todoUserIdList = bizTodoItemMapper.selectTodoUserListByTaskId(task.getId());
}
//如果是查询初始化的
if (!CollectionUtils.isEmpty(todoUserIdList)) {
for (String todoUserId: todoUserIdList) {

Loading…
Cancel
Save