Commit b99aa68d11a3bbf8572d5570391eebf99a46105a
1 parent
5a47987dfc
Exists in
master
and in
6 other branches
添加字段
Showing 3 changed files with 29 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
b99aa68
... | ... | @@ -35,6 +35,7 @@ |
35 | 35 | import org.apache.commons.lang.math.NumberUtils; |
36 | 36 | import org.springframework.beans.factory.annotation.Autowired; |
37 | 37 | import org.springframework.beans.factory.annotation.Qualifier; |
38 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
38 | 39 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
39 | 40 | import org.springframework.stereotype.Component; |
40 | 41 | |
... | ... | @@ -97,6 +98,9 @@ |
97 | 98 | @Autowired |
98 | 99 | private AntenatalExaminationFacade antenatalExaminationFacade; |
99 | 100 | |
101 | + @Autowired | |
102 | + private MongoTemplate mongoTemplate; | |
103 | + | |
100 | 104 | /** |
101 | 105 | * 增加一条产筛结果记录 |
102 | 106 | * |
... | ... | @@ -552,7 +556,7 @@ |
552 | 556 | if (end > list.size()) { |
553 | 557 | end = list.size(); |
554 | 558 | } |
555 | - listFuture.add(commonThreadPool.submit(new SieveWorker(hospitalId, list.subList(i, end), antenatalExaminationService, patientsService, applyOrderService, organizationService, diagnosisService, basicConfigService))); | |
559 | + listFuture.add(commonThreadPool.submit(new SieveWorker(hospitalId, list.subList(i, end), antenatalExaminationService, patientsService, applyOrderService, organizationService, diagnosisService, basicConfigService, mongoTemplate))); | |
556 | 560 | } |
557 | 561 | for (Future f : listFuture) { |
558 | 562 | try { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult.java
View file @
b99aa68
... | ... | @@ -71,6 +71,16 @@ |
71 | 71 | //新增产前诊断信息 |
72 | 72 | private List<Map<String, String>> dia; |
73 | 73 | |
74 | + private Boolean huaDaPushResult; | |
75 | + | |
76 | + public Boolean getHuaDaPushResult() { | |
77 | + return huaDaPushResult; | |
78 | + } | |
79 | + | |
80 | + public void setHuaDaPushResult(Boolean huaDaPushResult) { | |
81 | + this.huaDaPushResult = huaDaPushResult; | |
82 | + } | |
83 | + | |
74 | 84 | public List<Map<String, String>> getDia() { |
75 | 85 | return dia; |
76 | 86 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/SieveWorker.java
View file @
b99aa68
... | ... | @@ -17,6 +17,9 @@ |
17 | 17 | import org.apache.commons.lang.math.NumberUtils; |
18 | 18 | import org.springframework.beans.factory.annotation.Autowired; |
19 | 19 | import org.springframework.data.domain.Sort; |
20 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
21 | +import org.springframework.data.mongodb.core.query.Criteria; | |
22 | +import org.springframework.data.mongodb.core.query.Query; | |
20 | 23 | |
21 | 24 | import java.util.ArrayList; |
22 | 25 | import java.util.HashMap; |
23 | 26 | |
... | ... | @@ -45,9 +48,11 @@ |
45 | 48 | private DiagnosisService diagnosisService; |
46 | 49 | private BasicConfigService basicConfigService; |
47 | 50 | |
51 | + private MongoTemplate mongoTemplate; | |
52 | + | |
48 | 53 | public SieveWorker(String hospitalId, List<SieveModel> list, AntenatalExaminationService antService, |
49 | 54 | PatientsService patientsService, ApplyOrderService applyOrderService, |
50 | - OrganizationService organizationService, DiagnosisService diagnosisService, BasicConfigService basicConfigService) { | |
55 | + OrganizationService organizationService, DiagnosisService diagnosisService, BasicConfigService basicConfigService, MongoTemplate mongoTemplate) { | |
51 | 56 | this.hospitalId = hospitalId; |
52 | 57 | this.list = list; |
53 | 58 | this.antService = antService; |
... | ... | @@ -56,6 +61,7 @@ |
56 | 61 | this.organizationService = organizationService; |
57 | 62 | this.diagnosisService = diagnosisService; |
58 | 63 | this.basicConfigService = basicConfigService; |
64 | + this.mongoTemplate = mongoTemplate; | |
59 | 65 | } |
60 | 66 | |
61 | 67 | @Override |
... | ... | @@ -153,6 +159,13 @@ |
153 | 159 | } |
154 | 160 | sieveListResult.setDia(mList); |
155 | 161 | |
162 | + boolean huaDaPushResult = false; | |
163 | + List<SieveApplyOrderModel> sieveApplyOrderModels = mongoTemplate.find(Query.query(Criteria.where("parentId").is(sieveModel.getParentId())).with(new Sort(Sort.Direction.DESC, "created")), SieveApplyOrderModel.class); | |
164 | + if (CollectionUtils.isNotEmpty(sieveApplyOrderModels)) { | |
165 | + SieveApplyOrderModel model = sieveApplyOrderModels.get(0); | |
166 | + huaDaPushResult = model.isHuaDaPushResult(); | |
167 | + } | |
168 | + sieveListResult.setHuaDaPushResult(huaDaPushResult); | |
156 | 169 | results.add(sieveListResult); |
157 | 170 | } |
158 | 171 | return results; |