功能調整
This commit is contained in:
@@ -14,6 +14,7 @@ using System.IdentityModel.Metadata;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Http;
|
||||
using static TreeView;
|
||||
|
||||
@@ -345,7 +346,7 @@ public class orderController : ApiController
|
||||
public IHttpActionResult GetList([FromBody] Model.ViewModel.pro_order q, int page, int pageSize = 10,
|
||||
string sortBy = "", bool sortDesc = false)
|
||||
{
|
||||
|
||||
MyWeb.encrypt encrypt = new MyWeb.encrypt();
|
||||
var qry = _db.pro_order.Include("activity").Include("activity.activity_check").AsQueryable();
|
||||
//var aIDt = _db.actItems.AsEnumerable().Where(f => f.subject.Contains(q.actItemTxt.Trim())).Select(f => f.num);//品項
|
||||
|
||||
@@ -398,6 +399,21 @@ public class orderController : ApiController
|
||||
}
|
||||
}
|
||||
|
||||
if (q.f_user!=null&&!string.IsNullOrEmpty(q.f_user.u_name)) {
|
||||
qry = qry.Where(o => o.f_num != null && o.follower != null && o.follower.u_name ==q.f_user.u_name);
|
||||
}
|
||||
if (q.f_user != null && !string.IsNullOrEmpty(q.f_user.phone))
|
||||
{
|
||||
qry = qry.Where(o => o.f_num != null && o.follower != null && encrypt.DecryptAutoKey(o.follower.phone) == q.f_user.phone);
|
||||
}
|
||||
if (q.f_user != null && !string.IsNullOrEmpty(q.f_user.cellphone))
|
||||
{
|
||||
qry = qry.Where(o => o.f_num != null && o.follower != null && encrypt.DecryptAutoKey(o.follower.cellphone) == q.f_user.cellphone);
|
||||
}
|
||||
if (q.f_user != null && !string.IsNullOrEmpty(q.f_user.id_code))
|
||||
{
|
||||
qry = qry.Where(o => o.f_num != null && o.follower != null && encrypt.DecryptAutoKey(o.follower.id_code) == q.f_user.id_code);
|
||||
}
|
||||
|
||||
if (sortBy.Equals("order_no"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user