资金计划收款单全量更新优化客户对象取值判断

This commit is contained in:
yuxueliang0813 2025-08-07 15:40:05 +08:00
parent 849e7f555b
commit 21bf67c0ff
1 changed files with 9 additions and 1 deletions

View File

@ -356,7 +356,15 @@ public class RecBillZjjhTask extends AbstractTask implements Plugin {
} }
// 2. 加载客户对象 // 2. 加载客户对象
DynamicObject customer = BusinessDataServiceHelper.loadSingle(id, "bd_customer"); DynamicObject customer = null;
try {
customer = BusinessDataServiceHelper.loadSingle(id, "bd_customer");
}catch(Exception e){
//加载客户对象失败存在客户被删id任然存在于收款单上的情况
logger.error(e.getMessage());
return false; // 客户不存在默认通过
}
if (customer == null) { if (customer == null) {
return false; // 客户不存在默认通过 return false; // 客户不存在默认通过
} }