Browse Source

Merge remote-tracking branch 'origin/master'

master
kami 1 year ago
parent
commit
bb8bb27a52
  1. 8
      src/main/java/com/biutag/supervisiondata/event/ApplicationEvent.java
  2. 12
      src/main/java/com/biutag/supervisiondata/mapper/dwd/GBaseWFRXXMapper.java
  3. 3
      src/main/java/com/biutag/supervisiondata/pojo/entity/dwd/GBaseWFRXX.java
  4. 20
      src/main/java/com/biutag/supervisiondata/service/impl/PointServiceImpl.java

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

@ -29,8 +29,8 @@ import java.util.stream.Collectors;
* @version 0.0.1 * @version 0.0.1
* @since 1.8 * @since 1.8
*/ */
@Slf4j
@Component @Component
@Slf4j
public class ApplicationEvent { public class ApplicationEvent {
@Resource @Resource
@ -104,7 +104,7 @@ public class ApplicationEvent {
DepartUtil.init(ryRepository, departRepository); DepartUtil.init(ryRepository, departRepository);
LocalDateTime end = LocalDate.now().minusDays(1).atTime(23,59,59); LocalDateTime end = LocalDate.now().minusDays(1).atTime(23,59,59);
CompletableFutureUtil.runSync(() -> { CompletableFutureUtil.runSync(() -> {
personalService.init(List.of(76)); personalService.init(List.of(115,116));
// personalService.pullInvestigate(); // personalService.pullInvestigate();
// personalService.pullPsychosis(); // personalService.pullPsychosis();
// gBaseSHRWFRService.pullAndSave(LocalDateTime.of(2019,12,6,0,0,0), end); // gBaseSHRWFRService.pullAndSave(LocalDateTime.of(2019,12,6,0,0,0), end);
@ -145,8 +145,8 @@ public class ApplicationEvent {
// pointService.syncFatherEducation(initDomain(List.of(112))); // pointService.syncFatherEducation(initDomain(List.of(112)));
// pointService.syncMotherEducation(initDomain(List.of(113))); // pointService.syncMotherEducation(initDomain(List.of(113)));
// pointService.syncDomicileType(initDomain(List.of(114))); // 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)));
// gBaseJJDService.syncOtherContradict(initDomain(List.of(75))); // gBaseJJDService.syncOtherContradict(initDomain(List.of(75)));
// pointService.syncFamilyDie(initDomain(List.of(118))); // pointService.syncFamilyDie(initDomain(List.of(118)));

12
src/main/java/com/biutag/supervisiondata/mapper/dwd/GBaseWFRXXMapper.java

@ -58,17 +58,17 @@ public interface GBaseWFRXXMapper extends BaseMapper<GBaseWFRXX> {
" on a.zjhm = b.id_code where a.zydm is not null ") " on a.zjhm = b.id_code where a.zydm is not null ")
List<GBaseWFRXX> selectWork(); List<GBaseWFRXX> selectWork();
@Select("select b.ajbh, b.zjhm " + @Select("select b.ajbh, b.zjhm, a.ajmc " +
"from dwd_asj_zfba_ajjbxx a " + "from dwd_asj_zfba_ajjbxx a " +
"join dwd_ry_zfba_wfryxx b on a.ajbh = b.ajbh " + "join dwd_ry_zfba_wfryxx b on a.ajbh = b.ajbh " +
"inner join csga_wdpcdb.wdpc_person c on b.zjhm = c.id_code " + "inner join csga_wdpcdb.wdpc_person c on b.zjhm = c.id_code " +
"where a.ajbzdm = 1;") "where a.ajbzdm = 1 and b.lrsj between #{startTime} and #{endTime};")
List<GBaseWFRXX> selectCriminalPunishment(); List<GBaseWFRXX> selectCriminalPunishment(@Param("startTime")String startTime, @Param("endTime")String endTime);
@Select("select b.ajbh, b.zjhm " + @Select("select b.ajbh, b.zjhm, a.ajmc " +
"from dwd_asj_zfba_ajjbxx a " + "from dwd_asj_zfba_ajjbxx a " +
"join dwd_ry_zfba_wfryxx b on a.ajbh = b.ajbh " + "join dwd_ry_zfba_wfryxx b on a.ajbh = b.ajbh " +
"inner join csga_wdpcdb.wdpc_person c on b.zjhm = c.id_code " + "inner join csga_wdpcdb.wdpc_person c on b.zjhm = c.id_code " +
"where a.ajbzdm = 2;") "where a.ajbzdm = 2 and b.lrsj between #{startTime} and #{endTime};")
List<GBaseWFRXX> selectAdministrativePunishment(); List<GBaseWFRXX> selectAdministrativePunishment(@Param("startTime")String startTime, @Param("endTime")String endTime);
} }

3
src/main/java/com/biutag/supervisiondata/pojo/entity/dwd/GBaseWFRXX.java

@ -63,4 +63,7 @@ public class GBaseWFRXX implements Serializable {
@TableField("lrsj") @TableField("lrsj")
Date lrsj; Date lrsj;
@TableField(exist = false, value = "ajmc")
String ajmc;
} }

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

@ -328,7 +328,9 @@ public class PointServiceImpl implements PointService {
Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true); Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true);
Map<String, Integer> idCode = new HashMap<>(); Map<String, Integer> idCode = new HashMap<>();
log.info("模型116开始查询"); log.info("模型116开始查询");
List<GBaseWFRXX> list = wFRXXRepository.getBaseMapper().selectAdministrativePunishment(); LocalDateTime start = LocalDateTime.of(2019, 12, 6, 0, 0, 0);
LocalDateTime end = LocalDate.now().atTime(0, 0, 0);
List<GBaseWFRXX> list = wFRXXRepository.getBaseMapper().selectAdministrativePunishment(start.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), end.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
log.info("模型116查询结果数:{}", list.size()); log.info("模型116查询结果数:{}", list.size());
Map<String, List<GBaseWFRXX>> gAXZCFJDSMap = list.stream().collect(Collectors.groupingBy(GBaseWFRXX::getZjhm)); Map<String, List<GBaseWFRXX>> gAXZCFJDSMap = list.stream().collect(Collectors.groupingBy(GBaseWFRXX::getZjhm));
Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal)); Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal));
@ -346,7 +348,9 @@ public class PointServiceImpl implements PointService {
// 去重 // 去重
wfrwfxxList = wfrwfxxList.stream().filter(StreamUtil.distinctByKey(GBaseWFRXX::getAjbh)).toList(); wfrwfxxList = wfrwfxxList.stream().filter(StreamUtil.distinctByKey(GBaseWFRXX::getAjbh)).toList();
String context = wfrwfxxList.stream().map(GBaseWFRXX::getAjbh).collect(Collectors.joining(",")); String context = wfrwfxxList.stream()
.map(wfrwfxx -> "案件编号为:" + wfrwfxx.getAjbh() + ",案件名称为:" + wfrwfxx.getAjmc())
.collect(Collectors.joining(";"));
score = Math.min(wfrwfxxList.size(), 5); score = Math.min(wfrwfxxList.size(), 5);
ClueData data = ClueData.builder() ClueData data = ClueData.builder()
.name(personal.getName()) .name(personal.getName())
@ -356,7 +360,7 @@ public class PointServiceImpl implements PointService {
.score(score) .score(score)
.eventTime(LocalDateTime.now()) .eventTime(LocalDateTime.now())
.personId(personal.getId()) .personId(personal.getId())
.sourceData("发现该人员涉及" + wfrwfxxList.size() + "个行政处罚,案件编号为:“" + context + "”") .sourceData("发现该人员涉及" + wfrwfxxList.size() + "个行政处罚," + context)
.build(); .build();
toInsert.add(DataUtil.createClueData(task, data)); toInsert.add(DataUtil.createClueData(task, data));
} }
@ -373,7 +377,9 @@ public class PointServiceImpl implements PointService {
Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true); Map<String, RiskModelTaskClue> oldMap = domain.getOldMap(task.getModelId(), true);
Map<String, Integer> idCode = new HashMap<>(); Map<String, Integer> idCode = new HashMap<>();
log.info("模型115开始查询"); log.info("模型115开始查询");
List<GBaseWFRXX> list = wFRXXRepository.getBaseMapper().selectCriminalPunishment(); LocalDateTime start = LocalDateTime.of(2019, 12, 6, 0, 0, 0);
LocalDateTime end = LocalDate.now().atTime(0, 0, 0);
List<GBaseWFRXX> list = wFRXXRepository.getBaseMapper().selectCriminalPunishment(start.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), end.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
log.info("模型115查询结果数:{}", list.size()); log.info("模型115查询结果数:{}", list.size());
Map<String, List<GBaseWFRXX>> wfrxxMap = list.stream().collect(Collectors.groupingBy(GBaseWFRXX::getZjhm)); Map<String, List<GBaseWFRXX>> wfrxxMap = list.stream().collect(Collectors.groupingBy(GBaseWFRXX::getZjhm));
Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal)); Map<String, RiskPersonal> personalMap = domain.getPersons().stream().collect(Collectors.toMap(RiskPersonal::getIdCode, Function.identity(), (old, newVal) -> newVal));
@ -391,7 +397,9 @@ public class PointServiceImpl implements PointService {
// 去重 // 去重
wfrxxList = wfrxxList.stream().filter(StreamUtil.distinctByKey(GBaseWFRXX::getAjbh)).toList(); wfrxxList = wfrxxList.stream().filter(StreamUtil.distinctByKey(GBaseWFRXX::getAjbh)).toList();
String context = wfrxxList.stream().map(GBaseWFRXX::getAjbh).collect(Collectors.joining(",")); String context = wfrxxList.stream()
.map(wfrwfxx -> "案件编号为:" + wfrwfxx.getAjbh() + ",案件名称为:" + wfrwfxx.getAjmc())
.collect(Collectors.joining(";"));
score = Math.min(wfrxxList.size(), 5); score = Math.min(wfrxxList.size(), 5);
ClueData data = ClueData.builder() ClueData data = ClueData.builder()
.name(personal.getName()) .name(personal.getName())
@ -401,7 +409,7 @@ public class PointServiceImpl implements PointService {
.score(score) .score(score)
.eventTime(LocalDateTime.now()) .eventTime(LocalDateTime.now())
.personId(personal.getId()) .personId(personal.getId())
.sourceData("发现该人员涉及" + wfrxxList.size() + "个刑事案件,案件编号为:“" + context + "”") .sourceData("发现该人员涉及" + wfrxxList.size() + "个刑事案件," + context)
.build(); .build();
toInsert.add(DataUtil.createClueData(task, data)); toInsert.add(DataUtil.createClueData(task, data));
} }

Loading…
Cancel
Save