From 5bc3a44af907df1e61e6d7d98b06e55009b24ece Mon Sep 17 00:00:00 2001 From: wtt Date: Mon, 6 Jul 2020 19:55:06 +0800 Subject: [PATCH] update --- .../operate/web/controller/BabyCheckController.java | 12 ++++++++++++ .../operate/web/facade/BabyCheckFacade.java | 21 +++++++++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java index d6b90c0..c0ccd71 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java @@ -237,6 +237,18 @@ public class BabyCheckController extends BaseController { return babyCheckFacade.queryBabyHealthStatus(birth, value, sex, type, dueDate, babyId, checkDate); } + @RequestMapping(value = "/queryBabyHealthStatusMap", method = RequestMethod.GET) + @ResponseBody + public BaseObjectResponse queryBabyHealthStatusMap(@RequestParam(required = true) Double value, + @RequestParam(required = true) Integer sex, + @RequestParam(required = true) Integer type, + @RequestParam(required = true) String birth, + @RequestParam(required = false) String babyId, + @RequestParam(required = false) String dueDate, + @RequestParam(required = false) String checkDate) { + return babyCheckFacade.queryBabyHealthStatusMap(birth, value, sex, type, dueDate, babyId, checkDate); + + } /** diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java index 724c10c..ed18836 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java @@ -2058,15 +2058,29 @@ public class BabyCheckFacade extends BaseServiceImpl { public BaseObjectResponse queryBabyHealthStatus(String birth, Double value, Integer sex, Integer type, String dueDate, String babyId, String checkDate) { -// String res = ""; + String res = ""; + + //体重 + if (type == 0) { + res = getGrowthValue(birth, value, sex, dueDate, babyId, checkDate); + } else { + res = getGrowthValue1(birth, value, sex, type, dueDate, checkDate); + } + + BaseObjectResponse objectResponse = new BaseObjectResponse(); + objectResponse.setData(res); + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); + objectResponse.setErrormsg("成功"); + return objectResponse; + } + public BaseObjectResponse queryBabyHealthStatusMap(String birth, Double value, Integer sex, Integer type, String dueDate, String babyId, + String checkDate) { Map res = new HashMap(); //体重 if (type == 0) { -// res = getGrowthValue(birth, value, sex, dueDate, babyId, checkDate); res = getGrowthValueMap(birth, value, sex, dueDate, babyId, checkDate); } else { -// res = getGrowthValue1(birth, value, sex, type, dueDate, checkDate); res = getGrowthValue1Map(birth, value, sex, type, dueDate, checkDate); } @@ -2077,7 +2091,6 @@ public class BabyCheckFacade extends BaseServiceImpl { return objectResponse; } - public String getGrowthValue(String birth, Double value, Integer sex, String dueDate, String babyId, String checkDate) { -- 1.8.3.1