修复属性检查以及检入时因为NULL的原因报错

This commit is contained in:
supercjj2023 2025-08-21 10:00:55 +08:00
parent 7bd39c4653
commit fd11db648d
2 changed files with 8 additions and 4 deletions

View File

@ -2519,9 +2519,10 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
if (property.PropertyName == "所属系统")
{
var topName = GetTopDataItemTopName(property.PropertyValue, nameMap, idMap, topCache);
if (!string.IsNullOrEmpty(topName) && topName.Trim() != targetTopSystemName.Trim())
if (!string.IsNullOrEmpty(topName) && !string.Equals(topName.Trim(), targetTopSystemName?.Trim(), StringComparison.Ordinal))
{
toRemoveIds.Add(property.EngineDataID);
if (!string.IsNullOrEmpty(property.EngineDataID))
toRemoveIds.Add(property.EngineDataID);
}
}
}
@ -2551,6 +2552,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
Dictionary<string, ec_dataitemdetailEntity> idMap,
Dictionary<string, string> cache)
{
if (string.IsNullOrEmpty(itemName)) return null;
if (cache.ContainsKey(itemName))
return cache[itemName];

View File

@ -1088,9 +1088,10 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
if (property.PropertyName == "所属系统")
{
var topName = GetTopDataItemTopName(property.PropertyValue, nameMap, idMap, topCache);
if (!string.IsNullOrEmpty(topName) && topName.Trim() != targetTopSystemName.Trim())
if (!string.IsNullOrEmpty(topName) && !string.Equals(topName.Trim(), targetTopSystemName?.Trim(), StringComparison.Ordinal))
{
toRemoveIds.Add(property.EngineDataID);
if (!string.IsNullOrEmpty(property.EngineDataID))
toRemoveIds.Add(property.EngineDataID);
}
}
}
@ -1116,6 +1117,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
Dictionary<string, ec_dataitemdetailEntity> idMap,
Dictionary<string, string> cache)
{
if (string.IsNullOrEmpty(itemName)) return null;
if (cache.ContainsKey(itemName))
return cache[itemName];