fix: 金蝶推送组织编码缺失报错改显示组织名称替代部门ID
This commit is contained in:
+7
-3
@@ -592,9 +592,13 @@ public class KingdeeApBillSyncSupport {
|
||||
*/
|
||||
public String bfiOrgNumber(ContractManage contract) {
|
||||
Dept dept = contract.getOrganizationId() == null ? null : SysCache.getDept(contract.getOrganizationId());
|
||||
// dept为空 或者 deptCode为空,直接报错
|
||||
if (dept == null || Func.isBlank(dept.getDeptCode())) {
|
||||
throw new ServiceException("推送金蝶失败,合同所属组织编码不能为空,请检查部门ID【" + contract.getOrganizationId() + "】对应的部门是否维护部门编码");
|
||||
// dept为空,直接报错
|
||||
if (dept == null) {
|
||||
throw new ServiceException("推送金蝶失败,合同所属组织不存在,请检查合同所属组织配置");
|
||||
}
|
||||
// deptCode为空,直接报错
|
||||
if (Func.isBlank(dept.getDeptCode())) {
|
||||
throw new ServiceException("推送金蝶失败,合同所属组织编码不能为空,请检查组织[" + dept.getDeptName() + "]是否维护部门编码");
|
||||
}
|
||||
return dept.getDeptCode();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user