Commit 31b1fc9af119545d4774892b74941b02d25dd2fd
1 parent
44152e6ce5
Exists in
master
and in
6 other branches
快捷测量
Showing 2 changed files with 21 additions and 16 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
31b1fc9
... | ... | @@ -484,12 +484,12 @@ |
484 | 484 | // } |
485 | 485 | |
486 | 486 | String ip = IpUtils.getIpAddress(request); |
487 | - System.out.println("userIp="+ip); | |
488 | -// if ("2100001452".equals(u.getOrgId().toString()) && "192.168.100.101".equals(ip)) { | |
489 | -// ResultUtils.buildParameterErrorResultAndWrite(response, ""); | |
490 | -// return; | |
491 | -// } | |
492 | - | |
487 | + if ("xxx".equals(u.getRemarks())){ | |
488 | + if ("2100001452".equals(u.getOrgId().toString()) && "10.0.61.50".equals(ip)) { | |
489 | + ResultUtils.buildParameterErrorResultAndWrite(response, ""); | |
490 | + return; | |
491 | + } | |
492 | + } | |
493 | 493 | |
494 | 494 | if (null != u.getOrgId()) { |
495 | 495 | Organization organization = organizationService.getOrganization(u.getOrgId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
31b1fc9
... | ... | @@ -862,14 +862,18 @@ |
862 | 862 | } |
863 | 863 | patientsQuery.setExtSource(false); |
864 | 864 | |
865 | - //patientsQuery.setHospitalId(hospitalId); | |
865 | + patientsQuery.setHospitalId(hospitalId); | |
866 | 866 | patientsQuery.setType(1); |
867 | 867 | patientsQuery.setYn(YnEnums.YES.getId()); |
868 | 868 | List<Patients> patientses = patientsService.queryPatient(patientsQuery); |
869 | 869 | if (CollectionUtils.isEmpty(patientses)) { |
870 | - objectResponse.setErrorcode(ErrorCodeConstants.NO_DATA); | |
871 | - objectResponse.setErrormsg("测量用户还未建档"); | |
872 | - return objectResponse; | |
870 | + patientsQuery.setHospitalId(null); | |
871 | + patientses = patientsService.queryPatient(patientsQuery); | |
872 | + if (CollectionUtils.isEmpty(patientses)) { | |
873 | + objectResponse.setErrorcode(ErrorCodeConstants.NO_DATA); | |
874 | + objectResponse.setErrormsg("测量用户还未建档"); | |
875 | + return objectResponse; | |
876 | + } | |
873 | 877 | } |
874 | 878 | |
875 | 879 | Patients pat = patientses.get(0); |
876 | 880 | |
877 | 881 | |
... | ... | @@ -983,14 +987,13 @@ |
983 | 987 | } |
984 | 988 | |
985 | 989 | public BaseObjectResponse addNutritionInfo(NutritionInfoRequest nutritionInfoRequest) { |
986 | - | |
990 | + String hospitalId = nutritionInfoRequest.getHospitalId().trim(); | |
987 | 991 | Patients patients = patientsService.findOnePatientById(nutritionInfoRequest.getPatientId()); |
988 | 992 | nutritionInfoRequest.setPid(patients.getPid()); |
989 | 993 | List<PatientWeight> patientWeights = patientWeightService2.queryPatientWeight(Query.query( |
990 | - Criteria.where("pid").is(patients.getPid()).and("yn").is("1").and("created").gte(patients.getLastMenses()))); | |
991 | - String hospitalId = nutritionInfoRequest.getHospitalId().trim(); | |
994 | + Criteria.where("pid").is(patients.getPid()).and("yn").is("1") | |
995 | + .and("created").gte(patients.getLastMenses()).and("hospitalId").is(hospitalId))); | |
992 | 996 | |
993 | - | |
994 | 997 | Map<String, String> dayWeights = new LinkedHashMap<>(); |
995 | 998 | List<Map<String, Object>> dayWeights2 = new ArrayList<>(); |
996 | 999 | // |
... | ... | @@ -1198,7 +1201,7 @@ |
1198 | 1201 | } |
1199 | 1202 | |
1200 | 1203 | |
1201 | - bp = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(p.getPid())), BloodPressure.class); | |
1204 | + bp = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(p.getPid()).and("hospitalId").is(hospitalId)), BloodPressure.class); | |
1202 | 1205 | } |
1203 | 1206 | if (bp == null) { |
1204 | 1207 | String parentId = mongoUtil.doHidePatient(bloodPressure.getParentId(), hospitalId); |
... | ... | @@ -1348,7 +1351,9 @@ |
1348 | 1351 | public BaseResponse addBloodSugar(BloodSugar bloodSugar) { |
1349 | 1352 | |
1350 | 1353 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
1351 | - BloodSugar one = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(mongoUtil.getPid(bloodSugar.getParentId())).and("created").gt(DateUtil.getYMDTime()).and("bloodSugarType").is(bloodSugar.getBloodSugarType())), BloodSugar.class); | |
1354 | + BloodSugar one = mongoTemplate.findOne(Query.query(Criteria.where("pid") | |
1355 | + .is(mongoUtil.getPid(bloodSugar.getParentId())).and("created") | |
1356 | + .gt(DateUtil.getYMDTime()).and("bloodSugarType").is(bloodSugar.getBloodSugarType()).and("hospitalId").is(bloodSugar.getHospitalId())), BloodSugar.class); | |
1352 | 1357 | |
1353 | 1358 | Patients patients = patientsService.findOnePatientById(bloodSugar.getParentId()); |
1354 | 1359 |