|
|
@@ -65,6 +65,45 @@ t.[Result] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 获取页面显示列表数据 |
|
|
|
/// </summary> |
|
|
|
/// <param name="queryJson">查询参数</param> |
|
|
|
/// <returns></returns> |
|
|
|
public IEnumerable<FormulaMainEntity> GetList(string queryJson) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
var strSql = new StringBuilder(); |
|
|
|
strSql.Append("SELECT "); |
|
|
|
strSql.Append(@" |
|
|
|
t.Id, |
|
|
|
t.Name |
|
|
|
"); |
|
|
|
strSql.Append(" FROM FormulaMain t "); |
|
|
|
strSql.Append(" WHERE 1=1 "); |
|
|
|
var queryParam = queryJson.ToJObject(); |
|
|
|
// 虚拟参数 |
|
|
|
var dp = new DynamicParameters(new { }); |
|
|
|
if (!queryParam["Name"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String); |
|
|
|
strSql.Append(" AND t.Name Like @Name "); |
|
|
|
} |
|
|
|
return this.BaseRepository("CollegeMIS").FindList<FormulaMainEntity>(strSql.ToString(), dp); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
if (ex is ExceptionEx) |
|
|
|
{ |
|
|
|
throw; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw ExceptionEx.ThrowServiceException(ex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 获取FormulaMain表实体数据 |
|
|
|
/// </summary> |
|
|
|