|
@@ -778,28 +778,41 @@ public class BusinessReminderCardController extends JeecgController<BusinessRem
|
|
|
String newPhone = businessReminderCard.getNewPhone();
|
|
String newPhone = businessReminderCard.getNewPhone();
|
|
|
String[] split = newPhone.split(",");
|
|
String[] split = newPhone.split(",");
|
|
|
Set<String>set =new HashSet();
|
|
Set<String>set =new HashSet();
|
|
|
- for (String s : split) {
|
|
|
|
|
- if (StringUtils.isEmpty(s)){
|
|
|
|
|
- return Result.error("有未输入新办手机号");
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 拦截成功可以不输入手机号
|
|
|
|
|
+ if(!businessReminderCard.getJudgmentStatus().equals("2")){
|
|
|
|
|
+ for (String s : split) {
|
|
|
|
|
+ if (StringUtils.isEmpty(s)){
|
|
|
|
|
+ return Result.error("有未输入新办手机号");
|
|
|
|
|
+ }
|
|
|
|
|
+ set.add(s);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (set.size()!=split.length){
|
|
|
|
|
+ return Result.error("新办号码 不可重复!");
|
|
|
}
|
|
}
|
|
|
- set.add(s);
|
|
|
|
|
- }
|
|
|
|
|
- if (set.size()!=split.length){
|
|
|
|
|
- return Result.error("新办号码 不可重复!");
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
String s = phoneCheck(businessReminderCard.getNewPhone());
|
|
String s = phoneCheck(businessReminderCard.getNewPhone());
|
|
|
if (!s.isEmpty()){
|
|
if (!s.isEmpty()){
|
|
|
return Result.error(s);
|
|
return Result.error(s);
|
|
|
}
|
|
}
|
|
|
// 新办号码的用户编号
|
|
// 新办号码的用户编号
|
|
|
String phoneUserId = businessReminderCard.getPhoneUserId();
|
|
String phoneUserId = businessReminderCard.getPhoneUserId();
|
|
|
- String[] userIdSplit = phoneUserId.split(",");
|
|
|
|
|
|
|
+ //String[] userIdSplit = phoneUserId.split(",");
|
|
|
|
|
+ String[] userIdSplit = Arrays.stream(phoneUserId.split(","))
|
|
|
|
|
+ .filter(data -> !data.isEmpty()) // 过滤掉空字符串
|
|
|
|
|
+ .toArray(String[]::new);
|
|
|
Set<String>userIdSet =new HashSet();
|
|
Set<String>userIdSet =new HashSet();
|
|
|
|
|
+
|
|
|
for (String userId : userIdSplit) {
|
|
for (String userId : userIdSplit) {
|
|
|
- if (StringUtils.isEmpty(userId)){
|
|
|
|
|
|
|
+ if (!businessReminderCard.getJudgmentStatus().equals("2") && StringUtils.isEmpty(userId)){
|
|
|
return Result.error("有未输入用户编号");
|
|
return Result.error("有未输入用户编号");
|
|
|
}
|
|
}
|
|
|
- userIdSet.add(userId);
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(userId)){
|
|
|
|
|
+ userIdSet.add(userId);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (userIdSet.size()!=userIdSplit.length){
|
|
if (userIdSet.size()!=userIdSplit.length){
|
|
|
return Result.error("用户编号 不可重复!");
|
|
return Result.error("用户编号 不可重复!");
|
|
@@ -869,6 +882,9 @@ public class BusinessReminderCardController extends JeecgController<BusinessRem
|
|
|
String mes="";
|
|
String mes="";
|
|
|
String[] split = newPhone.split(",");
|
|
String[] split = newPhone.split(",");
|
|
|
for (String s : split) {
|
|
for (String s : split) {
|
|
|
|
|
+ if (StringUtils.isEmpty(s)){
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
String regex = "^((13[0-9])|(14[05679])|(15([0-3,5-9]))|(16[2567])|(17[01235678])|(18[0-9]|19[135689]))\\d{8}$";
|
|
String regex = "^((13[0-9])|(14[05679])|(15([0-3,5-9]))|(16[2567])|(17[01235678])|(18[0-9]|19[135689]))\\d{8}$";
|
|
|
Pattern p = Pattern.compile(regex);
|
|
Pattern p = Pattern.compile(regex);
|
|
|
Matcher m = p.matcher(s);
|
|
Matcher m = p.matcher(s);
|