优化
This commit is contained in:
parent
2cc3f35379
commit
017cbb7f3a
@ -350,6 +350,9 @@ public class ResultRecordController extends AbstractController {
|
|||||||
if(value.length() > 0){
|
if(value.length() > 0){
|
||||||
id = Long.parseLong(value);
|
id = Long.parseLong(value);
|
||||||
resultRecord = lzResultRecordService.selectResultRecordById(id);
|
resultRecord = lzResultRecordService.selectResultRecordById(id);
|
||||||
|
if(resultRecord == null){
|
||||||
|
return R.error("绩效不存在");
|
||||||
|
}
|
||||||
//下面判断权限
|
//下面判断权限
|
||||||
if(user.getUserId().longValue() != resultRecord.getStaffId().longValue()){
|
if(user.getUserId().longValue() != resultRecord.getStaffId().longValue()){
|
||||||
//不是自己的绩效,判断是否为绩效管理人员,老板,部门管理人员
|
//不是自己的绩效,判断是否为绩效管理人员,老板,部门管理人员
|
||||||
@ -363,16 +366,21 @@ public class ResultRecordController extends AbstractController {
|
|||||||
if(value.length() > 0){
|
if(value.length() > 0){
|
||||||
startId = Long.parseLong(value);
|
startId = Long.parseLong(value);
|
||||||
resultRecord = lzResultRecordService.selectResultRecordByStaffIdAndStartId(getUserId(), startId);
|
resultRecord = lzResultRecordService.selectResultRecordByStaffIdAndStartId(getUserId(), startId);
|
||||||
|
if(resultRecord == null){
|
||||||
|
return R.error("绩效不存在");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}else{
|
||||||
|
//根据token获取
|
||||||
if(resultRecord == null){
|
resultRecord = lzResultRecordService.selectLastResultRecordByUserId(getUserId());
|
||||||
resultRecord = lzResultRecordService.selectLastResultRecordByUserId(getUserId());//根据token获取
|
|
||||||
if(resultRecord == null){
|
if(resultRecord == null){
|
||||||
return R.error("绩效不存在");
|
return R.error("绩效不存在");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取考核维度等信息
|
//获取考核维度等信息
|
||||||
ResultRecordDetailDto resultRecordDetailDto = new ResultRecordDetailDto();
|
ResultRecordDetailDto resultRecordDetailDto = new ResultRecordDetailDto();
|
||||||
BeanUtils.copyProperties(resultRecord, resultRecordDetailDto);
|
BeanUtils.copyProperties(resultRecord, resultRecordDetailDto);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user