Commit 011fefd22ac99b23fb9b2e957ff3bf6d96f52524
1 parent
7659676e5f
Exists in
master
and in
6 other branches
更新
Showing 1 changed file with 5 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
011fefd
... | ... | @@ -5649,13 +5649,15 @@ |
5649 | 5649 | patientsQuery.setCardNo(idCard); |
5650 | 5650 | patientsQuery.setType(3); |
5651 | 5651 | |
5652 | + String hospitalId; | |
5652 | 5653 | if (StringUtils.isNotEmpty(hospitalName)) { |
5653 | 5654 | OrganizationQuery query = new OrganizationQuery(); |
5654 | 5655 | query.setName(hospitalName.trim()); |
5655 | 5656 | query.setYn(YnEnums.YES.getId()); |
5656 | 5657 | List<Organization> organizations = organizationService.queryOrganization(query); |
5657 | 5658 | if (CollectionUtils.isNotEmpty(organizations)) { |
5658 | - patientsQuery.setHospitalId(String.valueOf(organizations.get(0).getId())); | |
5659 | + hospitalId = String.valueOf(organizations.get(0).getId()); | |
5660 | + patientsQuery.setHospitalId(hospitalId); | |
5659 | 5661 | } else { |
5660 | 5662 | deliverMap.put("motherinfo", new ArrayList<>()); |
5661 | 5663 | return deliverMap; |
... | ... | @@ -5668,7 +5670,7 @@ |
5668 | 5670 | List<Patients> list; |
5669 | 5671 | String patientId = getPatientId(idCard); |
5670 | 5672 | if (StringUtils.isNotEmpty(patientId)) { |
5671 | - list = mongoTemplate.find(Query.query(Criteria.where("id").is(patientId)), Patients.class); | |
5673 | + list = mongoTemplate.find(Query.query(Criteria.where("id").is(patientId).and("hospitalId").is(hospitalId)), Patients.class); | |
5672 | 5674 | } else { |
5673 | 5675 | list = patientsService.queryPatient1(patientsQuery, "created"); |
5674 | 5676 | } |
... | ... | @@ -5916,12 +5918,7 @@ |
5916 | 5918 | String parentId = deliverModel.getParentId(); |
5917 | 5919 | Patients patientsModel = mongoTemplate.findOne(Query.query(Criteria.where("id").is(parentId)), Patients.class); |
5918 | 5920 | if (patientsModel != null) { |
5919 | - String sourceId = patientsModel.getSource(); | |
5920 | - if (StringUtils.isNotEmpty(sourceId)) { | |
5921 | - return sourceId; | |
5922 | - } else { | |
5923 | - return patientsModel.getId(); | |
5924 | - } | |
5921 | + return patientsModel.getId(); | |
5925 | 5922 | } |
5926 | 5923 | } |
5927 | 5924 | } |