Commit b4a788eec8ef6c936ceb096d884056273041be9e
1 parent
154f1a64fa
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 12 additions and 33 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/TemporaryBloodModel.java
View file @
b4a788e
| ... | ... | @@ -14,10 +14,6 @@ |
| 14 | 14 | |
| 15 | 15 | private String id; |
| 16 | 16 | |
| 17 | - // 孕前体重 | |
| 18 | - private String beforeWeight; | |
| 19 | - // 孕前身高 | |
| 20 | - private String beforeHeight; | |
| 21 | 17 | // 当前体重 |
| 22 | 18 | private String nowWeight; |
| 23 | 19 | private Date created; |
| ... | ... | @@ -112,22 +108,6 @@ |
| 112 | 108 | this.id = id; |
| 113 | 109 | } |
| 114 | 110 | |
| 115 | - | |
| 116 | - public String getBeforeWeight() { | |
| 117 | - return beforeWeight; | |
| 118 | - } | |
| 119 | - | |
| 120 | - public void setBeforeWeight(String beforeWeight) { | |
| 121 | - this.beforeWeight = beforeWeight; | |
| 122 | - } | |
| 123 | - | |
| 124 | - public String getBeforeHeight() { | |
| 125 | - return beforeHeight; | |
| 126 | - } | |
| 127 | - | |
| 128 | - public void setBeforeHeight(String beforeHeight) { | |
| 129 | - this.beforeHeight = beforeHeight; | |
| 130 | - } | |
| 131 | 111 | |
| 132 | 112 | public String getNowWeight() { |
| 133 | 113 | return nowWeight; |
platform-dal/src/main/java/com/lyms/platform/pojo/TemporaryBloodSugar.java
View file @
b4a788e
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TemporaryBloodServiceImpl.java
View file @
b4a788e
| ... | ... | @@ -211,9 +211,9 @@ |
| 211 | 211 | temp.put("pulse", bloodPressure.getPulse()); |
| 212 | 212 | temp.put("status", getPulseStatus(bloodPressure.getSsy(), bloodPressure.getSzy())); |
| 213 | 213 | temp.put("cardID", temporaryUser.getCardID()); |
| 214 | - temp.put("beforWeight", bloodPressure.getBeforeWeight() == null ? "" : bloodPressure.getBeforeWeight()); | |
| 214 | + temp.put("beforWeight", temporaryUser.getBeforeWeight() == null ? "" : temporaryUser.getBeforeWeight()); | |
| 215 | 215 | temp.put("weight", bloodPressure.getNowWeight() == null ? "" : bloodPressure.getNowWeight()); |
| 216 | - temp.put("height", bloodPressure.getBeforeHeight() == null ? "" : bloodPressure.getBeforeHeight()); | |
| 216 | + temp.put("height", temporaryUser.getBeforeHeight() == null ? "" : temporaryUser.getBeforeHeight()); | |
| 217 | 217 | temp.put("bregmatic", bloodPressure.getBregmatic() == null ? "" : bloodPressure.getBregmatic()); |
| 218 | 218 | } |
| 219 | 219 | restList.add(temp); |
| ... | ... | @@ -279,9 +279,9 @@ |
| 279 | 279 | if (temporaryBloo != null) { |
| 280 | 280 | TemporaryUserModel temporaryUser = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(temporaryBloo.getTemporaryUserId())), TemporaryUserModel.class); |
| 281 | 281 | //1.1回去bim值 String getBmi(String weight, String height); |
| 282 | - String weight = temporaryBloo.getBeforeWeight(); | |
| 283 | - String height = temporaryBloo.getBeforeHeight(); | |
| 284 | - String bregmatic = temporaryBloo.getBregmatic(); | |
| 282 | + String weight = temporaryUser.getBeforeWeight(); | |
| 283 | + String height = temporaryUser.getBeforeHeight(); | |
| 284 | + String bregmatic = temporaryUser.getBregmatic(); | |
| 285 | 285 | //2.通过pnationId ID获取到相应的信息例如:末次月经 |
| 286 | 286 | if (StringUtils.isNotEmpty(weight) && StringUtils.isNotEmpty(height) && StringUtils.isNotEmpty(bregmatic)) { |
| 287 | 287 | //Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(bloodPressure.getParentId())), Patients.class); |
| ... | ... | @@ -292,8 +292,8 @@ |
| 292 | 292 | paMap.put("phone", temporaryUser.getPhone()); |
| 293 | 293 | paMap.put("age", DateUtil.getAge(temporaryUser.getBirth())); |
| 294 | 294 | //paMap.put("dueDate", DateUtil.getyyyy_MM_dd(bloodModel.getDueDate())); |
| 295 | - paMap.put("height", temporaryBloo.getBeforeHeight()); | |
| 296 | - paMap.put("beforWeight", temporaryBloo.getBeforeWeight()); | |
| 295 | + paMap.put("height", temporaryUser.getBeforeHeight()); | |
| 296 | + paMap.put("beforWeight", temporaryUser.getBeforeWeight()); | |
| 297 | 297 | paMap.put("weeks", weeks); |
| 298 | 298 | datas.put("userInfo", paMap); |
| 299 | 299 | Double bmiD = Double.valueOf(patientWeightService.getBmi(weight, height)).doubleValue(); |
| 300 | 300 | |
| ... | ... | @@ -334,9 +334,9 @@ |
| 334 | 334 | } |
| 335 | 335 | } |
| 336 | 336 | //计算出属于那种类型 偏重 还事负重 还是正常 当前体重-孕前体重 |
| 337 | - Double residualWeight = Double.valueOf(temporaryBloo.getNowWeight()).doubleValue() - Double.valueOf(temporaryBloo.getBeforeWeight()).doubleValue(); | |
| 337 | + Double residualWeight = Double.valueOf(temporaryBloo.getNowWeight()).doubleValue() - Double.valueOf(temporaryUser.getBeforeWeight()).doubleValue(); | |
| 338 | 338 | //把厘米转换成米 |
| 339 | - Double heights = (Double.valueOf(temporaryBloo.getBeforeHeight()).doubleValue()) / 100d; | |
| 339 | + Double heights = (Double.valueOf(temporaryUser.getBeforeHeight()).doubleValue()) / 100d; | |
| 340 | 340 | int cals = this.getRounding((int) this.getCal(bregmatic, residualWeight, low, high, weeks, bmiD, temporaryBloo, heights, temporaryUser)); |
| 341 | 341 | String calStr = cals + "kcal"; |
| 342 | 342 | List<XyPresentationModel> xyPresentationModels = mongoTemplate.find(Query.query(Criteria.where("originWeek").lte(weeks).and("endWeek").gte(weeks)), XyPresentationModel.class); |
| ... | ... | @@ -438,7 +438,7 @@ |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | public double getCal(String bregmatic, double residualWeight, double low, double high, int weeks, double bmiD, TemporaryBloodModel bloodModel, double heights, TemporaryUserModel temporaryUser) { |
| 441 | - Double beforWeight = Double.valueOf(bloodModel.getBeforeWeight()).doubleValue(); | |
| 441 | + Double beforWeight = Double.valueOf(temporaryUser.getBeforeWeight()).doubleValue(); | |
| 442 | 442 | int age = DateUtil.getAge(temporaryUser.getBirth()); |
| 443 | 443 | Double number = 354 - 6.91 * age + 1.12 * (9.36 * beforWeight + 726 * heights); |
| 444 | 444 | //单胎 |
| ... | ... | @@ -528,7 +528,7 @@ |
| 528 | 528 | else if (residualWeight < 0) { |
| 529 | 529 | //重新计算bmi值 |
| 530 | 530 | String weight = bloodModel.getNowWeight(); |
| 531 | - String height = bloodModel.getBeforeHeight(); | |
| 531 | + String height = temporaryUser.getBeforeHeight(); | |
| 532 | 532 | Double bmiDs = Double.valueOf(patientWeightService.getBmi(weight, height)).doubleValue(); |
| 533 | 533 | if (bmiDs < 18.5 && weeks >= 0 && weeks <= 12) { |
| 534 | 534 | return number + 300; |
| ... | ... | @@ -631,7 +631,7 @@ |
| 631 | 631 | } else if (residualWeight < 0) { |
| 632 | 632 | //重新计算bmi值 |
| 633 | 633 | String weight = bloodModel.getNowWeight(); |
| 634 | - String height = bloodModel.getBeforeHeight(); | |
| 634 | + String height = temporaryUser.getBeforeHeight(); | |
| 635 | 635 | Double bmiDs = Double.valueOf(patientWeightService.getBmi(weight, height)).doubleValue(); |
| 636 | 636 | if (bmiDs <= 24.9 && weeks >= 0 && weeks <= 12) { |
| 637 | 637 | return number + 300; |