Commit 3377ad308f0ce3f095b67f04f27ecfa9d9754404
1 parent
d4c1f8d21e
Exists in
master
and in
6 other branches
bbbbbb
Showing 2 changed files with 7 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
3377ad3
... | ... | @@ -150,7 +150,7 @@ |
150 | 150 | maxAxis = Arrays.asList(6.7, 6.7, 6.7, 6.7, 6.7, 6.7, 6.7); |
151 | 151 | } |
152 | 152 | |
153 | - List<BloodSugar> bloodSugars = mongoTemplate.find(Query.query(Criteria.where("pid").is(mongoUtil.getPid(parentId))), BloodSugar.class); | |
153 | + List<BloodSugar> bloodSugars = mongoTemplate.find(Query.query(Criteria.where("pid").is(mongoUtil.getPid2(parentId))), BloodSugar.class); | |
154 | 154 | if(CollectionUtils.isNotEmpty(bloodSugars)) { |
155 | 155 | for (int i = 0; i < betweenDay.size(); i++) { |
156 | 156 | String day = betweenDay.get(i); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
View file @
3377ad3
... | ... | @@ -691,7 +691,13 @@ |
691 | 691 | |
692 | 692 | public String getPid(String parentId) { |
693 | 693 | Patients patients = mongoTemplate.findById(parentId, Patients.class); |
694 | + return patients == null ? null : patients.getPid(); | |
695 | + } | |
696 | + | |
697 | + public String getPid2(String parentId) { | |
698 | + Patients patients = mongoTemplate.findById(parentId, Patients.class); | |
694 | 699 | return patients == null || patients.getYn() == 1 ? null : patients.getPid(); |
695 | 700 | } |
701 | + | |
696 | 702 | } |