Commit aface8696b3d9c0e066c4277ccbd7390c45b13ec

Authored by liquanyu
1 parent 3a2e2e7b9f

update code

Showing 1 changed file with 17 additions and 1 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ aface86
... ... @@ -5,6 +5,7 @@
5 5 import com.lyms.platform.common.enums.*;
6 6 import com.lyms.platform.common.result.BaseObjectResponse;
7 7 import com.lyms.platform.common.utils.DateUtil;
  8 +import com.lyms.platform.common.utils.ExceptionUtils;
8 9 import com.lyms.platform.common.utils.JsonUtil;
9 10 import com.lyms.platform.operate.web.request.MatDeliverAddRequest;
10 11 import com.lyms.platform.operate.web.result.HighScoreResult;
11 12  
... ... @@ -519,8 +520,23 @@
519 520 }
520 521  
521 522 map.put("ydfmw",ydfmw);
522   - map.put("ydqjd",FunvCommonUtil.getBaseicConfigByid(ydqjd,basicConfigService));
  523 + map.put("ydqjd",FunvCommonUtil.getBaseicConfigByid(ydqjd, basicConfigService));
523 524 map.put("bChao",data.getbChao());
  525 +
  526 + //体重指数 yqWeight
  527 + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(data.getYqWeight()) && com.lyms.platform.common.utils.StringUtils.isNotEmpty(data.getHeight()))
  528 + {
  529 + try {
  530 + //体重指数计算规则:孕前体重/身高(单位米)的平方
  531 + java.text.DecimalFormat df=new java.text.DecimalFormat("#.#");
  532 + double tzzs = Double.parseDouble(data.getYqWeight()) / Math.pow(Double.parseDouble(data.getHeight()) / 100, 2);
  533 + System.out.println("tzzs=================="+tzzs);
  534 + map.put("tzzs", df.format(tzzs));
  535 + }catch (Exception e)
  536 + {
  537 + ExceptionUtils.catchException(e,"体重指数计算错误");
  538 + }
  539 + }
524 540  
525 541  
526 542 /* 诊断指导 */