Commit 780ab68d by kangxiaoshan

1

parent 6c21e29a
......@@ -2429,11 +2429,11 @@ public class ContractServiceImpl implements ContractService {
// 时间范围是否包含合同结束日期
boolean containEnd = formEnd.compareTo(contractEnd) > 0;
// 时间范围是否包含合同结束开始日期
boolean containStart = formStart.compareTo(contractStart) > 0;
boolean containStart = formStart.compareTo(contractStart) <= 0;
//所选结束时间包含合同结束时间 取合同结束时间 反之 取所选结束时间
DateTime usedEnd = containEnd ? contractEnd : formEnd;
//所选开始时间包含合同开始时间 则取合同开始时间 反之 取所选开始时间
DateTime usedStart = containStart ? contractEnd : formEnd;
DateTime usedStart = containStart ? contractStart : formStart;
v.setIntervalUseDays(Days.daysBetween(contractStart, usedEnd).getDays() + 1);//区间使用天数
......@@ -2449,7 +2449,7 @@ public class ContractServiceImpl implements ContractService {
if (containEnd) {
//时间范围合同结束时间时 分两部分计算
//第一部分
intervalIncome = (v.getMoney() * 100) / contracAllDays * (contractFormRange - 1);
intervalIncome = v.getIncomeExcludingTax() / contracAllDays * (contractFormRange - 1);
//第二部分
Long intervalIncomePart2 = (long) (v.getMoney() -
(v.getMoney() * 100 / contracAllDays * (contracAllDays - 1)) * 1.0 / 100) * 100;
......@@ -2458,7 +2458,7 @@ public class ContractServiceImpl implements ContractService {
v.setIntervaIncomeShare(intervalIncome);
} else {
intervalIncome = v.getMoney() * 100 / contracAllDays * contractFormRange;
intervalIncome = v.getIncomeExcludingTax() / contracAllDays * contractFormRange;
v.setIntervaIncomeShare(intervalIncome);
}
......
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