diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java index d24d3eb2..24f5a9f8 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -346,23 +346,31 @@ public class ResultRecordController extends AbstractController { ResultRecord resultRecord = null; if(param.containsKey("id")){ - id = Long.parseLong(param.get("id").toString()); - resultRecord = lzResultRecordService.selectResultRecordById(id); - //下面判断权限 - if(user.getUserId().longValue() != resultRecord.getStaffId().longValue()){ - //不是自己的绩效,判断是否为绩效管理人员,老板,部门管理人员 - log.info("不是自己的绩效"); + String value = param.get("id").toString(); + if(value.length() > 0){ + id = Long.parseLong(value); + resultRecord = lzResultRecordService.selectResultRecordById(id); + //下面判断权限 + if(user.getUserId().longValue() != resultRecord.getStaffId().longValue()){ + //不是自己的绩效,判断是否为绩效管理人员,老板,部门管理人员 + log.info("不是自己的绩效"); + } } + + }else if(param.containsKey("startId")){//根据startId和token获取 - startId = Long.parseLong(param.get("startId").toString()); - resultRecord = lzResultRecordService.selectResultRecordByStaffIdAndStartId(getUserId(), startId); - }else{//根据token获取 - resultRecord = lzResultRecordService.selectLastResultRecordByUserId(getUserId()); + 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("绩效不存在"); + resultRecord = lzResultRecordService.selectLastResultRecordByUserId(getUserId());//根据token获取 + if(resultRecord == null){ + return R.error("绩效不存在"); + } } //获取考核维度等信息