Commit 9f7f3fac976f42bb0ad267fecce45eaefb1774f8
1 parent
7d4e0106f1
Exists in
master
and in
7 other branches
1
Showing 2 changed files with 21 additions and 3 deletions
platform-dal/src/main/java/com/lyms/platform/query/AntExChuQuery.java
View file @
9f7f3fa
... | ... | @@ -5,9 +5,11 @@ |
5 | 5 | import com.lyms.platform.common.dao.operator.MongoCondition; |
6 | 6 | import com.lyms.platform.common.dao.operator.MongoOper; |
7 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
8 | +import org.apache.commons.collections.CollectionUtils; | |
8 | 9 | import org.springframework.data.mongodb.core.query.Criteria; |
9 | 10 | |
10 | 11 | import java.util.Date; |
12 | +import java.util.List; | |
11 | 13 | |
12 | 14 | /** |
13 | 15 | * Created by Administrator on 2016/6/21 0021. |
... | ... | @@ -29,6 +31,17 @@ |
29 | 31 | private Date gteCreated; |
30 | 32 | private String pid; |
31 | 33 | |
34 | + //医院id | |
35 | + private List<String> hospitalList; | |
36 | + | |
37 | + public List<String> getHospitalList() { | |
38 | + return hospitalList; | |
39 | + } | |
40 | + | |
41 | + public void setHospitalList(List<String> hospitalList) { | |
42 | + this.hospitalList = hospitalList; | |
43 | + } | |
44 | + | |
32 | 45 | public Date getGteCreated() { |
33 | 46 | return gteCreated; |
34 | 47 | } |
... | ... | @@ -131,7 +144,9 @@ |
131 | 144 | if (null != pid) { |
132 | 145 | condition = condition.and("pid", pid, MongoOper.IS); |
133 | 146 | } |
134 | - | |
147 | + if(CollectionUtils.isNotEmpty(hospitalList)){ | |
148 | + condition = condition.and("hospitalId", hospitalList, MongoOper.IN); | |
149 | + } | |
135 | 150 | Criteria c = null; |
136 | 151 | if (null != start) { |
137 | 152 | c = Criteria.where("checkTime").gte(start); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
9f7f3fa
... | ... | @@ -1764,7 +1764,9 @@ |
1764 | 1764 | } else { |
1765 | 1765 | AntExChuQuery antExChuQuery1 = new AntExChuQuery(); |
1766 | 1766 | antExChuQuery1.setPid(patients.getPid()); |
1767 | - antExChuQuery1.setHospitalId(hospitalId); | |
1767 | +// antExChuQuery1.setHospitalId(hospitalId); | |
1768 | + antExChuQuery1.setHospitalList(groupsFacade.findGroupHospital(userId,false)); | |
1769 | + | |
1768 | 1770 | antExChuQuery1.setYn(YnEnums.YES.getId()); |
1769 | 1771 | antExChuQuery1.setStart(max); |
1770 | 1772 | List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery1); |
... | ... | @@ -1776,7 +1778,8 @@ |
1776 | 1778 | PatientsQuery patientsQuery1 = new PatientsQuery(); |
1777 | 1779 | patientsQuery1.setYn(YnEnums.YES.getId()); |
1778 | 1780 | patientsQuery1.setPid(patients.getPid()); |
1779 | - patientsQuery1.setHospitalId(hospitalId); | |
1781 | +// patientsQuery1.setHospitalId(hospitalId); | |
1782 | + patientsQuery1.setHospitalList(groupsFacade.findGroupHospital(userId,false)); | |
1780 | 1783 | List<Patients> patientses = patientsService.queryPatient(patientsQuery1); |
1781 | 1784 | |
1782 | 1785 | if (CollectionUtils.isNotEmpty(patientses)) { |