Commit 31fe73db9595e1d98fdfec329ad6faf69f0e3355

Authored by liquanyu
1 parent bbcb4cc5dd

威海体重

Showing 1 changed file with 11 additions and 5 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ 31fe73d
... ... @@ -1008,13 +1008,19 @@
1008 1008 if (StringUtils.isNotEmpty(range)) {
1009 1009 String[] array = range.split("-");
1010 1010 double cz = getDiff(beforeWeight, weight);
1011   - if ((cz-Double.parseDouble(array[1])) >= add && cz/Double.parseDouble(array[1]) > prcent)
  1011 + if (Double.parseDouble(array[0]) > cz)
1012 1012 {
1013   - level = 1;
  1013 + if ((Double.parseDouble(array[0])-Math.abs(cz))*prcent < 1)
  1014 + {
  1015 + level = -1;
  1016 + }
1014 1017 }
1015   - else if ((Double.parseDouble(array[0])-cz) >= add && Double.parseDouble(array[0])/cz > prcent)
  1018 + else if (Double.parseDouble(array[1]) < cz)
1016 1019 {
1017   - level = -1;
  1020 + if ((cz-Double.parseDouble(array[1]))*prcent > 1)
  1021 + {
  1022 + level = 1;
  1023 + }
1018 1024 }
1019 1025 }
1020 1026 return level;
... ... @@ -1036,7 +1042,7 @@
1036 1042 double cz = getDiff(beforeWeight, weight);
1037 1043 if (Double.parseDouble(array[0]) > cz)
1038 1044 {
1039   - if ((Double.parseDouble(array[0])-cz)*prcent < 1)
  1045 + if ((Double.parseDouble(array[0])-Math.abs(cz))*prcent < 1)
1040 1046 {
1041 1047 level = -1;
1042 1048 }