Commit 5b487b996abd992d4827a0c8d376f3de5d5f3df3
1 parent
049782541e
Exists in
master
and in
1 other branch
update
Showing 1 changed file with 3 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
5b487b9
| ... | ... | @@ -33,8 +33,8 @@ |
| 33 | 33 | @Component |
| 34 | 34 | public class RiskReportFacade { |
| 35 | 35 | |
| 36 | + private static ExecutorService pool = Executors.newFixedThreadPool(4); | |
| 36 | 37 | |
| 37 | - | |
| 38 | 38 | @Autowired |
| 39 | 39 | private PatientsService patientsService; |
| 40 | 40 | |
| ... | ... | @@ -109,7 +109,7 @@ |
| 109 | 109 | List<BasicConfig> riskLevelConfig = basicConfigService.queryBasicConfig(basicConfigQuery); |
| 110 | 110 | if (CollectionUtils.isNotEmpty(riskLevelConfig)) |
| 111 | 111 | { |
| 112 | - ExecutorService pool = Executors.newFixedThreadPool(riskLevelConfig.size()); | |
| 112 | + | |
| 113 | 113 | for(BasicConfig levelConfig : riskLevelConfig) |
| 114 | 114 | { |
| 115 | 115 | if ("e637b361-99cf-41eb-84f2-f0dab596e928".equals(levelConfig.getId())) |
| ... | ... | @@ -123,8 +123,7 @@ |
| 123 | 123 | Future f = pool.submit(c); |
| 124 | 124 | futures.add(f); |
| 125 | 125 | } |
| 126 | - // 关闭线程池 | |
| 127 | - pool.shutdown(); | |
| 126 | + | |
| 128 | 127 | } |
| 129 | 128 | |
| 130 | 129 | if (CollectionUtils.isNotEmpty(futures)) |