xxyy
2025-03-10 438a163b5eb1e8a40e7f39f46602962b7f95a6f6
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Utilities/EntityProperties.cs
@@ -173,11 +173,11 @@
                if (sugarColumn == null)
                    return "请配置SugarColumn属性";
                //忽略与主键的字段不做验证
                if (property.Name == keyName.FirstLetterToUpper() || (ignoreFields != null && ignoreFields.Contains(property.Name)) || sugarColumn.IsOnlyIgnoreInsert || sugarColumn.IsOnlyIgnoreUpdate || sugarColumn.IsIgnore)
                if (property.Name.ToUpper() == keyName.ToUpper() || (ignoreFields != null && ignoreFields.Contains(property.Name)) || sugarColumn.IsOnlyIgnoreInsert || sugarColumn.IsOnlyIgnoreUpdate || sugarColumn.IsIgnore)
                    continue;
                //不在编辑中的列,是否也要必填
                if (!dic.ContainsKey(property.Name.FirstLetterToLower()))
                if (!dic.ContainsKey(property.Name.ToUpper()))
                {
                    if (!sugarColumn.IsNullable)
                    {
@@ -187,12 +187,12 @@
                    }
                    continue;
                }
                if(dic[property.Name.FirstLetterToLower()] != null)
                if(dic[property.Name.ToUpper()] != null)
                {
                    string str = dic[property.Name.FirstLetterToLower()].ToString();
                    string str = dic[property.Name.ToUpper()].ToString();
                    //将所有空值设置为null
                    if (str == string.Empty)
                        dic[property.Name.FirstLetterToLower()] = null;
                        dic[property.Name.ToUpper()] = null;
                }
                
            }