1
z8018
2025-03-12 17e4c7e3e7b3ef60d9da6de3b2a39a14a53c38a0
WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs
@@ -106,52 +106,7 @@
                    LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
                    Expression<Func<TEntity, bool>> expression = GetWhereExpression(property.Name, results[j].Item3, null, expressionType);
                    sugarQueryable = sugarQueryable.Where(expression);
                    //if (j == 0)
                    //{
                    //    where += "(";
                    //}
                    //LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
                    //if (expressionType == LinqExpressionType.Equal)
                    //{
                    //    where += $"{searchParametersList[i].Name} {HtmlElementType.Equal} '{results[j].Item3}'";
                    //}
                    //else if (expressionType == LinqExpressionType.ThanOrEqual)
                    //{
                    //    where += $"{searchParametersList[i].Name} {HtmlElementType.ThanOrEqual} '{searchParametersList[i].Value}'";
                    //}
                    //else if (expressionType == LinqExpressionType.LessThanOrEqual)
                    //{
                    //    where += $"{searchParametersList[i].Name} {HtmlElementType.LessOrEqual} '{searchParametersList[i].Value}'";
                    //}
                    //else if (expressionType == LinqExpressionType.GreaterThan)
                    //{
                    //    where += $"{searchParametersList[i].Name} {HtmlElementType.GT} '{searchParametersList[i].Value}'";
                    //}
                    //else if (expressionType == LinqExpressionType.LessThan)
                    //{
                    //    where += $"{searchParametersList[i].Name} {HtmlElementType.LT} '{searchParametersList[i].Value}'";
                    //}
                    //else if (expressionType == LinqExpressionType.Contains)
                    //{
                    //    where += $"{searchParametersList[i].Name} {HtmlElementType.like} '%{searchParametersList[i].Value}%'";
                    //}
                    //else
                    //{
                    //    where += $"{searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{results[j].Item3}'";
                    //}
                    //if (j == results.Count() - 1)
                    //{
                    //    where += ")";
                    //}
                    //else
                    //{
                    //    where += " or ";
                    //}
                }
                //if (i < searchParametersList.Count - 1)
                //    where += " and ";
            }
            return where;
        }
@@ -468,22 +423,6 @@
                }
                TEntity entity = saveModel.MainData.DicToModel<TEntity>();
                //List<string> listCol = new List<string>();
                //foreach (var item in saveModel.MainData)
                //{
                //    PropertyInfo propertyInfo = typeof(TEntity).GetProperty(item.Key);
                //    if (propertyInfo == null)
                //    {
                //        propertyInfo = typeof(TEntity).GetProperty(item.Key.FirstLetterToLower());
                //        if (propertyInfo == null)
                //        {
                //            propertyInfo = typeof(TEntity).GetProperty(item.Key.FirstLetterToUpper());
                //        }
                //    }
                //    listCol.Add(propertyInfo?.Name);
                //}
                if (saveModel.DetailData == null || saveModel.DetailData.Count == 0)
                {