流程承接只能选择相同角色的人
parent
469adad607
commit
9d7dc4d12c
|
@ -100,11 +100,12 @@ public class ProjectController extends BaseController {
|
|||
Map<String, Object> model) {
|
||||
//当前登录人的角色类型
|
||||
model.put("keywords", keywords);
|
||||
model.put("adminId", InterfaceUtil.getAdminId());
|
||||
model.put("admin", InterfaceUtil.getAdmin());
|
||||
Admin admin = InterfaceUtil.getAdmin();
|
||||
model.put("adminId", admin.getId());
|
||||
model.put("admin", admin);
|
||||
model.put("deptList", deptService.findAll());
|
||||
List<Admin> adminList = adminRepository.getAllEnable();
|
||||
adminList = adminList.stream().filter(a-> !"admin".equals(a.getUserName())).collect(Collectors.toList());
|
||||
List<Admin> adminList = adminRepository.findByRoleId(admin.getRoleId());
|
||||
adminList = adminList.stream().filter(a-> !admin.getId().equals(a.getId())).collect(Collectors.toList());
|
||||
model.put("adminList", adminList);
|
||||
ConcurrentHashMap<String, String> searchInfo = getSearchInfo(keywords, model);
|
||||
model.putIfAbsent("extend", "1");
|
||||
|
|
|
@ -46,4 +46,7 @@ public interface AdminRepository extends JpaRepository<Admin, Integer> {
|
|||
@Query("from Admin where isDeleted=0 AND enabled=1")
|
||||
List<Admin> getAllEnable();
|
||||
|
||||
@Query("from Admin where isDeleted=0 AND enabled=1 AND roleId=?1")
|
||||
List<Admin> findByRoleId(int roleId);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue