|
|
@ -161,11 +161,11 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo |
|
|
|
@Override |
|
|
|
public void addCommunitySelfOrganization(TokenDto tokenDto, AddCommunitySelfOrganizationFormDTO formDTO) { |
|
|
|
String customerId = tokenDto.getCustomerId(); |
|
|
|
boolean mobile = PhoneValidatorUtils.isMobile(formDTO.getPrincipalPhone()); |
|
|
|
/*boolean mobile = PhoneValidatorUtils.isMobile(formDTO.getPrincipalPhone()); |
|
|
|
boolean tel = PhoneValidatorUtils.isTel(formDTO.getPrincipalPhone()); |
|
|
|
if (!mobile && !tel){ |
|
|
|
throw new EpmetException(EpmetErrorCode.CHECK_PHONE_ERROR.getCode()); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
LambdaQueryWrapper<IcCommunitySelfOrganizationEntity> l = new LambdaQueryWrapper<>(); |
|
|
|
l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName()) |
|
|
|
.eq(IcCommunitySelfOrganizationEntity::getCustomerId,customerId) |
|
|
@ -246,11 +246,11 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
public void editCommunitySelfOrganization(TokenDto tokenDto, EditCommunitySelfOrganizationFormDTO formDTO) { |
|
|
|
boolean m = PhoneValidatorUtils.isMobile(formDTO.getPrincipalPhone()); |
|
|
|
/*boolean m = PhoneValidatorUtils.isMobile(formDTO.getPrincipalPhone()); |
|
|
|
boolean t = PhoneValidatorUtils.isTel(formDTO.getPrincipalPhone()); |
|
|
|
if (!m && !t){ |
|
|
|
throw new EpmetException(EpmetErrorCode.CHECK_PHONE_ERROR.getCode()); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
LambdaQueryWrapper<IcCommunitySelfOrganizationEntity> l = new LambdaQueryWrapper<>(); |
|
|
|
l.eq(IcCommunitySelfOrganizationEntity::getOrganizationName,formDTO.getOrganizationName()) |
|
|
|
.eq(IcCommunitySelfOrganizationEntity::getCustomerId,tokenDto.getCustomerId()) |
|
|
@ -586,7 +586,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo |
|
|
|
AtomicReference<Boolean> bl = new AtomicReference<>(false); |
|
|
|
StringBuffer msg = new StringBuffer(""); |
|
|
|
if (CollectionUtils.isNotEmpty(l.getPersons())){ |
|
|
|
l.getPersons().forEach(p -> { |
|
|
|
/*l.getPersons().forEach(p -> { |
|
|
|
boolean m = PhoneValidatorUtils.isMobile(p.getPersonPhone()); |
|
|
|
boolean t = PhoneValidatorUtils.isTel(p.getPersonPhone()); |
|
|
|
if (!m && !t){ |
|
|
@ -596,7 +596,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo |
|
|
|
return; |
|
|
|
//throw new EpmetException(EpmetErrorCode.CHECK_PHONE_ERROR.getCode());
|
|
|
|
} |
|
|
|
}); |
|
|
|
});*/ |
|
|
|
persons = ConvertUtils.sourceToTarget(l.getPersons(), IcCommunitySelfOrganizationPersonnelEntity.class); |
|
|
|
Map<String, List<IcCommunitySelfOrganizationPersonnelEntity>> groupByPhone = persons.stream().collect(Collectors.groupingBy(IcCommunitySelfOrganizationPersonnelEntity::getPersonPhone)); |
|
|
|
List<String> phones = new ArrayList<>(); |
|
|
|