Commit 019712eb by lzxry

bugfix

parent deea7cdb
......@@ -335,12 +335,15 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
totalFlow=totalFlow-accruingFlow+contract.getTrackFlow();
totalprice=totalprice-accruingAmounts+contract.getMoney();
contract.setIncomeExcludingTax(new BigDecimal(totalprice/1.06)
.setScale(2, BigDecimal.ROUND_HALF_UP).longValue());
BigDecimal unitPriceAccurate = new BigDecimal(totalprice/1.06/totalFlow)
.setScale(2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100L)).longValue());
BigDecimal unitPriceAccurate =null;
if(!contract.getPriceLevel().equals(Constant.tkioPriceLevelNotLimit)){
unitPriceAccurate = new BigDecimal(totalprice/1.06/totalFlow)
.setScale(16, BigDecimal.ROUND_HALF_UP);//当前合同的单价
//四舍五入单价
double unitPrice = unitPriceAccurate.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
contract.setUnitPrice(unitPrice);
}
boolean isLateContract = false; // 是否为晚录合同(为了兼容历史数据 此处做冗余判断)
if (ContractStatusEnum.LATE.getKey().equals(contract.getStatus())) {
isLateContract = true;
......@@ -621,7 +624,6 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
}
}
}
//多个合同其中有一个无限流量的,这组全部都走adi逻辑,否则用新需求的逻辑计算
}
}
......@@ -636,6 +638,14 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
Contract temp = contractsArray[j];
contractsArray[j] = contractsArray[j+1];
contractsArray[j + 1] = temp;
}else if (contractsArray[j].getCreateTime().getTime() == contractsArray[j + 1].getCreateTime().getTime()){
String contractCode = StringUtil.matchNumber(contractsArray[j].getContractCode());
String contractCodeMin = StringUtil.matchNumber(contractsArray[j+ 1].getContractCode());
if(Long.valueOf(contractCode)>Long.valueOf(contractCodeMin)){
Contract temp = contractsArray[j];
contractsArray[j] = contractsArray[j+1];
contractsArray[j + 1] = temp;
}
}
}
}
......
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