|
|
|
|
@ -14,6 +14,7 @@ import com.biutag.supervisiondata.pojo.domain.*;
|
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.*; |
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.mine.*; |
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.wdpc.WdpcGrjdXfsj; |
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.wdpc.WdpcGrjdZblx; |
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.wdpc2.WdpcHZCRYXX; |
|
|
|
|
import com.biutag.supervisiondata.repository.*; |
|
|
|
|
import com.biutag.supervisiondata.service.PointService; |
|
|
|
|
@ -91,7 +92,7 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
// 全部增加
|
|
|
|
|
for (RiskPersonal personal : entry.getValue()) { |
|
|
|
|
toInsert.add(createClue(task.getModelId(), 5, task.getId(), ClueData.builder() |
|
|
|
|
.tag(personal.getTags()) |
|
|
|
|
.tag("重点人员") |
|
|
|
|
.name(personal.getName()) |
|
|
|
|
.idCode(personal.getIdCode()) |
|
|
|
|
.eventTime(Optional.ofNullable(personal.getControlTime()).orElse(LocalDateTime.now())) |
|
|
|
|
@ -106,7 +107,7 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
for (RiskPersonal personal : entry.getValue()) { |
|
|
|
|
if (clueMap.get(personal.getTags()) == null) { |
|
|
|
|
toInsert.add(createClue(task.getModelId(), 5, task.getId(), ClueData.builder() |
|
|
|
|
.tag(personal.getTags()) |
|
|
|
|
.tag("重点人员") |
|
|
|
|
.name(personal.getName()) |
|
|
|
|
.idCode(personal.getIdCode()) |
|
|
|
|
.eventTime(Optional.ofNullable(personal.getControlTime()).orElse(LocalDateTime.now())) |
|
|
|
|
@ -129,6 +130,57 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
taskRepository.updateById(updateTask); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private final WdpcGrjdZblxRepository zblxRepository; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void syncPointType(TaskParamDomain domain) { |
|
|
|
|
List<WdpcGrjdZblx> lxList = zblxRepository.list(new LambdaQueryWrapper<WdpcGrjdZblx>() |
|
|
|
|
.eq(WdpcGrjdZblx::getLxdm, "18")); |
|
|
|
|
|
|
|
|
|
Map<String, WdpcGrjdZblx> map = lxList.stream().collect(Collectors.toMap(WdpcGrjdZblx::getDmbh, Function.identity(), (val, old) -> val)); |
|
|
|
|
|
|
|
|
|
List<GBaseZDRY> list = zdryRepository.getBaseMapper().syncPointPeople(); |
|
|
|
|
log.info("重点人员查询人数: {}", list.size()); |
|
|
|
|
RiskTask task = taskRepository.create(list.size(), 67); |
|
|
|
|
|
|
|
|
|
Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (val, old) -> val)); |
|
|
|
|
|
|
|
|
|
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<>(); |
|
|
|
|
for (GBaseZDRY ry : list) { |
|
|
|
|
RiskPersonal person = personalMap.get(ry.getSfzh()); |
|
|
|
|
if(person==null) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
List<String> codes = PatternUtil.takeMarkPositionToString(ry.getZdrylbbj()); |
|
|
|
|
if (codes.isEmpty()) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
List<RiskModelTaskClue> oldList = Optional.ofNullable(personMap.get(ry.getSfzh())).orElse(new ArrayList<>()); |
|
|
|
|
Map<String, RiskModelTaskClue> oldClue = oldList.stream().collect(Collectors.toMap(RiskModelTaskClue::getCaseIds, Function.identity(), (val, old) -> val)); |
|
|
|
|
for (String index : codes) { |
|
|
|
|
WdpcGrjdZblx zblx = map.get(index); |
|
|
|
|
if(oldClue.get(index) != null || zblx == null) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
toInsert.add(createClue(task.getModelId(), zblx.getScore().intValue(), task.getId(), ClueData.builder() |
|
|
|
|
.id(index) |
|
|
|
|
.personId(person.getId()) |
|
|
|
|
.tag(zblx.getDmmc()) |
|
|
|
|
.name(person.getName()) |
|
|
|
|
.idCode(person.getIdCode()) |
|
|
|
|
.sourceData("该人员存在标签:" + zblx.getDmmc() + ",增加风险分5分") |
|
|
|
|
.build())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
|
log.info("保存重点人员标签, {}"); |
|
|
|
|
modelTaskClueService.saveClues(toInsert, Default.POINT_IG); |
|
|
|
|
} |
|
|
|
|
taskRepository.updateTask(task.getId(), toInsert.size(), 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void syncViolence(TaskParamDomain domain) { |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 44); |
|
|
|
|
@ -164,7 +216,6 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
.id(violence.getAjbh()) |
|
|
|
|
.personId(person.getId()) |
|
|
|
|
.idCode(person.getIdCode()) |
|
|
|
|
.sourceData(JSON.toJSONString(violence)) |
|
|
|
|
.sourceData("通过核查案件信息,发现该人员有暴力伤害行为,案件编号为:" + violence.getAjbh() + Optional.ofNullable(violence.getWfss()).map(it -> ",具体情况为:" + it).orElse("")) |
|
|
|
|
.tag(violence.getAjlbmc()) |
|
|
|
|
.build(); |
|
|
|
|
|