Browse Source

注释社区自组织成员联系方式格式校验

master
zxc 3 years ago
parent
commit
ba8471b1ec
  1. 21
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java

21
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java

@ -200,13 +200,16 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
baseDao.insert(orgEntity);
if(CollectionUtils.isNotEmpty(formDTO.getOrganizationPersonnel())){
// 号码校验
formDTO.getOrganizationPersonnel().forEach(p -> {
/**
* 2022-06-14 需求变动 去掉号码校验
*/
/*formDTO.getOrganizationPersonnel().forEach(p -> {
boolean m = PhoneValidatorUtils.isMobile(p.getPersonPhone());
boolean t = PhoneValidatorUtils.isTel(p.getPersonPhone());
if (!m && !t){
throw new EpmetException(EpmetErrorCode.CHECK_PHONE_ERROR.getCode());
}
});
});*/
List<IcCommunitySelfOrganizationPersonnelEntity> persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class);
Map<String, List<IcCommunitySelfOrganizationPersonnelEntity>> groupPhone = persons.stream().collect(Collectors.groupingBy(IcCommunitySelfOrganizationPersonnelEntity::getPersonPhone));
List<String> phones = new ArrayList<>();
@ -263,13 +266,16 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
baseDao.updateCommunitySelfOrganization(e);
personnelService.deleteByOrgId(formDTO.getOrgId());
if (CollectionUtils.isNotEmpty(formDTO.getOrganizationPersonnel())){
formDTO.getOrganizationPersonnel().forEach(p -> {
/**
* 2022-06-14 需求变动 去掉号码校验
*/
/*formDTO.getOrganizationPersonnel().forEach(p -> {
boolean mobile = PhoneValidatorUtils.isMobile(p.getPersonPhone());
boolean tel = PhoneValidatorUtils.isTel(p.getPersonPhone());
if (!mobile && !tel){
throw new EpmetException(EpmetErrorCode.CHECK_PHONE_ERROR.getCode());
}
});
});*/
List<IcCommunitySelfOrganizationPersonnelEntity> persons = ConvertUtils.sourceToTarget(formDTO.getOrganizationPersonnel(), IcCommunitySelfOrganizationPersonnelEntity.class);
Map<String, List<IcCommunitySelfOrganizationPersonnelEntity>> groupPhone = persons.stream().collect(Collectors.groupingBy(IcCommunitySelfOrganizationPersonnelEntity::getPersonPhone));
List<String> phones = new ArrayList<>();
@ -540,13 +546,16 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
}
});
//手机号不合规
boolean m = PhoneValidatorUtils.isMobile(obj.getPrincipalPhone());
/**
* 2022-06-14 需求变动 去掉号码校验
*/
/*boolean m = PhoneValidatorUtils.isMobile(obj.getPrincipalPhone());
boolean t = PhoneValidatorUtils.isTel(obj.getPrincipalPhone());
if (!m && !t){
errMsg.append("手机号码不合法;");
bl.set(true);
log.warn("手机号码不合法,自组织名称{}", obj.getOrganizationName());
}
}*/
if(bl.get()){
excel = new CommunitySelfOrgImportExcel();
//excel.setAgencyName(obj.getOrganizationName());

Loading…
Cancel
Save