Commit 124379ff0834c63ee9eb689fb51eb2292e43f2d4
1 parent
2442bfdc02
Exists in
master
and in
6 other branches
儿童曲线图
Showing 4 changed files with 95 additions and 6 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsTemplateFacade.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java
View file @
124379f
... | ... | @@ -363,7 +363,7 @@ |
363 | 363 | * @param request |
364 | 364 | * @return |
365 | 365 | */ |
366 | - @RequestMapping(method = RequestMethod.GET, value = "/getGongGaoLine") | |
366 | + @RequestMapping(method = RequestMethod.GET, value = "/getGongGaoCurve") | |
367 | 367 | @ResponseBody |
368 | 368 | @TokenRequired |
369 | 369 | public BaseResponse getGongGaoLine(@RequestParam(required = true) String patientId,HttpServletRequest request) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
View file @
124379f
... | ... | @@ -69,7 +69,7 @@ |
69 | 69 | @ResponseBody |
70 | 70 | @TokenRequired |
71 | 71 | public BaseResponse deleteBabyBuildById(@PathVariable("id")String id,HttpServletRequest request){ |
72 | - babyCheckFacade.deleteBabyCheckById(id,getUserId(request)); | |
72 | + babyCheckFacade.deleteBabyCheckById(id, getUserId(request)); | |
73 | 73 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
74 | 74 | } |
75 | 75 | |
... | ... | @@ -152,7 +152,7 @@ |
152 | 152 | @RequestParam(required = true) Double weight, |
153 | 153 | @RequestParam(required = true) Integer sex, |
154 | 154 | @RequestParam(required = true) String birth){ |
155 | - return babyCheckFacade.queryHWByHeight(height,weight, sex,birth); | |
155 | + return babyCheckFacade.queryHWByHeight(height, weight, sex, birth); | |
156 | 156 | |
157 | 157 | } |
158 | 158 | |
... | ... | @@ -170,7 +170,7 @@ |
170 | 170 | @RequestParam(required = true) Integer sex, |
171 | 171 | @RequestParam(required = true) Integer type, |
172 | 172 | @RequestParam(required = true) String birth){ |
173 | - return babyCheckFacade.queryBabyHealthStatus(birth,value, sex, type); | |
173 | + return babyCheckFacade.queryBabyHealthStatus(birth, value, sex, type); | |
174 | 174 | |
175 | 175 | } |
176 | 176 | |
177 | 177 | |
... | ... | @@ -208,10 +208,25 @@ |
208 | 208 | public BaseObjectResponse getBabyMonthAge( |
209 | 209 | @RequestParam(required = true) String birth, |
210 | 210 | @RequestParam(required = false) String checkDate){ |
211 | - return babyCheckFacade.getBabyMonthAge(birth,checkDate); | |
211 | + return babyCheckFacade.getBabyMonthAge(birth, checkDate); | |
212 | 212 | |
213 | 213 | } |
214 | 214 | |
215 | + | |
216 | + | |
217 | + /** | |
218 | + *儿童检查曲线图 | |
219 | + * @param babyId | |
220 | + * @param request | |
221 | + * @return | |
222 | + */ | |
223 | + @RequestMapping(method = RequestMethod.GET, value = "/getBabyCurve") | |
224 | + @ResponseBody | |
225 | + @TokenRequired | |
226 | + public BaseResponse getBabyCurve(@RequestParam(required = true) String babyId,HttpServletRequest request) { | |
227 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
228 | + return babyCheckFacade.getBabyCurve(babyId, loginState.getId()); | |
229 | + } | |
215 | 230 | |
216 | 231 | |
217 | 232 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
124379f
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | import com.lyms.platform.common.result.BaseObjectResponse; |
8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
9 | 9 | import com.lyms.platform.common.utils.*; |
10 | +import com.lyms.platform.common.utils.StringUtils; | |
10 | 11 | import com.lyms.platform.operate.web.request.BabyCheckRequest; |
11 | 12 | import com.lyms.platform.operate.web.result.*; |
12 | 13 | import com.lyms.platform.operate.web.utils.MongoUtil; |
... | ... | @@ -19,6 +20,7 @@ |
19 | 20 | import com.lyms.platform.pojo.*; |
20 | 21 | import com.lyms.platform.query.*; |
21 | 22 | import org.apache.commons.collections.CollectionUtils; |
23 | +import org.apache.commons.lang.*; | |
22 | 24 | import org.springframework.beans.factory.annotation.Autowired; |
23 | 25 | import org.springframework.data.domain.Sort; |
24 | 26 | import org.springframework.stereotype.Component; |
... | ... | @@ -1629,6 +1631,78 @@ |
1629 | 1631 | |
1630 | 1632 | return res; |
1631 | 1633 | |
1634 | + } | |
1635 | + | |
1636 | + public BaseResponse getBabyCurve(String babyId, Integer id) { | |
1637 | + | |
1638 | + Map<String,Object> map = new HashMap<>(); | |
1639 | + | |
1640 | + List<String> weightTitles = new LinkedList<>(); | |
1641 | + List<String> weightValues = new LinkedList<>(); | |
1642 | + | |
1643 | + List<String> heightTitles = new LinkedList<>(); | |
1644 | + List<String> heightValues = new LinkedList<>(); | |
1645 | + | |
1646 | + List<Map<String,String>> tables = new LinkedList<>(); | |
1647 | + | |
1648 | + BabyCheckModelQuery query = new BabyCheckModelQuery(); | |
1649 | + query.setYn(YnEnums.YES.getId()); | |
1650 | + query.setBuildId(babyId); | |
1651 | + //查询儿童的检查记录 | |
1652 | + List<BabyCheckModel> checkModels = babyCheckService.queryBabyCheckRecord(query, "checkDate", Sort.Direction.ASC); | |
1653 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
1654 | + { | |
1655 | + for (BabyCheckModel checkModel : checkModels) | |
1656 | + { | |
1657 | + if (checkModel != null) | |
1658 | + { | |
1659 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(checkModel.getHeight()) || org.apache.commons.lang.StringUtils.isNotEmpty(checkModel.getWeight())) | |
1660 | + { | |
1661 | + Map<String,String> heightMap = new HashMap<>(); | |
1662 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(checkModel.getHeight())) | |
1663 | + { | |
1664 | + if (org.apache.commons.lang.StringUtils.isNumeric(checkModel.getHeight())) | |
1665 | + { | |
1666 | + heightTitles.add(DateUtil.getyyyy_MM_dd(checkModel.getCheckDate())); | |
1667 | + heightValues.add(checkModel.getHeight()); | |
1668 | + } | |
1669 | + heightMap.put("time",DateUtil.getyyyy_MM_dd(checkModel.getCheckDate())); | |
1670 | + heightMap.put("height", checkModel.getHeight()); | |
1671 | + } | |
1672 | + else | |
1673 | + { | |
1674 | + heightMap.put("height", "--"); | |
1675 | + } | |
1676 | + | |
1677 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(checkModel.getWeight())) | |
1678 | + { | |
1679 | + if (org.apache.commons.lang.StringUtils.isNumeric(checkModel.getWeight())) | |
1680 | + { | |
1681 | + weightTitles.add(DateUtil.getyyyy_MM_dd(checkModel.getCheckDate())); | |
1682 | + weightValues.add(checkModel.getWeight()); | |
1683 | + } | |
1684 | + heightMap.put("time", DateUtil.getyyyy_MM_dd(checkModel.getCheckDate())); | |
1685 | + heightMap.put("weight",checkModel.getWeight()); | |
1686 | + } | |
1687 | + else | |
1688 | + { | |
1689 | + heightMap.put("weight", "--"); | |
1690 | + } | |
1691 | + | |
1692 | + tables.add(heightMap); | |
1693 | + } | |
1694 | + } | |
1695 | + } | |
1696 | + } | |
1697 | + map.put("weightTitles",weightTitles); | |
1698 | + map.put("weightValues",weightValues); | |
1699 | + | |
1700 | + map.put("heightTitles",heightTitles); | |
1701 | + map.put("heightValues",heightValues); | |
1702 | + | |
1703 | + map.put("tables",tables); | |
1704 | + | |
1705 | + return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
1632 | 1706 | } |
1633 | 1707 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsTemplateFacade.java
View file @
124379f
... | ... | @@ -253,7 +253,7 @@ |
253 | 253 | result.put("serviceStatusName", ServiceStatusEnums.getNameById(temp.getServiceStatus())); |
254 | 254 | result.put("content", temp.getContent()); |
255 | 255 | |
256 | - String str = "一次 预约短信"; | |
256 | + String str = "一次 预约"+((temp.getTemplateType() == null || temp.getTemplateType() == 0 ) ? "推送" : "短信"); | |
257 | 257 | if (temp.getSmsType() != null && temp.getSmsType() != SmsServiceEnums.CJYYTX.getId() |
258 | 258 | && temp.getSmsType() != SmsServiceEnums.CHFCYUTX.getId() && temp.getSmsType() != SmsServiceEnums.EBYYTX.getId() |
259 | 259 | && temp.getSmsType() != SmsServiceEnums.YBYYTX.getId() |