Commit cb71a275ee57cc1312d6522fbee9966904889f40

Authored by lifengge
1 parent e0f80c90

提交

juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/AnalyzeController.java
@@ -90,13 +90,13 @@ public class AnalyzeController extends JeecgController<GaDemographic, IGaDemogra @@ -90,13 +90,13 @@ public class AnalyzeController extends JeecgController<GaDemographic, IGaDemogra
90 System.out.println("未成年人数据批量新增总条数" + resultMinor.size()); 90 System.out.println("未成年人数据批量新增总条数" + resultMinor.size());
91 System.out.println("学籍信息数据批量新增总条数" + resultSchools.size()); 91 System.out.println("学籍信息数据批量新增总条数" + resultSchools.size());
92 long startTime2 = System.currentTimeMillis(); 92 long startTime2 = System.currentTimeMillis();
93 -// minorService.insertBatch(resultMinor,departs); 93 + minorService.insertBatch(resultMinor,departs);
94 System.out.println("未成年人数据批量新增所用时间" + (System.currentTimeMillis() - startTime2) / 1000 + "秒"); 94 System.out.println("未成年人数据批量新增所用时间" + (System.currentTimeMillis() - startTime2) / 1000 + "秒");
95 long startTime1 = System.currentTimeMillis(); 95 long startTime1 = System.currentTimeMillis();
96 -// familyService.insertBatch(resultFamily,departs); 96 + familyService.insertBatch(resultFamily,departs);
97 System.out.println("家庭成员数据批量新增所用时间" + (System.currentTimeMillis() - startTime1) / 1000 + "秒"); 97 System.out.println("家庭成员数据批量新增所用时间" + (System.currentTimeMillis() - startTime1) / 1000 + "秒");
98 long startTime3 = System.currentTimeMillis(); 98 long startTime3 = System.currentTimeMillis();
99 -// schoolService.insertBatch(resultSchools,); 99 + schoolService.insertBatch(resultSchools,departs);
100 System.out.println("学籍信息入库时间" + (System.currentTimeMillis() - startTime3) / 1000 + "秒"); 100 System.out.println("学籍信息入库时间" + (System.currentTimeMillis() - startTime3) / 1000 + "秒");
101 long startTime4 = System.currentTimeMillis(); 101 long startTime4 = System.currentTimeMillis();
102 getSourceData(); 102 getSourceData();
@@ -525,10 +525,10 @@ public class AnalyzeController extends JeecgController<GaDemographic, IGaDemogra @@ -525,10 +525,10 @@ public class AnalyzeController extends JeecgController<GaDemographic, IGaDemogra
525 minor.setAddress(m.getAddress()); 525 minor.setAddress(m.getAddress());
526 } 526 }
527 if (oConvertUtils.isNotEmpty(m.getSchool())) { 527 if (oConvertUtils.isNotEmpty(m.getSchool())) {
528 - minor.setAddress(m.getSchool()); 528 + minor.setSchoolName(m.getSchool());
529 } 529 }
530 if (oConvertUtils.isNotEmpty(m.getAdmissionDate())) { 530 if (oConvertUtils.isNotEmpty(m.getAdmissionDate())) {
531 - minor.setAddress(m.getAdmissionDate()); 531 + minor.setStartYear(m.getAdmissionDate());
532 } 532 }
533 minor.setIdentity(m.getIdentity()); 533 minor.setIdentity(m.getIdentity());
534 minor.setCreateTime(creatTime); 534 minor.setCreateTime(creatTime);
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/FamilyServiceImpl.java
@@ -75,7 +75,7 @@ public class FamilyServiceImpl extends ServiceImpl<FamilyMapper, Family> impleme @@ -75,7 +75,7 @@ public class FamilyServiceImpl extends ServiceImpl<FamilyMapper, Family> impleme
75 75
76 public void updateStudentWithThreads(List<Family> list) { 76 public void updateStudentWithThreads(List<Family> list) {
77 // 线程数量 77 // 线程数量
78 - final Integer threadCount = 15; 78 + final Integer threadCount = 1;
79 79
80 //每个线程处理的数据量 80 //每个线程处理的数据量
81 final Integer dataPartionLength = (list.size() + threadCount - 1) / threadCount; 81 final Integer dataPartionLength = (list.size() + threadCount - 1) / threadCount;
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/GaHouseholdServiceImpl.java
@@ -31,7 +31,10 @@ public class GaHouseholdServiceImpl extends ServiceImpl&lt;GaHouseholdMapper, GaHou @@ -31,7 +31,10 @@ public class GaHouseholdServiceImpl extends ServiceImpl&lt;GaHouseholdMapper, GaHou
31 public Map<String, Family> getGaHouseholds(Map<String, String> gaDemographics) { 31 public Map<String, Family> getGaHouseholds(Map<String, String> gaDemographics) {
32 Map<String, Family> familyMap = new HashMap<>(); 32 Map<String, Family> familyMap = new HashMap<>();
33 try { 33 try {
  34 + long startTime = System.currentTimeMillis();
34 List<Family> families = gaHouseholdMapper.getGaHouseholds(); 35 List<Family> families = gaHouseholdMapper.getGaHouseholds();
  36 + System.out.println("数据查询时间" + (System.currentTimeMillis() - startTime) / 1000 + "秒");
  37 + long startTime2 = System.currentTimeMillis();
35 if (oConvertUtils.isNotEmpty(families)) { 38 if (oConvertUtils.isNotEmpty(families)) {
36 families.parallelStream().forEach(g -> { 39 families.parallelStream().forEach(g -> {
37 if (oConvertUtils.isNotEmpty(g) && oConvertUtils.isNotEmpty(g.getIdentity())) { 40 if (oConvertUtils.isNotEmpty(g) && oConvertUtils.isNotEmpty(g.getIdentity())) {
@@ -39,6 +42,7 @@ public class GaHouseholdServiceImpl extends ServiceImpl&lt;GaHouseholdMapper, GaHou @@ -39,6 +42,7 @@ public class GaHouseholdServiceImpl extends ServiceImpl&lt;GaHouseholdMapper, GaHou
39 } 42 }
40 }); 43 });
41 } 44 }
  45 + System.out.println("数据处理时间" + (System.currentTimeMillis() - startTime2) / 1000 + "秒");
42 } catch (Exception e) { 46 } catch (Exception e) {
43 e.printStackTrace(); 47 e.printStackTrace();
44 } 48 }
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/MinorServiceImpl.java
@@ -167,7 +167,7 @@ public class MinorServiceImpl extends ServiceImpl&lt;MinorMapper, Minor&gt; implements @@ -167,7 +167,7 @@ public class MinorServiceImpl extends ServiceImpl&lt;MinorMapper, Minor&gt; implements
167 167
168 public void updateStudentWithThreads(List<Minor> list) { 168 public void updateStudentWithThreads(List<Minor> list) {
169 // 线程数量 169 // 线程数量
170 - final Integer threadCount = 15; 170 + final Integer threadCount = 1;
171 171
172 //每个线程处理的数据量 172 //每个线程处理的数据量
173 final Integer dataPartionLength = (list.size() + threadCount - 1) / threadCount; 173 final Integer dataPartionLength = (list.size() + threadCount - 1) / threadCount;
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/MrSchoolServiceImpl.java
@@ -90,7 +90,7 @@ public class MrSchoolServiceImpl extends ServiceImpl&lt;MrSchoolMapper, MrSchool&gt; i @@ -90,7 +90,7 @@ public class MrSchoolServiceImpl extends ServiceImpl&lt;MrSchoolMapper, MrSchool&gt; i
90 90
91 public void updateStudentWithThreads(List<MrSchool> list) { 91 public void updateStudentWithThreads(List<MrSchool> list) {
92 // 线程数量 92 // 线程数量
93 - final Integer threadCount = 15; 93 + final Integer threadCount = 1;
94 94
95 //每个线程处理的数据量 95 //每个线程处理的数据量
96 final Integer dataPartionLength = (list.size() + threadCount - 1) / threadCount; 96 final Integer dataPartionLength = (list.size() + threadCount - 1) / threadCount;