Commit 3e6d1705bf219101c0929b33c8f402069fe40a2f

Authored by litao@lymsh.com
1 parent af0f9213f1

bbbbbb

Showing 2 changed files with 2 additions and 2 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ 3e6d170
... ... @@ -266,7 +266,7 @@
266 266  
267 267 // 体质指数(BMI)=孕前体重(kg)÷孕前身高^2(m)
268 268 public static String getBmi(String weight, String height) {
269   - if(StringUtils.isNotBlank(weight) && height != null) {
  269 + if(StringUtils.isNotBlank(weight) && StringUtils.isNotEmpty(height)) {
270 270 Double w = Double.parseDouble(weight);
271 271 Double h = Double.parseDouble(height) / 100l;
272 272 Double bmi = w / (h * h);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 3e6d170
... ... @@ -804,7 +804,7 @@
804 804  
805 805 reportModel.put("series", series);
806 806  
807   - if(bmiD == 20D) {
  807 + if(StringUtils.isEmpty(bmi)) {
808 808 title = "孕前BMI:--";
809 809 } else {
810 810 title = "孕前BMI:" + bmiD;