Commit 7e13170156bf2971d8f853a123414002a58bef39
1 parent
28528f98c0
Exists in
master
and in
6 other branches
儿童体重快速测量
Showing 6 changed files with 98 additions and 16 deletions
- platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MeasureInfoController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
7e13170
| ... | ... | @@ -1556,15 +1556,15 @@ |
| 1556 | 1556 | // int weeks = daysBetween(baby, new Date()) / 7; |
| 1557 | 1557 | // String weekAge = String.valueOf(weeks); |
| 1558 | 1558 | |
| 1559 | - Date startDate = addDay(new Date(),-10-1); | |
| 1560 | - Date endDate = addDay(new Date(), -10); | |
| 1559 | +// Date startDate = addDay(new Date(),-10-1); | |
| 1560 | +// Date endDate = addDay(new Date(), -10); | |
| 1561 | +// | |
| 1562 | +// String start = getyyyy_MM_dd(startDate); | |
| 1563 | +// String end = getyyyy_MM_dd(endDate); | |
| 1564 | +// | |
| 1565 | +// System.out.println(start+"=="+end); | |
| 1561 | 1566 | |
| 1562 | - String start = getyyyy_MM_dd(startDate); | |
| 1563 | - String end = getyyyy_MM_dd(endDate); | |
| 1564 | - | |
| 1565 | - System.out.println(start+"=="+end); | |
| 1566 | - | |
| 1567 | - Date baby = parseDate("2018-12-28"); | |
| 1567 | + Date baby = parseDate("2019-01-24"); | |
| 1568 | 1568 | System.out.println(baby.getTime()); |
| 1569 | 1569 | } |
| 1570 | 1570 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MeasureInfoController.java
View file @
7e13170
| ... | ... | @@ -322,5 +322,26 @@ |
| 322 | 322 | |
| 323 | 323 | |
| 324 | 324 | /**------end-------秦皇岛改版快速测量接口---------------**/ |
| 325 | + | |
| 326 | + | |
| 327 | + /** | |
| 328 | + * 儿童快速测量信息查询 | |
| 329 | + * @param certType | |
| 330 | + * @param certNo | |
| 331 | + * @param hospitalId | |
| 332 | + * @param request | |
| 333 | + * @return | |
| 334 | + */ | |
| 335 | + @RequestMapping(method = RequestMethod.GET, value = "/getBabyMeasureInfo") | |
| 336 | + @ResponseBody | |
| 337 | + public BaseObjectResponse getBabyMeasureInfo(@RequestParam(value = "certType", required = true) String certType, | |
| 338 | + @RequestParam(value = "certNo", required = true) String certNo, | |
| 339 | + @RequestParam(value = "hospitalId", required = true) String hospitalId, | |
| 340 | + HttpServletRequest request | |
| 341 | + ) | |
| 342 | + { | |
| 343 | + return measureInfoFacade.getBabyMeasureInfo(certType, certNo, hospitalId); | |
| 344 | + } | |
| 345 | + | |
| 325 | 346 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
7e13170
| ... | ... | @@ -926,9 +926,6 @@ |
| 926 | 926 | * @return |
| 927 | 927 | */ |
| 928 | 928 | public BaseObjectResponse getNutritionPatientInfo(Integer certType, String certNo, String hospitalId) { |
| 929 | - | |
| 930 | - System.out.println("getNutritionPatientInfo:certType" + certType + ";certNo="+certNo+";hospitalId="+hospitalId); | |
| 931 | - | |
| 932 | 929 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
| 933 | 930 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 934 | 931 | if (1 == certType) |
| ... | ... | @@ -1019,10 +1016,6 @@ |
| 1019 | 1016 | |
| 1020 | 1017 | public BaseObjectResponse addNutritionInfo(NutritionInfoRequest nutritionInfoRequest) { |
| 1021 | 1018 | |
| 1022 | - System.out.println("patientId="+nutritionInfoRequest.getPatientId()+";beforeWeight=" | |
| 1023 | - +nutritionInfoRequest.getBeforeWeight()+";beforeHeight="+nutritionInfoRequest.getBeforeHeight() | |
| 1024 | - +"currentWeight="+nutritionInfoRequest.getCurrentWeight()); | |
| 1025 | - | |
| 1026 | 1019 | Patients patients = patientsService.findOnePatientById(nutritionInfoRequest.getPatientId()); |
| 1027 | 1020 | List<PatientWeight> patientWeights = patientWeightService2.queryPatientWeight(Query.query(Criteria.where("patientId").is(nutritionInfoRequest.getPatientId()))); |
| 1028 | 1021 | String hospitalId = nutritionInfoRequest.getHospitalId(); |
| ... | ... | @@ -1530,5 +1523,61 @@ |
| 1530 | 1523 | objectResponse.setErrormsg("成功"); |
| 1531 | 1524 | return objectResponse; |
| 1532 | 1525 | } |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + @Autowired | |
| 1530 | + private BabyBookbuildingService babyBookbuildingService; | |
| 1531 | + | |
| 1532 | + public BaseObjectResponse getBabyMeasureInfo(String certType, String certNo, String hospitalId) { | |
| 1533 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 1534 | + BabyModelQuery query = new BabyModelQuery(); | |
| 1535 | + query.setHospitalId(hospitalId); | |
| 1536 | + query.setYn(YnEnums.YES.getId()); | |
| 1537 | + if ("1".equals(certType)) | |
| 1538 | + { | |
| 1539 | + query.setVcCardNo(certNo); | |
| 1540 | + } | |
| 1541 | + else | |
| 1542 | + { | |
| 1543 | + query.setMcertNo(certNo); | |
| 1544 | + } | |
| 1545 | + | |
| 1546 | + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(query); | |
| 1547 | + if (CollectionUtils.isEmpty(models)) | |
| 1548 | + { | |
| 1549 | + br.setErrorcode(ErrorCodeConstants.USER_NOT_EXISTS); | |
| 1550 | + br.setErrormsg("没有儿童档案,请到儿童中心创建档案"); | |
| 1551 | + return br; | |
| 1552 | + } | |
| 1553 | + | |
| 1554 | + Map data = new HashMap(); | |
| 1555 | + Map mother = new HashMap(); | |
| 1556 | + mother.put("motherCardNo",models.get(0).getMcertNo()); | |
| 1557 | + mother.put("motherPhone",models.get(0).getMphone()); | |
| 1558 | + mother.put("motherName",models.get(0).getMname()); | |
| 1559 | + mother.put("motherAge",models.get(0).getMbirth() == null ? "" : DateUtil.getAge(models.get(0).getMbirth(), new Date())); | |
| 1560 | + | |
| 1561 | + List<Map> babies = new ArrayList<>(); | |
| 1562 | + for (BabyModel baby : models) | |
| 1563 | + { | |
| 1564 | + Map map = new HashMap(); | |
| 1565 | + map.put("id",baby.getId()); | |
| 1566 | + map.put("babyName",baby.getName()); | |
| 1567 | + map.put("sex",SexEnum.getTextById(baby.getSex())); | |
| 1568 | + map.put("birth",DateUtil.getyyyy_MM_dd(baby.getBirth())); | |
| 1569 | + map.put("vcCardNo",baby.getVcCardNo()); | |
| 1570 | + | |
| 1571 | + babies.add(map); | |
| 1572 | + } | |
| 1573 | + | |
| 1574 | + data.put("babies",babies); | |
| 1575 | + data.put("mother",mother); | |
| 1576 | + | |
| 1577 | + br.setData(data); | |
| 1578 | + return br; | |
| 1579 | + } | |
| 1580 | + | |
| 1581 | + | |
| 1533 | 1582 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
View file @
7e13170
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
7e13170
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
7e13170