Commit 1b21d6b3772d5e51d2b8a50f821a941f2a789195
1 parent
b33ba9f858
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 9 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
1b21d6b
... | ... | @@ -33,6 +33,7 @@ |
33 | 33 | import org.apache.commons.lang.math.NumberUtils; |
34 | 34 | import org.springframework.beans.factory.annotation.Autowired; |
35 | 35 | import org.springframework.beans.factory.annotation.Qualifier; |
36 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
36 | 37 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
37 | 38 | import org.springframework.stereotype.Component; |
38 | 39 | |
... | ... | @@ -95,6 +96,8 @@ |
95 | 96 | @Autowired |
96 | 97 | private AntenatalExaminationFacade antenatalExaminationFacade; |
97 | 98 | |
99 | + @Autowired | |
100 | + private MongoTemplate mongoTemplate; | |
98 | 101 | |
99 | 102 | /** |
100 | 103 | * 增加一条产筛结果记录 |
... | ... | @@ -135,7 +138,6 @@ |
135 | 138 | * add or update SieveModel |
136 | 139 | * and addTrackDownInfo() |
137 | 140 | * |
138 | - * | |
139 | 141 | * @param sieveAddRequest |
140 | 142 | * @param userId |
141 | 143 | * @param sieveResultModel |
... | ... | @@ -551,7 +553,7 @@ |
551 | 553 | if (end > list.size()) { |
552 | 554 | end = list.size(); |
553 | 555 | } |
554 | - listFuture.add(commonThreadPool.submit(new SieveWorker(hospitalId, list.subList(i, end), antenatalExaminationService, patientsService, applyOrderService, organizationService, diagnosisService, basicConfigService, usersService, sieveService))); | |
556 | + listFuture.add(commonThreadPool.submit(new SieveWorker(hospitalId, list.subList(i, end), antenatalExaminationService, patientsService, applyOrderService, organizationService, diagnosisService, basicConfigService, usersService, sieveService, mongoTemplate))); | |
555 | 557 | } |
556 | 558 | for (Future f : listFuture) { |
557 | 559 | try { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/SieveWorker.java
View file @
1b21d6b
... | ... | @@ -16,6 +16,9 @@ |
16 | 16 | import org.apache.commons.lang.math.NumberUtils; |
17 | 17 | import org.springframework.beans.factory.annotation.Autowired; |
18 | 18 | import org.springframework.data.domain.Sort; |
19 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
20 | +import org.springframework.data.mongodb.core.query.Criteria; | |
21 | +import org.springframework.data.mongodb.core.query.Query; | |
19 | 22 | |
20 | 23 | import java.util.*; |
21 | 24 | import java.util.concurrent.Callable; |
22 | 25 | |
... | ... | @@ -44,11 +47,11 @@ |
44 | 47 | private SieveService sieveService; |
45 | 48 | |
46 | 49 | private MongoTemplate mongoTemplate; |
50 | + private UsersService usersService; | |
47 | 51 | |
48 | 52 | public SieveWorker(String hospitalId, List<SieveModel> list, AntenatalExaminationService antService, |
49 | 53 | PatientsService patientsService, ApplyOrderService applyOrderService, |
50 | - OrganizationService organizationService, DiagnosisService diagnosisService, BasicConfigService basicConfigService, UsersService usersService, SieveService sieveService) { | |
51 | - OrganizationService organizationService, DiagnosisService diagnosisService, BasicConfigService basicConfigService, MongoTemplate mongoTemplate) { | |
54 | + OrganizationService organizationService, DiagnosisService diagnosisService, BasicConfigService basicConfigService, UsersService usersService, SieveService sieveService, MongoTemplate mongoTemplate) { | |
52 | 55 | this.hospitalId = hospitalId; |
53 | 56 | this.list = list; |
54 | 57 | this.antService = antService; |