Browse Source

[update]修改查询审核签到查询语句

dev
zhangsiqi 7 months ago
parent
commit
b5c6587ebd
  1. 6
      ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/mapper/BizTodoItemMapper.java
  2. 4
      ruoyi-activiti/src/main/java/com/ruoyi/process/todoitem/service/impl/BizTodoItemServiceImpl.java

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

@ -66,18 +66,18 @@ public interface BizTodoItemMapper {
public long getTodoItemTotal(Map<String, Object> paraMap); public long getTodoItemTotal(Map<String, Object> paraMap);
public String getCurrentFlowUser(Map<String, Object> paraMap); public String getCurrentFlowUser(Map<String, Object> paraMap);
public String getCurrentNodeName(Map<String, Object> paraMap); public String getCurrentNodeName(Map<String, Object> paraMap);
public List<BizTodoItem> selectTodoItemByTaskId(@Param(value = "taskId")String taskId,@Param(value = "isHandle")String isHandle); public List<BizTodoItem> 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 String selectTodoItemTaskId(@Param(value = "instanceId")String instanceId,@Param(value = "todoUserId")String todoUserId,@Param(value = "isHandle")String isHandle);
public List<BizTodoItem> getTodoItemListNoPaging(Map<String, Object> paraMap); public List<BizTodoItem> getTodoItemListNoPaging(Map<String, Object> 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<String> selectTodoUserListByTaskId(@Param(value = "taskId") String taskId); List<String> selectTodoUserListByTaskId(@Param(value = "taskId") String taskId);
@Select("SELECT * FROM BIZ_TODO_ITEM WHERE TASK_ID = #{taskId} AND TODO_USER_ID = #{todoUserId}") @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); 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); String selectTodoUserByTaskId(String id);
/** /**

4
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.process.todoitem.service.IBizTodoItemService;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import org.activiti.engine.TaskService; import org.activiti.engine.TaskService;
import org.activiti.engine.impl.util.CollectionUtil;
import org.activiti.engine.task.Task; import org.activiti.engine.task.Task;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; 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.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -222,7 +220,7 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService {
// todoitem 去重 // todoitem 去重
List<BizTodoItem> bizTodoItem = bizTodoItemMapper.selectTodoItemByTaskId(task.getId(),"0"); List<BizTodoItem> bizTodoItem = bizTodoItemMapper.selectTodoItemByTaskId(task.getId(),"0");
if (!CollectionUtils.isEmpty(bizTodoItem)) continue; if (bizTodoItem != null) continue;
BizTodoItem newItem = new BizTodoItem(); BizTodoItem newItem = new BizTodoItem();
BeanUtils.copyProperties(todoItem, newItem); BeanUtils.copyProperties(todoItem, newItem);

Loading…
Cancel
Save