From ac188e41eb0390716dd229b2660a515bd9b6c2f2 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Sat, 10 Dec 2022 15:46:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A1=E6=A0=B8=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=98=AF=E5=90=A6=E4=B8=BA=E5=AE=A1=E6=A0=B8=E7=BB=84?= =?UTF-8?q?=E5=86=85=E5=85=B6=E5=AE=83=E7=BB=84=E5=91=98=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/activiti/controller/ActTaskController.java | 8 +++++++- .../java/io/renren/modules/activiti/dto/TaskDTO.java | 2 ++ .../modules/sys/service/impl/SysUserServiceImpl.java | 6 ++++-- renren-admin/src/main/resources/ehcache.xml | 10 ++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) 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 76c6a52d..2fe4e76e 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 @@ -99,12 +99,18 @@ public class ActTaskController { }) // @RequiresPermissions("sys:task:all") public Result> myToDoTaskPage(@ApiIgnore @RequestParam Map params) { - params.put("userId", SecurityUser.getUserId().toString()); + String userId = SecurityUser.getUserId().toString(); + params.put("userId", userId); PageData page = actTaskService.page(params); for (TaskDTO taskDTO : page.getList()) { if (!StringUtils.isEmpty(taskDTO.getAssignee())) { SysUserDTO userDTO = sysUserService.get(Long.valueOf(taskDTO.getAssignee())); taskDTO.setAssigneeName(userDTO.getRealName()); + if (userId.equals(taskDTO.getAssignee())) { + taskDTO.setSynergism(Boolean.FALSE); + } else { + taskDTO.setSynergism(Boolean.FALSE); + } } } 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 e3dfa9fc..c666d17a 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 @@ -100,6 +100,8 @@ public class TaskDTO { @ApiModelProperty(value = "提供部门") private String provideDept; + @ApiModelProperty(value = "是否为审核组内协助任务") + private Boolean synergism; @Override diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java index 53e5588d..ee946119 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java @@ -1,6 +1,5 @@ package io.renren.modules.sys.service.impl; -import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -28,12 +27,12 @@ import io.renren.modules.sys.enums.JhDeptsEnum; import io.renren.modules.sys.enums.SuperAdminEnum; import io.renren.modules.sys.service.*; import lombok.extern.log4j.Log4j2; -import org.apache.commons.lang3.ObjectUtils; import org.h2.util.StringUtils; 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.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -78,6 +77,8 @@ public class SysUserServiceImpl extends BaseServiceImpl + + + \ No newline at end of file