| | |
| | | if (cumulative.compareTo(byId.getMoney()) <= 0 && cumulative1.compareTo(byId.getMoney()) >= 0) { |
| | | byId.setLevel(list.get(i).getLevel()); |
| | | }else{ |
| | | byId.setLevel(list.get(i).getLevel()); |
| | | if (cumulative1.compareTo(byId.getMoney())<=0){ |
| | | byId.setLevel(list.get(i).getLevel()); |
| | | } |
| | | |
| | | } |
| | | }else { |
| | | BigDecimal cumulative = list.get(i - 1).getCumulativeConsumption(); |
| | | BigDecimal cumulative1 = list.get(i).getCumulativeConsumption(); |
| | | if (cumulative.compareTo(byId.getMoney()) <= 0 && cumulative1.compareTo(byId.getMoney()) >= 0) { |
| | | byId.setLevel(list.get(i).getLevel()); |
| | | if (i!=0&&i!=list.size()-1){ |
| | | BigDecimal cumulative = list.get(i - 1).getCumulativeConsumption(); |
| | | BigDecimal cumulative1 = list.get(i).getCumulativeConsumption(); |
| | | if (cumulative.compareTo(byId.getMoney()) <= 0 && cumulative1.compareTo(byId.getMoney()) >= 0) { |
| | | byId.setLevel(list.get(i).getLevel()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | this.updateById(byId); |
| | | } |
| | | |
| | | /** |