提交修改
This commit is contained in:
commit
53fb065270
@ -15,8 +15,11 @@ import java.util.List;
|
|||||||
public interface AssessService {
|
public interface AssessService {
|
||||||
PageUtils userTaskList(AssessTaskReq req,Long userId);
|
PageUtils userTaskList(AssessTaskReq req,Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param staffRole
|
||||||
|
* @return null 为全部部门 size = 0 为没有部门
|
||||||
|
*/
|
||||||
List<Long> roleDepartment(StaffRole staffRole);
|
List<Long> roleDepartment(StaffRole staffRole);
|
||||||
|
|
||||||
List<Long> roleEvgroup(StaffRole staffRole);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.lz.modules.performance.service.impl;
|
package com.lz.modules.performance.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.lz.common.utils.DateUtils;
|
import com.lz.common.utils.DateUtils;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
@ -16,6 +17,7 @@ import com.lz.modules.performance.req.AssessTaskReq;
|
|||||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||||
import com.lz.modules.performance.res.TaskListRes;
|
import com.lz.modules.performance.res.TaskListRes;
|
||||||
import com.lz.modules.performance.service.AssessService;
|
import com.lz.modules.performance.service.AssessService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.bytebuddy.asm.Advice;
|
import net.bytebuddy.asm.Advice;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -34,6 +36,7 @@ import java.util.stream.Collectors;
|
|||||||
* @Desc:
|
* @Desc:
|
||||||
* @Date: 2020/10/14 14:59
|
* @Date: 2020/10/14 14:59
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service("assessService")
|
@Service("assessService")
|
||||||
public class AssessServiceImpl implements AssessService {
|
public class AssessServiceImpl implements AssessService {
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -82,6 +85,12 @@ public class AssessServiceImpl implements AssessService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> roleDepartment(StaffRole staffRole) {
|
public List<Long> roleDepartment(StaffRole staffRole) {
|
||||||
|
if(staffRole == null){
|
||||||
|
log.info("staffRole 为空");
|
||||||
|
return Collections.EMPTY_LIST;
|
||||||
|
}
|
||||||
|
log.info("获取 roleDepartment,staffRole: " + JSON.toJSONString(staffRole));
|
||||||
|
// 0 标识全部部门
|
||||||
if (staffRole.getDepartmentId() == 0) {
|
if (staffRole.getDepartmentId() == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -97,21 +106,9 @@ public class AssessServiceImpl implements AssessService {
|
|||||||
List<Long> collect = allDepart.stream().distinct().map(s -> Long.valueOf(s)).collect(Collectors.toList());
|
List<Long> collect = allDepart.stream().distinct().map(s -> Long.valueOf(s)).collect(Collectors.toList());
|
||||||
return collect;
|
return collect;
|
||||||
}
|
}
|
||||||
|
log.info("未获取到用户权限对应的部门 roleID: " + staffRole.getId());
|
||||||
return Collections.EMPTY_LIST;
|
return Collections.EMPTY_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Long> roleEvgroup(StaffRole staffRole) {
|
|
||||||
if (staffRole.getDepartmentId() == 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return staffRoleEvaluationGroupService.selectEvaluationGroupIdsByRoleId(staffRole.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user