Commit 4de2f86e470537fc2cb954846c2b09d6b5b4f945
1 parent
f7ce1e3d6a
Exists in
master
and in
6 other branches
体重管理
Showing 1 changed file with 14 additions and 14 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
4de2f86
... | ... | @@ -1355,8 +1355,8 @@ |
1355 | 1355 | { |
1356 | 1356 | status = "处于"; |
1357 | 1357 | kulStart = currentWeight.multiply(new BigDecimal(25)).doubleValue(); |
1358 | - kulEnd = kulStart; | |
1359 | 1358 | } |
1359 | + kulEnd = kulStart; | |
1360 | 1360 | } |
1361 | 1361 | //孕中期 //孕晚期 |
1362 | 1362 | else if (week > 12) |
1363 | 1363 | |
... | ... | @@ -1416,19 +1416,19 @@ |
1416 | 1416 | |
1417 | 1417 | |
1418 | 1418 | public static void main(String[] args) { |
1419 | -// PatientWeightServiceImpl patientWeightService = new PatientWeightServiceImpl(); | |
1420 | -// String bmi = patientWeightService.getBmi("55", "162"); | |
1421 | -// Map<String,String> map = patientWeightService.getComputeKul(55, 62, 20, Double.parseDouble(bmi)); | |
1422 | -// System.out.println(map); | |
1419 | + PatientWeightServiceImpl patientWeightService = new PatientWeightServiceImpl(); | |
1420 | + String bmi = patientWeightService.getBmi("44", "1.58"); | |
1421 | + Map<String,String> map = patientWeightService.getComputeKul(44 , 50, 9, Double.parseDouble(bmi)); | |
1422 | + System.out.println(map); | |
1423 | 1423 | |
1424 | -// double kulStart = 2153.5; | |
1425 | -// int k1 = ((int)kulStart/100)*100; | |
1426 | -// double k2 = kulStart - k1; | |
1427 | -// if (k2 > 50) | |
1428 | -// { | |
1429 | -// k1+=100; | |
1430 | -// } | |
1431 | -// System.out.println(k1); | |
1424 | + double kulStart = 750; | |
1425 | + int k1 = ((int)kulStart/100)*100; | |
1426 | + double k2 = kulStart - k1; | |
1427 | + if (k2 > 50) | |
1428 | + { | |
1429 | + k1+=100; | |
1430 | + } | |
1431 | + System.out.println(k1); | |
1432 | 1432 | } |
1433 | 1433 | } |