实物卡片同步设备定时任务优化

This commit is contained in:
zhangzhiguo 2025-11-24 17:26:03 +08:00
parent 7e1608e0f4
commit 6072b60549
1 changed files with 6 additions and 2 deletions

View File

@ -41,6 +41,10 @@ public class NewEquipmentCardTaskPlugin extends AbstractTask {
@Override @Override
public void execute(RequestContext requestContext, Map<String, Object> map) throws KDException { public void execute(RequestContext requestContext, Map<String, Object> map) throws KDException {
assetorg();
}
public static void assetorg(){
// 1. 收集 assetcat.number避免 NPE使用泛型 // 1. 收集 assetcat.number避免 NPE使用泛型
Set<String> strings = new HashSet<>(); Set<String> strings = new HashSet<>();
DynamicObject[] equipmenttype = BusinessDataServiceHelper.load( DynamicObject[] equipmenttype = BusinessDataServiceHelper.load(
@ -389,7 +393,7 @@ public class NewEquipmentCardTaskPlugin extends AbstractTask {
if (totalErrorBuilder.length() > 0) { if (totalErrorBuilder.length() > 0) {
log.error("总报错信息为:\n" + totalErrorBuilder.toString()); log.error("总报错信息为:\n" + totalErrorBuilder.toString());
} }
} // end execute }
/** /**
* 判断给定字符串是否为空null 空字符串 * 判断给定字符串是否为空null 空字符串
@ -525,7 +529,7 @@ public class NewEquipmentCardTaskPlugin extends AbstractTask {
/** /**
* 获取操作错误信息更健壮的空安全处理 * 获取操作错误信息更健壮的空安全处理
*/ */
private String getOperationResultErrorInfos(OperationResult operationResult) { private static String getOperationResultErrorInfos(OperationResult operationResult) {
if (operationResult == null) return StringUtils.EMPTY; if (operationResult == null) return StringUtils.EMPTY;
if (operationResult.isSuccess()) { if (operationResult.isSuccess()) {
return StringUtils.EMPTY; return StringUtils.EMPTY;