public JsonMessage allMyReviewList(Authentication authentication,String assessId) {
JsonMessage message = new JsonMessage();
AuthUserDetail detail = (AuthUserDetail) authentication.getDetails();
SysUser user=userService.getByUserId(detail.getUserId());
String depId=user.getDepId();
List<OkrReview> okrReviewList=service.allReviewList(assessId);
Iterator<OkrReview> it = okrReviewList.iterator();
while(it.hasNext()){
OkrReview x = it.next();
if(!userService.getByUserId(x.getUserId()).getDepId().equals(depId)){
it.remove();
}
}
message.setData(okrReviewList);
return message;
}
|