Commit 3043f59e1ee39a54a90e895dd81677c6ca1a26c5
1 parent
8e3fa117e4
Exists in
master
and in
6 other branches
威海产后观察
Showing 5 changed files with 105 additions and 2 deletions
- platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ChildbirthManagerQueryModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/MaterDeliverWorker.java
platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java
View file @
3043f59
... | ... | @@ -43,6 +43,16 @@ |
43 | 43 | private Date modifiedStart; |
44 | 44 | private Date modifiedEnd; |
45 | 45 | |
46 | + private List<String> cunZai; | |
47 | + | |
48 | + public List<String> getCunZai() { | |
49 | + return cunZai; | |
50 | + } | |
51 | + | |
52 | + public void setCunZai(List<String> cunZai) { | |
53 | + this.cunZai = cunZai; | |
54 | + } | |
55 | + | |
46 | 56 | public Date getModifiedStart() { |
47 | 57 | return modifiedStart; |
48 | 58 | } |
... | ... | @@ -140,6 +150,10 @@ |
140 | 150 | |
141 | 151 | if (CollectionUtils.isNotEmpty(ids)) { |
142 | 152 | condition = condition.and("id", ids, MongoOper.IN); |
153 | + } | |
154 | + | |
155 | + if (CollectionUtils.isNotEmpty(cunZai)) { | |
156 | + condition = condition.and("id", cunZai, MongoOper.NIN); | |
143 | 157 | } |
144 | 158 | |
145 | 159 | if (CollectionUtils.isNotEmpty(pregnancyOuts)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
3043f59
... | ... | @@ -129,6 +129,12 @@ |
129 | 129 | private PostVisitHospitalService postVisitHospitalService; |
130 | 130 | |
131 | 131 | @Autowired |
132 | + private PostpartumRecordsService postpartumRecordsService; | |
133 | + | |
134 | + @Autowired | |
135 | + private RecordsService recordsService; | |
136 | + | |
137 | + @Autowired | |
132 | 138 | private BookbuildingFacade bookbuildingFacade; |
133 | 139 | |
134 | 140 | private static Map<Integer, String> ONE_ENUMS = new HashMap<>(); |
... | ... | @@ -2126,6 +2132,35 @@ |
2126 | 2132 | matDeliverQuery.setParentIdList(parentIdList); |
2127 | 2133 | } |
2128 | 2134 | |
2135 | + /**********增加产后观察,观察状态条件查询**********/ | |
2136 | + if(StringUtils.isNotEmpty(childbirthManagerRequest.getGcStatus())){ | |
2137 | + if("0".equals(childbirthManagerRequest.getGcStatus())){//正在观察的产妇,填写完分娩记录默认为正在观察 | |
2138 | + PostpartumRecordsQuery prQuery = new PostpartumRecordsQuery(); | |
2139 | + prQuery.setGcStatus("1"); | |
2140 | + prQuery.setIsDelete("1"); | |
2141 | + List<PostpartumRecords> prList = postpartumRecordsService.getPostpartumRecordsQuery(prQuery); | |
2142 | + if(CollectionUtils.isNotEmpty(prList)){ | |
2143 | + List<String> sList = new ArrayList<String>(); | |
2144 | + for(PostpartumRecords p : prList){ | |
2145 | + sList.add(p.getMaternalDeliverId()); | |
2146 | + } | |
2147 | + matDeliverQuery.setCunZai(sList); | |
2148 | + } | |
2149 | + }else{ | |
2150 | + PostpartumRecordsQuery prQuery = new PostpartumRecordsQuery(); | |
2151 | + prQuery.setGcStatus("1"); | |
2152 | + prQuery.setIsDelete("1"); | |
2153 | + List<PostpartumRecords> prList = postpartumRecordsService.getPostpartumRecordsQuery(prQuery); | |
2154 | + if(CollectionUtils.isNotEmpty(prList)){ | |
2155 | + List<String> sList = new ArrayList<String>(); | |
2156 | + for(PostpartumRecords p : prList){ | |
2157 | + sList.add(p.getMaternalDeliverId()); | |
2158 | + } | |
2159 | + matDeliverQuery.setIds(sList); | |
2160 | + } | |
2161 | + } | |
2162 | + } | |
2163 | + /**********增加完毕***********/ | |
2129 | 2164 | |
2130 | 2165 | List<MaternalDeliverModel> maternalDeliverModelList; |
2131 | 2166 | if (!childbirthManagerRequest.isExcel() && (childbirthManagerRequest.getHloseBloodType() != null |
... | ... | @@ -2158,7 +2193,7 @@ |
2158 | 2193 | List<MaternalDeliverModel> mlist = maternalDeliverModelList.subList(i, end); |
2159 | 2194 | Callable c = new MaterDeliverWorker(organizationService, usersService, |
2160 | 2195 | babyService, basicConfigService, childbirthManagerRequest.getInitQuery(), |
2161 | - mlist, patientsMap); | |
2196 | + mlist, patientsMap,postpartumRecordsService,recordsService); | |
2162 | 2197 | Future f = commonThreadPool.submit(c); |
2163 | 2198 | if (f != null) |
2164 | 2199 | { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java
View file @
3043f59
... | ... | @@ -168,6 +168,16 @@ |
168 | 168 | // 1 <2500g、2 ≥4000g、3 ≥2500g与<4000g之间 |
169 | 169 | private Integer weight; |
170 | 170 | |
171 | + private String gcStatus;//观察状态(0:正在观察;1:观察完成) | |
172 | + | |
173 | + public String getGcStatus() { | |
174 | + return gcStatus; | |
175 | + } | |
176 | + | |
177 | + public void setGcStatus(String gcStatus) { | |
178 | + this.gcStatus = gcStatus; | |
179 | + } | |
180 | + | |
171 | 181 | public Integer getWeight() { |
172 | 182 | return weight; |
173 | 183 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ChildbirthManagerQueryModel.java
View file @
3043f59
... | ... | @@ -425,6 +425,25 @@ |
425 | 425 | private String zypbfm;//专业陪伴分娩(0:未选择;1:已选择) |
426 | 426 | private String bhnum;//住院号 |
427 | 427 | |
428 | + private String gcStatus;//观察状态(0:正在观察;1:观察完成) | |
429 | + private String recordsNum;//记录条数 | |
430 | + | |
431 | + public String getGcStatus() { | |
432 | + return gcStatus; | |
433 | + } | |
434 | + | |
435 | + public void setGcStatus(String gcStatus) { | |
436 | + this.gcStatus = gcStatus; | |
437 | + } | |
438 | + | |
439 | + public String getRecordsNum() { | |
440 | + return recordsNum; | |
441 | + } | |
442 | + | |
443 | + public void setRecordsNum(String recordsNum) { | |
444 | + this.recordsNum = recordsNum; | |
445 | + } | |
446 | + | |
428 | 447 | public String getBhnum() { |
429 | 448 | return bhnum; |
430 | 449 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/MaterDeliverWorker.java
View file @
3043f59
... | ... | @@ -15,6 +15,8 @@ |
15 | 15 | import com.lyms.platform.pojo.*; |
16 | 16 | import com.lyms.platform.query.AntExRecordQuery; |
17 | 17 | import com.lyms.platform.query.BabyModelQuery; |
18 | +import com.lyms.platform.query.PostpartumRecordsQuery; | |
19 | +import com.lyms.platform.query.RecordsQuery; | |
18 | 20 | import org.apache.commons.collections.CollectionUtils; |
19 | 21 | import org.apache.commons.collections.MapUtils; |
20 | 22 | import org.apache.commons.lang.*; |
21 | 23 | |
... | ... | @@ -43,10 +45,13 @@ |
43 | 45 | private String initQuery; |
44 | 46 | private List<MaternalDeliverModel> maternalDeliverModelList; |
45 | 47 | private Map<String, Patients> patientsMap; |
48 | + private PostpartumRecordsService postpartumRecordsService; | |
49 | + private RecordsService recordsService; | |
46 | 50 | |
47 | 51 | public MaterDeliverWorker(OrganizationService organizationService,UsersService usersService, |
48 | 52 | BabyService babyService,BasicConfigService basicConfigService,String initQuery, |
49 | - List<MaternalDeliverModel> maternalDeliverModelList,Map<String, Patients> patientsMap) { | |
53 | + List<MaternalDeliverModel> maternalDeliverModelList,Map<String, Patients> patientsMap, | |
54 | + PostpartumRecordsService postpartumRecordsService,RecordsService recordsService) { | |
50 | 55 | this.maternalDeliverModelList = maternalDeliverModelList; |
51 | 56 | this.patientsMap = patientsMap; |
52 | 57 | this.organizationService = organizationService; |
... | ... | @@ -54,6 +59,8 @@ |
54 | 59 | this.babyService = babyService; |
55 | 60 | this.initQuery = initQuery; |
56 | 61 | this.basicConfigService = basicConfigService; |
62 | + this.postpartumRecordsService = postpartumRecordsService; | |
63 | + this.recordsService = recordsService; | |
57 | 64 | } |
58 | 65 | |
59 | 66 | @Override |
... | ... | @@ -501,6 +508,24 @@ |
501 | 508 | childbirthManagerQueryModel.setDueCount(maternalDeliverModel.getDueCount());//产次 |
502 | 509 | childbirthManagerQueryModel.setMyzd(maternalDeliverModel.getMyzd());//母婴阻断 |
503 | 510 | childbirthManagerQueryModel.setBhnum(maternalDeliverModel.getBhNum());//住院号 |
511 | + | |
512 | + PostpartumRecordsQuery prQuery = new PostpartumRecordsQuery(); | |
513 | + prQuery.setParentId(patients.getId()); | |
514 | + prQuery.setIsDelete("1"); | |
515 | + List<PostpartumRecords> prList = postpartumRecordsService.getPostpartumRecordsQuery(prQuery); | |
516 | + if(CollectionUtils.isNotEmpty(prList)){ | |
517 | + childbirthManagerQueryModel.setGcStatus(prList.get(0).getGcStatus()); | |
518 | + RecordsQuery rQuery = new RecordsQuery(); | |
519 | + rQuery.setPostId(prList.get(0).getId()); | |
520 | + rQuery.setIsDelete("1"); | |
521 | + List<Records> rList = recordsService.getRecordsListQuery(rQuery); | |
522 | + if(CollectionUtils.isNotEmpty(rList)){ | |
523 | + childbirthManagerQueryModel.setRecordsNum(String.valueOf(rList.size())); | |
524 | + } | |
525 | + }else{ | |
526 | + childbirthManagerQueryModel.setGcStatus("0"); | |
527 | + childbirthManagerQueryModel.setRecordsNum("0"); | |
528 | + } | |
504 | 529 | |
505 | 530 | childbirthManagerQueryModelList.add(childbirthManagerQueryModel); |
506 | 531 |