public ActionResult GetUserPages2(C_WxUserShowVM.Condition condition) { string where = StrWhere(condition); PageJsonModel <C_WxUserShowVM> page = new PageJsonModel <C_WxUserShowVM>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = @"(select a.ID,a.UserName,a.IsValid,a.NickName,a.Mobile,a.Grade,a.TrueName, a.WxNo,a.DatRegister,a.Email,a.PortraitUrl,wx.openid wx_openid, wx.nickname wx_nickname,wx.sex wx_sex,wx.headimgurl wx_headimgurl,wx.remark wx_remark, wx.groupid wx_groupid,wx.subscribe wx_subscribe,wx.subscribe_time wx_subscribe_time, wx.country wx_country,wx.language wx_language from C_WxUser as a left join C_UserWxInfo as wx on a.UserName=wx.C_UserName) as userwxvm"; page.strSelect = "*"; page.strWhere = where + " and Email<>''"; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = "ID desc"; } page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult LoadSources(SYSMArticleSearch condition) { PageJsonModel <SYSMArticle> page = new PageJsonModel <SYSMArticle>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = string.Format(" SYSMArticle "); page.strSelect = " * "; page.strWhere = " and Title<>'' "; if (condition.dayType == "today") { page.strWhere += string.Format(" and DatEdit>='{0}' ", DateTime.Now.ToString("yyyy-MM-dd 00:00:00")); } if (condition.dayType == "history") { page.strWhere += string.Format(" and DatEdit<'{0}' ", DateTime.Now.ToString("yyyy-MM-dd 00:00:00")); } page.strOrder = "DatEdit desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetOrders(OrderSearch condition) { string where = OrderSearch.StrWhere(condition); PageJsonModel <OrderShowVM> page = new PageJsonModel <OrderShowVM>(); page.pageIndex = condition.pageIndex; page.strForm = @" [Order] left join C_User on [Order].UserName=C_User.UserName "; page.strSelect = " [Order].*,C_User.Name C_User_Name,(select C_UserType.Name from C_UserType where C_UserType.Lever= C_User.C_UserTypeID) C_UserTypeName "; page.pageSize = condition.pageSize; page.strWhere = string.Format(" and [Order].ParentUser='' ") + where; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = " [Order].ID Desc"; } page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
private ActionResult GetInStockCensusPages(InStockCensusShow condition, string where) { string StrForm = "(select count(*) count,s.IntoOrderNo,s.BigCode,s.MiddleCode,p.ProductNumber ProductNumber,p.ProductName ProductName,s.IntoTime " + "from Scale s left join Product p on s.ProductNo=p.ProductNumber where s.IsInto=1 " + where + "group by ProductNumber,ProductName,s.IntoOrderNo,s.BigCode,s.MiddleCode,s.IntoTime) as InStockScaleShow "; PageJsonModel <InStockCensus> page = new PageJsonModel <InStockCensus>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = StrForm; page.strSelect = " * "; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = "IntoTime desc"; } page.LoadList(); if (page.pageResponse != null && page.pageResponse.RtnList != null && page.pageResponse.RtnList.Count > 0) { ScaleCodeCount IntoStockCount = Scale.GetIntoStockCount(where); page.pageResponse.BigCount = IntoStockCount.BigCount; page.pageResponse.MiddleCount = IntoStockCount.MiddleCount; page.pageResponse.SmallCount = IntoStockCount.SmallCount; return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); } return(Json("", JsonRequestBehavior.AllowGet)); }
public ActionResult GetC_UserScaletj(ScaleOutStokeShow condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += " and ProductNo+ProductName like '%" + condition.keyword + "%'"; } if (!string.IsNullOrWhiteSpace(condition.DatCreateB)) { where += string.Format(" and CreateTime >={0} ", CommonFunc.GetTimestamp(Convert.ToDateTime(condition.DatCreateB + " 00:00:00"))); } if (!string.IsNullOrWhiteSpace(condition.DatCreateE)) { where += string.Format(" and CreateTime <={0} ", CommonFunc.GetTimestamp(Convert.ToDateTime(condition.DatCreateE + " 23:59:59"))); } PageJsonModel <OutScaleDetail> page = new PageJsonModel <OutScaleDetail>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "(select count(SmallCode) as Qty,s.Shipper,s.ProductNo,p.ProductName,p.ProductImg " + "from ScaleOutStoke s left join Product p on s.ProductNo=p.ProductNumber " + "where Shipper='" + CurrentUser.UserName + "'" + where + "group by s.Shipper,s.ProductNo,p.ProductName,ProductImg) as Detail"; page.strSelect = "* "; page.strOrder = "Qty desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetSentOrders(jf_lpOrderSearch condition) { string where = string.Empty; //订单号 if (!string.IsNullOrWhiteSpace(condition.OrderNo)) { where += " and OrderNo like '%" + Common.Filter(condition.OrderNo) + "%' "; } if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += string.Format(@" and (jf_lpOrder.OrderNo like '%{0}%' or jf_lpOrder.OrderName like '%{0}%' or OrderMan like '%{0}%' or OrderMobile like '%{0}%' or [Address] like '%{0}%' or [PostName] like '%{0}%' or [PostNo] like '%{0}%') ", condition.keyword); } PageJsonModel <jf_lpOrderShowVM> page = new PageJsonModel <jf_lpOrderShowVM>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " jf_lpOrder left join j_OrderPost on j_OrderPost.OrderNo=jf_lpOrder.OrderNo "; page.strSelect = @" jf_lpOrder.*, ISNULL(j_OrderPost.PostName,'') PostName,ISNULL(j_OrderPost.PostNo,'') PostNo,ISNULL(j_OrderPost.Dat,0) PostDat "; page.strWhere = " and j_OrderPost.PostNo is not null " + where; page.strOrder = " j_OrderPost.Dat Desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
private ActionResult GetPages(C_UserSearch condition, string where) { PageJsonModel <C_UserShow> page = new PageJsonModel <C_UserShow>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = @"(select c.*,o.Name ChiefName,o.Phone ChiefPhone ,t.Name LevelName,I.Name IName from C_User as c left join C_User as o on c.Chief=o.ID left join C_UserType t on c.C_UserTypeID=t.Lever left join C_User I on c.Introducer=I.UserName ) as C_UserShow"; page.strSelect = " * "; page.strWhere = where; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = "ID desc"; } page.LoadList(); if (page.pageResponse != null && page.pageResponse.RtnList != null && page.pageResponse.RtnList.Count > 0) { return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); } return(Json("", JsonRequestBehavior.AllowGet)); }
public ActionResult GetC_Userhuantj(ScaleOutStokeShow condition) { string where = string.Empty; string where1 = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += " and Phone like '%" + condition.keyword + "%'"; } if (!string.IsNullOrWhiteSpace(condition.DatCreateB)) { where1 += string.Format(" and C_UserAdvice.DatCreate >='{0} 00:00:00' ", Common.Filter(condition.DatCreateB)); } if (!string.IsNullOrWhiteSpace(condition.DatCreateE)) { where1 += string.Format(" and C_UserAdvice.DatCreate <'{0} 23:59:59' ", Common.Filter(condition.DatCreateE)); } PageJsonModel <C_UserAdvice> page = new PageJsonModel <C_UserAdvice>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; string strForm = ""; strForm = @"C_UserAdvice left join ScaleOutStoke on ScaleOutStoke.SmallCode=C_UserAdvice.SN"; if (!string.IsNullOrWhiteSpace(where1)) { strForm += where1; } page.strForm = strForm; page.strSelect = " C_UserAdvice.Phone Phone,count(SN) sl "; page.strWhere = string.Format(" and ScaleOutStoke.Consignee='{0}' and C_UserAdvice.state2='已审核' and C_UserAdvice.state='换货' group by Phone ", CurrentUser.UserName) + where; page.strOrder = "Phone"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
private ActionResult GetPages(SelScale condition, string where) { PageJsonModel <View_AntiQuery> page = new PageJsonModel <View_AntiQuery>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "View_AntiQuery"; page.strSelect = " ID, AntiCode, IP, province, city, warning, Address, UserName, CreateTime, BigCode, MiddleCode, SmallCode,SalesAddress "; page.strWhere = where; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = "CreateTime desc"; } page.LoadList(); if (page.pageResponse != null && page.pageResponse.RtnList != null && page.pageResponse.RtnList.Count > 0) { return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); } return(Json("", JsonRequestBehavior.AllowGet)); }
private ActionResult GetPages2(SelScale condition, string where) { PageJsonModel <SelScale> page = new PageJsonModel <SelScale>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " SelScale"; page.strSelect = " province,city,Address,warning,count(ID) cnt"; page.strWhere = where + " and warning='窜货' group by province,city,Address,warning"; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = "count(ID) desc"; } page.LoadList(); if (page.pageResponse != null && page.pageResponse.RtnList != null && page.pageResponse.RtnList.Count > 0) { return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); } return(Json("", JsonRequestBehavior.AllowGet)); }
private ActionResult GetOutStockCencusPages(OutStockCensusShow condition, string where) { PageJsonModel <OutStockCensus> page = new PageJsonModel <OutStockCensus>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; string strForm = ""; strForm = @"(select count(*) count,s.CreateTime,s.OutOrderNo,s.BigCode,s.MiddleCode,s.Consignee Consignee, s.Shipper Shipper,p.ProductName ProductName,p.ProductNumber ProductNumber " + "from ScaleOutStoke s left join Product p on s.ProductNo=p.ProductNumber where Shipper='总部' " + where; strForm += " group by s.CreateTime,s.OutOrderNo,s.BigCode,s.MiddleCode,s.Consignee,s.Shipper,p.ProductName,p.ProductNumber) as OutStockScaleShow left join C_User as c on c.UserName=OutStockScaleShow.Consignee"; page.strForm = strForm; page.strSelect = " OutStockScaleShow.*,c.Name C_Name "; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = "OutStockScaleShow.CreateTime desc"; } page.LoadList(); if (page.pageResponse != null && page.pageResponse.RtnList != null && page.pageResponse.RtnList.Count > 0) { ScaleCodeCount OutCodeCount = ScaleOutStoke.GetC_UserOutCount(where); page.pageResponse.BigCount = OutCodeCount.BigCount; page.pageResponse.MiddleCount = OutCodeCount.MiddleCount; page.pageResponse.SmallCount = OutCodeCount.SmallCount; return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); } return(Json("", JsonRequestBehavior.AllowGet)); }
private ActionResult GetPages(Scale condition, string where) { PageJsonModel <ScaleOutStokeShow> page = new PageJsonModel <ScaleOutStokeShow>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "(select s.Shipper,s.BigCode,s.MiddleCode,s.SmallCode,s.AntiCode,s.CreateTime,s.OutOrderNo,s.ProductName,s.ProductNumber,s.ProductImg,c.Name " + "from (select s.SmallCode,s.Consignee, s.Shipper, s.BigCode,s.MiddleCode," + "s.AntiCode,s.CreateTime,s.OutOrderNo,p.ProductName,p.ProductNumber," + "p.ProductImg ProductImg from ScaleOutStoke s left join Product p on s.ProductNo=p.ProductNumber where s.Shipper='总部') s left join C_User c on s.Consignee=c.UserName) as OutStockScaleShow"; page.strSelect = " * "; page.strWhere = where; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = "CreateTime desc"; } page.LoadList(); if (page.pageResponse != null && page.pageResponse.RtnList != null && page.pageResponse.RtnList.Count > 0) { return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); } return(Json("", JsonRequestBehavior.AllowGet)); }
public ActionResult GetAgentIncrease(SearchAgentIncrease condition) { string where = string.Empty; //关键字搜索 if (!string.IsNullOrWhiteSpace(condition.keyword)) { condition.keyword = Common.Filter(condition.keyword); where += string.Format(@" and o.Name like '%{0}%' ", condition.keyword); } //订单创建时间 where += string.Format(" and c.DatVerify >='{0}/01 00:00:00' and c.DatVerify<'{1}/01 00:00:00'", Common.Filter(condition.DatCreateMon), DateTime.Parse(Common.Filter(condition.DatCreateMon) + "/01").AddMonths(1).ToString("yyyy-MM")); if (condition.C_UserTypeID != 0) { where += string.Format(" and o.C_UserTypeID ='{0}' ", condition.C_UserTypeID); } PageJsonModel <AgentIncrease> page = new PageJsonModel <AgentIncrease>(); page.pageIndex = condition.pageIndex; page.strForm = @" ( select Count(c.Chief)+ (select COUNT(*)+1 from C_User where Chief=o.ID and state='已审核' and DatVerify<'" + Common.Filter(condition.DatCreateMon) + "/01 00:00:00') Team, (select COUNT(*)+1 from C_User where Chief=o.ID and state='已审核' and DatVerify<'" + Common.Filter(condition.DatCreateMon) + "/01 00:00:00') Teamcount, Count(c.Chief) counts, Count(c.Chief)/(select COUNT(*)+1.0 from C_User where Chief=o.ID and state='已审核' and DatVerify<'" + Common.Filter(condition.DatCreateMon) + "/01 00:00:00') agentcount,o.Name Name,o.Identifier Identifier from C_User c left join C_User o on c.Chief=o.ID where c.Chief!=0 and c.state='已审核' " + where + " group by o.Chief,o.Identifier,o.Name,o.ID) as show"; page.strSelect = " * "; page.pageSize = condition.pageSize; page.strWhere = ""; page.strOrder = " agentcount Desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetSaleAgent(SaleSearch condition) { string where = "and Chief=0 and UserName!='m2000' and c.state='已审核'"; //关键字搜索 if (!string.IsNullOrWhiteSpace(condition.keyword)) { condition.keyword = Common.Filter(condition.keyword); where += string.Format(@" and (c.Name like '%{0}%' or c.Phone like '%{0}%') ", condition.keyword); } if (condition.C_UserTypeID != 0) { where += string.Format(" and c.C_UserTypeID ='{0}' ", condition.C_UserTypeID); } PageJsonModel <C_User> page = new PageJsonModel <C_User>(); page.pageIndex = condition.pageIndex; page.strForm = @" (select c.ID,c.Name,c.UserName,c.Phone,t.Name C_UserTypeName,(select COUNT(*) from [ScaleOutStoke] where Consignee=c.UserName and State='启用') count from [C_User] c left join [C_UserType] t on c.C_UserTypeID=t.Lever where 1=1 " + where + " group by c.ID,c.Name,c.UserName,c.Phone,t.Name ) as show"; // page.strForm = @" (select c.ID,c.Name,c.UserName,c.Phone,t.Name C_UserTypeName,count(s.ID) count from [C_User] c left join [ScaleOutStoke] s on c.UserName=s.Consignee left join [C_UserType] t on c.C_UserTypeID=t.Lever where s.State='启用' " + where + " group by c.ID,c.Name,c.UserName,c.Phone,t.Name) as show"; page.strSelect = " * "; page.pageSize = condition.pageSize; page.strWhere = ""; page.strOrder = " ID Desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult LoadRebateDetail(RebateSearch condition) { PageJsonModel <C_UserRebate> page = new PageJsonModel <C_UserRebate>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = string.Format(" C_UserRebate left join [Order] left join C_User on [Order].UserName=C_User.UserName on C_UserRebate.OrderNo=[Order].OrderNo "); page.strSelect = " C_UserRebate.*,C_User.Name order_CName, [Order].SumPrice "; page.strWhere = string.Format(" and R_People='{0}' ", CurrentUser.UserName); if (!string.IsNullOrWhiteSpace(condition.keyword)) { condition.keyword = Common.Filter(condition.keyword); page.strWhere += string.Format(" and C_UserRebate.OrderNo='{0}' ", condition.keyword); } if (!string.IsNullOrWhiteSpace(condition.DatCreateMon)) { condition.DatCreateMon = Common.Filter(condition.DatCreateMon); DateTime DatMon = new DateTime(); DateTime.TryParse(condition.DatCreateMon, out DatMon); page.strWhere += string.Format(" and datepart(mm,C_UserRebate.DatCreat)=datepart(mm,'{0}') ", DatMon.ToString("yyyy/MM/dd")); } if (!string.IsNullOrWhiteSpace(condition.Cat)) { page.strWhere += string.Format(" and C_UserRebate.Cat='{0}' ", condition.Cat); } page.strOrder = "C_UserRebate.DatCreat desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetPDALog(BaseDateSearch condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.DatCreateB)) { where += string.Format(" and OpearTime >={0} ", CommonFunc.GetTimestamp(Convert.ToDateTime(condition.DatCreateB + " 00:00:00"))); } if (!string.IsNullOrWhiteSpace(condition.DatCreateE)) { where += string.Format(" and OpearTime <={0} ", CommonFunc.GetTimestamp(Convert.ToDateTime(condition.DatCreateE + " 23:59:59"))); } if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += string.Format(" and EventName+TypeName+BarCode like '%{0}%' ", condition.keyword); } PageJsonModel <PDALog> page = new PageJsonModel <PDALog>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "PDALog"; page.strSelect = " * "; page.strWhere = where; page.strOrder = "OpearTime desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetNoSendOrders(OrderSearch condition) { string where = string.Empty; //订单编号 if (!string.IsNullOrWhiteSpace(condition.OrderNo)) { where += " and [Order].OrderNo like '%" + Common.Filter(condition.OrderNo) + "%' "; } if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += string.Format(" and ([Order].OrderNo like '%{0}%' or [Order].OrderName like '%{0}%' or [Order].OrderMan like '%{0}%' or [Order].OrderMobile like '%{0}%' or [Order].[Address] like '%{0}%') ", condition.keyword); } where += string.Format(" and [Order].OrderState='待发货' and [Order].AuditState='已审核'"); PageJsonModel <OrderShowVM> page = new PageJsonModel <OrderShowVM>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " [Order] left join C_User on [Order].UserName=C_User.UserName "; page.strSelect = @" [Order].*,C_User.Name C_User_Name,(select Name from C_UserType where C_UserType.Lever= C_User.C_UserTypeID) C_UserTypeName "; page.strWhere = string.Format(" and [Order].ParentUser='' ") + where; page.strOrder = " DatAudit Asc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 出货详情 /// </summary> /// <param name="condition"></param> /// <returns></returns> public ActionResult GetC_UserOutScaleDetail(ScaleOutStokeShow condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += " and Name+OutOrderNo+ProductName like '%" + condition.keyword + "%'"; } if (!string.IsNullOrEmpty(condition.DatCreateB)) { where += string.Format(" and CreateTime>={0}", CommonFunc.GetTimestamp(Convert.ToDateTime(condition.DatCreateB + " 00:00:00"))); } if (!string.IsNullOrEmpty(condition.DatCreateE)) { where += string.Format(" and CreateTime<={0}", CommonFunc.GetTimestamp(Convert.ToDateTime(condition.DatCreateE + " 23:59:59"))); } PageJsonModel <ScaleOutStokeShow> page = new PageJsonModel <ScaleOutStokeShow>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " (select COUNT(*) Qty,s.Shipper, s.ProductNo as ProductNumber,c.Name,s.CreateTime,s.OutOrderNo,p.ProductName,p.ProductImg,Consignee " + "from ScaleOutStoke s left join C_User c on s.Consignee=c.UserName left join Product as p on s.ProductNo=p.ProductNumber " + "group by s.ProductNo ,c.Name,s.CreateTime,s.Shipper,s.OutOrderNo,p.ProductName,p.ProductImg,Consignee ) as Detail "; page.strSelect = "* "; page.strWhere = " and Shipper='" + CurrentUser.UserName + "'" + where; page.strOrder = "CreateTime,OutOrderNo desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetSentOrders(OrderSearch condition) { string where = string.Empty; //订单编号 if (!string.IsNullOrWhiteSpace(condition.OrderNo)) { where += " and OrderNo like '%" + Common.Filter(condition.OrderNo) + "%' "; } if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += string.Format(@" and ([Order].OrderNo like '%{0}%' or [Order].OrderName like '%{0}%' or [Order].OrderMan like '%{0}%' or [Order].OrderMobile like '%{0}%' or [Order].[Address] like '%{0}%' or OrderPost.[PostName] like '%{0}%' or OrderPost.[PostNo] like '%{0}%') ", condition.keyword); } PageJsonModel <OrderShowVM> page = new PageJsonModel <OrderShowVM>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " [Order] left join C_User on [Order].UserName=C_User.UserName left join OrderPost on OrderPost.OrderNo=[Order].OrderNo "; page.strSelect = @" [Order].*,C_User.Name C_User_Name, ISNULL(OrderPost.PostName,'') PostName,ISNULL(OrderPost.PostNo,'') PostNo,ISNULL(OrderPost.Dat,0) PostDat,(select Name from C_UserType where C_UserType.Lever= C_User.C_UserTypeID) C_UserTypeName "; page.strWhere = " and [Order].ParentUser='' and OrderPost.PostNo is not null " + where; page.strOrder = " OrderPost.Dat Desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetNoSendOrders(jf_lpOrderSearch condition) { string where = string.Empty; //订单号 if (!string.IsNullOrWhiteSpace(condition.OrderNo)) { where += " and OrderNo like '%" + Common.Filter(condition.OrderNo) + "%' "; } if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += string.Format(" and (OrderNo like '%{0}%' or OrderName like '%{0}%' or OrderMan like '%{0}%' or OrderMobile like '%{0}%' or [Address] like '%{0}%') ", condition.keyword); } where += string.Format(" and OrderState='待发货' and PayState='已支付' and AuditState='已审核'"); PageJsonModel <jf_lpOrderShowVM> page = new PageJsonModel <jf_lpOrderShowVM>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " jf_lpOrder "; page.strSelect = @" * "; page.strWhere = where; page.strOrder = " DatPay Asc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
//[B_MenuRightsTag("查看")] //public ActionResult InCreaseIndex() //{ // return View(); //} public ActionResult GetAgentIncrease(SaleSearch condition) { string where = string.Empty; string wheres = string.Empty; //关键字搜索 if (!string.IsNullOrWhiteSpace(condition.keyword)) { condition.keyword = Common.Filter(condition.keyword); wheres += string.Format(@" and Name like '%{0}%' ", condition.keyword); } //订单创建时间 where += string.Format(" and DatAudit >='{0}/01 00:00:00' and DatAudit<'{1}/01 00:00:00'", Common.Filter(condition.DatCreateB), DateTime.Parse(Common.Filter(condition.DatCreateB) + "/01").AddMonths(1).ToString("yyyy-MM")); if (condition.C_UserTypeID != 0) { wheres += string.Format(" and C_UserTypeID ='{0}' ", condition.C_UserTypeID); } string OldSumPrice = "(select Sum(o.SumPrice) from [C_User] c left join [Order] o on c.UserName=o.UserName where c.UserName=oc.UserName and OrderState='已发货' and DatAudit<'" + Common.Filter(condition.DatCreateB) + "/01 00:00:00')"; string TheMonthSumPrice = "(select Sum(o.SumPrice) from [C_User] c left join [Order] o on c.UserName=o.UserName where c.UserName=oc.UserName and OrderState='已发货' " + where + ")"; PageJsonModel <SaleInCrease> page = new PageJsonModel <SaleInCrease>(); page.pageIndex = condition.pageIndex; page.strForm = @"(select " + OldSumPrice + " OldSumPrice," + TheMonthSumPrice + " TheMonthSumPrice ," + TheMonthSumPrice + "/" + OldSumPrice + " Increase, SUM(od.SumPrice) SumPrice,oc.Name Name,oc.Identifier Identifier,oc.C_UserTypeID C_UserTypeID from [C_User] oc left join [Order] od on od.UserName=oc.UserName where od.OrderState='已发货' group by oc.UserName, Name,Identifier,oc.C_UserTypeID ) as show"; page.strSelect = " * "; page.pageSize = condition.pageSize; page.strWhere = wheres; page.strOrder = " Increase,TheMonthSumPrice desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetAdvicePage(C_UserAdvice condition) { string where = string.Empty; where += "and State='已审核'"; if (!string.IsNullOrWhiteSpace(Common.Filter(condition.keyword))) { where += string.Format(@" and (Name like '%{0}%' or Phone like '%{0}%') ", Common.Filter(condition.keyword)); } PageJsonModel <C_UserAdvice> page = new PageJsonModel <C_UserAdvice>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = @"C_UserAdvice"; page.strSelect = " * "; page.strWhere = where; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = "DatCreate asc"; } page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
private ActionResult GetPages(RtnStockSeacher condition, string where) { PageJsonModel <ScaleRtnStokeDetail> page = new PageJsonModel <ScaleRtnStokeDetail>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "ScaleRtnStoke s left join C_User as c on c.UserName=s.Consignee"; page.strSelect = " s.ReturnTime,s.BigCode,s.MiddleCode,s.SmallCode,s.OrderNo,s.OutTime,s.OutOrderNo,c.Name "; page.strWhere = where; if (string.IsNullOrWhiteSpace(condition.orderby) == false) { page.strOrder = Common.FilteSQLStr(condition.orderby); } else { page.strOrder = "ReturnTime desc"; } page.LoadList(); if (page.pageResponse != null && page.pageResponse.RtnList != null && page.pageResponse.RtnList.Count > 0) { return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); } return(Json("", JsonRequestBehavior.AllowGet)); }
public ActionResult GetBigCodePage(BigScaleSearch condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.KeyWord)) { where += string.Format(" and ProductNumber+ProductName+ProducctNo+BarCode like '%{0}%'", Common.Filter(condition.KeyWord)); } if (!string.IsNullOrWhiteSpace(condition.OrderNo)) { where += string.Format(" and OrderNo like '{0}%'", Common.Filter(condition.OrderNo)); } if (!string.IsNullOrWhiteSpace(condition.DatCreateB)) { where += string.Format(" and ReturnTime >={0} ", CommonFunc.GetTimestamp(Convert.ToDateTime(condition.DatCreateB + " 00:00:00"))); } if (!string.IsNullOrWhiteSpace(condition.DatCreateE)) { where += string.Format(" and ReturnTime <={0} ", CommonFunc.GetTimestamp(Convert.ToDateTime(condition.DatCreateE + " 23:59:59"))); } PageJsonModel <ScaleRtnStokeDetail> page = new PageJsonModel <ScaleRtnStokeDetail>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "View_RtnRecord"; page.strSelect = " OrderNo, RtnWay, BarCode, ProducctNo, ReturnTime, OperaUser, BarCount, ProductImg, ProductNumber, ProductName, PUserName, PRealName, Name "; page.strWhere = where; page.strOrder = " ReturnTime desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetRebate_nh_DetailPage(RebateSearch condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += " and c.Name like '%" + condition.keyword + "%'"; } condition.DatCreateMon = Common.Filter(condition.DatCreateMon); DateTime DatMon = new DateTime(); DateTime.TryParse(condition.DatCreateMon, out DatMon); where += string.Format(" and r.State='已发放' and r.Cat='拿货返利' and r.R_People='" + condition.UserName + "' and datepart(mm,r.DatCreat)=datepart(mm,'{0}') ", DatMon.ToString("yyyy/MM/dd")); PageJsonModel <C_UserRebate> page = new PageJsonModel <C_UserRebate>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = @" C_UserRebate r left join C_User c on r.R_People=c.UserName left join C_UserType on C_UserType.Lever=c.C_UserTypeID left join [Order] on r.OrderNo=[Order].OrderNo "; page.strSelect = " r.*,c.Name Name,c.Phone Phone,C_UserType.Name userTypeName,[Order].ProductCnt "; page.strWhere = " and Issuer='总部' " + where; page.strOrder = "r.DatCreat desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult Rebate_nh_GetNoRebatePage(RebateSearch condition) { condition.State = "未发放"; string where = RebateSearch.StrWhere_nh(condition); PageJsonModel <C_UserRebate> page = Rebate_nh_GetPage(condition, where); page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetMyScalePage(BaseInSearch condition) { PageJsonModel <ScaleOutStoke> page = new PageJsonModel <ScaleOutStoke>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " ScaleOutStoke "; page.strSelect = "* "; page.strWhere = string.Format(" and Consignee='{0}' and State='启用' and P_ID='{1}'", CurrentUser.UserName, condition.keyword); page.strOrder = "DatCreate desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
private ActionResult GetPages(SupplierSearch condition, string where) { PageJsonModel <Supplier> page = new PageJsonModel <Supplier>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "Supplier"; page.strSelect = " * "; page.strWhere = where; page.strOrder = "ID desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetProductPage(MProductSearch condition) { PageJsonModel <Product> page = new PageJsonModel <Product>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "Product"; page.strSelect = "* "; page.strWhere = " and States='已上架'"; page.strOrder = "ProductID desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
private static PageJsonModel <C_UserInduce> NewMethod(C_UserSearch condition, string where) { PageJsonModel <C_UserInduce> page = new PageJsonModel <C_UserInduce>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = @"( select c.*,t.Name ILeverName from (select c.*,t.Name LeverName from (SELECT c.*,b.C_UserTypeID IC_UserTypeID ,b.Name IName,b.Phone IPhone FROM C_User c left join C_User b on c.Introducer=b.UserName where c.Introducer!='' and c.Chief=0) c left join C_UserType t on c.C_UserTypeID=t.Lever) c left join C_UserType t on c.IC_UserTypeID=t.Lever ) as Show"; page.strSelect = " * "; page.strWhere = where; page.strOrder = "ID desc"; page.LoadList(); return(page); }