Commit 68c849a7fab2c6c4479e7c365ee16160382a67c0
1 parent
d5eb5c6cb4
Exists in
master
and in
6 other branches
小程序查询血糖信息
Showing 2 changed files with 10 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
68c849a
... | ... | @@ -275,6 +275,7 @@ |
275 | 275 | AntenatalExaminationModel model = antExAddRequest.convertToDataModel(); |
276 | 276 | //表示区域的 |
277 | 277 | if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { |
278 | + //建立隐藏档案 | |
278 | 279 | String parentId = handHideBuild(antExAddRequest.getPid(), antExAddRequest.getParentId(), userId, 1); |
279 | 280 | model.setParentId(parentId); |
280 | 281 | antExAddRequest.setParentId(parentId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
68c849a
... | ... | @@ -22,6 +22,7 @@ |
22 | 22 | import com.lyms.platform.operate.web.utils.MongoUtil; |
23 | 23 | import com.lyms.platform.pojo.BloodSugar; |
24 | 24 | import com.lyms.platform.pojo.Patients; |
25 | +import org.apache.commons.collections.map.HashedMap; | |
25 | 26 | import org.springframework.beans.factory.annotation.Autowired; |
26 | 27 | import org.springframework.data.domain.Sort; |
27 | 28 | import org.springframework.data.mongodb.core.MongoTemplate; |
28 | 29 | |
... | ... | @@ -371,8 +372,15 @@ |
371 | 372 | } |
372 | 373 | monthCountSet3.add(month); |
373 | 374 | } |
375 | + Map<String,Object> newBloodMap = new HashedMap(); | |
374 | 376 | |
375 | - return RespBuilder.buildSuccess("restList", restList, "count", bloodSugars.size(), "dayCount", dayCountSet.size(), "month", monthCountSet3, "monthAvgMap", monthAvgMap, "weekAvgMap", weekAvgMap); | |
377 | + if(CollectionUtils.isNotEmpty(bloodSugars)){ | |
378 | + BloodSugar bloodSugar = bloodSugars.get(0); | |
379 | + newBloodMap.put("bloodSugar",bloodSugar.getBloodSugar()); | |
380 | + newBloodMap.put("bloodSugarType",bloodSugar.getBloodSugarType()); | |
381 | + } | |
382 | + | |
383 | + return RespBuilder.buildSuccess("restList", restList, "count", bloodSugars.size(), "dayCount", dayCountSet.size(), "month", monthCountSet3, "monthAvgMap", monthAvgMap, "weekAvgMap", weekAvgMap,"newBloodVal",newBloodMap); | |
376 | 384 | } |
377 | 385 | |
378 | 386 | } |