|
|
@@ -1087,22 +1087,18 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
}
|
|
|
|
|
|
// 判断是否已经结算完成, 考虑回款差额
|
|
|
- if (surplusPremium.compareTo(BigDecimalUtil.add(settlementVo.getActualReceivedAmount(), platformSettlementVo.getSettlementVo().getSettlementPaymentDifference())) == 0) {
|
|
|
- log.info("序号为[{}]的发票已经结算完成",invoice.getId());
|
|
|
- // 更新发票状态
|
|
|
- invoice.setStatus("1");
|
|
|
- insPlyIncomeInvoiceMapper.insert(invoice);
|
|
|
- // 判断是需要更新哪个字段
|
|
|
- this.updateIncomeSettlementStatus(invoice.getInvoiceType(), invoicingVo.getIncomeIds(), settlementDateTime);
|
|
|
- }else{
|
|
|
- log.info("invoiceId=[{}]还剩[{}]钱没有结算",settlementVo.getInvoicingId(), surplusPremium.subtract(settlementVo.getActualReceivedAmount()));
|
|
|
- }
|
|
|
- return true;
|
|
|
+ log.info("序号为[{}]的发票已经结算完成",invoice.getId());
|
|
|
+ // 更新发票状态
|
|
|
+ invoice.setStatus("1");
|
|
|
+ insPlyIncomeInvoiceMapper.insert(invoice);
|
|
|
+ // 判断是需要更新哪个字段
|
|
|
+ this.updateIncomeSettlementStatus(invoice.getInvoiceType(), invoicingVo.getIncomeIds(), settlementDateTime);
|
|
|
} catch (Exception e) {
|
|
|
log.error("平台结算异常. settlementVo=[{}]",JSONUtil.toJsonStr(settlementVo), e);
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
throw new RuntimeException(e.getMessage());
|
|
|
}
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
@Override
|