|
|
|
@ -119,14 +119,14 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
|
|
|
|
|
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
// 已出现的份证
|
|
|
|
// 已出现的份证
|
|
|
|
Map<String, Byte[]> cache = new WeakHashMap<>(); |
|
|
|
HashSet<String> cache = new HashSet<>(); |
|
|
|
LocalDate now = LocalDate.now(); |
|
|
|
LocalDate now = LocalDate.now(); |
|
|
|
for (GBaseJJD item : jjdList) { |
|
|
|
for (GBaseJJD item : jjdList) { |
|
|
|
GBaseSYRKXX syrkxx; |
|
|
|
GBaseSYRKXX syrkxx; |
|
|
|
// 接警单证件号不为空并没入过库
|
|
|
|
// 接警单证件号不为空并没入过库
|
|
|
|
if (item.getBjrzjhm() != null && cache.get(item.getBjrzjhm()) == null) { |
|
|
|
if (item.getBjrzjhm() != null && !cache.contains(item.getBjrzjhm())) { |
|
|
|
syrkxx = idCodeMap.get(item.getBjrzjhm()); |
|
|
|
syrkxx = idCodeMap.get(item.getBjrzjhm()); |
|
|
|
cache.put(item.getBjrzjhm(), new Byte[0]); |
|
|
|
cache.add(item.getBjrzjhm()); |
|
|
|
if (syrkxx != null) { |
|
|
|
if (syrkxx != null) { |
|
|
|
RiskPersonal personal = createPerson(syrkxx, item.getBjsj(), now, end, Default.BIG_TAG_JJD); |
|
|
|
RiskPersonal personal = createPerson(syrkxx, item.getBjsj(), now, end, Default.BIG_TAG_JJD); |
|
|
|
if (personal != null) { |
|
|
|
if (personal != null) { |
|
|
|
@ -139,14 +139,14 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
if (!idCards.isEmpty()) { |
|
|
|
if (!idCards.isEmpty()) { |
|
|
|
String[] arr = idCards.split(","); |
|
|
|
String[] arr = idCards.split(","); |
|
|
|
for (String s : arr) { |
|
|
|
for (String s : arr) { |
|
|
|
if (cache.get(s) != null) { |
|
|
|
if (cache.contains(s)) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
GBaseSYRKXX xx = idCodeMap.get(s); |
|
|
|
GBaseSYRKXX xx = idCodeMap.get(s); |
|
|
|
if (xx == null) { |
|
|
|
if (xx == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
cache.put(xx.getGmsfhm(), new Byte[0]); |
|
|
|
cache.add(xx.getGmsfhm()); |
|
|
|
RiskPersonal personal = createPerson(xx, item.getBjsj(), now, end, Default.BIG_TAG_JJD); |
|
|
|
RiskPersonal personal = createPerson(xx, item.getBjsj(), now, end, Default.BIG_TAG_JJD); |
|
|
|
if (personal == null) { |
|
|
|
if (personal == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
@ -158,7 +158,7 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
List<GBaseSYRKXX> xxList = Optional.ofNullable(mobileMap.get(item.getBjdh())).orElse(new ArrayList<>()); |
|
|
|
List<GBaseSYRKXX> xxList = Optional.ofNullable(mobileMap.get(item.getBjdh())).orElse(new ArrayList<>()); |
|
|
|
syrkxx = compare(xxList, item.getBjrxm()); |
|
|
|
syrkxx = compare(xxList, item.getBjrxm()); |
|
|
|
if (syrkxx != null) { |
|
|
|
if (syrkxx != null) { |
|
|
|
cache.put(syrkxx.getGmsfhm(), new Byte[0]); |
|
|
|
cache.add(syrkxx.getGmsfhm()); |
|
|
|
RiskPersonal personal = createPerson(syrkxx, item.getBjsj(), now, end, Default.BIG_TAG_JJD); |
|
|
|
RiskPersonal personal = createPerson(syrkxx, item.getBjsj(), now, end, Default.BIG_TAG_JJD); |
|
|
|
if (personal == null) { |
|
|
|
if (personal == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
@ -175,14 +175,14 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
public void pullPointPersonalInfo() { |
|
|
|
public void pullPointPersonalInfo() { |
|
|
|
List<GBaseZDRY> list = zdryRepository.getBaseMapper().syncPointPeople(); |
|
|
|
List<GBaseZDRY> list = zdryRepository.getBaseMapper().syncPointPeople(); |
|
|
|
LocalDate now = LocalDate.now(); |
|
|
|
LocalDate now = LocalDate.now(); |
|
|
|
Map<String, Byte[]> exist = new WeakHashMap<>(); |
|
|
|
HashSet<String> exist = new HashSet<>(); |
|
|
|
|
|
|
|
|
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
for (GBaseZDRY ry : list) { |
|
|
|
for (GBaseZDRY ry : list) { |
|
|
|
if (exist.get(ry.getSfzh()) != null) { |
|
|
|
if (exist.contains(ry.getSfzh())) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
exist.put(ry.getSfzh(), new Byte[0]); |
|
|
|
exist.add(ry.getSfzh()); |
|
|
|
RiskPersonal personal = new RiskPersonal(); |
|
|
|
RiskPersonal personal = new RiskPersonal(); |
|
|
|
personal.setTags(Default.POINT_POEPLE); |
|
|
|
personal.setTags(Default.POINT_POEPLE); |
|
|
|
personal.setCreateTime(LocalDateTime.now()); |
|
|
|
personal.setCreateTime(LocalDateTime.now()); |
|
|
|
@ -234,13 +234,13 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
Map<String, Contradiction> map = list.stream().collect(Collectors.toMap(Contradiction::getGmsfhm, Function.identity(), (val, old) -> val)); |
|
|
|
Map<String, Contradiction> map = list.stream().collect(Collectors.toMap(Contradiction::getGmsfhm, Function.identity(), (val, old) -> val)); |
|
|
|
List<GBaseSYRKXX> xxList = getByIdCode(idCodes); |
|
|
|
List<GBaseSYRKXX> xxList = getByIdCode(idCodes); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Byte[]> exist = new WeakHashMap<>(); |
|
|
|
HashSet<String> exist = new HashSet<>(); |
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
for (GBaseSYRKXX syrkxx : xxList) { |
|
|
|
for (GBaseSYRKXX syrkxx : xxList) { |
|
|
|
if (exist.get(syrkxx.getGmsfhm()) != null) { |
|
|
|
if (exist.contains(syrkxx.getGmsfhm())) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
exist.put(syrkxx.getGmsfhm(), new Byte[0]); |
|
|
|
exist.add(syrkxx.getGmsfhm()); |
|
|
|
Contradiction contradiction = map.get(syrkxx.getGmsfhm()); |
|
|
|
Contradiction contradiction = map.get(syrkxx.getGmsfhm()); |
|
|
|
RiskPersonal personal = createPerson(syrkxx, Optional.of(contradiction).map(Contradiction::getMaxTime) |
|
|
|
RiskPersonal personal = createPerson(syrkxx, Optional.of(contradiction).map(Contradiction::getMaxTime) |
|
|
|
.orElse(null), now.toLocalDate(), now, Default.BIG_TAG_SHWFR); |
|
|
|
.orElse(null), now.toLocalDate(), now, Default.BIG_TAG_SHWFR); |
|
|
|
@ -293,17 +293,18 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
.toList())))).join(); |
|
|
|
.toList())))).join(); |
|
|
|
// 去重
|
|
|
|
// 去重
|
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
Map<String, Byte[]> map = new WeakHashMap<>(); |
|
|
|
HashSet<String> map = new HashSet<>(); |
|
|
|
LocalDate today = now.toLocalDate(); |
|
|
|
LocalDate today = now.toLocalDate(); |
|
|
|
Date nowDate = new Date(); |
|
|
|
Date nowDate = new Date(); |
|
|
|
for (GBaseSYRKXX xx : xxList) { |
|
|
|
for (GBaseSYRKXX xx : xxList) { |
|
|
|
if (map.get(xx.getGmsfhm()) == null) { |
|
|
|
if (map.contains(xx.getGmsfhm())) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
RiskPersonal personal = createPerson(xx, nowDate, today, now, Default.BIG_TAG_PETITION); |
|
|
|
RiskPersonal personal = createPerson(xx, nowDate, today, now, Default.BIG_TAG_PETITION); |
|
|
|
if (personal != null) { |
|
|
|
if (personal != null) { |
|
|
|
personals.add(personal); |
|
|
|
personals.add(personal); |
|
|
|
} |
|
|
|
} |
|
|
|
map.put(xx.getGmsfhm(), new Byte[0]); |
|
|
|
map.add(xx.getGmsfhm()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
riskPersonalService.saveDistinct(personals); |
|
|
|
riskPersonalService.saveDistinct(personals); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -333,13 +334,15 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
List<GBaseSYRKXX> xxList = new ArrayList<>(getByIdCode(idCards2)); |
|
|
|
List<GBaseSYRKXX> xxList = new ArrayList<>(getByIdCode(idCards2)); |
|
|
|
// 去重
|
|
|
|
// 去重
|
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
Map<String, Byte[]> map = new WeakHashMap<>(); |
|
|
|
HashSet<String> map = new HashSet<>(); |
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
LocalDate today = now.toLocalDate(); |
|
|
|
LocalDate today = now.toLocalDate(); |
|
|
|
Date nowDate = new Date(); |
|
|
|
Date nowDate = new Date(); |
|
|
|
Map<String, SupExternalDepart> hope = new WeakHashMap<>(); |
|
|
|
Map<String, SupExternalDepart> hope = new WeakHashMap<>(); |
|
|
|
for (GBaseSYRKXX xx : xxList) { |
|
|
|
for (GBaseSYRKXX xx : xxList) { |
|
|
|
if (map.get(xx.getGmsfhm()) == null) { |
|
|
|
if (map.contains(xx.getGmsfhm())) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
RiskPersonal personal = createPerson(xx, nowDate, today, now, Default.BIG_TAG_PETITION); |
|
|
|
RiskPersonal personal = createPerson(xx, nowDate, today, now, Default.BIG_TAG_PETITION); |
|
|
|
if (personal == null) { |
|
|
|
if (personal == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
@ -355,8 +358,7 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
personal.setControlDepartName(null); |
|
|
|
personal.setControlDepartName(null); |
|
|
|
} |
|
|
|
} |
|
|
|
personals.add(personal); |
|
|
|
personals.add(personal); |
|
|
|
map.put(xx.getGmsfhm(), new Byte[0]); |
|
|
|
map.add(xx.getGmsfhm()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
riskPersonalService.saveDistinct(personals); |
|
|
|
riskPersonalService.saveDistinct(personals); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -404,15 +406,15 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
List<GBaseSYRKXX> xxList = new ArrayList<>(getByIdCode(idCards2)); |
|
|
|
List<GBaseSYRKXX> xxList = new ArrayList<>(getByIdCode(idCards2)); |
|
|
|
Map<String, GBaseSYRKXX> xxMap = xxList.stream().collect(Collectors.toMap(GBaseSYRKXX::getGmsfhm, Function.identity(), (val, old) -> val)); |
|
|
|
Map<String, GBaseSYRKXX> xxMap = xxList.stream().collect(Collectors.toMap(GBaseSYRKXX::getGmsfhm, Function.identity(), (val, old) -> val)); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Byte[]> map = new WeakHashMap<>(); |
|
|
|
HashSet<String> map = new HashSet<>(); |
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
List<RiskPersonal> personals = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, SupExternalDepart> hope = new WeakHashMap<>(); |
|
|
|
Map<String, SupExternalDepart> hope = new WeakHashMap<>(); |
|
|
|
for (WdpcGrjdJsbry ry : jsbryList) { |
|
|
|
for (WdpcGrjdJsbry ry : jsbryList) { |
|
|
|
if (map.get(ry.getIdCode()) != null) { |
|
|
|
if (map.contains(ry.getIdCode())) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
map.put(ry.getIdCode(), new Byte[0]); |
|
|
|
map.add(ry.getIdCode()); |
|
|
|
|
|
|
|
|
|
|
|
GBaseSYRKXX xx = xxMap.get(ry.getIdCode()); |
|
|
|
GBaseSYRKXX xx = xxMap.get(ry.getIdCode()); |
|
|
|
|
|
|
|
|
|
|
|
@ -489,7 +491,7 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
log.info("有效头像共:{}", total); |
|
|
|
log.info("有效头像共:{}", total); |
|
|
|
List<PersonImageInfo> infoList; |
|
|
|
List<PersonImageInfo> infoList; |
|
|
|
List<RiskPersonInfo> infos; |
|
|
|
List<RiskPersonInfo> infos; |
|
|
|
Map<String, Byte[]> p = new WeakHashMap<>(); |
|
|
|
HashSet<String> p = new HashSet<>(); |
|
|
|
for (int page = 1;; page++) { |
|
|
|
for (int page = 1;; page++) { |
|
|
|
log.info("{}", page); |
|
|
|
log.info("{}", page); |
|
|
|
int pageNo = (page- 1) * 10000; |
|
|
|
int pageNo = (page- 1) * 10000; |
|
|
|
@ -498,10 +500,10 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
infos = new ArrayList<>(); |
|
|
|
infos = new ArrayList<>(); |
|
|
|
log.info("保存:{}",infoList.size()); |
|
|
|
log.info("保存:{}",infoList.size()); |
|
|
|
for (PersonImageInfo item : infoList) { |
|
|
|
for (PersonImageInfo item : infoList) { |
|
|
|
if(p.get(item.getIdCode().toUpperCase()) != null) { |
|
|
|
if(p.contains(item.getIdCode().toUpperCase())) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
p.put(item.getIdCode().toUpperCase(), new Byte[0]); |
|
|
|
p.add(item.getIdCode().toUpperCase()); |
|
|
|
RiskPersonInfo info = new RiskPersonInfo(); |
|
|
|
RiskPersonInfo info = new RiskPersonInfo(); |
|
|
|
info.setIdCode(item.getIdCode()); |
|
|
|
info.setIdCode(item.getIdCode()); |
|
|
|
info.setImageBase64(Media.JPEG.concat(new String(item.getImage()))); |
|
|
|
info.setImageBase64(Media.JPEG.concat(new String(item.getImage()))); |
|
|
|
|