Commit e2a9a383 by lizefeng

自动周转默认 用建议采购数排序

parent bcbbae4a
...@@ -23,7 +23,7 @@ namespace AutoTurnOver.DB ...@@ -23,7 +23,7 @@ namespace AutoTurnOver.DB
/// <param name="order">排序类型</param> /// <param name="order">排序类型</param>
/// <param name="sort">排序字段</param> /// <param name="sort">排序字段</param>
/// <returns></returns> /// <returns></returns>
public static List<Models.dc_auto_turnover> List(Condition_AutoTurnOver m,int offset, int limit, ref int total,string order="",string sort="") public static List<Models.dc_auto_turnover> List(Condition_AutoTurnOver m,int offset, int limit, ref int total,string order="",string sort= "")
{ {
try try
{ {
...@@ -47,6 +47,8 @@ namespace AutoTurnOver.DB ...@@ -47,6 +47,8 @@ namespace AutoTurnOver.DB
total = _connection.ExecuteScalar<int>("select count(0) from ("+sql+") tb1"); total = _connection.ExecuteScalar<int>("select count(0) from ("+sql+") tb1");
//设置默认排序字段
if (string.IsNullOrWhiteSpace(sort)) sort = "quantity_init_advise";
if (!string.IsNullOrEmpty(sort)) if (!string.IsNullOrEmpty(sort))
{ {
sql += " order by dat." + sort; sql += " order by dat." + sort;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment