|
|
|
|
@ -356,14 +356,67 @@ public class GBaseSHRWFRServiceImpl implements GBaseSHRWFRService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
|
clueService.saveClues(toInsert, Default.WF_IG); |
|
|
|
|
clueService.saveClues(toInsert, "B24是否被打击处理"); |
|
|
|
|
} |
|
|
|
|
taskRepository.updateTask(task.getId(), toInsert.size(), 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void crimeName(TaskParamDomain domain) { |
|
|
|
|
List<WdpcGrjdZblx> lxList = zblxRepository.list(new LambdaQueryWrapper<WdpcGrjdZblx>() |
|
|
|
|
.eq(WdpcGrjdZblx::getLxdm, "15")); |
|
|
|
|
Map<String, WdpcGrjdZblx> map = lxList.stream().collect(Collectors.toMap(WdpcGrjdZblx::getDmbh, Function.identity(), (val, old) -> val)); |
|
|
|
|
LocalDateTime start = LocalDateTime.of(2019, 12, 6, 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"))); |
|
|
|
|
RiskTask task = taskRepository.create(xxList.size(), 75); |
|
|
|
|
|
|
|
|
|
List<RiskModelTaskClue> oldList = Optional.ofNullable(domain.getMap().get(task.getModelId())).orElse(new ArrayList<>()); |
|
|
|
|
// 按人分
|
|
|
|
|
Map<String, List<RiskModelTaskClue>> personOldMap = oldList.stream().collect(Collectors.groupingBy(RiskModelTaskClue::getIdCode)); |
|
|
|
|
|
|
|
|
|
Map<String, List<GBaseWFRXX>> wfrMap = xxList.stream().collect(Collectors.groupingBy(GBaseWFRXX::getZjhm)); |
|
|
|
|
|
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
for (RiskPersonal person : domain.getPersons()) { |
|
|
|
|
List<GBaseWFRXX> wfxxList = wfrMap.get(person.getIdCode()); |
|
|
|
|
if (wfxxList == null) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
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)); |
|
|
|
|
for (GBaseWFRXX xx : wfxxList) { |
|
|
|
|
if (oldMap.get(BhUtil.ajBh(xx.getAjbh())) != null) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
WdpcGrjdZblx zblx = map.get(xx.getSxzmdm()); |
|
|
|
|
if(zblx == null) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
ClueData data = ClueData.builder() |
|
|
|
|
.name(person.getName()) |
|
|
|
|
.id(BhUtil.ajBh(xx.getAjbh())) |
|
|
|
|
.idCode(person.getIdCode()) |
|
|
|
|
.tag(zblx.getDmmc()) |
|
|
|
|
.personId(person.getId()) |
|
|
|
|
.sourceData("该人员有犯罪前科,刑事处罚罪名:" + zblx.getDmmc() + ",案件编号:" + xx.getAjbh() + ",增加风险"+zblx.getScore().intValue()+"5分") |
|
|
|
|
.build(); |
|
|
|
|
try { |
|
|
|
|
data.setEventTime(xx.getLrsj().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); |
|
|
|
|
} catch (Exception ignored) { |
|
|
|
|
data.setEventTime(LocalDateTime.now()); |
|
|
|
|
} |
|
|
|
|
toInsert.add(createClue(task.getModelId(), zblx.getScore().intValue(), task.getId(), data)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
|
clueService.saveClues(toInsert, "B27刑事处罚罪名"); |
|
|
|
|
} |
|
|
|
|
taskRepository.updateTask(task.getId(), toInsert.size(), 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private final WdpcGrjdZblxRepository zblxRepository; |
|
|
|
|
|