Commit 3a46d828aa628307d0ed86fecfd7a0da1af4ea71
1 parent
fe51244d3b
Exists in
master
and in
6 other branches
血糖
Showing 1 changed file with 11 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
3a46d82
... | ... | @@ -212,6 +212,7 @@ |
212 | 212 | one = new BloodSugar(); |
213 | 213 | one.setParentId(parentId); |
214 | 214 | one.setHospitalId(mongoUtil.getHidByParentId(parentId)); |
215 | + one.setBloodSugar(bloodSugar); | |
215 | 216 | one.setBloodSugarType(bloodSugarType); |
216 | 217 | one.setCreated(new Date()); |
217 | 218 | // one.setCreateUser(userId); |
... | ... | @@ -224,7 +225,16 @@ |
224 | 225 | |
225 | 226 | @Override |
226 | 227 | public BaseResponse wxInfo(String parentId, Integer type) { |
227 | - return null; | |
228 | + List<Map<String, Object>> restList = new ArrayList<>(); | |
229 | + List<BloodSugar> bloodSugars = mongoTemplate.find(Query.query(Criteria.where("parentId").is(parentId)).with(new Sort(Sort.Direction.DESC, "created")), BloodSugar.class); | |
230 | + for (BloodSugar bloodSugar : bloodSugars) { | |
231 | + Map<String, Object> temp = new HashMap<>(); | |
232 | + temp.put("bloodSugar", bloodSugar.getBloodSugar()); | |
233 | + temp.put("craeted", bloodSugar.getCreated()); | |
234 | + temp.put("type", bloodSugar.getBloodSugarType()); | |
235 | + restList.add(temp); | |
236 | + } | |
237 | + return RespBuilder.buildSuccess(restList); | |
228 | 238 | } |
229 | 239 | |
230 | 240 | } |