|
|
|
@ -14,6 +14,7 @@ import com.biutag.supervisiondata.pojo.entity.mine.RiskModelTaskClue; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.mine.RiskPersonal; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.mine.RiskPersonal; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.mine.RiskTask; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.mine.RiskTask; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.mine.SupExternalDepart; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.mine.SupExternalDepart; |
|
|
|
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.wdpc.WdpcGrjdZblx; |
|
|
|
import com.biutag.supervisiondata.pojo.enums.DepartType; |
|
|
|
import com.biutag.supervisiondata.pojo.enums.DepartType; |
|
|
|
import com.biutag.supervisiondata.repository.*; |
|
|
|
import com.biutag.supervisiondata.repository.*; |
|
|
|
import com.biutag.supervisiondata.service.GBaseSHRWFRService; |
|
|
|
import com.biutag.supervisiondata.service.GBaseSHRWFRService; |
|
|
|
@ -92,9 +93,9 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
List<GBaseSHRXX> shrTmp = shrxxRepository.getBaseMapper().selectDataToRisk(start.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), |
|
|
|
List<GBaseSHRXX> shrTmp = shrxxRepository.getBaseMapper().selectDataToRisk(start.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), |
|
|
|
end.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
|
|
|
end.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
|
|
|
for (GBaseSHRXX gBaseSHRXX : shrTmp) { |
|
|
|
for (GBaseSHRXX gBaseSHRXX : shrTmp) { |
|
|
|
if(gBaseSHRXX.getGmsfhm() != null) { |
|
|
|
if (gBaseSHRXX.getGmsfhm() != null) { |
|
|
|
idCards.add(gBaseSHRXX.getGmsfhm()); |
|
|
|
idCards.add(gBaseSHRXX.getGmsfhm()); |
|
|
|
} else if(gBaseSHRXX.getLxdh() != null) { |
|
|
|
} else if (gBaseSHRXX.getLxdh() != null) { |
|
|
|
mobiles.add(gBaseSHRXX.getLxdh()); |
|
|
|
mobiles.add(gBaseSHRXX.getLxdh()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
@ -107,9 +108,9 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
List<GBaseWFRXX> wfrTmp = wfrxxRepository.getBaseMapper().selectDataToRisk("2019-12-06 00:00:00", |
|
|
|
List<GBaseWFRXX> wfrTmp = wfrxxRepository.getBaseMapper().selectDataToRisk("2019-12-06 00:00:00", |
|
|
|
end.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
|
|
|
end.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
|
|
|
for (GBaseWFRXX gBaseWFRXX : wfrTmp) { |
|
|
|
for (GBaseWFRXX gBaseWFRXX : wfrTmp) { |
|
|
|
if(gBaseWFRXX.getZjhm() != null) { |
|
|
|
if (gBaseWFRXX.getZjhm() != null) { |
|
|
|
idCards.add(gBaseWFRXX.getZjhm()); |
|
|
|
idCards.add(gBaseWFRXX.getZjhm()); |
|
|
|
} else if(gBaseWFRXX.getLxdh() != null) { |
|
|
|
} else if (gBaseWFRXX.getLxdh() != null) { |
|
|
|
mobiles.add(gBaseWFRXX.getLxdh()); |
|
|
|
mobiles.add(gBaseWFRXX.getLxdh()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
@ -179,18 +180,18 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
Map<String, List<GBaseAJJBXX>> shrMap = new HashMap<>(); |
|
|
|
Map<String, List<GBaseAJJBXX>> shrMap = new HashMap<>(); |
|
|
|
for (GBaseSHRXX gBaseSHRXX : shrList) { |
|
|
|
for (GBaseSHRXX gBaseSHRXX : shrList) { |
|
|
|
GBaseAJJBXX ajjbxx = xxMap.get(gBaseSHRXX.getAjbh()); |
|
|
|
GBaseAJJBXX ajjbxx = xxMap.get(gBaseSHRXX.getAjbh()); |
|
|
|
if(ajjbxx == null) { |
|
|
|
if (ajjbxx == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
GBaseSYRKXX rkxx = Optional.ofNullable(gBaseSHRXX.getGmsfhm()).map(idCodeMap::get) |
|
|
|
GBaseSYRKXX rkxx = Optional.ofNullable(gBaseSHRXX.getGmsfhm()).map(idCodeMap::get) |
|
|
|
.orElse(null); |
|
|
|
.orElse(null); |
|
|
|
if(gBaseSHRXX.getLxdh() != null && rkxx == null) { |
|
|
|
if (gBaseSHRXX.getLxdh() != null && rkxx == null) { |
|
|
|
List<GBaseSYRKXX> rkxxList = mobileMap.get(gBaseSHRXX.getLxdh()); |
|
|
|
List<GBaseSYRKXX> rkxxList = mobileMap.get(gBaseSHRXX.getLxdh()); |
|
|
|
if(rkxxList != null) { |
|
|
|
if (rkxxList != null) { |
|
|
|
rkxx = compare(rkxxList, gBaseSHRXX.getXm()); |
|
|
|
rkxx = compare(rkxxList, gBaseSHRXX.getXm()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(rkxx != null) { |
|
|
|
if (rkxx != null) { |
|
|
|
RiskPersonal person = createPerson(Default.SHR_TAG, ajjbxx, rkxx); |
|
|
|
RiskPersonal person = createPerson(Default.SHR_TAG, ajjbxx, rkxx); |
|
|
|
if (rkxx.getSspcsdm() != null) { |
|
|
|
if (rkxx.getSspcsdm() != null) { |
|
|
|
PointOrg org = orgCodeMap.get(rkxx.getSspcsdm()); |
|
|
|
PointOrg org = orgCodeMap.get(rkxx.getSspcsdm()); |
|
|
|
@ -207,7 +208,7 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(person.getIdCode() != null) { |
|
|
|
if (person.getIdCode() != null) { |
|
|
|
shrMap.computeIfAbsent(person.getIdCode(), k -> new ArrayList<>()).add(ajjbxx); |
|
|
|
shrMap.computeIfAbsent(person.getIdCode(), k -> new ArrayList<>()).add(ajjbxx); |
|
|
|
} |
|
|
|
} |
|
|
|
personals.add(person); |
|
|
|
personals.add(person); |
|
|
|
@ -215,20 +216,20 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
} |
|
|
|
} |
|
|
|
for (GBaseWFRXX gBaseWFRXX : wxrList) { |
|
|
|
for (GBaseWFRXX gBaseWFRXX : wxrList) { |
|
|
|
GBaseAJJBXX ajjbxx = xxMap.get(gBaseWFRXX.getAjbh()); |
|
|
|
GBaseAJJBXX ajjbxx = xxMap.get(gBaseWFRXX.getAjbh()); |
|
|
|
if(ajjbxx == null) { |
|
|
|
if (ajjbxx == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
GBaseSYRKXX rkxx = null; |
|
|
|
GBaseSYRKXX rkxx = null; |
|
|
|
if(gBaseWFRXX.getZjhm() != null) { |
|
|
|
if (gBaseWFRXX.getZjhm() != null) { |
|
|
|
rkxx = idCodeMap.get(gBaseWFRXX.getZjhm()); |
|
|
|
rkxx = idCodeMap.get(gBaseWFRXX.getZjhm()); |
|
|
|
} |
|
|
|
} |
|
|
|
if(gBaseWFRXX.getLxdh() != null && rkxx == null) { |
|
|
|
if (gBaseWFRXX.getLxdh() != null && rkxx == null) { |
|
|
|
List<GBaseSYRKXX> rkxxList = mobileMap.get(gBaseWFRXX.getLxdh()); |
|
|
|
List<GBaseSYRKXX> rkxxList = mobileMap.get(gBaseWFRXX.getLxdh()); |
|
|
|
if(rkxxList != null) { |
|
|
|
if (rkxxList != null) { |
|
|
|
rkxx = compare(rkxxList, gBaseWFRXX.getXm()); |
|
|
|
rkxx = compare(rkxxList, gBaseWFRXX.getXm()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(rkxx != null) { |
|
|
|
if (rkxx != null) { |
|
|
|
RiskPersonal person = createPerson(Default.WFR_TAG, ajjbxx, rkxx); |
|
|
|
RiskPersonal person = createPerson(Default.WFR_TAG, ajjbxx, rkxx); |
|
|
|
if (rkxx.getSspcsdm() != null) { |
|
|
|
if (rkxx.getSspcsdm() != null) { |
|
|
|
PointOrg org = orgCodeMap.get(rkxx.getSspcsdm()); |
|
|
|
PointOrg org = orgCodeMap.get(rkxx.getSspcsdm()); |
|
|
|
@ -253,25 +254,25 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
List<GBaseAJJBXX> tmp = shrMap.get(personal.getIdCode()); |
|
|
|
List<GBaseAJJBXX> tmp = shrMap.get(personal.getIdCode()); |
|
|
|
if(tmp == null || tmp.isEmpty()) { |
|
|
|
if (tmp == null || tmp.isEmpty()) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
GBaseAJJBXX jjx = null; |
|
|
|
GBaseAJJBXX jjx = null; |
|
|
|
for (GBaseAJJBXX gBaseAJJBXX : tmp) { |
|
|
|
for (GBaseAJJBXX gBaseAJJBXX : tmp) { |
|
|
|
if(jjx == null) { |
|
|
|
if (jjx == null) { |
|
|
|
jjx = gBaseAJJBXX; |
|
|
|
jjx = gBaseAJJBXX; |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
LocalDateTime time = gBaseAJJBXX.getBarq().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); |
|
|
|
LocalDateTime time = gBaseAJJBXX.getBarq().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); |
|
|
|
if(time.isAfter(jjx.getBarq().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime())) { |
|
|
|
if (time.isAfter(jjx.getBarq().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime())) { |
|
|
|
jjx = gBaseAJJBXX; |
|
|
|
jjx = gBaseAJJBXX; |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.info("报警时间处理异常"); |
|
|
|
log.info("报警时间处理异常"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(jjx == null || jjx.getBadwiddm() == null) { |
|
|
|
if (jjx == null || jjx.getBadwiddm() == null) { |
|
|
|
personal.setControlDepartId(null); |
|
|
|
personal.setControlDepartId(null); |
|
|
|
personal.setControlDepartName(null); |
|
|
|
personal.setControlDepartName(null); |
|
|
|
personal.setControlTime(null); |
|
|
|
personal.setControlTime(null); |
|
|
|
@ -311,8 +312,8 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void combatCrime(TaskParamDomain domain) { |
|
|
|
public void combatCrime(TaskParamDomain domain) { |
|
|
|
LocalDateTime start = LocalDateTime.of(2019,12,6,0,0,0); |
|
|
|
LocalDateTime start = LocalDateTime.of(2019, 12, 6, 0, 0, 0); |
|
|
|
LocalDateTime end = LocalDate.now().atTime(0,0,0); |
|
|
|
LocalDateTime end = LocalDate.now().atTime(0, 0, 0); |
|
|
|
|
|
|
|
|
|
|
|
List<GBaseWFRXX> xxList = wfrxxRepository.getBaseMapper().selectFiveYearsCombatCrime(start.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), end.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
|
|
|
List<GBaseWFRXX> xxList = wfrxxRepository.getBaseMapper().selectFiveYearsCombatCrime(start.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), end.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
|
|
|
|
|
|
|
|
|
|
|
@ -328,22 +329,22 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
|
|
|
|
|
|
|
|
for (RiskPersonal person : domain.getPersons()) { |
|
|
|
for (RiskPersonal person : domain.getPersons()) { |
|
|
|
List<GBaseWFRXX> wfxxList = wfrMap.get(person.getIdCode()); |
|
|
|
List<GBaseWFRXX> wfxxList = wfrMap.get(person.getIdCode()); |
|
|
|
if(wfxxList == null) { |
|
|
|
if (wfxxList == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
List<RiskModelTaskClue> olds = Optional.ofNullable(personOldMap.get(person.getIdCode())).orElse(new ArrayList<>()); |
|
|
|
List<RiskModelTaskClue> olds = Optional.ofNullable(personOldMap.get(person.getIdCode())).orElse(new ArrayList<>()); |
|
|
|
Map<String, RiskModelTaskClue> oldMap = olds.stream().collect(Collectors.toMap(RiskModelTaskClue::getCaseIds, Function.identity(), (val, old) -> val)); |
|
|
|
Map<String, RiskModelTaskClue> oldMap = olds.stream().collect(Collectors.toMap(RiskModelTaskClue::getCaseIds, Function.identity(), (val, old) -> val)); |
|
|
|
for (GBaseWFRXX xx : wfxxList) { |
|
|
|
for (GBaseWFRXX xx : wfxxList) { |
|
|
|
if(oldMap.get(BhUtil.ajBh(xx.getAjbh())) != null) { |
|
|
|
if (oldMap.get(BhUtil.ajBh(xx.getAjbh())) != null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
ClueData data = ClueData.builder() |
|
|
|
ClueData data = ClueData.builder() |
|
|
|
.name(person.getName()) |
|
|
|
.name(person.getName()) |
|
|
|
.id(BhUtil.ajBh(xx.getAjbh())) |
|
|
|
.id(BhUtil.ajBh(xx.getAjbh())) |
|
|
|
.idCode(person.getIdCode()) |
|
|
|
.idCode(person.getIdCode()) |
|
|
|
.tag("被打击处理") |
|
|
|
.tag("已被打击处理") |
|
|
|
.personId(person.getId()) |
|
|
|
.personId(person.getId()) |
|
|
|
.sourceData("该人员因" + xx.getSxzm() + "被打击处理,案件编号:" + xx.getAjbh()+ ",增加风险分5分") |
|
|
|
.sourceData("该人员因" + xx.getSxzm() + "被打击处理,案件编号:" + xx.getAjbh() + ",增加风险分5分") |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
data.setEventTime(xx.getLrsj().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); |
|
|
|
data.setEventTime(xx.getLrsj().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); |
|
|
|
@ -354,14 +355,166 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(!toInsert.isEmpty()) { |
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
clueService.saveClues(toInsert, Default.WF_IG); |
|
|
|
clueService.saveClues(toInsert, Default.WF_IG); |
|
|
|
} |
|
|
|
} |
|
|
|
taskRepository.updateTask(task.getId(), toInsert.size(), 0); |
|
|
|
taskRepository.updateTask(task.getId(), toInsert.size(), 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void crimeName(TaskParamDomain domain) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final WdpcGrjdZblxRepository zblxRepository; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void hadWork(TaskParamDomain domain) { |
|
|
|
|
|
|
|
// 职业等级
|
|
|
|
|
|
|
|
RiskTask task = taskRepository.create(domain.getPersons().size(), 37); |
|
|
|
|
|
|
|
// 有无职业
|
|
|
|
|
|
|
|
RiskTask task2 = taskRepository.create(domain.getPersons().size(), 67); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<WdpcGrjdZblx> lxList = zblxRepository.list(new LambdaQueryWrapper<WdpcGrjdZblx>() |
|
|
|
|
|
|
|
.in(WdpcGrjdZblx::getLxdm, List.of("9", "12"))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, List<WdpcGrjdZblx>> lxMap = lxList.stream().collect(Collectors.groupingBy(WdpcGrjdZblx::getLxdm)); |
|
|
|
|
|
|
|
Map<String, String> wfrMap = new WeakHashMap<>(); |
|
|
|
|
|
|
|
int count = domain.getIdCards().size(); |
|
|
|
|
|
|
|
for (List<String> idCard : domain.getIdCards()) { |
|
|
|
|
|
|
|
count--; |
|
|
|
|
|
|
|
log.info("违法人进度{}", count); |
|
|
|
|
|
|
|
List<GBaseWFRXX> tmp = wfrxxRepository.list(new LambdaQueryWrapper<GBaseWFRXX>() |
|
|
|
|
|
|
|
.select(GBaseWFRXX::getZjhm, GBaseWFRXX::getZydm) |
|
|
|
|
|
|
|
.in(GBaseWFRXX::getZjhm, idCard)); |
|
|
|
|
|
|
|
for (GBaseWFRXX gBaseWFRXX : tmp) { |
|
|
|
|
|
|
|
wfrMap.put(gBaseWFRXX.getZjhm(), gBaseWFRXX.getZydm()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 担心和保安、涉药模型混搭
|
|
|
|
|
|
|
|
Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<WdpcGrjdZblx> wfzyList = Optional.ofNullable(lxMap.get("12")).orElse(new ArrayList<>()); |
|
|
|
|
|
|
|
Map<String, WdpcGrjdZblx> wfzyMap = wfzyList.stream().collect(Collectors.toMap(WdpcGrjdZblx::getDmbh, Function.identity(), (val, old) -> val)); |
|
|
|
|
|
|
|
// 职业登记划分
|
|
|
|
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
|
|
|
// 有无职业
|
|
|
|
|
|
|
|
List<RiskModelTaskClue> toInsert2 = new ArrayList<>(); |
|
|
|
|
|
|
|
// 实有人口要查的
|
|
|
|
|
|
|
|
List<RiskPersonal> personalList = new ArrayList<>(); |
|
|
|
|
|
|
|
List<List<String>> srIdCodes = new ArrayList<>(); |
|
|
|
|
|
|
|
for (RiskPersonal person : domain.getPersons()) { |
|
|
|
|
|
|
|
if (oldMap.get(person.getIdCode()) != null) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
String zydm = wfrMap.get(person.getIdCode()); |
|
|
|
|
|
|
|
if (zydm == null) { |
|
|
|
|
|
|
|
if (srIdCodes.isEmpty()) { |
|
|
|
|
|
|
|
srIdCodes.add(new ArrayList<>()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (srIdCodes.getLast().size() >= 10000) { |
|
|
|
|
|
|
|
srIdCodes.add(new ArrayList<>()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
srIdCodes.getLast().add(person.getIdCode()); |
|
|
|
|
|
|
|
personalList.add(person); |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
WdpcGrjdZblx zblx = wfzyMap.get(zydm); |
|
|
|
|
|
|
|
if (zblx == null) { |
|
|
|
|
|
|
|
if (srIdCodes.isEmpty()) { |
|
|
|
|
|
|
|
srIdCodes.add(new ArrayList<>()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (srIdCodes.getLast().size() >= 10000) { |
|
|
|
|
|
|
|
srIdCodes.add(new ArrayList<>()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
srIdCodes.getLast().add(person.getIdCode()); |
|
|
|
|
|
|
|
personalList.add(person); |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ClueData data = ClueData.builder() |
|
|
|
|
|
|
|
.name(person.getName()) |
|
|
|
|
|
|
|
.id("zy") |
|
|
|
|
|
|
|
.idCode(person.getIdCode()) |
|
|
|
|
|
|
|
.tag(zblx.getDmmc()) |
|
|
|
|
|
|
|
.eventTime(LocalDateTime.now()) |
|
|
|
|
|
|
|
.personId(person.getId()) |
|
|
|
|
|
|
|
.build(); |
|
|
|
|
|
|
|
if (zblx.getScore() < 5.0) { |
|
|
|
|
|
|
|
data.setSourceData("该人员从事" + zblx.getDmmc() + "的职业,增加风险分" + zblx.getScore().intValue() + "分"); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
data.setSourceData("该人员" + zblx.getDmmc() + ",增加风险分" + zblx.getScore().intValue() + "分"); |
|
|
|
|
|
|
|
ClueData data2 = ClueData.builder() |
|
|
|
|
|
|
|
.name(person.getName()) |
|
|
|
|
|
|
|
.id("zy") |
|
|
|
|
|
|
|
.idCode(person.getIdCode()) |
|
|
|
|
|
|
|
.tag(zblx.getDmmc()) |
|
|
|
|
|
|
|
.eventTime(LocalDateTime.now()) |
|
|
|
|
|
|
|
.personId(person.getId()) |
|
|
|
|
|
|
|
.sourceData("该人员无固定职业,增加风险分5分") |
|
|
|
|
|
|
|
.build(); |
|
|
|
|
|
|
|
toInsert2.add(createClue(task2.getModelId(), zblx.getScore().intValue(), task2.getId(), data2)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
toInsert.add(createClue(task.getModelId(), zblx.getScore().intValue(), task.getId(), data)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<GBaseSYRKXX> xxList = new ArrayList<>(); |
|
|
|
|
|
|
|
count = srIdCodes.size(); |
|
|
|
|
|
|
|
for (List<String> srIdCode : srIdCodes) { |
|
|
|
|
|
|
|
count--; |
|
|
|
|
|
|
|
log.info("实有人口进度{}", count); |
|
|
|
|
|
|
|
xxList.addAll(gBaseSYRKXXRepository.list(new LambdaQueryWrapper<GBaseSYRKXX>() |
|
|
|
|
|
|
|
.select(GBaseSYRKXX::getZydm, GBaseSYRKXX::getGmsfhm) |
|
|
|
|
|
|
|
.in(GBaseSYRKXX::getGmsfhm, srIdCode))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, String> syMap = xxList.stream().collect(Collectors.toMap(GBaseSYRKXX::getGmsfhm, GBaseSYRKXX::getZydm, (val, old) -> val)); |
|
|
|
|
|
|
|
for (RiskPersonal person : personalList) { |
|
|
|
|
|
|
|
String zydm = syMap.get(person.getIdCode()); |
|
|
|
|
|
|
|
if (zydm == null) continue; |
|
|
|
|
|
|
|
WdpcGrjdZblx zblx = wfzyMap.get(zydm); |
|
|
|
|
|
|
|
if(zblx == null) continue; |
|
|
|
|
|
|
|
ClueData data = ClueData.builder() |
|
|
|
|
|
|
|
.name(person.getName()) |
|
|
|
|
|
|
|
.id("zy") |
|
|
|
|
|
|
|
.idCode(person.getIdCode()) |
|
|
|
|
|
|
|
.tag(zblx.getDmmc()) |
|
|
|
|
|
|
|
.eventTime(LocalDateTime.now()) |
|
|
|
|
|
|
|
.personId(person.getId()) |
|
|
|
|
|
|
|
.build(); |
|
|
|
|
|
|
|
if (zblx.getScore() < 5.0) { |
|
|
|
|
|
|
|
data.setSourceData("该人员从事" + zblx.getDmmc() + "的职业,增加风险分" + zblx.getScore().intValue() + "分"); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
data.setSourceData("该人员" + zblx.getDmmc() + ",增加风险分" + zblx.getScore().intValue() + "分"); |
|
|
|
|
|
|
|
ClueData data2 = ClueData.builder() |
|
|
|
|
|
|
|
.name(person.getName()) |
|
|
|
|
|
|
|
.id("zy") |
|
|
|
|
|
|
|
.idCode(person.getIdCode()) |
|
|
|
|
|
|
|
.tag(zblx.getDmmc()) |
|
|
|
|
|
|
|
.eventTime(LocalDateTime.now()) |
|
|
|
|
|
|
|
.personId(person.getId()) |
|
|
|
|
|
|
|
.sourceData("该人员无固定职业,增加风险分5分") |
|
|
|
|
|
|
|
.build(); |
|
|
|
|
|
|
|
toInsert2.add(createClue(task2.getModelId(), zblx.getScore().intValue(), task2.getId(), data2)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
toInsert.add(createClue(task.getModelId(), zblx.getScore().intValue(), task.getId(), data)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!toInsert.isEmpty()) { |
|
|
|
|
|
|
|
log.info("保存职业类型: {}", toInsert.size()); |
|
|
|
|
|
|
|
clueService.saveClues(toInsert, Default.IMPORT_IG); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(!toInsert2.isEmpty()) { |
|
|
|
|
|
|
|
log.info("保存无职业: {}", toInsert2.size()); |
|
|
|
|
|
|
|
clueService.saveClues(toInsert2, Default.IMPORT_IG); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
taskRepository.updateTask(task.getId(), toInsert.size(), 0); |
|
|
|
|
|
|
|
taskRepository.updateTask(task2.getId(), toInsert2.size(), 0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 多身份证对比名称 |
|
|
|
* 多身份证对比名称 |
|
|
|
|
|
|
|
* |
|
|
|
* @param infos 信息 |
|
|
|
* @param infos 信息 |
|
|
|
* @param name 名称 |
|
|
|
* @param name 名称 |
|
|
|
* @return 正确信息 |
|
|
|
* @return 正确信息 |
|
|
|
@ -369,8 +522,8 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
GBaseSYRKXX compare(List<GBaseSYRKXX> infos, String name) { |
|
|
|
GBaseSYRKXX compare(List<GBaseSYRKXX> infos, String name) { |
|
|
|
GBaseSYRKXX info = null; |
|
|
|
GBaseSYRKXX info = null; |
|
|
|
for (GBaseSYRKXX gBaseSYRKXX : infos) { |
|
|
|
for (GBaseSYRKXX gBaseSYRKXX : infos) { |
|
|
|
if(gBaseSYRKXX.getXm().equals(name)) { |
|
|
|
if (gBaseSYRKXX.getXm().equals(name)) { |
|
|
|
info=gBaseSYRKXX; |
|
|
|
info = gBaseSYRKXX; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -385,7 +538,7 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService { |
|
|
|
personal.setControlDepartId(ajjbxx.getBadwiddm()); |
|
|
|
personal.setControlDepartId(ajjbxx.getBadwiddm()); |
|
|
|
personal.setControlDepartName(ajjbxx.getBadwidmc()); |
|
|
|
personal.setControlDepartName(ajjbxx.getBadwidmc()); |
|
|
|
personal.setGender(IdCodeUtil.idCard2Gender(rkxx.getGmsfhm())); |
|
|
|
personal.setGender(IdCodeUtil.idCard2Gender(rkxx.getGmsfhm())); |
|
|
|
if(personal.getGender() == null ){ |
|
|
|
if (personal.getGender() == null) { |
|
|
|
personal.setGender(rkxx.getXbdm()); |
|
|
|
personal.setGender(rkxx.getXbdm()); |
|
|
|
} |
|
|
|
} |
|
|
|
personal.setControlDepartType(DepartType.OTHER.getType()); |
|
|
|
personal.setControlDepartType(DepartType.OTHER.getType()); |
|
|
|
|