Commit 18fb79bf by lzxry

cas合同总天数修复

parent 764b8868
...@@ -221,14 +221,16 @@ public class ShareIncomeServiceImpl implements ShareIncomeService { ...@@ -221,14 +221,16 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
contract.setIncomeExcludingTax(excludTax); contract.setIncomeExcludingTax(excludTax);
BigDecimal oneTimeRecognizedRevenue = null; BigDecimal oneTimeRecognizedRevenue = null;
BigDecimal dailyRevenueRecognition = null;
if(contract.getOneTime()!=null&&contract.getOneTime()==false){//处理cas是否计算一次性收入标识 if(contract.getOneTime()!=null&&contract.getOneTime()==false){//处理cas是否计算一次性收入标识
oneTimeRecognizedRevenue = new BigDecimal("0"); oneTimeRecognizedRevenue = new BigDecimal("0");
dailyRevenueRecognition = bigDecimal.multiply(new BigDecimal("100"));
}else{ }else{
oneTimeRecognizedRevenue = bigDecimal.multiply(new BigDecimal("0.9")); oneTimeRecognizedRevenue = bigDecimal.multiply(new BigDecimal("90"));
dailyRevenueRecognition = bigDecimal.multiply(new BigDecimal("10"));//0.1*100=10,前端拿到区间分摊收入/100得到最终的值
} }
BigDecimal dailyRevenueRecognition = bigDecimal.multiply(new BigDecimal("10"));//0.1*100=10,前端拿到区间分摊收入/100得到最终的值
contract.setOneTimeRecognizedRevenue(oneTimeRecognizedRevenue.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()); contract.setOneTimeRecognizedRevenue(oneTimeRecognizedRevenue.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
int contractAllDay = getDayRange(contractPart[0], contractPart[1]) + 1;//合同总天数 int contractAllDay = getDayRange(contractValidPart[0], contractValidPart[1]) + 1;//合同总天数
//处理精度 //处理精度
BigDecimal dayShareIncome = dailyRevenueRecognition.divide(new BigDecimal(String.valueOf(contractAllDay)),8,BigDecimal.ROUND_HALF_UP); BigDecimal dayShareIncome = dailyRevenueRecognition.divide(new BigDecimal(String.valueOf(contractAllDay)),8,BigDecimal.ROUND_HALF_UP);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment