Commit 1db718bd844a4c8f119518ca531182eb5fcfac76
1 parent
576ef90f8d
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 28 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MeasureInfoController.java
View file @
1db718b
| ... | ... | @@ -377,6 +377,13 @@ |
| 377 | 377 | return measureInfoFacade.addMeasureBabyDataInfo(measureBabyInfoRequest); |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | + @RequestMapping(method = RequestMethod.GET, value = "/getMeasureBaby") | |
| 381 | + @ResponseBody | |
| 382 | + @TokenRequired | |
| 383 | + public BaseResponse getMeasureBaby(@RequestParam(value = "babyId", required = true) String babyId, HttpServletRequest request) { | |
| 384 | + return measureInfoFacade.getMeasureBaby(babyId,getUserId(request)); | |
| 385 | + } | |
| 386 | + | |
| 380 | 387 | |
| 381 | 388 | /** |
| 382 | 389 | * 儿童体重 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
1db718b
| ... | ... | @@ -1662,6 +1662,27 @@ |
| 1662 | 1662 | return objectResponse; |
| 1663 | 1663 | } |
| 1664 | 1664 | |
| 1665 | + public BaseResponse getMeasureBaby(String babyId,Integer userId) { | |
| 1666 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 1667 | + MeasureBabyDataInfoQuery query = new MeasureBabyDataInfoQuery(); | |
| 1668 | + query.setHospitalId(hospitalId); | |
| 1669 | + String today = DateUtil.getyyyy_MM_dd(new Date()); | |
| 1670 | + query.setModifiedTimeStart(DateUtil.parseYMDHMS(today + " 00:00:00")); | |
| 1671 | + query.setModifiedTimeEnd(DateUtil.parseYyyyMMddHHssmm(today + " 23:59:59")); | |
| 1672 | + query.setSort(" modified desc "); | |
| 1673 | + query.setBabyId(babyId); | |
| 1674 | + query.setValueType(1);//值类型: 1 体重和身高 2 血压和脉搏 3、体温 | |
| 1675 | + List<MeasureBabyInfoModel> models = mysqlMeasureDataInfoService.queryMeasureBabyInfoList(query); | |
| 1676 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
| 1677 | + if (CollectionUtils.isNotEmpty(models)) { | |
| 1678 | + MeasureBabyInfoModel measureBabyInfoModel = models.get(0); | |
| 1679 | + objectResponse.setData(measureBabyInfoModel); | |
| 1680 | + } | |
| 1681 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 1682 | + objectResponse.setErrormsg("成功"); | |
| 1683 | + return objectResponse; | |
| 1684 | + } | |
| 1685 | + | |
| 1665 | 1686 | @Autowired |
| 1666 | 1687 | private BabyBookbuildingService babyBookbuildingService; |
| 1667 | 1688 |