Browse Source

修改打分

master
kami 1 year ago
parent
commit
6b499684ff
  1. 88
      src/main/java/com/biutag/supervisiondata/event/ApplicationEvent.java
  2. 3
      src/main/java/com/biutag/supervisiondata/mapper/dwd/GBaseZDRYMapper.java
  3. 8
      src/main/java/com/biutag/supervisiondata/service/impl/PointServiceImpl.java
  4. 3
      src/main/java/com/biutag/supervisiondata/service/impl/RiskScoreRuleServiceImpl.java

88
src/main/java/com/biutag/supervisiondata/event/ApplicationEvent.java

@ -102,52 +102,50 @@ public class ApplicationEvent {
LocalDateTime start = LocalDateTime.of(2023, 12, 6, 0, 0, 0); LocalDateTime start = LocalDateTime.of(2023, 12, 6, 0, 0, 0);
LocalDateTime end = LocalDateTime.now(); LocalDateTime end = LocalDateTime.now();
CompletableFutureUtil.runSync(() -> { CompletableFutureUtil.runSync(() -> {
// 测试数据 personalService.init();
// gBaseJJDService.pullDataAndSaveRedis(start, end); personalService.pullInvestigate();
// personalService.init(); personalService.pullPsychosis();
// personalService.pullInvestigate(); gBaseJJDService.pullAndSave(start, end);
// personalService.pullPsychosis(); gBaseSHRWFRService.pullAndSave(start, end);
// gBaseJJDService.pullAndSave(start, end); petitionService.personPullAndSave(start, end);
// gBaseSHRWFRService.pullAndSave(start, end); personalService.pullPetitionAgain();
// petitionService.personPullAndSave(start, end); pointService.personPullAndSave(start, end);
// personalService.pullPetitionAgain(); riskPersonalService.fixed();
// pointService.personPullAndSave(start, end);
// riskPersonalService.fixed(); petitionService.petitionModelTask(initDomain(List.of(40)));
riskTaskService.eduModelTask(initDomain(List.of(34)));
// petitionService.petitionModelTask(initDomain(List.of(40))); riskTaskService.infoModelTask(initDomain(List.of(32,33)));
// riskTaskService.eduModelTask(initDomain(List.of(34))); marriageService.marriageModelTask(initDomain(List.of(39,51)));
// riskTaskService.infoModelTask(initDomain(List.of(32,33))); pointService.syncSecurity(initDomain(List.of(37)));
// marriageService.marriageModelTask(initDomain(List.of(39,51))); habitService.habitModelTask(start, initDomain(List.of(36,60,61,62)));
// pointService.syncSecurity(initDomain(List.of(37))); pointService.syncCarUser(initDomain(List.of(53)));
// habitService.habitModelTask(start, initDomain(List.of(36,60,61,62))); riskTaskService.riskAreaModelTask(initDomain(List.of(41)));
// pointService.syncCarUser(initDomain(List.of(53))); pointService.syncScore(initDomain(List.of(43)));
// riskTaskService.riskAreaModelTask(initDomain(List.of(41))); pointService.syncViolence(initDomain(List.of(44)));
// pointService.syncScore(initDomain(List.of(43))); noControlService.syncNoControlData(initDomain(List.of(45)));
// pointService.syncViolence(initDomain(List.of(44))); pointService.syncDrug(initDomain(List.of(37)));
// noControlService.syncNoControlData(initDomain(List.of(45))); pointService.syncControlNoPower(initDomain(List.of(48)));
// pointService.syncDrug(initDomain(List.of(37))); pointService.syncOilBuy(initDomain(List.of(52)));
// pointService.syncControlNoPower(initDomain(List.of(48))); gBaseJJDService.pullPoliceInstance(start, end, initDomain(List.of(55,56,57,58)));
// pointService.syncOilBuy(initDomain(List.of(52))); jsbryService.syncPys(initDomain(List.of(59)));
// gBaseJJDService.pullPoliceInstance(start, end, initDomain(List.of(55,56,57,58))); gBaseSHRWFRService.combatCrime(initDomain(List.of(63)));
// jsbryService.syncPys(initDomain(List.of(59))); gBaseJJDService.syncPoliceAttack(initDomain(List.of(64)));
// gBaseSHRWFRService.combatCrime(initDomain(List.of(63))); gBaseJJDService.syncHomeViolence(initDomain(List.of(65,66)));
// gBaseJJDService.syncPoliceAttack(initDomain(List.of(64))); pointService.syncPointType(initDomain(List.of(67)));
// gBaseJJDService.syncHomeViolence(initDomain(List.of(65,66))); gBaseSHRWFRService.hadWork(initDomain(List.of(68)));
// pointService.syncPointType(initDomain(List.of(67))); gBaseJJDService.syncParentRelation(initDomain(List.of(69,70)));
// gBaseSHRWFRService.hadWork(initDomain(List.of(68))); gBaseJJDService.syncLove(initDomain(List.of(71)));
// gBaseJJDService.syncParentRelation(initDomain(List.of(69,70))); gBaseJJDService.syncMarryDispute(initDomain(List.of(72)));
// gBaseJJDService.syncLove(initDomain(List.of(71))); gBaseJJDService.syncNeighborAndColleagueDispute(initDomain(List.of(73)));
// gBaseJJDService.syncMarryDispute(initDomain(List.of(72))); gBaseJJDService.syncBullying(initDomain(List.of(74)));
// gBaseJJDService.syncNeighborAndColleagueDispute(initDomain(List.of(73))); gBaseSHRWFRService.crimeName(initDomain(List.of(76)));
// gBaseJJDService.syncBullying(initDomain(List.of(74))); pointService.syncIsPetition(initDomain(List.of(111)));
// gBaseSHRWFRService.crimeName(initDomain(List.of(76))); pointService.syncFatherEducation(initDomain(List.of(112)));
// pointService.syncIsPetition(initDomain(List.of(111))); pointService.syncMotherEducation(initDomain(List.of(113)));
// pointService.syncFatherEducation(initDomain(List.of(112))); pointService.syncDomicileType(initDomain(List.of(114)));
// pointService.syncMotherEducation(initDomain(List.of(113)));
// pointService.syncDomicileType(initDomain(List.of(114)));
// pointService.syncCriminalPunishment(initDomain(List.of(115)));// 需重跑 报错 // pointService.syncCriminalPunishment(initDomain(List.of(115)));// 需重跑 报错
// pointService.syncAdministrativePunishment(initDomain(List.of(116)));// 需重跑 pointService.syncAdministrativePunishment(initDomain(List.of(116)));// 需重跑
// pointService.syncParentsDivorce(initDomain(List.of(117))); pointService.syncParentsDivorce(initDomain(List.of(117)));
pointService.syncFamilyDie(initDomain(List.of(118))); pointService.syncFamilyDie(initDomain(List.of(118)));
pointService.syncFatherDie(initDomain(List.of(119))); pointService.syncFatherDie(initDomain(List.of(119)));
pointService.syncMotherDie(initDomain(List.of(120))); pointService.syncMotherDie(initDomain(List.of(120)));

3
src/main/java/com/biutag/supervisiondata/mapper/dwd/GBaseZDRYMapper.java

@ -86,6 +86,9 @@ public interface GBaseZDRYMapper extends BaseMapper<GBaseZDRY> {
"</script>") "</script>")
List<String> syncCarUser(@Param("list")List<String> list); List<String> syncCarUser(@Param("list")List<String> list);
@Select(" select distinct dwd_zjhm from dwd_wp_jtqbglpt_jdcjbxx where (length(dwd_zjhm) = 18 or length(dwd_zjhm) = 15) and dwd_zjlx = 'A' and ztdm is not null and ztdm not in ( 'B','K','E') ")
List<String> syncCarUser2();
/** /**
* 获取重点人员的组织机构 * 获取重点人员的组织机构
* @return 列表 * @return 列表

8
src/main/java/com/biutag/supervisiondata/service/impl/PointServiceImpl.java

@ -1637,12 +1637,8 @@ public class PointServiceImpl implements PointService {
@Override @Override
public void syncCarUser(TaskParamDomain domain) { public void syncCarUser(TaskParamDomain domain) {
int count = domain.getIdCards().size(); List<String> carUsers = zdryRepository.getBaseMapper().syncCarUser2();
List<String> carUsers = new ArrayList<>(); log.info("车主数量:{}", carUsers.size());
for (List<String> idCard : domain.getIdCards()) {
carUsers.addAll(zdryRepository.getBaseMapper().syncCarUser(idCard));
log.info("车主进度:{}", --count);
}
RiskTask task = createTask(carUsers.size(), 53); RiskTask task = createTask(carUsers.size(), 53);
taskRepository.save(task); taskRepository.save(task);

3
src/main/java/com/biutag/supervisiondata/service/impl/RiskScoreRuleServiceImpl.java

@ -107,7 +107,8 @@ public class RiskScoreRuleServiceImpl implements RiskScoreRuleService {
// BigDecimal weight = new BigDecimal(Double.toString(riskScoreRule.getWeight())); // BigDecimal weight = new BigDecimal(Double.toString(riskScoreRule.getWeight()));
// n2 = n2.multiply(weight).divide(new BigDecimal("100"), 2, RoundingMode.UP); // n2 = n2.multiply(weight).divide(new BigDecimal("100"), 2, RoundingMode.UP);
Double ruleScore = temp.stream().mapToDouble(RiskModelTaskClue::getScoreResult).sum(); Double ruleScore = temp.stream().mapToDouble(RiskModelTaskClue::getScoreResult).sum();
BigDecimal n2 = new BigDecimal(Double.toString(Math.min(ruleScore, riskScoreRule.getScore()))); BigDecimal rScore = new BigDecimal(riskScoreRule.getScore().toString()).multiply(new BigDecimal(weight));
BigDecimal n2 = new BigDecimal(Double.toString(Math.min(ruleScore, rScore.doubleValue())));
score=score.add(n2); score=score.add(n2);
} }
// BigDecimal ruleScore = new BigDecimal(Double.toString(rule.getScore())); // BigDecimal ruleScore = new BigDecimal(Double.toString(rule.getScore()));

Loading…
Cancel
Save