|
@@ -1232,7 +1232,7 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
|
|
|
Double nowCurCost = coalPaymentInfo1.getCurrentAverageAllocatedCost();
|
|
|
coalPaymentInfo1.setDistributableAmount(nowDisAmount + expenseInfo1.getAmountMoney());
|
|
|
coalPaymentInfo1.setCurrentAverageAllocatedCost((nowCurCost*13/550*nowDisAmount +
|
|
|
- expenseInfo1.getCoalPrice()*13/550*expenseInfo1.getAmountMoney()) / (nowDisAmount + expenseInfo1.getAmountMoney()));
|
|
|
+ (expenseInfo1.getCoalPrice()!=null?expenseInfo1.getCoalPrice():0d)*13/550*expenseInfo1.getAmountMoney()) / (nowDisAmount + expenseInfo1.getAmountMoney()));
|
|
|
coalPaymentInfoService.updateById(coalPaymentInfo1);
|
|
|
}else {
|
|
|
//不为空, 编辑
|
|
@@ -1242,7 +1242,7 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
|
|
|
Double nowCurCost = coalPaymentInfo.getCurrentAverageAllocatedCost();
|
|
|
coalPaymentInfo.setDistributableAmount(nowDisAmount + expenseInfo1.getAmountMoney());
|
|
|
coalPaymentInfo.setCurrentAverageAllocatedCost((nowCurCost*13/550*nowDisAmount +
|
|
|
- expenseInfo1.getCoalPrice()*13/550*expenseInfo1.getAmountMoney()) / (nowDisAmount + expenseInfo1.getAmountMoney()));
|
|
|
+ (expenseInfo1.getCoalPrice()!=null?expenseInfo1.getCoalPrice():0d)/550*expenseInfo1.getAmountMoney()) / (nowDisAmount + expenseInfo1.getAmountMoney()));
|
|
|
coalPaymentInfoService.updateById(coalPaymentInfo);
|
|
|
}
|
|
|
//付款之后费用状态变成已完成
|