|
|
|
@@ -278,7 +278,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
end = new BigDecimal(revenueArray[1]).divide(new BigDecimal(365), 10, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(dayCount)); |
|
|
|
} |
|
|
|
if(EnumGetRatioFrom.RENT.getCode().equals(from)) { |
|
|
|
revenue = revenue.divide(new BigDecimal(12)); |
|
|
|
revenue = revenue.divide(new BigDecimal(12)).setScale(10, RoundingMode.HALF_EVEN); |
|
|
|
} |
|
|
|
}else if(EnumMissTimeType.MONTH.getCode().equals(timeType)){ |
|
|
|
if(EnumGetRatioFrom.BILL.getCode().equals(from)) { |
|
|
|
@@ -287,7 +287,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
} |
|
|
|
}else if(EnumMissTimeType.PERIOD.getCode().equals(timeType)){ |
|
|
|
if(EnumGetRatioFrom.RENT.getCode().equals(from)) { |
|
|
|
revenue = revenue.divide(new BigDecimal(period)); |
|
|
|
revenue = revenue.divide(new BigDecimal(period)).setScale(10, RoundingMode.HALF_EVEN);; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -305,7 +305,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
end = new BigDecimal(revenueArray[1]).divide(new BigDecimal(365), 10, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(dayCount)); |
|
|
|
} |
|
|
|
if(EnumGetRatioFrom.RENT.getCode().equals(from)) { |
|
|
|
revenue = revenue.divide(new BigDecimal(12)); |
|
|
|
revenue = revenue.divide(new BigDecimal(12)).setScale(10, RoundingMode.HALF_EVEN);; |
|
|
|
} |
|
|
|
}else if(EnumMissTimeType.MONTH.getCode().equals(timeType)){ |
|
|
|
if(EnumGetRatioFrom.BILL.getCode().equals(from)) { |
|
|
|
@@ -313,7 +313,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
} |
|
|
|
}else if(EnumMissTimeType.PERIOD.getCode().equals(timeType)){ |
|
|
|
if(EnumGetRatioFrom.RENT.getCode().equals(from)) { |
|
|
|
revenue = revenue.divide(new BigDecimal(period)); |
|
|
|
revenue = revenue.divide(new BigDecimal(period)).setScale(10, RoundingMode.HALF_EVEN);; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -321,13 +321,13 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
ratioVo.setRatio(ratio); |
|
|
|
|
|
|
|
//计算超出部分 |
|
|
|
BigDecimal payRatio = new BigDecimal(ratio).divide(new BigDecimal(10000)); |
|
|
|
BigDecimal payRatio = new BigDecimal(ratio).divide(new BigDecimal(10000)).setScale(10, RoundingMode.HALF_EVEN);; |
|
|
|
BigDecimal balance = new BigDecimal(revenueLong).subtract(end.multiply(new BigDecimal(1000000))); |
|
|
|
BigDecimal price = balance.multiply(payRatio).setScale(2, RoundingMode.HALF_EVEN); |
|
|
|
|
|
|
|
array = ratioList.get(i-1).split(":"); |
|
|
|
Integer frontatio = Integer.parseInt(array[1]); |
|
|
|
BigDecimal frontRatio = new BigDecimal(frontatio).divide(new BigDecimal(10000)); |
|
|
|
BigDecimal frontRatio = new BigDecimal(frontatio).divide(new BigDecimal(10000)).setScale(10, RoundingMode.HALF_EVEN);; |
|
|
|
BigDecimal frontPrice = end.multiply(new BigDecimal(1000000).multiply(frontRatio).setScale(2, RoundingMode.HALF_EVEN)); |
|
|
|
|
|
|
|
ratioVo.setBalance(price.add(frontPrice)); |
|
|
|
|