|
|
|
@ -51,8 +51,6 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
|
|
|
|
|
|
|
|
private final RiskModelTaskClueService riskModelTaskClueService; |
|
|
|
private final RiskModelTaskClueService riskModelTaskClueService; |
|
|
|
|
|
|
|
|
|
|
|
private final RiskModelTaskClueRepository clueRepository; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final SupExternalDepartRepository externalDepartRepository; |
|
|
|
private final SupExternalDepartRepository externalDepartRepository; |
|
|
|
|
|
|
|
|
|
|
|
private final GBaseZDRYRepository zdryRepository; |
|
|
|
private final GBaseZDRYRepository zdryRepository; |
|
|
|
@ -192,7 +190,7 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
personal.setGender(IdCodeUtil.idCard2Gender(personal.getIdCode())); |
|
|
|
personal.setGender(IdCodeUtil.idCard2Gender(personal.getIdCode())); |
|
|
|
if(personal == null) { |
|
|
|
if (personal.getGender() == null) { |
|
|
|
personal.setGender(xx.getXbdm()); |
|
|
|
personal.setGender(xx.getXbdm()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (xx.getLxdh() != null) { |
|
|
|
if (xx.getLxdh() != null) { |
|
|
|
@ -206,7 +204,7 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
if (xx.getSspcsdm() != null) { |
|
|
|
if (xx.getSspcsdm() != null) { |
|
|
|
PointOrg org = orgCodeMap.get(xx.getSspcsdm()); |
|
|
|
PointOrg org = orgCodeMap.get(xx.getSspcsdm()); |
|
|
|
org = findOrg(org, orgIdMap); |
|
|
|
org = findOrg(org, orgIdMap); |
|
|
|
SupExternalDepart depart = Optional.ofNullable(org).map(PointOrg::getDm).map(item -> jqExternalDepart.get(item)).orElse(null); |
|
|
|
SupExternalDepart depart = Optional.ofNullable(org).map(PointOrg::getDm).map(jqExternalDepart::get).orElse(null); |
|
|
|
if (depart != null) { |
|
|
|
if (depart != null) { |
|
|
|
personal.setControlDepartId(depart.getInternalId()); |
|
|
|
personal.setControlDepartId(depart.getInternalId()); |
|
|
|
personal.setControlDepartName(depart.getInternalName()); |
|
|
|
personal.setControlDepartName(depart.getInternalName()); |
|
|
|
@ -237,7 +235,7 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
if (xx.getSspcsdm() != null) { |
|
|
|
if (xx.getSspcsdm() != null) { |
|
|
|
PointOrg org = orgCodeMap.get(xx.getSspcsdm()); |
|
|
|
PointOrg org = orgCodeMap.get(xx.getSspcsdm()); |
|
|
|
org = findOrg(org, orgIdMap); |
|
|
|
org = findOrg(org, orgIdMap); |
|
|
|
SupExternalDepart depart = Optional.ofNullable(org).map(PointOrg::getDm).map(item -> jqExternalDepart.get(item)).orElse(null); |
|
|
|
SupExternalDepart depart = Optional.ofNullable(org).map(PointOrg::getDm).map(jqExternalDepart::get).orElse(null); |
|
|
|
if (depart != null) { |
|
|
|
if (depart != null) { |
|
|
|
personal.setControlDepartId(depart.getInternalId()); |
|
|
|
personal.setControlDepartId(depart.getInternalId()); |
|
|
|
personal.setControlDepartName(depart.getInternalName()); |
|
|
|
personal.setControlDepartName(depart.getInternalName()); |
|
|
|
@ -252,7 +250,7 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
if (xx == null) { |
|
|
|
if (xx == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
GBaseSYRKXX info = null; |
|
|
|
GBaseSYRKXX info; |
|
|
|
if (xx.size() == 1) { |
|
|
|
if (xx.size() == 1) { |
|
|
|
info = xx.getFirst(); |
|
|
|
info = xx.getFirst(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
@ -274,7 +272,7 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
if (info.getSspcsdm() != null) { |
|
|
|
if (info.getSspcsdm() != null) { |
|
|
|
PointOrg org = orgCodeMap.get(info.getSspcsdm()); |
|
|
|
PointOrg org = orgCodeMap.get(info.getSspcsdm()); |
|
|
|
org = findOrg(org, orgIdMap); |
|
|
|
org = findOrg(org, orgIdMap); |
|
|
|
SupExternalDepart depart = Optional.ofNullable(org).map(PointOrg::getDm).map(item -> jqExternalDepart.get(item)).orElse(null); |
|
|
|
SupExternalDepart depart = Optional.ofNullable(org).map(PointOrg::getDm).map(jqExternalDepart::get).orElse(null); |
|
|
|
if (depart != null) { |
|
|
|
if (depart != null) { |
|
|
|
personal.setControlDepartId(depart.getInternalId()); |
|
|
|
personal.setControlDepartId(depart.getInternalId()); |
|
|
|
personal.setControlDepartName(depart.getInternalName()); |
|
|
|
personal.setControlDepartName(depart.getInternalName()); |
|
|
|
@ -323,14 +321,20 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
Map<String, List<RiskPersonal>> man = domain.getPersons().stream().filter(item -> item.getMobileNumber() != null).collect(Collectors.groupingBy(RiskPersonal::getMobileNumber)); |
|
|
|
Map<String, List<RiskPersonal>> man = domain.getPersons().stream().filter(item -> item.getMobileNumber() != null).collect(Collectors.groupingBy(RiskPersonal::getMobileNumber)); |
|
|
|
Map<String, RiskPersonal> idCodeMan = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (oldValue, newValue) -> newValue)); |
|
|
|
Map<String, RiskPersonal> idCodeMan = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (oldValue, newValue) -> newValue)); |
|
|
|
|
|
|
|
|
|
|
|
List<ClueData> data = new ArrayList<>(); |
|
|
|
List<RiskModelTaskClue> oldList = Optional.ofNullable(domain.getMap().get(task.getModelId())).orElse(new ArrayList<>()); |
|
|
|
|
|
|
|
Map<String, RiskModelTaskClue> oldMap = oldList.stream().collect(Collectors.toMap(RiskModelTaskClue::getCaseIds, Function.identity(), (val, old) -> val)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
for (DataCaseVerif dataCaseVerif : pList3) { |
|
|
|
for (DataCaseVerif dataCaseVerif : pList3) { |
|
|
|
|
|
|
|
if (oldMap.get(BhUtil.petBh(dataCaseVerif.getOriginId())) != null) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
List<RiskPersonal> list = man.get(dataCaseVerif.getResponderPhone()); |
|
|
|
List<RiskPersonal> list = man.get(dataCaseVerif.getResponderPhone()); |
|
|
|
RiskPersonal person = comparePerson(list, dataCaseVerif.getResponderName()); |
|
|
|
RiskPersonal person = comparePerson(list, dataCaseVerif.getResponderName()); |
|
|
|
if (person == null) { |
|
|
|
if (person == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
data.add(ClueData.builder() |
|
|
|
toInsert.add(createClue(task.getModelId(), 5, task.getId(), ClueData.builder() |
|
|
|
.id(dataCaseVerif.getOriginId()) |
|
|
|
.id(dataCaseVerif.getOriginId()) |
|
|
|
.tag(Default.PETITION_CASE_TAG) |
|
|
|
.tag(Default.PETITION_CASE_TAG) |
|
|
|
.personId(person.getId()) |
|
|
|
.personId(person.getId()) |
|
|
|
@ -340,15 +344,18 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
.idCode(person.getIdCode()) |
|
|
|
.idCode(person.getIdCode()) |
|
|
|
.name(person.getName()) |
|
|
|
.name(person.getName()) |
|
|
|
.sourceData("该人员在近12个月内有诉求不满或长期未化解的情况,增加风险分5分,具体情况为:" + dataCaseVerif.getThingDesc()) |
|
|
|
.sourceData("该人员在近12个月内有诉求不满或长期未化解的情况,增加风险分5分,具体情况为:" + dataCaseVerif.getThingDesc()) |
|
|
|
.build()); |
|
|
|
.build())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (DataPetition12337 item : pList1) { |
|
|
|
for (DataPetition12337 item : pList1) { |
|
|
|
|
|
|
|
if (oldMap.get(BhUtil.petBh(item.getOnlyId())) != null) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
RiskPersonal person = idCodeMan.get(item.getIdCode()); |
|
|
|
RiskPersonal person = idCodeMan.get(item.getIdCode()); |
|
|
|
if (person == null) { |
|
|
|
if (person == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
data.add(ClueData.builder() |
|
|
|
toInsert.add(createClue(task.getModelId(), 5, task.getId(), ClueData.builder() |
|
|
|
.id(item.getOnlyId()) |
|
|
|
.id(item.getOnlyId()) |
|
|
|
.tag(Default.PETITION_12337_TAG) |
|
|
|
.tag(Default.PETITION_12337_TAG) |
|
|
|
.personId(person.getId()) |
|
|
|
.personId(person.getId()) |
|
|
|
@ -358,15 +365,18 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
.idCode(person.getIdCode()) |
|
|
|
.idCode(person.getIdCode()) |
|
|
|
.name(person.getName()) |
|
|
|
.name(person.getName()) |
|
|
|
.sourceData("该人员在近12个月内有诉求不满或长期未化解的情况,增加风险分5分,具体情况为:" + item.getReviewDes()) |
|
|
|
.sourceData("该人员在近12个月内有诉求不满或长期未化解的情况,增加风险分5分,具体情况为:" + item.getReviewDes()) |
|
|
|
.build()); |
|
|
|
.build())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (DataPetitionComplaint item : pList2) { |
|
|
|
for (DataPetitionComplaint item : pList2) { |
|
|
|
|
|
|
|
if (oldMap.get(BhUtil.petBh(item.getOriginId())) != null) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
RiskPersonal person = idCodeMan.get(item.getResponderIdCode()); |
|
|
|
RiskPersonal person = idCodeMan.get(item.getResponderIdCode()); |
|
|
|
if (person == null) { |
|
|
|
if (person == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
data.add(ClueData.builder() |
|
|
|
toInsert.add(createClue(task.getModelId(), 5, task.getId(), ClueData.builder() |
|
|
|
.id(item.getOriginId()) |
|
|
|
.id(item.getOriginId()) |
|
|
|
.tag(Default.PETITION_TAG) |
|
|
|
.tag(Default.PETITION_TAG) |
|
|
|
.personId(person.getId()) |
|
|
|
.personId(person.getId()) |
|
|
|
@ -376,152 +386,17 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
.idCode(person.getIdCode()) |
|
|
|
.idCode(person.getIdCode()) |
|
|
|
.name(person.getName()) |
|
|
|
.name(person.getName()) |
|
|
|
.sourceData("该人员在近12个月内有诉求不满或长期未化解的情况,增加风险分5分,具体情况为:" + item.getThingDesc()) |
|
|
|
.sourceData("该人员在近12个月内有诉求不满或长期未化解的情况,增加风险分5分,具体情况为:" + item.getThingDesc()) |
|
|
|
.build()); |
|
|
|
.build())); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 数据部分
|
|
|
|
|
|
|
|
List<RiskModelTaskClue> toUpdates = new ArrayList<>(); |
|
|
|
|
|
|
|
List<RiskModelTaskClue> toInsert = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 操作前查询之前的数据,可能要合并
|
|
|
|
|
|
|
|
List<RiskModelTaskClue> oldList = Optional.ofNullable(domain.getMap().get(task.getModelId())).orElse(new ArrayList<>()); |
|
|
|
|
|
|
|
List<RiskModelTaskClue> oldResults = Optional.ofNullable(domain.getMap().get(task.getModelId())).orElse(new ArrayList<>()); |
|
|
|
|
|
|
|
for (RiskModelTaskClue clue : oldList) { |
|
|
|
|
|
|
|
if(clue.getEventTime().isBefore(time)) { |
|
|
|
|
|
|
|
// 再见了兄弟
|
|
|
|
|
|
|
|
RiskModelTaskClue clue1 = new RiskModelTaskClue(); |
|
|
|
|
|
|
|
clue1.setId(clue.getId()); |
|
|
|
|
|
|
|
clue1.setDel(1); |
|
|
|
|
|
|
|
toUpdates.add(clue1); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
oldResults.add(clue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, List<RiskModelTaskClue>> oldMap = oldResults.stream().collect(Collectors.groupingBy(RiskModelTaskClue::getIdCode)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, List<ClueData>> clueMap = data.stream().collect(Collectors.groupingBy(ClueData::getIdCode)); |
|
|
|
|
|
|
|
// 按季度计分
|
|
|
|
|
|
|
|
for (Map.Entry<String, List<ClueData>> entry : clueMap.entrySet()) { |
|
|
|
|
|
|
|
List<RiskModelTaskClue> oldClues = Optional.ofNullable(oldMap.get(entry.getKey())).orElse(new ArrayList<>()); |
|
|
|
|
|
|
|
// - 先筛选出老记录,如果已经入库过了,新增的就删除
|
|
|
|
|
|
|
|
Map<String, RiskModelTaskClue> oldClueMap = oldClues.stream().collect(Collectors.toMap(RiskModelTaskClue::getCaseIds, Function.identity(), (oldValue, newValue) -> newValue)); |
|
|
|
|
|
|
|
// 胜利者将继续进行筛选
|
|
|
|
|
|
|
|
List<RiskModelTaskClue> winner = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (ClueData clueData : entry.getValue()) { |
|
|
|
|
|
|
|
// 找不到旧编号才继续
|
|
|
|
|
|
|
|
if(oldClueMap.get(BhUtil.petBh(clueData.getId())) == null) { |
|
|
|
|
|
|
|
winner.add(createClue(task.getModelId(), 5, task.getId(), clueData)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// - 结合新旧数据,从新计算季度,季度最晚的算分
|
|
|
|
|
|
|
|
oldClues.addAll(winner); |
|
|
|
|
|
|
|
Map<Integer, List<RiskModelTaskClue>> winnerMap = new WeakHashMap<>(); |
|
|
|
|
|
|
|
// 去年季度
|
|
|
|
|
|
|
|
Map<Integer, List<RiskModelTaskClue>> lastWinnerMap = new WeakHashMap<>(); |
|
|
|
|
|
|
|
int year = time.getYear(); |
|
|
|
|
|
|
|
for (RiskModelTaskClue oldClue : oldClues) { |
|
|
|
|
|
|
|
int month = oldClue.getEventTime().getMonthValue(); |
|
|
|
|
|
|
|
int theYear = oldClue.getEventTime().getYear(); |
|
|
|
|
|
|
|
int session = month / 3; |
|
|
|
|
|
|
|
if(theYear != year) { |
|
|
|
|
|
|
|
List<RiskModelTaskClue> list = Optional.ofNullable(lastWinnerMap.get(session)).orElse(new ArrayList<>()); |
|
|
|
|
|
|
|
list.add(oldClue); |
|
|
|
|
|
|
|
lastWinnerMap.put(session, list); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
List<RiskModelTaskClue> list = Optional.ofNullable(winnerMap.get(session)).orElse(new ArrayList<>()); |
|
|
|
|
|
|
|
list.add(oldClue); |
|
|
|
|
|
|
|
winnerMap.put(session, list); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// - 上季度排序
|
|
|
|
|
|
|
|
for (Map.Entry<Integer, List<RiskModelTaskClue>> entities : lastWinnerMap.entrySet()) { |
|
|
|
|
|
|
|
List<RiskModelTaskClue> list = entities.getValue(); |
|
|
|
|
|
|
|
list.sort(Comparator.comparing(RiskModelTaskClue::getEventTime, Comparator.reverseOrder())); |
|
|
|
|
|
|
|
RiskModelTaskClue clue = list.getFirst(); |
|
|
|
|
|
|
|
int years = clue.getEventTime().getYear(); |
|
|
|
|
|
|
|
String [] str = clue.getRiskReason().split("-"); |
|
|
|
|
|
|
|
if(clue.getId() != null) { |
|
|
|
|
|
|
|
RiskModelTaskClue update = new RiskModelTaskClue(); |
|
|
|
|
|
|
|
update.setId(clue.getId()); |
|
|
|
|
|
|
|
update.setScore(2); |
|
|
|
|
|
|
|
update.setRiskReason(str[0] + "-" + years+"年"+(entities.getKey()+1)+"季度"); |
|
|
|
|
|
|
|
toUpdates.add(update); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
clue.setScore(2); |
|
|
|
|
|
|
|
clue.setRiskReason(str[0] + "-" + years+"年"+(entities.getKey()+1)+"季度"); |
|
|
|
|
|
|
|
toInsert.add(clue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
list.remove(0); |
|
|
|
|
|
|
|
for (RiskModelTaskClue riskModelTaskClue : list) { |
|
|
|
|
|
|
|
years = riskModelTaskClue.getEventTime().getYear(); |
|
|
|
|
|
|
|
str = riskModelTaskClue.getRiskReason().split("-"); |
|
|
|
|
|
|
|
if(riskModelTaskClue.getId() != null) { |
|
|
|
|
|
|
|
RiskModelTaskClue update = new RiskModelTaskClue(); |
|
|
|
|
|
|
|
update.setId(riskModelTaskClue.getId()); |
|
|
|
|
|
|
|
update.setScore(0); |
|
|
|
|
|
|
|
update.setRiskReason(str[0] + "-" + years+"年"+(entities.getKey()+1)+"季度季度(已合并到本季度最后)"); |
|
|
|
|
|
|
|
toUpdates.add(update); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
riskModelTaskClue.setScore(0); |
|
|
|
|
|
|
|
riskModelTaskClue.setRiskReason(str[0] + "-" + years+"年"+(entities.getKey()+1)+"季度季度(已合并到本季度最后)"); |
|
|
|
|
|
|
|
toInsert.add(riskModelTaskClue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// - 本季度排序
|
|
|
|
|
|
|
|
for (Map.Entry<Integer, List<RiskModelTaskClue>> entities : winnerMap.entrySet()) { |
|
|
|
|
|
|
|
List<RiskModelTaskClue> list = entities.getValue(); |
|
|
|
|
|
|
|
list.sort(Comparator.comparing(RiskModelTaskClue::getEventTime, Comparator.reverseOrder())); |
|
|
|
|
|
|
|
RiskModelTaskClue clue = list.getFirst(); |
|
|
|
|
|
|
|
int years = clue.getEventTime().getYear(); |
|
|
|
|
|
|
|
String [] str = clue.getRiskReason().split("-"); |
|
|
|
|
|
|
|
if(clue.getId() != null) { |
|
|
|
|
|
|
|
RiskModelTaskClue update = new RiskModelTaskClue(); |
|
|
|
|
|
|
|
update.setId(clue.getId()); |
|
|
|
|
|
|
|
update.setScore(2); |
|
|
|
|
|
|
|
update.setRiskReason(str[0] + "-" + years+"年"+(entities.getKey()+1)+"季度"); |
|
|
|
|
|
|
|
toUpdates.add(update); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
clue.setScore(2); |
|
|
|
|
|
|
|
clue.setRiskReason(str[0] + "-" + years+"年"+(entities.getKey()+1)+"季度"); |
|
|
|
|
|
|
|
toInsert.add(clue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
list.remove(0); |
|
|
|
|
|
|
|
for (RiskModelTaskClue riskModelTaskClue : list) { |
|
|
|
|
|
|
|
years = riskModelTaskClue.getEventTime().getYear(); |
|
|
|
|
|
|
|
str = riskModelTaskClue.getRiskReason().split("-"); |
|
|
|
|
|
|
|
if(riskModelTaskClue.getId() != null) { |
|
|
|
|
|
|
|
RiskModelTaskClue update = new RiskModelTaskClue(); |
|
|
|
|
|
|
|
update.setId(riskModelTaskClue.getId()); |
|
|
|
|
|
|
|
update.setScore(0); |
|
|
|
|
|
|
|
update.setRiskReason(str[0] + "-" + years+"年"+(entities.getKey()+1)+"季度季度(已合并到本季度最后)"); |
|
|
|
|
|
|
|
toUpdates.add(update); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
riskModelTaskClue.setScore(0); |
|
|
|
|
|
|
|
riskModelTaskClue.setRiskReason(str[0] + "-" + years+"年"+(entities.getKey()+1)+"季度季度(已合并到本季度最后)"); |
|
|
|
|
|
|
|
toInsert.add(riskModelTaskClue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
if (!toInsert.isEmpty()) { |
|
|
|
|
|
|
|
log.info("公安信访数据: {}", toInsert.size()); |
|
|
|
riskModelTaskClueService.saveClues(toInsert, Default.MAIL_IG); |
|
|
|
riskModelTaskClueService.saveClues(toInsert, Default.MAIL_IG); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(!toUpdates.isEmpty()) { |
|
|
|
|
|
|
|
log.info("修改线索数 | {}", toUpdates.size()); |
|
|
|
|
|
|
|
clueRepository.updateBatchById(toUpdates); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RiskTask updateTask = new RiskTask(); |
|
|
|
RiskTask updateTask = new RiskTask(); |
|
|
|
updateTask.setId(task.getId()); |
|
|
|
updateTask.setId(task.getId()); |
|
|
|
updateTask.setInsertSize(toInsert.size()); |
|
|
|
updateTask.setInsertSize(toInsert.size()); |
|
|
|
updateTask.setUpdateSize(toUpdates.size()); |
|
|
|
updateTask.setUpdateSize(0); |
|
|
|
updateTask.setState(1); |
|
|
|
updateTask.setState(1); |
|
|
|
updateTask.setEndTime(LocalDateTime.now()); |
|
|
|
updateTask.setEndTime(LocalDateTime.now()); |
|
|
|
riskTaskRepository.updateById(updateTask); |
|
|
|
riskTaskRepository.updateById(updateTask); |
|
|
|
@ -575,32 +450,15 @@ public class PetitionServiceImpl implements PetitionService { |
|
|
|
return clue; |
|
|
|
return clue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
RiskPersonalControlRecord createControlRecord(ClueData data) { |
|
|
|
|
|
|
|
RiskPersonalControlRecord controlRecord = new RiskPersonalControlRecord(); |
|
|
|
|
|
|
|
controlRecord.setName(data.getName()); |
|
|
|
|
|
|
|
controlRecord.setIdCode(data.getIdCode()); |
|
|
|
|
|
|
|
controlRecord.setCreateTime(LocalDateTime.now()); |
|
|
|
|
|
|
|
controlRecord.setControlTime(data.getEventTime()); |
|
|
|
|
|
|
|
controlRecord.setControlDepartId(data.getDepartId()); |
|
|
|
|
|
|
|
controlRecord.setControlDepartName(data.getDepartName()); |
|
|
|
|
|
|
|
controlRecord.setControlTag(data.getTag()); |
|
|
|
|
|
|
|
controlRecord.setCaseId(BhUtil.ajBh(data.getId())); |
|
|
|
|
|
|
|
return controlRecord; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RiskPersonal checkPerson(RiskPersonal personal) { |
|
|
|
RiskPersonal checkPerson(RiskPersonal personal) { |
|
|
|
if (personal.getName() == null || personal.getIdCode() == null || personal.getName().isEmpty() || personal.getIdCode().isEmpty()) { |
|
|
|
if (personal.getName() == null || personal.getIdCode() == null || personal.getName().isEmpty() || personal.getIdCode().isEmpty()) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
try{ |
|
|
|
Integer age = IdCodeUtil.idCard2Age(personal.getIdCode(), LocalDate.now()); |
|
|
|
int age = IdCodeUtil.idCard2Age(personal.getIdCode(), LocalDate.now()); |
|
|
|
if (age == null || age <= 6) { |
|
|
|
if(age <= 6) { |
|
|
|
|
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
personal.setAge(age); |
|
|
|
personal.setAge(age); |
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (personal.getGender() == null) { |
|
|
|
if (personal.getGender() == null) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
int gender = personal.getIdCode().length() == 18 ? Integer.valueOf(personal.getIdCode().substring(16, 17)) : Integer.valueOf(personal.getIdCode().substring(14, 15)); |
|
|
|
int gender = personal.getIdCode().length() == 18 ? Integer.valueOf(personal.getIdCode().substring(16, 17)) : Integer.valueOf(personal.getIdCode().substring(14, 15)); |
|
|
|
|