提交 6feb282a authored 作者: huyufan's avatar huyufan

Merge remote-tracking branch 'origin/v6.5_transport_open_20231115' into test

...@@ -1059,8 +1059,6 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -1059,8 +1059,6 @@ public class OrderChildServiceImpl implements OrderChildService {
// 更新车辆状态 // 更新车辆状态
updateDriverOrderStatusDriverConfirm(orderChild.getTruckId()); updateDriverOrderStatusDriverConfirm(orderChild.getTruckId());
// 生成扣除流水
// 生成计费单 // 生成计费单
saveSettlementDetail(orderChild,orderGoods); saveSettlementDetail(orderChild,orderGoods);
......
...@@ -115,6 +115,8 @@ public class SettlementServiceImpl implements SettlementService { ...@@ -115,6 +115,8 @@ public class SettlementServiceImpl implements SettlementService {
if (subtract.compareTo(BigDecimal.ZERO) <= 0) { if (subtract.compareTo(BigDecimal.ZERO) <= 0) {
settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO); settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
settlementDriverDetail.setPrepayFreightFlag(0);
} else { } else {
if (subtract.subtract(ans).compareTo(BigDecimal.ZERO) >= 0) { if (subtract.subtract(ans).compareTo(BigDecimal.ZERO) >= 0) {
OwnerAccount account = ownerAccountDao.getAccountByOwnerUserNoAndAccountType(orderChild.getOwnerUserNo(), OwnerAccount account = ownerAccountDao.getAccountByOwnerUserNoAndAccountType(orderChild.getOwnerUserNo(),
...@@ -174,20 +176,17 @@ public class SettlementServiceImpl implements SettlementService { ...@@ -174,20 +176,17 @@ public class SettlementServiceImpl implements SettlementService {
// 结算金额 // 结算金额
settlementOwnerDetail.setSettlementFreight(settlementFreightCalc(orderChild.getSettlementWay(),settlementOwnerDetail)); settlementOwnerDetail.setSettlementFreight(settlementFreightCalc(orderChild.getSettlementWay(),settlementOwnerDetail));
if (SettlementOwnerEnum.InvoiceType.ORDINARY.getCode().equals(invoiceType)) {
if (settlementOwnerDetail.getSettlementFreight().compareTo(BigDecimal.ZERO) < 0) { if (settlementOwnerDetail.getSettlementFreight().compareTo(BigDecimal.ZERO) == 0) {
settlementOwnerDetail.setFinalPaymentStatus(SettlementOwnerDetailEnum.FinalPaymentStatus.NO_REQUIRE.getCode()); settlementOwnerDetail.setFinalPaymentStatus(SettlementOwnerDetailEnum.FinalPaymentStatus.NO_REQUIRE.getCode());
} }
settlementOwnerDetail.setInvoiceType(invoiceType);
settlementDriverDetail.setInvoiceType(invoiceType);
//设置司机预付运费标示
if (settlementOwnerDetail.getPrepayFreight().compareTo(BigDecimal.ZERO) > 0) {
settlementDriverDetail.setPrepayFreightFlag(1);
} else { } else {
settlementDriverDetail.setPrepayFreightFlag(0); if (settlementDriverDetail.getSettlementFreight().compareTo(BigDecimal.ZERO) == 0) {
settlementOwnerDetail.setFinalPaymentStatus(SettlementOwnerDetailEnum.FinalPaymentStatus.NO_REQUIRE.getCode());
} }
}
settlementOwnerDetail.setInvoiceType(invoiceType);
settlementDriverDetail.setInvoiceType(invoiceType);
log.info("当前货主结算信息{},车主结算信息:{}", JSONUtil.parse(settlementOwnerDetail), JSONUtil.parse(settlementDriverDetail)); log.info("当前货主结算信息{},车主结算信息:{}", JSONUtil.parse(settlementOwnerDetail), JSONUtil.parse(settlementDriverDetail));
settlementOwnerDetailDao.updateInvoiceType(settlementOwnerDetail); settlementOwnerDetailDao.updateInvoiceType(settlementOwnerDetail);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论