Commit e3e6b2b8 by lzxry

bugfix

parent 8098009f
...@@ -160,7 +160,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService { ...@@ -160,7 +160,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
}else{ }else{
//TKIO普通流量套餐 //TKIO普通流量套餐
//this.shareIncome4ContractTwo(v, start, end); //this.shareIncome4ContractTwo(v, start, end);
this.shareIncome4ContractTKIO(v, start, end); this.shareIncome4ContractTKIO(v, start, end,false);
} }
break; break;
default:this.shareIncome4Contract(v, start, end);break; default:this.shareIncome4Contract(v, start, end);break;
...@@ -270,7 +270,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService { ...@@ -270,7 +270,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
if(master.getPriceLevel()== Constant.tkioPriceLevelNotLimit){//无限流量走adi计算逻辑 if(master.getPriceLevel()== Constant.tkioPriceLevelNotLimit){//无限流量走adi计算逻辑
shareIncome4Contract(master,start,end); shareIncome4Contract(master,start,end);
}else{//普通流量走tkio计算逻辑 }else{//普通流量走tkio计算逻辑
shareIncome4ContractTKIO(master,start,end); shareIncome4ContractTKIO(master,start,end,false);
} }
}else{//该首次签约/续约合同 绑定了补充协议合同 }else{//该首次签约/续约合同 绑定了补充协议合同
List<Contract> sideLette = contractVO.getSideLette(); List<Contract> sideLette = contractVO.getSideLette();
...@@ -633,7 +633,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService { ...@@ -633,7 +633,7 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
}else{ }else{
Contract contractMaster = contractsArray[i]; Contract contractMaster = contractsArray[i];
if(contracts.contains(contractMaster)){ if(contracts.contains(contractMaster)){
shareIncome4ContractTKIO(contractMaster,start,checkTwoTime(new DateTime(contractMaster.getNextSignedDate()),end)?new DateTime(contractMaster.getNextSignedDate()):end);//到结束的前一天 shareIncome4ContractTKIO(contractMaster,start,end,true);//到结束的前一天
} }
} }
} }
...@@ -666,13 +666,20 @@ public class ShareIncomeServiceImpl implements ShareIncomeService { ...@@ -666,13 +666,20 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
} }
return contractsArray; return contractsArray;
} }
private void shareIncome4ContractTKIO(Contract contract, DateTime start, DateTime end) { private void shareIncome4ContractTKIO(Contract contract, DateTime start, DateTime end,Boolean isNew) {
DateTime[] selected = new DateTime[]{ DateTime[] selected = new DateTime[]{
start, start,
end};//用户筛选开始/结束日期 end};//用户筛选开始/结束日期
DateTime[] contractPart = new DateTime[]{ DateTime[] contractPart=null;
new DateTime(contract.getStartDate()), if(isNew){
new DateTime(contract.getEndDate())};//合同开始结束 时间 contractPart = new DateTime[]{
new DateTime(contract.getStartDate()),
new DateTime(StringUtil.isEmpty(contract.getNextSignedDate())?contract.getEndDate():contract.getNextSignedDate())};//合同开始结束 时间
}else{
contractPart = new DateTime[]{
new DateTime(contract.getStartDate()),
new DateTime(contract.getEndDate())};//合同开始结束 时间
}
DateTime[] usePart = new DateTime[]{ DateTime[] usePart = new DateTime[]{
selected[0].compareTo(contractPart[0]) <= 0 ? contractPart[0] : selected[0], selected[0].compareTo(contractPart[0]) <= 0 ? contractPart[0] : selected[0],
selected[1].compareTo(contractPart[1]) >= 0 ? contractPart[1] : selected[1] selected[1].compareTo(contractPart[1]) >= 0 ? contractPart[1] : selected[1]
......
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