fix: 调整付款申请推送金蝶参数设置
This commit is contained in:
+16
-6
@@ -397,27 +397,37 @@ public class PaymentApplicationServiceImpl extends BaseServiceImpl<PaymentApplic
|
||||
param.setExratetableNumber(bfiPayApplyExratetable);
|
||||
param.setExratedate(applyDateText);
|
||||
param.setAwrpTextfield1(bfiPaymentMethodLabel(entity.getPaymentMethod()));
|
||||
if (entity.getContractId() != null) {
|
||||
param.setAwrpSrcBt(BFI_CONTRACT_SRC_BT);
|
||||
param.setAwrpSrcConNo(entity.getContractNo());
|
||||
}
|
||||
|
||||
// 来源单据
|
||||
param.setAwrpSrcBt(BFI_CONTRACT_SRC_BT);
|
||||
// 有上游合同才传 awrpSrcConNo
|
||||
// if (entity.getContractId() != null) {
|
||||
// param.setAwrpSrcConNo(entity.getContractNo());
|
||||
// }
|
||||
|
||||
BfiPayApplySaveEntryDTO entry = new BfiPayApplySaveEntryDTO();
|
||||
entry.setEPaymenttypeNumber("settlement_payment".equals(entity.getPaymentType()) ? BFI_PAYMENT_TYPE_FORMAL : BFI_PAYMENT_TYPE_PREPAY);
|
||||
entry.setEAsstacttype(BFI_SUPPLIER_ASSTACT_TYPE);
|
||||
// 供应商编码
|
||||
entry.setEAsstactNumber(bfiSupplierCode(entity));
|
||||
entry.setEAssacct(entity.getBankAccount());
|
||||
entry.setEBebankNumber(entity.getBankName());
|
||||
entry.setEPayamount(applyAmount);
|
||||
// 应付金额
|
||||
// entry.setEPayamount(applyAmount);
|
||||
// 申请金额
|
||||
entry.setEApplyamount(applyAmount);
|
||||
entry.setEExpaydate(applyDateText);
|
||||
// entry.setEExpaydate(applyDateText);
|
||||
entry.setProjectNumber(bfiProjectNumber(entity));
|
||||
entry.setAwrpEntryCode(entity.getPaymentNo() + "-1");
|
||||
entry.setERemark(entity.getRemark());
|
||||
param.setEntry(List.of(entry));
|
||||
|
||||
BfiBillSaveResultVO saveResult = bfiService.savePrePayApply(param);
|
||||
// BfiBillSaveResultVO saveResult = null;
|
||||
if (saveResult == null || Func.isEmpty(saveResult.getResult())) {
|
||||
throw new ServiceException("推送金蝶付款申请失败,金蝶未返回单据结果");
|
||||
}
|
||||
|
||||
BfiBillSaveResultItemVO item = saveResult.getResult().get(0);
|
||||
if (!Boolean.TRUE.equals(item.getBillStatus()) || item.getId() == null) {
|
||||
String errorText = Func.isEmpty(item.getErrors()) ? "未知错误" : String.join(";", item.getErrors());
|
||||
|
||||
Reference in New Issue
Block a user