获取绩效详情逻辑变更
This commit is contained in:
parent
cbf0ced7f5
commit
caaf6f75ce
@ -349,6 +349,28 @@ public class ResultRecordController extends AbstractController {
|
||||
String value = param.get("id").toString();
|
||||
if(value.length() > 0){
|
||||
id = Long.parseLong(value);
|
||||
}
|
||||
}else if(param.containsKey("startId")){//根据startId和token获取
|
||||
String value = param.get("startId").toString();
|
||||
if(value.length() > 0){
|
||||
startId = Long.parseLong(value);
|
||||
}
|
||||
}
|
||||
|
||||
if(id == null){
|
||||
if(startId == null){
|
||||
//根据token获取
|
||||
resultRecord = lzResultRecordService.selectLastResultRecordByUserId(getUserId());
|
||||
if(resultRecord == null){
|
||||
return R.error("绩效不存在");
|
||||
}
|
||||
}else{
|
||||
resultRecord = lzResultRecordService.selectResultRecordByStaffIdAndStartId(getUserId(), startId);
|
||||
if(resultRecord == null){
|
||||
return R.error("绩效不存在");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
resultRecord = lzResultRecordService.selectResultRecordById(id);
|
||||
if(resultRecord == null){
|
||||
return R.error("绩效不存在");
|
||||
@ -360,24 +382,6 @@ public class ResultRecordController extends AbstractController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}else if(param.containsKey("startId")){//根据startId和token获取
|
||||
String value = param.get("startId").toString();
|
||||
if(value.length() > 0){
|
||||
startId = Long.parseLong(value);
|
||||
resultRecord = lzResultRecordService.selectResultRecordByStaffIdAndStartId(getUserId(), startId);
|
||||
if(resultRecord == null){
|
||||
return R.error("绩效不存在");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//根据token获取
|
||||
resultRecord = lzResultRecordService.selectLastResultRecordByUserId(getUserId());
|
||||
if(resultRecord == null){
|
||||
return R.error("绩效不存在");
|
||||
}
|
||||
}
|
||||
|
||||
//获取考核维度等信息
|
||||
ResultRecordDetailDto resultRecordDetailDto = new ResultRecordDetailDto();
|
||||
BeanUtils.copyProperties(resultRecord, resultRecordDetailDto);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user