|
|
|
@ -15,6 +15,7 @@ import com.biutag.supervisiondata.pojo.entity.dwd.GBaseOilBuy; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseTbDZdrylb; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseTbDZdrylb; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseZDRY; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseZDRY; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.mine.*; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.mine.*; |
|
|
|
|
|
|
|
import com.biutag.supervisiondata.pojo.entity.wdpc.WdpcGrjdXfsj; |
|
|
|
import com.biutag.supervisiondata.repository.*; |
|
|
|
import com.biutag.supervisiondata.repository.*; |
|
|
|
import com.biutag.supervisiondata.service.PointService; |
|
|
|
import com.biutag.supervisiondata.service.PointService; |
|
|
|
import com.biutag.supervisiondata.service.RiskModelTaskClueService; |
|
|
|
import com.biutag.supervisiondata.service.RiskModelTaskClueService; |
|
|
|
@ -56,6 +57,10 @@ public class PointServiceImpl implements PointService { |
|
|
|
|
|
|
|
|
|
|
|
private final SupDepartMapper supDepartMapper; |
|
|
|
private final SupDepartMapper supDepartMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final WdpcGrjdXfsjRepository wdpcGrjdXfsjRepository; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final WdpcGrjdXfsjCsRepository wdpcGrjdXfsjCsRepository; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void personPullAndSave(LocalDateTime start, LocalDateTime end) { |
|
|
|
public void personPullAndSave(LocalDateTime start, LocalDateTime end) { |
|
|
|
riskPersonalService.formatAndSave(getPersons(), Default.POINT_POEPLE); |
|
|
|
riskPersonalService.formatAndSave(getPersons(), Default.POINT_POEPLE); |
|
|
|
@ -229,6 +234,48 @@ public class PointServiceImpl implements PointService { |
|
|
|
taskRepository.updateById(updateTask); |
|
|
|
taskRepository.updateById(updateTask); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void syncIsPetition(TaskParamDomain domain) { |
|
|
|
|
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 101); |
|
|
|
|
|
|
|
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()); |
|
|
|
|
|
|
|
list.addAll(wdpcGrjdXfsjCsRepository.getBaseMapper().selectXfMan()); |
|
|
|
|
|
|
|
log.info("模型101第二次查询后总结果数:{}", 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) { |
|
|
|
|
|
|
|
RiskPersonal personal = personalMap.get(xfMan.getIdCode()); |
|
|
|
|
|
|
|
if (personal == null) continue; |
|
|
|
|
|
|
|
if (idCode.get(xfMan.getIdCode()) != null) continue; |
|
|
|
|
|
|
|
if (oldMap.get(xfMan.getIdCode()) != null) continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
idCode.put(xfMan.getIdCode(), 1); |
|
|
|
|
|
|
|
ClueData data = ClueData.builder() |
|
|
|
|
|
|
|
.name(personal.getName()) |
|
|
|
|
|
|
|
.id(personal.getId().toString()) |
|
|
|
|
|
|
|
.idCode(personal.getIdCode()) |
|
|
|
|
|
|
|
.tag("上访人员") |
|
|
|
|
|
|
|
.personId(personal.getId()) |
|
|
|
|
|
|
|
.sourceData("发现该人员有过上访经历,增加风险分5分") |
|
|
|
|
|
|
|
.build(); |
|
|
|
|
|
|
|
toInsert.add(createClue(task.getModelId(), 5, task.getId(), data)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
|
|
|
|
modelTaskClueService.saveClues(toInsert, Default.IS_PETITION); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
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 |
|
|
|
@Override |
|
|
|
public void syncDrug(TaskParamDomain domain) { |
|
|
|
public void syncDrug(TaskParamDomain domain) { |
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 37); |
|
|
|
RiskTask task = createTask(domain.getPersons().size(), 37); |
|
|
|
|