Commit a7ccd1b353ed87b35d430a3db9e4bd4a8eac490c
1 parent
ab124d06e5
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 8 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/NutritionInfoRequest.java
View file @
a7ccd1b
| 1 | 1 | package com.lyms.platform.operate.web.request; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.common.utils.StringUtils; | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * Created by Administrator on 2018-05-07. |
| 5 | 7 | */ |
| ... | ... | @@ -119,6 +121,12 @@ |
| 119 | 121 | } |
| 120 | 122 | |
| 121 | 123 | public void setCurrentWeight(String currentWeight) { |
| 124 | + | |
| 125 | + if (StringUtils.isNotEmpty(currentWeight)) | |
| 126 | + { | |
| 127 | + currentWeight = String.format("%.2f", Double.parseDouble(currentWeight)); | |
| 128 | + } | |
| 129 | + | |
| 122 | 130 | this.currentWeight = currentWeight; |
| 123 | 131 | } |
| 124 | 132 | } |