Commit ad8487fa18112d4b832281e5458ee1ad9a3b118d
1 parent
27e3be90a9
Exists in
master
and in
6 other branches
测量
Showing 1 changed file with 6 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
ad8487f
| ... | ... | @@ -1397,17 +1397,17 @@ |
| 1397 | 1397 | double addWeightStart = 1 + rangeweek.multiply(bigavage).doubleValue(); |
| 1398 | 1398 | double addWeightEnd = 1.5 + rangeweek.multiply(bigavage).doubleValue(); |
| 1399 | 1399 | |
| 1400 | - double kstart = (currentWeight.add(new BigDecimal(addWeightStart)).doubleValue()) * 25 + basekul; | |
| 1401 | - double kend = (currentWeight.add(new BigDecimal(addWeightEnd)).doubleValue()) * 25 + basekul; | |
| 1400 | + double kstart = (beforeWeight.add(new BigDecimal(addWeightStart)).doubleValue()) * 25 + basekul; | |
| 1401 | + double kend = (beforeWeight.add(new BigDecimal(addWeightEnd)).doubleValue()) * 25 + basekul; | |
| 1402 | 1402 | |
| 1403 | 1403 | status = "处于"; |
| 1404 | - if (addWeightEnd > add && (addWeightEnd - add) > 0.5) | |
| 1404 | + if (addWeightEnd < add && (add - addWeightEnd) > 0.5) | |
| 1405 | 1405 | { |
| 1406 | 1406 | status = "高于"; |
| 1407 | 1407 | kstart -= 500; |
| 1408 | 1408 | kend -= 500; |
| 1409 | 1409 | } |
| 1410 | - else if (addWeightEnd < add && (add - addWeightEnd) > 0.5) | |
| 1410 | + else if (addWeightStart > add && (addWeightStart - add) > 0.5) | |
| 1411 | 1411 | { |
| 1412 | 1412 | status = "低于"; |
| 1413 | 1413 | kstart += 500; |
| ... | ... | @@ -1426,8 +1426,8 @@ |
| 1426 | 1426 | |
| 1427 | 1427 | public static void main(String[] args) { |
| 1428 | 1428 | PatientWeightServiceImpl patientWeightService = new PatientWeightServiceImpl(); |
| 1429 | - String bmi = patientWeightService.getBmi("63", "1.6"); | |
| 1430 | - Map<String,String> map = patientWeightService.getComputeKul(64 , 63, 11, Double.parseDouble(bmi)); | |
| 1429 | + String bmi = patientWeightService.getBmi("49", "150"); | |
| 1430 | + Map<String,String> map = patientWeightService.getComputeKul(49 , 51.7, 16, Double.parseDouble(bmi)); | |
| 1431 | 1431 | System.out.println(map); |
| 1432 | 1432 | |
| 1433 | 1433 | // double kulStart = 750; |