Commit d2d0db33 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.5.1' into MVP1.5.1

parents ecd1888c 960f3d91
......@@ -173,5 +173,15 @@ public class TCheckMobileController {
public CheckBatchVo checkMobileBatch(@RequestBody List<String> list) {
return tCheckMobileService.checkMobileBatch(list);
}
/**
* @Author fxj
* @Description 批量手机号校验
* @Date 18:20 2023/3/1
**/
@Operation(description = "批量手机号校验")
@SysLog("批量手机号校验" )
@PostMapping("/checkMobileBatch" )
public CheckBatchVo checkMobileBatchs(@RequestBody List<String> list) {
return tCheckMobileService.checkMobileBatch(list);
}
}
......@@ -178,9 +178,35 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
}
}
List<String> noCurlist = new ArrayList<>();
Boolean cur;
Map<String, Boolean> backMap = new HashMap<>();
List<String> tempList = new ArrayList<>();
// 因手机号码最多50个所以这里 要特殊处理下
if (Common.isNotNull(list)){
//计数器
int count =1;
for (String phone:list){
tempList.add(phone);
if (count == 50){
checkMobiles(tempList, vo, noMap, noCurlist, backMap);
tempList.clear();
// 重置
count =1;
}else {
count ++;
}
}
}
checkMobiles(tempList, vo, noMap, noCurlist, backMap);
return vo;
}
private void checkMobiles(List<String> list,
CheckBatchVo vo,
Map<String, Boolean> noMap,
List<String> noCurlist,
Map<String, Boolean> backMap) {
StringBuilder phones = new StringBuilder();
Boolean cur;
for (String check : list) {
cur = noMap.get(check);
if (cur != null) {
......@@ -213,10 +239,9 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
if (!saveList.isEmpty()) {
this.saveBatch(saveList);
}
saveList.clear();
}
}
vo.setCheckMap(backMap);
return vo;
}
}
......@@ -3766,9 +3766,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.HANDLE_PROVINCE_IS_NULL);
continue;
}
String c = detail.getInsuranceHandleCity().toString();
//商险办理地权限校验
boolean b = insuranceAreaResList.stream().anyMatch(s -> detail.getInsuranceHandleCity().equals(s.getCity()) && detail.getInsuranceHandleProvince().equals(s.getProvince()));
if(!b){
if(insuranceAreaResList.stream().noneMatch(s -> c.equals(s.getCity()))){
param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION);
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment