|
|
|
|
@ -6,7 +6,6 @@ import com.biutag.supervisiondata.common.interfaces.CompletableFutureUtil;
|
|
|
|
|
import com.biutag.supervisiondata.common.utils.StreamUtil; |
|
|
|
|
import com.biutag.supervisiondata.config.cache.RedisDao; |
|
|
|
|
import com.biutag.supervisiondata.mapper.dwd.ModelClueDataMapper; |
|
|
|
|
import com.biutag.supervisiondata.mapper.mine.SupDepartMapper; |
|
|
|
|
import com.biutag.supervisiondata.pojo.ClueData; |
|
|
|
|
import com.biutag.supervisiondata.pojo.constants.Default; |
|
|
|
|
import com.biutag.supervisiondata.pojo.database.MuchCall; |
|
|
|
|
@ -23,6 +22,7 @@ import com.biutag.supervisiondata.service.PointService;
|
|
|
|
|
import com.biutag.supervisiondata.service.RiskModelTaskClueService; |
|
|
|
|
import com.biutag.supervisiondata.service.RiskPersonalService; |
|
|
|
|
import com.biutag.supervisiondata.util.BhUtil; |
|
|
|
|
import com.biutag.supervisiondata.util.DataUtil; |
|
|
|
|
import com.biutag.supervisiondata.util.IdCodeUtil; |
|
|
|
|
import com.biutag.supervisiondata.util.PatternUtil; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
@ -124,12 +124,23 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
if (sb.isEmpty()) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
toInsert.add(createClue(task.getModelId(), 5, task.getId(), ClueData.builder() |
|
|
|
|
.tag("重点人员") |
|
|
|
|
// toInsert.add(createClue(task.getModelId(), 5, task.getId(), ClueData.builder()
|
|
|
|
|
// .tag("重点人员")
|
|
|
|
|
// .name(personals.getFirst().getName())
|
|
|
|
|
// .idCode(personals.getFirst().getIdCode())
|
|
|
|
|
// .eventTime(Optional.ofNullable(personals.getFirst().getControlTime()).orElse(LocalDateTime.now()))
|
|
|
|
|
// .sourceData("发现该人员为重点人员,存在" + personals.size() + "个标签")
|
|
|
|
|
// .build()));
|
|
|
|
|
toInsert.add(DataUtil.createClueData(task, ClueData.builder() |
|
|
|
|
// 案件编号、接警单编号之类
|
|
|
|
|
.id("") |
|
|
|
|
.score(5) |
|
|
|
|
.personId(personals.getFirst().getId()) |
|
|
|
|
.tags(List.of("重点人员")) |
|
|
|
|
.sourceData("发现该人员为重点人员,存在" + personals.size() + "个标签") |
|
|
|
|
.name(personals.getFirst().getName()) |
|
|
|
|
.idCode(personals.getFirst().getIdCode()) |
|
|
|
|
.eventTime(Optional.ofNullable(personals.getFirst().getControlTime()).orElse(LocalDateTime.now())) |
|
|
|
|
.sourceData("该人员存在标签:" +sb.substring(0,sb.length()-1) + ",属于重点人员") |
|
|
|
|
.eventTime(personals.getFirst().getControlTime()) |
|
|
|
|
.build())); |
|
|
|
|
} |
|
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
|
@ -156,7 +167,7 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
List<RiskModelTaskClue> olds = Optional.ofNullable(domain.getMap().get(task.getModelId())).orElse(new ArrayList<>()); |
|
|
|
|
Map<String, List<RiskModelTaskClue>> personMap = olds.stream().collect(Collectors.groupingBy(RiskModelTaskClue::getIdCode)); |
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
Map<String, List<RiskModelTaskClue>> mapPerson = new WeakHashMap<>(); |
|
|
|
|
Map<String, List<ClueData>> mapPerson = new WeakHashMap<>(); |
|
|
|
|
for (GBaseZDRY ry : list) { |
|
|
|
|
RiskPersonal person = personalMap.get(ry.getSfzh()); |
|
|
|
|
if (person == null) { |
|
|
|
|
@ -180,18 +191,43 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
.tag(zblx.getDmmc()) |
|
|
|
|
.name(person.getName()) |
|
|
|
|
.idCode(person.getIdCode()) |
|
|
|
|
.sourceData("该人员存在标签:" + zblx.getDmmc() ) |
|
|
|
|
.score(zblx.getScore().intValue()) |
|
|
|
|
.build(); |
|
|
|
|
try { |
|
|
|
|
data.setEventTime(LocalDateTime.parse(ry.getJlbgsj(), DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
data.setEventTime(LocalDateTime.now()); |
|
|
|
|
} catch (Exception ignored) { |
|
|
|
|
} |
|
|
|
|
mapPerson.computeIfAbsent(person.getIdCode(), k -> new ArrayList<>()).add(createClue(task.getModelId(), zblx.getScore().intValue(), task.getId(), data)); |
|
|
|
|
mapPerson.computeIfAbsent(person.getIdCode(), k -> new ArrayList<>()).add(data); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (Map.Entry<String, List<RiskModelTaskClue>> entry : mapPerson.entrySet()) { |
|
|
|
|
toInsert.addAll(entry.getValue().stream().filter(StreamUtil.distinctByKey(RiskModelTaskClue::getRiskReason)).toList()); |
|
|
|
|
for (Map.Entry<String, List<ClueData>> entry : mapPerson.entrySet()) { |
|
|
|
|
LocalDateTime tmpDateTime = null; |
|
|
|
|
List<ClueData> tmp = entry.getValue().stream().filter(StreamUtil.distinctByKey(ClueData::getTag)).toList(); |
|
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
|
int score = 0; |
|
|
|
|
List<String> tags = new ArrayList<>(); |
|
|
|
|
for (ClueData clue : tmp) { |
|
|
|
|
if (tmpDateTime == null) { |
|
|
|
|
tmpDateTime = clue.getEventTime(); |
|
|
|
|
} |
|
|
|
|
if (tmpDateTime.isBefore(clue.getEventTime())) { |
|
|
|
|
tmpDateTime = clue.getEventTime(); |
|
|
|
|
} |
|
|
|
|
tags.add(clue.getTag()); |
|
|
|
|
sb.append(clue.getTag()).append(","); |
|
|
|
|
score += clue.getScore(); |
|
|
|
|
} |
|
|
|
|
toInsert.add(DataUtil.createClueData(task, ClueData.builder() |
|
|
|
|
// 案件编号、接警单编号之类
|
|
|
|
|
.id("") |
|
|
|
|
.score(Math.min(5, score)) |
|
|
|
|
.personId(tmp.getFirst().getPersonId()) |
|
|
|
|
.tags(tags) |
|
|
|
|
.sourceData(sb.substring(0, sb.length() - 1)) |
|
|
|
|
.name(tmp.getFirst().getName()) |
|
|
|
|
.idCode(tmp.getFirst().getIdCode()) |
|
|
|
|
.eventTime(tmpDateTime) |
|
|
|
|
.build())); |
|
|
|
|
} |
|
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
|
log.info("保存重点人员标签 {}", toInsert.size()); |
|
|
|
|
@ -644,7 +680,8 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
Map<String, Integer> idCode = new HashMap<>(); |
|
|
|
|
log.info("模型129开始查询"); |
|
|
|
|
List<WdpcGrjdJsbry> list1 = jsbryRepository.getBaseMapper().selectByIdNos(); |
|
|
|
|
List<WdpcJZJLB> list2 = jZJLBRepository.getBaseMapper().selectForModel129();; |
|
|
|
|
List<WdpcJZJLB> list2 = jZJLBRepository.getBaseMapper().selectForModel129(); |
|
|
|
|
; |
|
|
|
|
List<WdpcXdry> list3 = xdryRepository.getBaseMapper().selectXIDU(); |
|
|
|
|
List<WdpcSqjzry> list4 = sqjzryRepository.getBaseMapper().selectByIdNos(); |
|
|
|
|
List<WdpcXmsfry> list5 = xmsfryRepository.getBaseMapper().selectByIdNos(); |
|
|
|
|
@ -767,7 +804,8 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
Map<String, Integer> idCode = new HashMap<>(); |
|
|
|
|
log.info("模型130开始查询"); |
|
|
|
|
List<WdpcGrjdJsbry> list1 = jsbryRepository.getBaseMapper().selectByIdNos(); |
|
|
|
|
List<WdpcJZJLB> list2 = jZJLBRepository.getBaseMapper().selectForModel129();; |
|
|
|
|
List<WdpcJZJLB> list2 = jZJLBRepository.getBaseMapper().selectForModel129(); |
|
|
|
|
; |
|
|
|
|
List<WdpcXdry> list3 = xdryRepository.getBaseMapper().selectXIDU(); |
|
|
|
|
List<WdpcSqjzry> list4 = sqjzryRepository.getBaseMapper().selectByIdNos(); |
|
|
|
|
List<WdpcXmsfry> list5 = xmsfryRepository.getBaseMapper().selectByIdNos(); |
|
|
|
|
@ -1505,7 +1543,8 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
"中技毕业", "中等专科学校", "高中", "高中毕业", "农业高中毕业" -> 3;// 高中中专
|
|
|
|
|
case "农业初中毕业", "技工学校", "技工学校肄业", "技工学校毕业", "初中", "职业初中毕业", "初中毕业", |
|
|
|
|
"初中肆业", "相当初中毕业" -> 4;// 初中
|
|
|
|
|
case "小学", "小学肄业", "小学肆业", "小学毕业", "相当小学毕业", "文盲", "文盲或半文盲", "学龄前儿童" -> 5;// 小学
|
|
|
|
|
case "小学", "小学肄业", "小学肆业", "小学毕业", "相当小学毕业", "文盲", "文盲或半文盲", "学龄前儿童" -> |
|
|
|
|
5;// 小学
|
|
|
|
|
default -> 0; |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|