|
|
|
@@ -820,7 +820,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
for (int j = 0; j < arraySize; j++) { |
|
|
|
rentInfoObject = rentInfoArray.getJSONObject(j); |
|
|
|
adjustRatio = rentInfoObject.getJSONArray("adjustRatio"); |
|
|
|
BigDecimal price = new BigDecimal(priceList.get(i)[j]).add(new BigDecimal(adjustRatio.getString(i))); |
|
|
|
BigDecimal price = new BigDecimal(priceList.get(i)[j]).add(new BigDecimal(adjustRatio.getString(i)).multiply(new BigDecimal(100))); |
|
|
|
priceArrs[j] = price.setScale(0, RoundingMode.HALF_EVEN).longValue(); |
|
|
|
} |
|
|
|
priceList.add(priceArrs); |
|
|
|
@@ -869,10 +869,18 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
priceArrs = new long[size]; |
|
|
|
priceArrs[0] = price; |
|
|
|
BigDecimal priceD = new BigDecimal(price); |
|
|
|
for (int i = 1; i < size; i++) { |
|
|
|
BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(10000)); |
|
|
|
priceD = priceD.add(divide); |
|
|
|
priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); |
|
|
|
if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { |
|
|
|
for (int i = 1; i < size; i++) { |
|
|
|
BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(10000)); |
|
|
|
priceD = priceD.add(divide); |
|
|
|
priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); |
|
|
|
} |
|
|
|
} else { |
|
|
|
for (int i = 1; i < size; i++) { |
|
|
|
BigDecimal divide = priceD.add(new BigDecimal(integers.get(i))); |
|
|
|
priceD = priceD.add(divide); |
|
|
|
priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|