Commit cd1fbba20aec4274b5abe6612d3704dde1374877
1 parent
70beb2c741
Exists in
master
and in
6 other branches
服务同步
Showing 2 changed files with 4 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
cd1fbba
... | ... | @@ -155,7 +155,7 @@ |
155 | 155 | System.out.println("一共需要处理数据量:"+patientCount); |
156 | 156 | |
157 | 157 | //预计开启10个线程处理,计算每个线程需要处理的数据量 |
158 | - int batchSize = patientCount/10; | |
158 | + int batchSize = patientCount/5; | |
159 | 159 | int end = 0; |
160 | 160 | List<Future> listFuture = new ArrayList<>(); |
161 | 161 | for (int i = 0; i < patientCount; i += batchSize) { |
... | ... | @@ -163,6 +163,7 @@ |
163 | 163 | if (end > patientCount) { |
164 | 164 | end = patientCount+1; |
165 | 165 | } |
166 | + System.out.println("线程处理数据量:"+i+"--至--"+end); | |
166 | 167 | listFuture.add(commonThreadPool.submit(new BuildSerToPatientSerWorker(i, end,patientsService,patientServiceService,isSkip,isZjzx,batchSize,patientCount))); |
167 | 168 | } |
168 | 169 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/BuildSerToPatientSerWorker.java
View file @
cd1fbba
... | ... | @@ -39,8 +39,8 @@ |
39 | 39 | this.patientServiceService = patientServiceService; |
40 | 40 | this.isSkip = isSkip; |
41 | 41 | this.isZjzx = isZjzx; |
42 | - if (batchSize >= 100) { | |
43 | - this.batchSize = 100; | |
42 | + if (batchSize >= 1000) { | |
43 | + this.batchSize = 1000; | |
44 | 44 | } else { |
45 | 45 | this.batchSize = batchSize; |
46 | 46 | } |