Commit 5e6fbf40552dc0d23da6bac0d79ac4630ad794b8
1 parent
e98bd96904
Exists in
master
and in
6 other branches
2
Showing 4 changed files with 80 additions and 5 deletions
- platform-dal/src/main/java/com/lyms/platform/query/MatDeliverFollowQuery.java
- 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/MatdeliverFollowRequest.java
platform-dal/src/main/java/com/lyms/platform/query/MatDeliverFollowQuery.java
View file @
5e6fbf4
... | ... | @@ -82,8 +82,12 @@ |
82 | 82 | /** |
83 | 83 | * 访视日期 |
84 | 84 | */ |
85 | - private Date visitDate; | |
85 | + private Date visitStartDate; | |
86 | 86 | /** |
87 | + * 访视日期 | |
88 | + */ | |
89 | + private Date visitEndDate; | |
90 | + /** | |
87 | 91 | * 访视医生 |
88 | 92 | */ |
89 | 93 | private String visitDoctor; |
... | ... | @@ -209,6 +213,13 @@ |
209 | 213 | if (StringUtils.isNotBlank(hospitalId)) { |
210 | 214 | condition = condition.and("hospitalId",hospitalId , MongoOper.IS); |
211 | 215 | } |
216 | + | |
217 | + if (visitStartDate!=null) { | |
218 | + condition = condition.and("visitDate",visitStartDate , MongoOper.GTE); | |
219 | + } | |
220 | + if (visitEndDate!=null) { | |
221 | + condition = condition.and("visitDate",visitEndDate , MongoOper.LTE); | |
222 | + } | |
212 | 223 | if (StringUtils.isNotBlank(deliverId)) { |
213 | 224 | condition = condition.and("deliverId",deliverId , MongoOper.IS); |
214 | 225 | } |
215 | 226 | |
... | ... | @@ -381,12 +392,20 @@ |
381 | 392 | this.visitAffirm = visitAffirm; |
382 | 393 | } |
383 | 394 | |
384 | - public Date getVisitDate() { | |
385 | - return visitDate; | |
395 | + public Date getVisitStartDate() { | |
396 | + return visitStartDate; | |
386 | 397 | } |
387 | 398 | |
388 | - public void setVisitDate(Date visitDate) { | |
389 | - this.visitDate = visitDate; | |
399 | + public void setVisitStartDate(Date visitStartDate) { | |
400 | + this.visitStartDate = visitStartDate; | |
401 | + } | |
402 | + | |
403 | + public Date getVisitEndDate() { | |
404 | + return visitEndDate; | |
405 | + } | |
406 | + | |
407 | + public void setVisitEndDate(Date visitEndDate) { | |
408 | + this.visitEndDate = visitEndDate; | |
390 | 409 | } |
391 | 410 | |
392 | 411 | public String getVisitDoctor() { |
platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java
View file @
5e6fbf4
... | ... | @@ -18,6 +18,7 @@ |
18 | 18 | */ |
19 | 19 | public class MatDeliverQuery extends BaseQuery implements IConvertToNativeQuery { |
20 | 20 | private String id; |
21 | + private List<String> ids; | |
21 | 22 | private String parentId; |
22 | 23 | private List<String> parentIdList; |
23 | 24 | private String deliveryMode; |
... | ... | @@ -79,6 +80,14 @@ |
79 | 80 | */ |
80 | 81 | private String matFollowId; |
81 | 82 | |
83 | + public List<String> getIds() { | |
84 | + return ids; | |
85 | + } | |
86 | + | |
87 | + public void setIds(List<String> ids) { | |
88 | + this.ids = ids; | |
89 | + } | |
90 | + | |
82 | 91 | public String getFsHospital() { |
83 | 92 | return fsHospital; |
84 | 93 | } |
... | ... | @@ -228,6 +237,10 @@ |
228 | 237 | MongoCondition condition = MongoCondition.newInstance(); |
229 | 238 | if (null != id) { |
230 | 239 | condition = condition.and("id", id, MongoOper.IS); |
240 | + } | |
241 | + | |
242 | + if (CollectionUtils.isNotEmpty(ids)) { | |
243 | + condition = condition.and("id", ids, MongoOper.IN); | |
231 | 244 | } |
232 | 245 | if (null != pid) { |
233 | 246 | condition = condition.and("pid", pid, MongoOper.IS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
5e6fbf4
... | ... | @@ -56,6 +56,8 @@ |
56 | 56 | @Autowired |
57 | 57 | private MatDeliverService matDeliverService; |
58 | 58 | @Autowired |
59 | + private MatDeliverFollowService matDeliverFollowService; | |
60 | + @Autowired | |
59 | 61 | private AntenatalExaminationFacade antenatalExaminationFacade; |
60 | 62 | @Autowired |
61 | 63 | private BabyService babyService; |
... | ... | @@ -1479,6 +1481,20 @@ |
1479 | 1481 | } |
1480 | 1482 | |
1481 | 1483 | MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); |
1484 | + | |
1485 | + if(matdeliverFollowRequest.getFollowStarDate()!=null){ | |
1486 | + MatDeliverFollowQuery matDeliverFollowQuery = new MatDeliverFollowQuery(); | |
1487 | + matDeliverFollowQuery.setVisitStartDate(matdeliverFollowRequest.getFollowStarDate()); | |
1488 | + matDeliverFollowQuery.setVisitEndDate(matdeliverFollowRequest.getFollowEndDate()); | |
1489 | + List<MatdeliverFollowModel> matdeliverFollowModels = matDeliverFollowService.query(matDeliverFollowQuery); | |
1490 | + List<String> mfIds = new ArrayList<>(); | |
1491 | + for(MatdeliverFollowModel md:matdeliverFollowModels){ | |
1492 | + mfIds.add(md.getDeliverId()); | |
1493 | + } | |
1494 | + matDeliverQuery.setIds(mfIds); | |
1495 | + } | |
1496 | + | |
1497 | + | |
1482 | 1498 | |
1483 | 1499 | //查询号不为空,则查询孕妇id |
1484 | 1500 | if (StringUtils.isNotEmpty(matdeliverFollowRequest.getQueryNo())//查询号不为空 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/MatdeliverFollowRequest.java
View file @
5e6fbf4
1 | 1 | package com.lyms.platform.operate.web.request; |
2 | 2 | |
3 | +import java.util.Date; | |
4 | + | |
3 | 5 | /** |
4 | 6 | * @auther yangfei |
5 | 7 | * @createTime 2017年11月21日 17时58分 |
6 | 8 | |
... | ... | @@ -18,7 +20,16 @@ |
18 | 20 | * 访视阶段 1-访视期内、2-超出访视期 |
19 | 21 | */ |
20 | 22 | private Integer followStage; |
23 | + | |
21 | 24 | /** |
25 | + * 访视时间开始 | |
26 | + */ | |
27 | + private Date followStarDate; | |
28 | + /** | |
29 | + * 访视时间结束 | |
30 | + */ | |
31 | + private Date followEndDate; | |
32 | + /** | |
22 | 33 | * @discription 是否区域 |
23 | 34 | */ |
24 | 35 | private String isArea; |
... | ... | @@ -82,6 +93,22 @@ |
82 | 93 | * 是否分页(导出不分页,普通分页) |
83 | 94 | */ |
84 | 95 | private String need; |
96 | + | |
97 | + public Date getFollowStarDate() { | |
98 | + return followStarDate; | |
99 | + } | |
100 | + | |
101 | + public void setFollowStarDate(Date followStarDate) { | |
102 | + this.followStarDate = followStarDate; | |
103 | + } | |
104 | + | |
105 | + public Date getFollowEndDate() { | |
106 | + return followEndDate; | |
107 | + } | |
108 | + | |
109 | + public void setFollowEndDate(Date followEndDate) { | |
110 | + this.followEndDate = followEndDate; | |
111 | + } | |
85 | 112 | |
86 | 113 | public Integer getFollowStage() { |
87 | 114 | return followStage; |