sap生成付款申请单的组织为空优化
This commit is contained in:
parent
edc0c190d2
commit
2c0202d516
|
|
@ -166,6 +166,11 @@ public class QuerySapCreatePayApplyTask extends AbstractTask {
|
||||||
// 公司编号 bukrs
|
// 公司编号 bukrs
|
||||||
QFilter Q1 = new QFilter("number", QCP.equals, bukrs);
|
QFilter Q1 = new QFilter("number", QCP.equals, bukrs);
|
||||||
DynamicObject org = BusinessDataServiceHelper.loadSingle(orgEntName, new QFilter[]{Q1});
|
DynamicObject org = BusinessDataServiceHelper.loadSingle(orgEntName, new QFilter[]{Q1});
|
||||||
|
if(org == null){
|
||||||
|
logger.error("同步失败,凭证号:" + fkBillNum + "的公司未在金蝶找到对应公司");
|
||||||
|
JhzjUtils.saveLog(fkBillNum, apimenthod, it_list.toJSONString(), "同步失败,SAP的公司未在金蝶找到对应公司", false, "API");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// 申请金额 , 汇率 , 申请金额折结算币别
|
// 申请金额 , 汇率 , 申请金额折结算币别
|
||||||
BigDecimal amount = BigDecimal.ZERO;
|
BigDecimal amount = BigDecimal.ZERO;
|
||||||
|
|
|
||||||
|
|
@ -499,8 +499,11 @@ public class ApplyAdjustBillControler {
|
||||||
handleError("同步失败,调整单号:" + fkBillNum + "的费控单据已锁定", fkBillNum, null);
|
handleError("同步失败,调整单号:" + fkBillNum + "的费控单据已锁定", fkBillNum, null);
|
||||||
return "同步失败,调整单号:" + fkBillNum + "的费控单据已锁定";
|
return "同步失败,调整单号:" + fkBillNum + "的费控单据已锁定";
|
||||||
}
|
}
|
||||||
DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", "id", new QFilter("number", "=", orgNum).toArray());
|
DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", new QFilter("number", "=", orgNum).toArray());
|
||||||
|
if (org == null) {
|
||||||
|
handleError("同步失败,调整单号:" + fkBillNum + "的公司未在金蝶找到对应公司", fkBillNum, null);
|
||||||
|
return "同步失败,调整单号:" + fkBillNum + "的公司未在金蝶找到对应公司";
|
||||||
|
}
|
||||||
// 设置组织信息
|
// 设置组织信息
|
||||||
ap_payapply.set("settleorg", org);
|
ap_payapply.set("settleorg", org);
|
||||||
ap_payapply.set("applyorg", org);
|
ap_payapply.set("applyorg", org);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue