优化了检入检查的循环,之前因为没有PUSH,冲突了。
This commit is contained in:
parent
4d827a45be
commit
e1f9939a41
@ -496,49 +496,18 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
var key = (checkproperty.EngineDataID, checkproperty.PropertyID);
|
||||
if (propDict.TryGetValue(key, out var propertyValue))
|
||||
{
|
||||
var PropertyValue = AllPropsOfEng
|
||||
.FirstOrDefault(x =>
|
||||
x.EngineDataID == checkproperty.EngineDataID &&
|
||||
x.PropertyID == checkproperty.PropertyID)
|
||||
?.PropertyValue;
|
||||
//foreach (var property in AllPropsOfEng)
|
||||
//{
|
||||
//如果ec_enginedata_propety里面的EngineDataID等于需要检查对象的EngineDataID,且属性ID也能对上,且属性值为空或者NULL,则认为没有填写
|
||||
if (string.IsNullOrEmpty(PropertyValue) || PropertyValue == "0")
|
||||
{
|
||||
errText = $"图面有对象【{checkproperty.TagNumber}】在即时更新阶段的必填属性【{checkproperty.PropertyName}】值为空,不能检入,请执行“属性检查”功能对图纸进行属性检查。";
|
||||
return res = false;
|
||||
}
|
||||
//}
|
||||
if (string.IsNullOrEmpty(propertyValue) || propertyValue == "0")
|
||||
{
|
||||
errText = $"图面有对象【{checkproperty.TagNumber}】在即时更新阶段的必填属性【{checkproperty.PropertyName}】值为空,不能检入,请执行“属性检查”功能对图纸进行属性检查。";
|
||||
return res = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errText = $"图面有对象【{checkproperty.TagNumber}】在即时更新阶段的必填属性【{checkproperty.PropertyName}】不存在,认为空,需要填写,不能检入,请执行“属性检查”功能对图纸进行属性检查。";
|
||||
return res = false;
|
||||
}
|
||||
//如果ec_enginedata_propety里面没有必填属性要求的这个属性,就代表没有保存,认为是没有填值,为空
|
||||
//if (AllPropsOfEng.Where(x => x.EngineDataID == checkproperty.EngineDataID).Select(x => x.PropertyID).Contains(checkproperty.PropertyID))
|
||||
//{
|
||||
// var PropertyValue = AllPropsOfEng
|
||||
// .FirstOrDefault(x =>
|
||||
// x.EngineDataID == checkproperty.EngineDataID &&
|
||||
// x.PropertyID == checkproperty.PropertyID)
|
||||
// ?.PropertyValue;
|
||||
// //foreach (var property in AllPropsOfEng)
|
||||
// //{
|
||||
// //如果ec_enginedata_propety里面的EngineDataID等于需要检查对象的EngineDataID,且属性ID也能对上,且属性值为空或者NULL,则认为没有填写
|
||||
// if (string.IsNullOrEmpty(PropertyValue) || PropertyValue == "0")
|
||||
// {
|
||||
// errText = $"图面有对象【{checkproperty.TagNumber}】在即时更新阶段的必填属性【{checkproperty.PropertyName}】值为空,不能检入,请执行“属性检查”功能对图纸进行属性检查。";
|
||||
// return res = false;
|
||||
// }
|
||||
// //}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// errText = $"图面有对象【{checkproperty.TagNumber}】在即时更新阶段的必填属性【{checkproperty.PropertyName}】不存在,认为空,需要填写,不能检入,请执行“属性检查”功能对图纸进行属性检查。";
|
||||
// return res = false;
|
||||
//}
|
||||
}
|
||||
|
||||
//需要去看依赖项的数据了,这里的条件为无需必填或者即时更新版必填又或者Isrequired=null,都要去检查,又由于会去这个List里面找上级关联对象,所以也不能针对dependency_type去做过滤,不然可能就找不到上级对象了
|
||||
|
Loading…
x
Reference in New Issue
Block a user