|
@@ -311,15 +311,19 @@ public class SaleStatementServiceImpl implements SaleStatementService {
|
|
|
* 处理退税金额
|
|
|
*/
|
|
|
List<TaxRefundDetails> rList = refundDetailsMap.getOrDefault(p.getContractId(),null);
|
|
|
- BigDecimal taxReturnMoney = rList.stream().map(taxRefundDetails -> {
|
|
|
- //获取汇率
|
|
|
- BigDecimal rate = taxRefundDetails.getRate();
|
|
|
- // 获取认领金额
|
|
|
- BigDecimal money = taxRefundDetails.getAmount();
|
|
|
- // 返回兑人民币后金额
|
|
|
- return rate.multiply(money);
|
|
|
- }).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
- p.setTaxReturnMoney(taxReturnMoney);
|
|
|
+ if(CollectionUtils.isNotEmpty(rList)){
|
|
|
+ BigDecimal taxReturnMoney = rList.stream().map(taxRefundDetails -> {
|
|
|
+ //获取汇率
|
|
|
+ BigDecimal rate = taxRefundDetails.getRate();
|
|
|
+ // 获取认领金额
|
|
|
+ BigDecimal money = taxRefundDetails.getAmount();
|
|
|
+ // 返回兑人民币后金额
|
|
|
+ return rate.multiply(money);
|
|
|
+ }).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ p.setTaxReturnMoney(taxReturnMoney);
|
|
|
+ }else{
|
|
|
+ p.setTaxReturnMoney(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|