隐患考评调整

main
zhaokai 2026-03-31 17:13:49 +08:00
parent 3c513f9229
commit 35f8dcc70c
2 changed files with 7 additions and 8 deletions

View File

@ -47,19 +47,19 @@ public class HiddenEvaluationDetailAddExe {
public boolean execute(HiddenEvaluationDetailAddCmd cmd) { public boolean execute(HiddenEvaluationDetailAddCmd cmd) {
List<EvaluationConfigDO> listByCorpId =evaluationConfigRepository.getListByCorpId(cmd.getCorpinfoId(), cmd.getEvaluationType()); List<EvaluationConfigDO> listByCorpId =evaluationConfigRepository.getListByCorpId(cmd.getCorpinfoId(), cmd.getEvaluationType());
//判断当前人是否可以评论,,如果是企业登录,当前人所在的 企业也可以评审 //判断当前人是否可以评论,,如果是企业登录,当前人所在的 企业也可以评审
if(corpInfoRepository.checkCorp()){ /* if(corpInfoRepository.checkCorp()){
// 企业登录:验证当前企业是否在配置列表中 // 企业登录:验证当前企业是否在配置列表中
if (!listByCorpId.stream().anyMatch(config -> if (!listByCorpId.stream().anyMatch(config ->
AuthContext.getTenantId().equals(config.getCorpinfoId()))) { AuthContext.getTenantId().equals(config.getCorpinfoId()))) {
throw new BizException("当前企业没有权限评论"); throw new BizException("当前企业没有权限评论");
} }
}else{ }else{*/
// 个人登录:验证当前用户是否在配置列表中 // 个人登录:验证当前用户是否在配置列表中
if (!listByCorpId.stream().anyMatch(config -> if (!listByCorpId.stream().anyMatch(config ->
AuthContext.getUserId().equals(config.getUserId()))) { AuthContext.getUserId().equals(config.getUserId()))) {
throw new BizException("当前用户没有权限评审"); throw new BizException("当前用户没有权限评审");
} }
} // }

View File

@ -69,13 +69,12 @@ public class HiddenEvaluationRecordQueryExe {
PageResponse<HiddenStatisticsDO> pageResponse = hiddenEvaluationRecordRepository.hidddenPage(params); PageResponse<HiddenStatisticsDO> pageResponse = hiddenEvaluationRecordRepository.hidddenPage(params);
List<HiddenStatisticsCO> examCenterCOS =hiddenEvaluationRecordCoConvertor.converHiddenStatisticDOsToCOs(pageResponse.getData()); List<HiddenStatisticsCO> examCenterCOS =hiddenEvaluationRecordCoConvertor.converHiddenStatisticDOsToCOs(pageResponse.getData());
//判断是企业的话,企业端CurrentEvaluationFlag如果Au //判断是企业的话,暂时只能个人才能考评,主账号不可以考评
String checkKey; /* String checkKey;
if(corpInfoRepository.checkCorp()){ if(corpInfoRepository.checkCorp()){
checkKey = AuthContext.getTenantId().toString(); checkKey = AuthContext.getTenantId().toString();
}else{ }else{*/
checkKey = AuthContext.getTenantId() + "-" + AuthContext.getUserId(); String checkKey = AuthContext.getTenantId() + "-" + AuthContext.getUserId();
}
examCenterCOS.forEach(co -> { examCenterCOS.forEach(co -> {
if (co.getCheckUserId() != null && co.getCheckUserId().contains(checkKey)) { if (co.getCheckUserId() != null && co.getCheckUserId().contains(checkKey)) {