12
This commit is contained in:
parent
e24c2e31cc
commit
eb9843dc8b
@ -57,6 +57,15 @@ namespace MyCode.Project.Domain.Message.Request.PurchaseOrder
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string MaterialCode { get; set; }
|
public string MaterialCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序顺序 0=倒序 1=顺序
|
||||||
|
/// </summary>
|
||||||
|
public int SortType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序字段 默认传=""
|
||||||
|
/// </summary>
|
||||||
|
public string SortString { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,19 @@ namespace MyCode.Project.Repositories
|
|||||||
, a.FBILLTYPEID
|
, a.FBILLTYPEID
|
||||||
,b.* FROM [PurchaseOrder] a left join PurchaseOrderItem b on a.fid=b.fid
|
,b.* FROM [PurchaseOrder] a left join PurchaseOrderItem b on a.fid=b.fid
|
||||||
";
|
";
|
||||||
var list= this.SelectListPage<PurchaseOrderPageList>(sql, where, search.Page, search.PageSize, " [FiD] desc,MaterialCode ");
|
|
||||||
|
string sortType = "desc";
|
||||||
|
string sortString = "FiD";
|
||||||
|
if (condition.SortType == 1)
|
||||||
|
{
|
||||||
|
sortType = "";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrWhiteSpace(condition.SortString))
|
||||||
|
{
|
||||||
|
sortString = condition.SortString;
|
||||||
|
}
|
||||||
|
|
||||||
|
var list= this.SelectListPage<PurchaseOrderPageList>(sql, where, search.Page, search.PageSize, $@" {sortString} {sortType},MaterialCode ");
|
||||||
int fid = 0;
|
int fid = 0;
|
||||||
list.DataList.ForEach(t=>
|
list.DataList.ForEach(t=>
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user