Commit b237dc6072e149aa8e9ea860bcc7f16a60738392
1 parent
93014118ca
Exists in
master
and in
6 other branches
儿童测量记录
Showing 3 changed files with 61 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyNutritionController.java
View file @
b237dc6
| ... | ... | @@ -9,6 +9,9 @@ |
| 9 | 9 | import com.lyms.platform.operate.web.facade.BabyNutritionFacade; |
| 10 | 10 | import com.lyms.platform.operate.web.request.BabyNutritionRequest; |
| 11 | 11 | import com.lyms.platform.operate.web.request.BabyNutritionSettleRequest; |
| 12 | +import com.lyms.platform.pojo.MeasureBabyInfoModel; | |
| 13 | +import com.lyms.platform.query.MeasureBabyDataInfoQuery; | |
| 14 | +import org.apache.commons.collections.CollectionUtils; | |
| 12 | 15 | import org.springframework.beans.factory.annotation.Autowired; |
| 13 | 16 | import org.springframework.stereotype.Controller; |
| 14 | 17 | import org.springframework.web.bind.annotation.*; |
| ... | ... | @@ -18,6 +21,7 @@ |
| 18 | 21 | import javax.validation.Valid; |
| 19 | 22 | import java.util.Calendar; |
| 20 | 23 | import java.util.Date; |
| 24 | +import java.util.List; | |
| 21 | 25 | |
| 22 | 26 | |
| 23 | 27 | /** |
| ... | ... | @@ -215,7 +219,18 @@ |
| 215 | 219 | public void settleHistoryExport(@Valid @RequestBody BabyNutritionSettleRequest request, |
| 216 | 220 | HttpServletResponse response) { |
| 217 | 221 | getStartTimeAndEndTime(request); |
| 218 | - babyNutritionFacade.settleHistoryExport(request,response); | |
| 222 | + babyNutritionFacade.settleHistoryExport(request, response); | |
| 223 | + } | |
| 224 | + | |
| 225 | + | |
| 226 | + /** | |
| 227 | + * 当天测量体重记录的儿童 | |
| 228 | + * @param request | |
| 229 | + */ | |
| 230 | + @RequestMapping(method = RequestMethod.GET, value = "/getTodayBabyMeasures") | |
| 231 | + @TokenRequired | |
| 232 | + public BaseResponse getTodayBabyMeasures(HttpServletRequest request) { | |
| 233 | + return babyNutritionFacade.getTodayBabyMeasures(getUserId(request)); | |
| 219 | 234 | } |
| 220 | 235 | |
| 221 | 236 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java
View file @
b237dc6
| ... | ... | @@ -1629,5 +1629,49 @@ |
| 1629 | 1629 | } |
| 1630 | 1630 | } |
| 1631 | 1631 | |
| 1632 | + public BaseResponse getTodayBabyMeasures(Integer userId) { | |
| 1633 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 1634 | + | |
| 1635 | + MeasureBabyDataInfoQuery query = new MeasureBabyDataInfoQuery(); | |
| 1636 | + query.setHospitalId(hospitalId); | |
| 1637 | + String today = DateUtil.getyyyy_MM_dd(new Date()); | |
| 1638 | + query.setModifiedTimeStart(DateUtil.parseYMDHMS(today + " 00:00:00")); | |
| 1639 | + query.setModifiedTimeEnd(DateUtil.parseYyyyMMddHHssmm(today + " 23:59:59")); | |
| 1640 | + query.setSort(" modified desc "); | |
| 1641 | + List<Map> datas = new ArrayList<>(); | |
| 1642 | + List<MeasureBabyInfoModel> models = mysqlMeasureDataInfoService.queryMeasureBabyInfoList(query); | |
| 1643 | + if (CollectionUtils.isNotEmpty(models)) { | |
| 1644 | + for (MeasureBabyInfoModel model : models) | |
| 1645 | + { | |
| 1646 | + if (!StringUtils.isNotEmpty(model.getBabyId())) | |
| 1647 | + { | |
| 1648 | + continue; | |
| 1649 | + } | |
| 1650 | + | |
| 1651 | + BabyModel baby = babyBookbuildingService.queryBabyBuildById(model.getBabyId()); | |
| 1652 | + | |
| 1653 | + if (baby != null) | |
| 1654 | + { | |
| 1655 | + Map map = new HashMap(); | |
| 1656 | + map.put("weight", model.getValueOne()); | |
| 1657 | + map.put("hegiht", model.getValueTwo()); | |
| 1658 | + map.put("lastTime", DateUtil.getyyyy_MM_dd(model.getModified())); | |
| 1659 | + map.put("babyId", model.getBabyId()); | |
| 1660 | + map.put("babyName", baby.getName()); | |
| 1661 | + map.put("babySex", SexEnum.getTextById(baby.getSex())); | |
| 1662 | + map.put("monthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(baby.getBirth(), new Date()))); | |
| 1663 | + map.put("motherName", baby.getMname()); | |
| 1664 | + map.put("phone", baby.getMphone()); | |
| 1665 | + map.put("vcCardNo", baby.getVcCardNo()); | |
| 1666 | + datas.add(map); | |
| 1667 | + } | |
| 1668 | + } | |
| 1669 | + } | |
| 1670 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
| 1671 | + objectResponse.setData(datas); | |
| 1672 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 1673 | + objectResponse.setErrormsg("成功"); | |
| 1674 | + return objectResponse; | |
| 1675 | + } | |
| 1632 | 1676 | } |
platform-operate-api/src/main/resources/config.properties
View file @
b237dc6
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | #同步数据到v2.0 |
| 36 | 36 | sync_to_v2_url=http://hengshui.mamibeibi.com:8091 |
| 37 | 37 | |
| 38 | -#华大基因url 测试 正式bisp-tssfy tssfy123456 | |
| 38 | +#华大基因url 测试 2019年11月8号)将不支持http 正式bisp-tssfy tssfy123456 正式:https://applet.bgi.com/bisp-all/ 测试:https://hbms.bgi.com/bisp-all/ | |
| 39 | 39 | huada_url=http://119.23.237.220/bisp-all |
| 40 | 40 | huada_syscode=bisp-czsfy |
| 41 | 41 | huada_secret=czsfy123$ |