|
|
@ -247,6 +247,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result authBadgeRecord(CertificationAddFormDTO certificationAddFormDTO) { |
|
|
|
// 校验这个徽章此人有没有
|
|
|
|
Integer recordCount = userBadgeCertificateRecordDao.selectIsExist(certificationAddFormDTO.getBadgeId(), certificationAddFormDTO.getUserId()); |
|
|
|
if (recordCount>NumConstant.ZERO){ |
|
|
|
throw new RenException("不允许重复提交审核"); |
|
|
@ -293,10 +294,12 @@ public class UserBadgeServiceImpl implements UserBadgeService { |
|
|
|
} |
|
|
|
Set<String> requiredColumns = authFieldResultDTOS.stream() |
|
|
|
.filter(o -> NumConstant.ONE_STR.equals(o.getIsRequired())) |
|
|
|
.map(AuthFieldResultDTO::getEnName).collect(Collectors.toSet()); |
|
|
|
.map(AuthFieldResultDTO::getCnName).collect(Collectors.toSet()); |
|
|
|
List<String> missColumns = ValidatorUtils.hasAllRequired(JSON.toJSONString(certificationAddFormDTO), requiredColumns); |
|
|
|
if (!CollectionUtils.isEmpty(missColumns)) { |
|
|
|
throw new RenException(JSON.toJSONString(missColumns).concat("不能为空")); |
|
|
|
EpmetErrorCode.BADGE_CHECK.setMsg(JSON.toJSONString(missColumns).concat("不能为空")); |
|
|
|
throw new RenException(EpmetErrorCode.BADGE_CHECK.getCode()); |
|
|
|
// throw new RenException(JSON.toJSONString(missColumns).concat("不能为空"));
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -360,6 +363,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<AuthFieldResultDTO> authField(AuthFieldFormDTO authFieldFormDTO) { |
|
|
|
// 查询徽章要显示的认证信息字段
|
|
|
|
List<AuthFieldResultDTO> authFieldResultDTOS = userBadgeDao.selectAuthField(authFieldFormDTO); |
|
|
|
if (CollectionUtils.isEmpty(authFieldResultDTOS)){ |
|
|
|
authFieldFormDTO.setCustomerId(BadgeConstant.DEFAULT_CUSTOMER); |
|
|
|