fix: 金蝶推送组织编码改取部门金蝶组织编码(kingdeeDeptCode)
This commit is contained in:
+5
-5
@@ -648,8 +648,8 @@ public class InvoiceApplicationServiceImpl extends BaseServiceImpl<InvoiceApplic
|
|||||||
if (Func.isBlank(entity.getDepartmentEmails())) throw new ServiceException("推送金蝶开票申请失败:部门邮箱(发票推送邮箱)不能为空");
|
if (Func.isBlank(entity.getDepartmentEmails())) throw new ServiceException("推送金蝶开票申请失败:部门邮箱(发票推送邮箱)不能为空");
|
||||||
if (Func.isBlank(entity.getTaxpayerNo())) throw new ServiceException("推送金蝶开票申请失败:购方纳税人识别号不能为空");
|
if (Func.isBlank(entity.getTaxpayerNo())) throw new ServiceException("推送金蝶开票申请失败:购方纳税人识别号不能为空");
|
||||||
Dept dept = entity.getDeptId() == null ? null : SysCache.getDept(entity.getDeptId());
|
Dept dept = entity.getDeptId() == null ? null : SysCache.getDept(entity.getDeptId());
|
||||||
if (dept == null || Func.isBlank(dept.getDeptCode())) {
|
if (dept == null || Func.isBlank(dept.getKingdeeDeptCode())) {
|
||||||
throw new ServiceException("推送金蝶开票申请失败:申请部门[" + Func.toStr(entity.getDeptId()) + "]未维护部门编码,请检查部门数据");
|
throw new ServiceException("推送金蝶开票申请失败:申请部门[" + Func.toStr(entity.getDeptId()) + "]未维护金蝶组织编码,请检查部门数据");
|
||||||
}
|
}
|
||||||
CustomerArchive customer = entity.getReceiverCustomerId() == null ? null : customerArchiveMapper.selectById(entity.getReceiverCustomerId());
|
CustomerArchive customer = entity.getReceiverCustomerId() == null ? null : customerArchiveMapper.selectById(entity.getReceiverCustomerId());
|
||||||
if (customer == null || Func.isBlank(customer.getCustomerCode())) {
|
if (customer == null || Func.isBlank(customer.getCustomerCode())) {
|
||||||
@@ -735,10 +735,10 @@ public class InvoiceApplicationServiceImpl extends BaseServiceImpl<InvoiceApplic
|
|||||||
BigDecimal sheetAmount, List<BfiInvoiceApplySaveEntryDTO> items) {
|
BigDecimal sheetAmount, List<BfiInvoiceApplySaveEntryDTO> items) {
|
||||||
BfiInvoiceApplySaveDTO param = new BfiInvoiceApplySaveDTO();
|
BfiInvoiceApplySaveDTO param = new BfiInvoiceApplySaveDTO();
|
||||||
// ==================== 以下为【必填】字段(BfiInvoiceApplySaveDTO 标注),非必填字段先注释保留 ====================
|
// ==================== 以下为【必填】字段(BfiInvoiceApplySaveDTO 标注),非必填字段先注释保留 ====================
|
||||||
// 【必填】组织.编码:申请部门 deptId → 部门编码
|
// 【必填】组织.编码:申请部门 deptId → 金蝶组织编码
|
||||||
param.setOrgidNumber(dept.getDeptCode());
|
param.setOrgidNumber(dept.getKingdeeDeptCode());
|
||||||
// 【必填】申请部门.编码:同上
|
// 【必填】申请部门.编码:同上
|
||||||
param.setAwrpOrgfieldNumber(dept.getDeptCode());
|
param.setAwrpOrgfieldNumber(dept.getKingdeeDeptCode());
|
||||||
// 【必填】业务单据编号(候选键):单张发票候选 billno(多张发票时开票申请单号-张次序号)
|
// 【必填】业务单据编号(候选键):单张发票候选 billno(多张发票时开票申请单号-张次序号)
|
||||||
param.setBillno(billNo);
|
param.setBillno(billNo);
|
||||||
// 【必填】单据日期:申请日期 yyyy-MM-dd HH:mm:ss
|
// 【必填】单据日期:申请日期 yyyy-MM-dd HH:mm:ss
|
||||||
|
|||||||
+4
-4
@@ -813,11 +813,11 @@ public class KingdeeApBillSyncSupport {
|
|||||||
if (dept == null) {
|
if (dept == null) {
|
||||||
throw new ServiceException("推送金蝶失败,合同所属组织不存在,请检查合同所属组织配置");
|
throw new ServiceException("推送金蝶失败,合同所属组织不存在,请检查合同所属组织配置");
|
||||||
}
|
}
|
||||||
// deptCode为空,直接报错
|
// kingdeeDeptCode为空,直接报错
|
||||||
if (Func.isBlank(dept.getDeptCode())) {
|
if (Func.isBlank(dept.getKingdeeDeptCode())) {
|
||||||
throw new ServiceException("推送金蝶失败,合同所属组织编码不能为空,请检查组织[" + dept.getDeptName() + "]是否维护部门编码");
|
throw new ServiceException("推送金蝶失败,合同所属组织编码不能为空,请检查组织[" + dept.getDeptName() + "]是否维护金蝶组织编码");
|
||||||
}
|
}
|
||||||
return dept.getDeptCode();
|
return dept.getKingdeeDeptCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user