Commit 8badb0b6bfde207ff366b227f36a70d371ef9e6a

Authored by hujiaqi

Merge remote-tracking branch 'origin/master'

Showing 3 changed files

platform-dal/src/main/java/com/lyms/platform/query/AntExChuQuery.java View file @ 8badb0b
... ... @@ -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 @ 8badb0b
... ... @@ -961,7 +961,9 @@
961 961 Date date = DateUtil.addWeek(patients.getLastMenses(), 42);
962 962  
963 963 Date currentDate = DateUtil.formatDate(new Date());
964   - if (date.getTime() <= currentDate.getTime() || patients.getBuildType() == 2) {
  964 +
  965 +
  966 + if ((date.getTime() <= currentDate.getTime() || patients.getBuildType() == 2)||patients.getType()==3&&patients.getFmDate()!=null) {
965 967 //建档记录
966 968 if (null != patients.getHospitalId()) {
967 969 organization = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId()));
... ... @@ -1764,7 +1766,9 @@
1764 1766 } else {
1765 1767 AntExChuQuery antExChuQuery1 = new AntExChuQuery();
1766 1768 antExChuQuery1.setPid(patients.getPid());
1767   - antExChuQuery1.setHospitalId(hospitalId);
  1769 +// antExChuQuery1.setHospitalId(hospitalId);
  1770 + antExChuQuery1.setHospitalList(groupsFacade.findGroupHospital(userId,false));
  1771 +
1768 1772 antExChuQuery1.setYn(YnEnums.YES.getId());
1769 1773 antExChuQuery1.setStart(max);
1770 1774 List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery1);
... ... @@ -1776,7 +1780,8 @@
1776 1780 PatientsQuery patientsQuery1 = new PatientsQuery();
1777 1781 patientsQuery1.setYn(YnEnums.YES.getId());
1778 1782 patientsQuery1.setPid(patients.getPid());
1779   - patientsQuery1.setHospitalId(hospitalId);
  1783 +// patientsQuery1.setHospitalId(hospitalId);
  1784 + patientsQuery1.setHospitalList(groupsFacade.findGroupHospital(userId,false));
1780 1785 List<Patients> patientses = patientsService.queryPatient(patientsQuery1);
1781 1786  
1782 1787 if (CollectionUtils.isNotEmpty(patientses)) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.java View file @ 8badb0b
... ... @@ -277,6 +277,7 @@
277 277 acidMap.put("other",2);
278 278 }
279 279 }
  280 + acidMap.put("id",data.getId());
280 281 list.add(acidMap);
281 282 }
282 283 }