Commit f740c9d4471b186edd8a1e80d19f05bd82bc887f

Authored by yangfei
1 parent e9cab3e4a4

追访

Showing 2 changed files with 16 additions and 7 deletions

platform-dal/src/main/java/com/lyms/platform/query/PostReviewQuery.java View file @ f740c9d
... ... @@ -8,6 +8,7 @@
8 8 import org.springframework.data.mongodb.core.query.Criteria;
9 9  
10 10 import java.util.Date;
  11 +import java.util.List;
11 12  
12 13 /**
13 14 * Created by Administrator on 2016/6/28 0028.
... ... @@ -15,6 +16,7 @@
15 16 public class PostReviewQuery extends BaseQuery implements IConvertToNativeQuery {
16 17 private String id;
17 18 private String parentId;
  19 + private List<String> parentIdList;
18 20 private Integer yn;
19 21 //创建时间
20 22 private Date start;
... ... @@ -29,6 +31,14 @@
29 31  
30 32 private String hospitalId;
31 33  
  34 + public List<String> getParentIdList() {
  35 + return parentIdList;
  36 + }
  37 +
  38 + public void setParentIdList(List<String> parentIdList) {
  39 + this.parentIdList = parentIdList;
  40 + }
  41 +
32 42 public String getHospitalId() {
33 43 return hospitalId;
34 44 }
... ... @@ -118,6 +128,9 @@
118 128 }
119 129 if(null!=hospitalId){
120 130 mongoCondition=mongoCondition.and("hospitalId",hospitalId,MongoOper.IS);
  131 + }
  132 + if (null != parentIdList) {
  133 + mongoCondition = mongoCondition.and("parentId", parentIdList, MongoOper.IN);
121 134 }
122 135 boolean isAddStart = Boolean.FALSE;
123 136 Criteria c = null;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ f740c9d
... ... @@ -1707,8 +1707,8 @@
1707 1707  
1708 1708 PatientsQuery patientsQuery = new PatientsQuery();
1709 1709 patientsQuery.setSource(patients.getId());
1710   -
1711 1710 patientsQuery.setBuildType(1);
  1711 + System.out.println("查询条件:"+patientsQuery.convertToQuery().convertToMongoQuery());
1712 1712 List<Patients> patients1 = patientsService.queryPatient(patientsQuery);
1713 1713 if (CollectionUtils.isNotEmpty(patients1)) {
1714 1714 for (Patients ps : patients1) {
... ... @@ -1797,11 +1797,7 @@
1797 1797 } else {
1798 1798 PostReviewQuery postReviewQuery = new PostReviewQuery();
1799 1799 postReviewQuery.setYn(YnEnums.YES.getId());
1800   - if (patients2 != null) {
1801   - postReviewQuery.setParentId(patients2.getId());
1802   - } else {
1803   - postReviewQuery.setParentId(patientId);
1804   - }
  1800 + postReviewQuery.setParentIdList(patientIds);
1805 1801 //产后复查记录
1806 1802 List<PostReviewModel> reviewModels = postReviewService.findWithList(postReviewQuery);
1807 1803 if (CollectionUtils.isNotEmpty(reviewModels)) {
... ... @@ -2345,7 +2341,7 @@
2345 2341 patientsQuery.setEnable("2");
2346 2342 }
2347 2343 Patients patients = null;
2348   - // System.out.println("复诊时查询当前医院是否有隐藏建档条件:" + patientsQuery.convertToQuery().convertToMongoQuery());
  2344 + System.out.println("复诊时查询当前医院是否有隐藏建档条件:" + patientsQuery.convertToQuery().convertToMongoQuery());
2349 2345 List<Patients> list = patientsService.queryPatient1(patientsQuery, "modified");
2350 2346 if (CollectionUtils.isNotEmpty(list)) {
2351 2347 return list.get(0);