不区分权限案件查询
This commit is contained in:
+37
-29
@@ -97,39 +97,47 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
// @Override
|
||||
// public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
|
||||
// // 获取登录用户
|
||||
// LoginUser loginUser = getLoginUser();
|
||||
// SysUser user = loginUser.getUser();
|
||||
// Long userId = user.getUserId();
|
||||
// Long deptId = user.getDeptId();
|
||||
// List<SysRole> roles = user.getRoles();
|
||||
// // 查询登录人身份证号
|
||||
// SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||
// caseApplication.setIdCard(sysUser.getIdCard());
|
||||
// caseApplication.setUserId(String.valueOf(userId));
|
||||
// startPage();
|
||||
// for (SysRole role : roles) {
|
||||
// // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||
// if(role.getRoleName().equals("超级管理员")
|
||||
// ||role.getRoleName().equals("仲裁委")
|
||||
// ||role.getRoleName().equals("部门长")){
|
||||
// return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||
// }
|
||||
// if(role.getRoleName().equals("法律顾问")){
|
||||
// // 查询角色有关的用户部门
|
||||
// List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
// caseApplication.setDeptIds(deptIds);
|
||||
// }
|
||||
// if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
|
||||
// // 查询角色有关的用户部门
|
||||
// caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||
// return caseApplicationMapper.selectCaseApplicationList(caseApplication);
|
||||
//
|
||||
// }
|
||||
@Override
|
||||
public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
|
||||
// 获取登录用户
|
||||
LoginUser loginUser = getLoginUser();
|
||||
SysUser user = loginUser.getUser();
|
||||
Long userId = user.getUserId();
|
||||
Long deptId = user.getDeptId();
|
||||
List<SysRole> roles = user.getRoles();
|
||||
// 查询登录人身份证号
|
||||
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||
caseApplication.setIdCard(sysUser.getIdCard());
|
||||
caseApplication.setUserId(String.valueOf(userId));
|
||||
startPage();
|
||||
for (SysRole role : roles) {
|
||||
// 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||
if(role.getRoleName().equals("超级管理员")
|
||||
||role.getRoleName().equals("仲裁委")
|
||||
||role.getRoleName().equals("部门长")){
|
||||
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||
}
|
||||
if(role.getRoleName().equals("法律顾问")){
|
||||
// 查询角色有关的用户部门
|
||||
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
caseApplication.setDeptIds(deptIds);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||
return caseApplicationMapper.selectCaseApplicationList(caseApplication);
|
||||
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertcaseApplication(CaseApplication caseApplication) {
|
||||
|
||||
Reference in New Issue
Block a user