增加对id传空的判断
This commit is contained in:
parent
1cb8b1332f
commit
2cc3f35379
@ -346,23 +346,31 @@ public class ResultRecordController extends AbstractController {
|
|||||||
ResultRecord resultRecord = null;
|
ResultRecord resultRecord = null;
|
||||||
|
|
||||||
if(param.containsKey("id")){
|
if(param.containsKey("id")){
|
||||||
id = Long.parseLong(param.get("id").toString());
|
String value = param.get("id").toString();
|
||||||
resultRecord = lzResultRecordService.selectResultRecordById(id);
|
if(value.length() > 0){
|
||||||
//下面判断权限
|
id = Long.parseLong(value);
|
||||||
if(user.getUserId().longValue() != resultRecord.getStaffId().longValue()){
|
resultRecord = lzResultRecordService.selectResultRecordById(id);
|
||||||
//不是自己的绩效,判断是否为绩效管理人员,老板,部门管理人员
|
//下面判断权限
|
||||||
log.info("不是自己的绩效");
|
if(user.getUserId().longValue() != resultRecord.getStaffId().longValue()){
|
||||||
|
//不是自己的绩效,判断是否为绩效管理人员,老板,部门管理人员
|
||||||
|
log.info("不是自己的绩效");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}else if(param.containsKey("startId")){//根据startId和token获取
|
}else if(param.containsKey("startId")){//根据startId和token获取
|
||||||
startId = Long.parseLong(param.get("startId").toString());
|
String value = param.get("startId").toString();
|
||||||
resultRecord = lzResultRecordService.selectResultRecordByStaffIdAndStartId(getUserId(), startId);
|
if(value.length() > 0){
|
||||||
}else{//根据token获取
|
startId = Long.parseLong(value);
|
||||||
resultRecord = lzResultRecordService.selectLastResultRecordByUserId(getUserId());
|
resultRecord = lzResultRecordService.selectResultRecordByStaffIdAndStartId(getUserId(), startId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(resultRecord == null){
|
if(resultRecord == null){
|
||||||
return R.error("绩效不存在");
|
resultRecord = lzResultRecordService.selectLastResultRecordByUserId(getUserId());//根据token获取
|
||||||
|
if(resultRecord == null){
|
||||||
|
return R.error("绩效不存在");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取考核维度等信息
|
//获取考核维度等信息
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user