Commit 15d5a916 by kangxiaoshan

1

parent e0ac8d7b
......@@ -2419,7 +2419,7 @@ public class ContractServiceImpl implements ContractService {
//不含稅收入
//以下结果统一 *100
// Long excludTax = v.getMoney() * 6 / 100;
Long excludTax = (long) (v.getMoney() * 100 * 0.06);
Long excludTax = v.getMoney() * 100 - (long) (v.getMoney() * 100 * 0.06);
v.setIncomeExcludingTax(excludTax);
DateTime formStart = new DateTime(startDate);
......@@ -2450,9 +2450,10 @@ public class ContractServiceImpl implements ContractService {
//时间范围合同结束时间时 分两部分计算
//第一部分
intervalIncome = v.getIncomeExcludingTax() / contracAllDays * (contractFormRange - 1);
//第二部分
Long intervalIncomePart2 = (long) (v.getMoney() -
(v.getMoney() * 100 / contracAllDays * (contracAllDays - 1)) * 1.0 / 100) * 100;
//此处 除100 计算完成再扩大100倍
Long intervalIncomePart2 = (long) (v.getIncomeExcludingTax() * 1.0 / 100 -
((v.getIncomeExcludingTax() * 1.0 / 100 / contracAllDays * (contracAllDays - 1)))) * 100;
intervalIncome += intervalIncomePart2;
v.setIntervaIncomeShare(intervalIncome);
......@@ -2468,7 +2469,6 @@ public class ContractServiceImpl implements ContractService {
//分摊总收入
v.setIncomeShareAll(intervalIncome + v.getAdjustmentFund());
});
return contracts;
......@@ -2484,7 +2484,6 @@ public class ContractServiceImpl implements ContractService {
System.out.println(10023L * 1.0 / 100);
System.out.println((129 * 100 / 111) * 1.0 / 100);
System.out.println();
}
......
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