隐患考评调整
parent
3c513f9229
commit
35f8dcc70c
|
|
@ -47,19 +47,19 @@ public class HiddenEvaluationDetailAddExe {
|
|||
public boolean execute(HiddenEvaluationDetailAddCmd cmd) {
|
||||
List<EvaluationConfigDO> listByCorpId =evaluationConfigRepository.getListByCorpId(cmd.getCorpinfoId(), cmd.getEvaluationType());
|
||||
//判断当前人是否可以评论,,如果是企业登录,当前人所在的 企业也可以评审
|
||||
if(corpInfoRepository.checkCorp()){
|
||||
/* if(corpInfoRepository.checkCorp()){
|
||||
// 企业登录:验证当前企业是否在配置列表中
|
||||
if (!listByCorpId.stream().anyMatch(config ->
|
||||
AuthContext.getTenantId().equals(config.getCorpinfoId()))) {
|
||||
throw new BizException("当前企业没有权限评论");
|
||||
}
|
||||
}else{
|
||||
}else{*/
|
||||
// 个人登录:验证当前用户是否在配置列表中
|
||||
if (!listByCorpId.stream().anyMatch(config ->
|
||||
AuthContext.getUserId().equals(config.getUserId()))) {
|
||||
throw new BizException("当前用户没有权限评审");
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -69,13 +69,12 @@ public class HiddenEvaluationRecordQueryExe {
|
|||
PageResponse<HiddenStatisticsDO> pageResponse = hiddenEvaluationRecordRepository.hidddenPage(params);
|
||||
|
||||
List<HiddenStatisticsCO> examCenterCOS =hiddenEvaluationRecordCoConvertor.converHiddenStatisticDOsToCOs(pageResponse.getData());
|
||||
//判断是企业的话,企业端CurrentEvaluationFlag如果Au
|
||||
String checkKey;
|
||||
//判断是企业的话,暂时只能个人才能考评,主账号不可以考评
|
||||
/* String checkKey;
|
||||
if(corpInfoRepository.checkCorp()){
|
||||
checkKey = AuthContext.getTenantId().toString();
|
||||
}else{
|
||||
checkKey = AuthContext.getTenantId() + "-" + AuthContext.getUserId();
|
||||
}
|
||||
}else{*/
|
||||
String checkKey = AuthContext.getTenantId() + "-" + AuthContext.getUserId();
|
||||
|
||||
examCenterCOS.forEach(co -> {
|
||||
if (co.getCheckUserId() != null && co.getCheckUserId().contains(checkKey)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue