fix: 预付款申请,入参调整
This commit is contained in:
+32
-4
@@ -1005,6 +1005,31 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
|
|||||||
return kingdeeApBillSyncSupport.bfiDateTimeText(applyDate);
|
return kingdeeApBillSyncSupport.bfiDateTimeText(applyDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金蝶汇率日期文本(A103-3 预付款路径):优先取付款申请关联结算单页面维护的汇率日期
|
||||||
|
* (正式结算单 settlementId、预结算单 preSettlementId,与 A102-2 统一口径),
|
||||||
|
* 未关联结算单或结算单未维护汇率日期时取付款申请申请日期兜底。
|
||||||
|
*
|
||||||
|
* @param entity 付款申请实体
|
||||||
|
* @param context 金蝶同步上下文(缓存载体)
|
||||||
|
* @return 汇率日期文本
|
||||||
|
*/
|
||||||
|
private String bfiExrateDateText(PaymentApplication entity, KingdeeSyncContext context) {
|
||||||
|
if (entity.getSettlementId() != null) {
|
||||||
|
FormalSettlement settlement = context.settlementCache().computeIfAbsent(entity.getSettlementId(), formalSettlementMapper::selectById);
|
||||||
|
if (settlement != null && settlement.getExchangeRateDate() != null) {
|
||||||
|
return kingdeeApBillSyncSupport.bfiDateTimeText(settlement.getExchangeRateDate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (entity.getPreSettlementId() != null) {
|
||||||
|
PreSettlement preSettlement = preSettlementMapper.selectById(entity.getPreSettlementId());
|
||||||
|
if (preSettlement != null && preSettlement.getExchangeRateDate() != null) {
|
||||||
|
return kingdeeApBillSyncSupport.bfiDateTimeText(preSettlement.getExchangeRateDate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return bfiDateTimeText(entity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送金蝶付款申请单(A103-3 付款申请保存,预付款路径),返回金蝶单据id
|
* 推送金蝶付款申请单(A103-3 付款申请保存,预付款路径),返回金蝶单据id
|
||||||
*
|
*
|
||||||
@@ -1025,6 +1050,8 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
|
|||||||
param.setAwrpSrcSys(bfiProperties.getSrcSys());
|
param.setAwrpSrcSys(bfiProperties.getSrcSys());
|
||||||
// 结算组织.编码
|
// 结算组织.编码
|
||||||
param.setSettleorgNumber(orgNumber);
|
param.setSettleorgNumber(orgNumber);
|
||||||
|
// 部门.编码
|
||||||
|
param.setAwrpDepartmentNumber(orgNumber);
|
||||||
// 【必填】单据类型.编码
|
// 【必填】单据类型.编码
|
||||||
param.setBilltypeNumber(bfiProperties.getPayApply().getBilltype());
|
param.setBilltypeNumber(bfiProperties.getPayApply().getBilltype());
|
||||||
// 【必填】申请日期:yyyy-MM-dd HH:mm:ss(各接口统一格式)
|
// 【必填】申请日期:yyyy-MM-dd HH:mm:ss(各接口统一格式)
|
||||||
@@ -1045,13 +1072,13 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
|
|||||||
param.setAwrpSrcType(bfiProperties.getPayApply().getSrcType());
|
param.setAwrpSrcType(bfiProperties.getPayApply().getSrcType());
|
||||||
// 【必填】汇率表.编码
|
// 【必填】汇率表.编码
|
||||||
param.setExratetableNumber(bfiProperties.getPayApply().getExratetable());
|
param.setExratetableNumber(bfiProperties.getPayApply().getExratetable());
|
||||||
// 【必填】汇率日期
|
// 【必填】汇率日期:取付款申请关联结算单页面维护的汇率日期(与 A102-2 统一口径),未关联/未维护时取申请日期
|
||||||
param.setExratedate(applyDateText);
|
param.setExratedate(this.bfiExrateDateText(entity, context));
|
||||||
// 付款渠道(非必传)
|
// 付款渠道(非必传)
|
||||||
param.setAwrpTextfield1(bfiPaymentMethodLabel(entity.getPaymentMethod()));
|
param.setAwrpTextfield1(bfiPaymentMethodLabel(entity.getPaymentMethod()));
|
||||||
|
|
||||||
// 来源单据
|
// 来源单据
|
||||||
param.setAwrpSrcBt(KingdeeBfiConstant.BFI_CONTRACT_SRC_BT);
|
// param.setAwrpSrcBt(KingdeeBfiConstant.BFI_CONTRACT_SRC_BT);
|
||||||
// 有上游合同才传 awrpSrcConNo
|
// 有上游合同才传 awrpSrcConNo
|
||||||
// if (entity.getContractId() != null) {
|
// if (entity.getContractId() != null) {
|
||||||
// param.setAwrpSrcConNo(entity.getContractNo());
|
// param.setAwrpSrcConNo(entity.getContractNo());
|
||||||
@@ -1075,7 +1102,8 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
|
|||||||
// 期望付款日(非必传)
|
// 期望付款日(非必传)
|
||||||
// entry.setEExpaydate(applyDateText);
|
// entry.setEExpaydate(applyDateText);
|
||||||
// 【必填】项目.项目编码
|
// 【必填】项目.项目编码
|
||||||
entry.setProjectNumber(bfiProjectNumber(entity, context));
|
// entry.setProjectNumber(bfiProjectNumber(entity, context));
|
||||||
|
entry.setProjectNumber(KingdeeBfiConstant.BFI_AP_BILL_PROJECT_NUMBER_TEST);
|
||||||
// 【必填】对方系统唯一行id(不能重复):付款申请号-1
|
// 【必填】对方系统唯一行id(不能重复):付款申请号-1
|
||||||
entry.setAwrpEntryCode(bfiEntryCode(entity.getPaymentNo(), 1));
|
entry.setAwrpEntryCode(bfiEntryCode(entity.getPaymentNo(), 1));
|
||||||
// 备注(非必传)
|
// 备注(非必传)
|
||||||
|
|||||||
Reference in New Issue
Block a user