diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java index 99cb42f6..a5acb27c 100644 --- a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java +++ b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java @@ -66,18 +66,18 @@ public interface BizTodoItemMapper { public long getTodoItemTotal(Map paraMap); public String getCurrentFlowUser(Map paraMap); public String getCurrentNodeName(Map paraMap); - public List selectTodoItemByTaskId(@Param(value = "taskId")String taskId,@Param(value = "isHandle")String isHandle); + public List selectTodoItemByTaskId(@Param(value = "taskId")String taskId, @Param(value = "isHandle")String isHandle); public String selectTodoItemTaskId(@Param(value = "instanceId")String instanceId,@Param(value = "todoUserId")String todoUserId,@Param(value = "isHandle")String isHandle); public List getTodoItemListNoPaging(Map paraMap); - @Select("SELECT USER_ID_ FROM ACT_ID_MEMBERSHIP WHERE GROUP_ID_ in (SELECT GROUP_ID_ FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ = #{taskId})") + @Select("SELECT USER_ID_ FROM ACT_ID_MEMBERSHIP WHERE GROUP_ID_ = (SELECT GROUP_ID_ FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ = #{taskId})") List selectTodoUserListByTaskId(@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); - @Select("SELECT USER_ID_ FROM ACT_ID_MEMBERSHIP WHERE USER_ID_ in (SELECT USER_ID_ FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ = #{taskId})") + @Select("SELECT USER_ID_ FROM ACT_ID_MEMBERSHIP WHERE USER_ID_ = (SELECT USER_ID_ FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ = #{taskId}) limit 1") String selectTodoUserByTaskId(String id); /** diff --git a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java index b9187556..8fca4aa3 100644 --- a/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java +++ b/ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java @@ -11,7 +11,6 @@ import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.process.todoitem.service.IBizTodoItemService; import com.ruoyi.system.mapper.SysUserMapper; import org.activiti.engine.TaskService; -import org.activiti.engine.impl.util.CollectionUtil; import org.activiti.engine.task.Task; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -19,7 +18,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.Collections; import java.util.List; import java.util.Map; @@ -222,7 +220,7 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService { // todoitem 去重 List bizTodoItem = bizTodoItemMapper.selectTodoItemByTaskId(task.getId(),"0"); - if (!CollectionUtils.isEmpty(bizTodoItem)) continue; + if (bizTodoItem != null) continue; BizTodoItem newItem = new BizTodoItem(); BeanUtils.copyProperties(todoItem, newItem);