|
|
|
|
@ -11,10 +11,7 @@ import com.biutag.supervisiondata.pojo.database.MuchCall;
|
|
|
|
|
import com.biutag.supervisiondata.pojo.database.PointOrg; |
|
|
|
|
import com.biutag.supervisiondata.pojo.database.SecurityMan; |
|
|
|
|
import com.biutag.supervisiondata.pojo.domain.*; |
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseCSCZRK; |
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseOilBuy; |
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseTbDZdrylb; |
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseZDRY; |
|
|
|
|
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.repository.*; |
|
|
|
|
@ -64,6 +61,10 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
|
|
|
|
|
private final GBaseCSCZRKRepository cSCZRKRepository; |
|
|
|
|
|
|
|
|
|
private final GBaseWFRWFXXRepository wFRWFXXRepository; |
|
|
|
|
|
|
|
|
|
private final GBaseGAXZCFJDSRepository gAXZCFJDSRepository; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void personPullAndSave(LocalDateTime start, LocalDateTime end) { |
|
|
|
|
riskPersonalService.formatAndSave(getPersons(), Default.POINT_POEPLE); |
|
|
|
|
@ -237,16 +238,102 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
taskRepository.updateById(updateTask); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void syncAdministrativePunishment(TaskParamDomain domain) { |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 116); |
|
|
|
|
taskRepository.save(task); |
|
|
|
|
|
|
|
|
|
Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true); |
|
|
|
|
Map<String, Integer> idCode = new HashMap<>(); |
|
|
|
|
List<GBaseGAXZCFJDS> list = gAXZCFJDSRepository.getBaseMapper().selectAdministrativePunishment(); |
|
|
|
|
log.info("模型116查询结果数:{}", list.size()); |
|
|
|
|
Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal)); |
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
for (GBaseGAXZCFJDS domicileType : list) { |
|
|
|
|
RiskPersonal personal = personalMap.get(domicileType.getZjhm()); |
|
|
|
|
if (personal == null) continue; |
|
|
|
|
if (idCode.get(domicileType.getZjhm()) != null) continue; |
|
|
|
|
if (oldMap.get(domicileType.getZjhm()) != null) continue; |
|
|
|
|
|
|
|
|
|
idCode.put(domicileType.getZjhm(), 1); |
|
|
|
|
ClueData data = ClueData.builder() |
|
|
|
|
.name(personal.getName()) |
|
|
|
|
.id(personal.getId().toString()) |
|
|
|
|
.idCode(personal.getIdCode()) |
|
|
|
|
.tag("受到行政处罚") |
|
|
|
|
.personId(personal.getId()) |
|
|
|
|
.sourceData("发现该人员涉及案件“" + domicileType.getAjmc() + "”,案件编号:" |
|
|
|
|
+ domicileType.getAjbh() + ",处罚内容为“" + domicileType.getCfms1() |
|
|
|
|
+ "”。因受到行政处罚,增加风险分5分") |
|
|
|
|
.build(); |
|
|
|
|
toInsert.add(createClue(task.getModelId(), 5, task.getId(), data)); |
|
|
|
|
} |
|
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
|
modelTaskClueService.saveClues(toInsert, Default.ADMINISTRATIVEPUNISHMENT); |
|
|
|
|
} |
|
|
|
|
RiskTask updateTask = new RiskTask(); |
|
|
|
|
updateTask.setId(task.getId()); |
|
|
|
|
updateTask.setInsertSize(toInsert.size()); |
|
|
|
|
updateTask.setUpdateSize(0); |
|
|
|
|
updateTask.setState(1); |
|
|
|
|
updateTask.setEndTime(LocalDateTime.now()); |
|
|
|
|
taskRepository.updateById(updateTask); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void syncCriminalPunishment(TaskParamDomain domain) { |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 115); |
|
|
|
|
taskRepository.save(task); |
|
|
|
|
|
|
|
|
|
Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true); |
|
|
|
|
Map<String, Integer> idCode = new HashMap<>(); |
|
|
|
|
List<GBaseWFRWFXX> list = wFRWFXXRepository.getBaseMapper().selectCriminalPunishment(); |
|
|
|
|
log.info("模型115查询结果数:{}", list.size()); |
|
|
|
|
Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal)); |
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
for (GBaseWFRWFXX domicileType : list) { |
|
|
|
|
RiskPersonal personal = personalMap.get(domicileType.getZjhm()); |
|
|
|
|
if (personal == null) continue; |
|
|
|
|
if (idCode.get(domicileType.getZjhm()) != null) continue; |
|
|
|
|
if (oldMap.get(domicileType.getZjhm()) != null) continue; |
|
|
|
|
|
|
|
|
|
idCode.put(domicileType.getZjhm(), 1); |
|
|
|
|
ClueData data = ClueData.builder() |
|
|
|
|
.name(personal.getName()) |
|
|
|
|
.id(personal.getId().toString()) |
|
|
|
|
.idCode(personal.getIdCode()) |
|
|
|
|
.tag("受到刑事处罚") |
|
|
|
|
.personId(personal.getId()) |
|
|
|
|
.sourceData("发现该人员" + domicileType.getJysm() + "案件编号:" + domicileType.getAjbh() |
|
|
|
|
+ ",因受到刑事处罚,增加风险分5分") |
|
|
|
|
.build(); |
|
|
|
|
toInsert.add(createClue(task.getModelId(), 5, task.getId(), data)); |
|
|
|
|
} |
|
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
|
modelTaskClueService.saveClues(toInsert, Default.CRIMINALPUNISHMENT); |
|
|
|
|
} |
|
|
|
|
RiskTask updateTask = new RiskTask(); |
|
|
|
|
updateTask.setId(task.getId()); |
|
|
|
|
updateTask.setInsertSize(toInsert.size()); |
|
|
|
|
updateTask.setUpdateSize(0); |
|
|
|
|
updateTask.setState(1); |
|
|
|
|
updateTask.setEndTime(LocalDateTime.now()); |
|
|
|
|
taskRepository.updateById(updateTask); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void syncDomicileType(TaskParamDomain domain) { |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 104); |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 114); |
|
|
|
|
taskRepository.save(task); |
|
|
|
|
|
|
|
|
|
Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true); |
|
|
|
|
Map<String, Integer> idCode = new HashMap<>(); |
|
|
|
|
List<GBaseCSCZRK> list = cSCZRKRepository.getBaseMapper().selectDomicileType(); |
|
|
|
|
log.info("模型104查询结果数:{}", list.size()); |
|
|
|
|
List<GBaseCSCZRK> list = new ArrayList<>(); |
|
|
|
|
log.info("模型114开始查询"); |
|
|
|
|
for (List<String> idCard : domain.getIdCards()) { |
|
|
|
|
list.addAll(cSCZRKRepository.getBaseMapper().selectDomicileType(idCard)); |
|
|
|
|
} |
|
|
|
|
log.info("模型114查询结果数:{}", list.size()); |
|
|
|
|
Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal)); |
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
for (GBaseCSCZRK domicileType : list) { |
|
|
|
|
@ -285,13 +372,13 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void syncFatherEducation(TaskParamDomain domain) { |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 102); |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 112); |
|
|
|
|
taskRepository.save(task); |
|
|
|
|
|
|
|
|
|
Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true); |
|
|
|
|
Map<String, Integer> idCode = new HashMap<>(); |
|
|
|
|
List<GBaseCSCZRK> list = cSCZRKRepository.getBaseMapper().selectFatherEducation(); |
|
|
|
|
log.info("模型102查询结果数:{}", list.size()); |
|
|
|
|
log.info("模型112查询结果数:{}", list.size()); |
|
|
|
|
Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal)); |
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
for (GBaseCSCZRK fatherEducation : list) { |
|
|
|
|
@ -326,13 +413,13 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void syncMotherEducation(TaskParamDomain domain) { |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 103); |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 113); |
|
|
|
|
taskRepository.save(task); |
|
|
|
|
|
|
|
|
|
Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true); |
|
|
|
|
Map<String, Integer> idCode = new HashMap<>(); |
|
|
|
|
List<GBaseCSCZRK> list = cSCZRKRepository.getBaseMapper().selectMotherEducation(); |
|
|
|
|
log.info("模型103查询结果数:{}", list.size()); |
|
|
|
|
log.info("模型113查询结果数:{}", list.size()); |
|
|
|
|
Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal)); |
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
for (GBaseCSCZRK motherEducation : list) { |
|
|
|
|
@ -386,15 +473,15 @@ public class PointServiceImpl implements PointService {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void syncIsPetition(TaskParamDomain domain) { |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 101); |
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 111); |
|
|
|
|
taskRepository.save(task); |
|
|
|
|
|
|
|
|
|
Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true); |
|
|
|
|
Map<String, Integer> idCode = new HashMap<>(); |
|
|
|
|
List<WdpcGrjdXfsj> list = wdpcGrjdXfsjRepository.getBaseMapper().selectXfMan(); |
|
|
|
|
log.info("模型101第一次查询结果数:{}", list.size()); |
|
|
|
|
log.info("模型111第一次查询结果数:{}", list.size()); |
|
|
|
|
list.addAll(wdpcGrjdXfsjCsRepository.getBaseMapper().selectXfMan()); |
|
|
|
|
log.info("模型101第二次查询后总结果数:{}", list.size()); |
|
|
|
|
log.info("模型111第二次查询后总结果数:{}", list.size()); |
|
|
|
|
Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal)); |
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
for (WdpcGrjdXfsj xfMan : list) { |
|
|
|
|
|