diff --git a/juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/AnalyzeController.java b/juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/AnalyzeController.java index 76e2afc..62a2043 100644 --- a/juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/AnalyzeController.java +++ b/juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/AnalyzeController.java @@ -74,6 +74,7 @@ public class AnalyzeController extends JeecgController resultSchools = new ArrayList<>();//分析后学籍的信息 private static final int corePoolSize = Runtime.getRuntime().availableProcessors(); private static final ThreadPoolExecutor executor = new ThreadPoolExecutor(corePoolSize, corePoolSize + 1, 10L, TimeUnit.SECONDS, new LinkedBlockingQueue(1000)); + private String random_number="00000000"; @AutoLog(value = "来源数据管理-分页列表查询") @@ -90,13 +91,13 @@ public class AnalyzeController extends JeecgController> f1 = CompletableFuture.supplyAsync(() -> gaPunishService.queryAll(), executor); - CompletableFuture> f2 = CompletableFuture.supplyAsync(() -> specialStudentService.queryList(), executor); - CompletableFuture> f3 = CompletableFuture.supplyAsync(() -> mzOrphanService.getIdentityS(), executor); - CompletableFuture> f4 = CompletableFuture.supplyAsync(() -> mzUnsupportedService.getIdentityS(), executor); - CompletableFuture> f5 = CompletableFuture.supplyAsync(() -> mzLeftBehindChildrenService.getIdentityS(), executor); - CompletableFuture> f6 = CompletableFuture.supplyAsync(() -> mzAdoptionService.getIdentityS(), executor); - CompletableFuture> f7 = CompletableFuture.supplyAsync(() -> highSchoolService.getList(), executor); - CompletableFuture> f8 = CompletableFuture.supplyAsync(() -> primarySchoolService.getList(), executor); -// CompletableFuture> f9 = CompletableFuture.supplyAsync(() -> gaDemographicService.getIdentityS(), executor); +// ExecutorService pool = Executors.newFixedThreadPool(8); +// CompletableFuture> f1 = CompletableFuture.supplyAsync(() -> gaPunishService.queryAll(), executor); +// CompletableFuture> f2 = CompletableFuture.supplyAsync(() -> specialStudentService.queryList(), executor); +// CompletableFuture> f3 = CompletableFuture.supplyAsync(() -> mzOrphanService.getIdentityS(), executor); +// CompletableFuture> f4 = CompletableFuture.supplyAsync(() -> mzUnsupportedService.getIdentityS(), executor); +// CompletableFuture> f5 = CompletableFuture.supplyAsync(() -> mzLeftBehindChildrenService.getIdentityS(), executor); +// CompletableFuture> f6 = CompletableFuture.supplyAsync(() -> mzAdoptionService.getIdentityS(), executor); +// CompletableFuture> f7 = CompletableFuture.supplyAsync(() -> highSchoolService.getList(), executor); +// CompletableFuture> f8 = CompletableFuture.supplyAsync(() -> primarySchoolService.getList(), executor); //行政处罚数据 -// Map gaPunishVos = gaPunishService.queryAll(); - Map gaPunishVos = new HashMap<>(); - gaPunishVos.putAll(f1.get()); -// List specialStudentVos = specialStudentService.queryList(); - List specialStudentVos = new ArrayList<>(); - specialStudentVos.addAll(f2.get()); + Map gaPunishVos = gaPunishService.queryAll(); +// Map gaPunishVos = new HashMap<>(); +// gaPunishVos.putAll(f1.get()); + List specialStudentVos = specialStudentService.queryList(); +// List specialStudentVos = new ArrayList<>(); +// specialStudentVos.addAll(f2.get()); //孤儿数据 -// List mzOrphans = mzOrphanService.getIdentityS(); - List mzOrphans = new ArrayList<>(); - mzOrphans.addAll(f3.get()); + List mzOrphans = mzOrphanService.getIdentityS(); +// List mzOrphans = new ArrayList<>(); +// mzOrphans.addAll(f3.get()); //无人抚养 -// List mzUnsupporteds = mzUnsupportedService.getIdentityS(); - List mzUnsupporteds = new ArrayList<>(); - mzUnsupporteds.addAll(f4.get()); + List mzUnsupporteds = mzUnsupportedService.getIdentityS(); +// List mzUnsupporteds = new ArrayList<>(); +// mzUnsupporteds.addAll(f4.get()); //留守儿童 -// List mzLeftBehinds =mzLeftBehindChildrenService.getIdentityS(); - List mzLeftBehinds = new ArrayList<>(); - mzLeftBehinds.addAll(f5.get()); + List mzLeftBehinds =mzLeftBehindChildrenService.getIdentityS(); +// List mzLeftBehinds = new ArrayList<>(); +// mzLeftBehinds.addAll(f5.get()); //领养 -// List mzAdoptions =mzAdoptionService.getIdentityS(); - List mzAdoptions = new ArrayList<>(); - mzAdoptions.addAll(f6.get()); + List mzAdoptions =mzAdoptionService.getIdentityS(); +// List mzAdoptions = new ArrayList<>(); +// mzAdoptions.addAll(f6.get()); //获取初高中学生信息 -// List highSchools = highSchoolService.getList(); - List highSchools = new ArrayList<>(); - highSchools.addAll(f7.get()); + List highSchools = highSchoolService.getList(); +// List highSchools = new ArrayList<>(); +// highSchools.addAll(f7.get()); //获取幼小学生信息 -// List primarySchools = primarySchoolService.getList(); - List primarySchools = new ArrayList<>(); - primarySchools.addAll(f8.get()); + List primarySchools = primarySchoolService.getList(); +// List primarySchools = new ArrayList<>(); +// primarySchools.addAll(f8.get()); //人口基本信息小于18岁 // Map gaDemographics =gaDemographicService.getIdentityS(); // Map gaDemographics =new HashMap<>(); // gaDemographics.putAll(f9.get()); //关闭线程池 - pool.shutdown(); +// pool.shutdown(); Map gaDemographics = gaDemographicService.getIdentityS(); System.out.println("线程池查询用时" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); long startTime1 = System.currentTimeMillis(); @@ -311,7 +311,7 @@ public class AnalyzeController extends JeecgController highSchoolIntersection = new ArrayList<>(); if (oConvertUtils.isNotEmpty(highSchools)) { - highSchools.parallelStream().forEach(h -> { + highSchools.stream().forEach(h -> { if (oConvertUtils.isNotEmpty(gaDemographics) && oConvertUtils.isNotEmpty(gaDemographics.get(h.getIdentity()))) { if (h.getIdentity().equals(gaDemographics.get(h.getIdentity()))) { //交集 @@ -355,7 +355,7 @@ public class AnalyzeController extends JeecgController primarySchoolIntersection = new ArrayList<>(); if (oConvertUtils.isNotEmpty(primarySchools)) { - primarySchools.parallelStream().forEach(p -> { + primarySchools.stream().forEach(p -> { if (oConvertUtils.isNotEmpty(gaDemographics) && oConvertUtils.isNotEmpty(p) && oConvertUtils.isNotEmpty(gaDemographics.get(p.getIdentity()))) { if (p.getIdentity().equals(gaDemographics.get(p.getIdentity()))) { //交集 @@ -391,8 +391,8 @@ public class AnalyzeController extends JeecgController minorMap = new HashMap<>(); if (oConvertUtils.isNotEmpty(gaDemographicDifference) && oConvertUtils.isNotEmpty(gaHouseholds)) { - gaDemographicDifference.parallelStream().forEach(idCard -> { - if (oConvertUtils.isNotEmpty(idCard) && oConvertUtils.isNotEmpty(gaHouseholds.get(idCard))) { + gaDemographicDifference.stream().forEach(idCard -> { + if (oConvertUtils.isNotEmpty(idCard) && oConvertUtils.isNotEmpty(gaHouseholds.get(idCard)) && IDNumberUtil.checkID(idCard)) { Minor minor = new Minor(); minor.setSchool(Minor.SCHOOL_STATUS_YES); minor.setName(gaHouseholds.get(idCard).getName()); @@ -440,7 +440,7 @@ public class AnalyzeController extends JeecgController 0) { for (SysDepart d : departs) { - intersection.parallelStream().forEach(i -> { + intersection.stream().forEach(i -> { if (oConvertUtils.isNotEmpty(i) && oConvertUtils.isNotEmpty(i.getSchool()) && oConvertUtils.isNotEmpty(d) && oConvertUtils.isNotEmpty(d.getCommonCode())) { if (d.getCommonCode().contains(i.getSchool())) { i.setSysOrgCode(d.getOrgCode()); @@ -452,8 +452,8 @@ public class AnalyzeController extends JeecgController { - if (oConvertUtils.isNotEmpty(i) && oConvertUtils.isNotEmpty(i.getIdentity())) { + intersection.stream().forEach(i -> { + if (oConvertUtils.isNotEmpty(i) && oConvertUtils.isNotEmpty(i.getIdentity()) && IDNumberUtil.checkID(i.getIdentity())) { Minor minor = new Minor(); //身份证号 String idCard = i.getIdentity(); @@ -507,9 +507,9 @@ public class AnalyzeController extends JeecgController 0) { for (SysDepart d : departs) { - difference.parallelStream().forEach(m -> { + difference.stream().forEach(m -> { Minor minor = new Minor(); - if (oConvertUtils.isNotEmpty(m)) { + if (oConvertUtils.isNotEmpty(m) && oConvertUtils.isNotEmpty(m.getIdentity()) && IDNumberUtil.checkID(m.getIdentity())) { if (oConvertUtils.isNotEmpty(d) && oConvertUtils.isNotEmpty(d.getCommonCode()) && oConvertUtils.isNotEmpty(m.getSchool())) { if (d.getCommonCode().contains(m.getSchool()) && oConvertUtils.isNotEmpty(minorMap.get(m.getIdentity()))) { minor.setSysOrgCode(d.getOrgCode()); @@ -692,9 +692,24 @@ public class AnalyzeController extends JeecgController guardians = new HashMap<>(); if (oConvertUtils.isNotEmpty(gaHouseholds)) { + int i=0; for (Map.Entry m : gaHouseholds.entrySet()) { String mapKey = m.getKey(); Family family = m.getValue(); + if (oConvertUtils.isNotEmpty(family)) { + i=i+1; + if (oConvertUtils.isNotEmpty(gaPunishVos) && oConvertUtils.isNotEmpty(gaPunishVos.get(mapKey))) { + family.setCrime(Family.IS_CRIME); + if (oConvertUtils.isNotEmpty(gaPunishVos.get(mapKey).getAjmc())) { + family.setOther(gaPunishVos.get(mapKey).getAjmc()); + } + if (oConvertUtils.isNotEmpty(gaPunishVos.get(mapKey).getSldwmc())) { + family.setReason(gaPunishVos.get(mapKey).getSldwmc()); + } + } else { + family.setCrime(Family.IS_NOT_CRIME); + } + } if (oConvertUtils.isNotEmpty(family) && oConvertUtils.isNotEmpty(family.getHouseholdNum()) && oConvertUtils.isNotEmpty(family.getIdentity())) { String houseNum = family.getHouseholdNum(); List list = new ArrayList<>(); @@ -715,19 +730,6 @@ public class AnalyzeController extends JeecgController - + - - - - - - - + + + + + + +