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)); }
/// <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 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)); }
public ActionResult Index1(string ID) { try { string O_ID = "Beware of fake products without authorization"; string ProductNumber = "Beware of fake products without authorization"; string ProductName = "Beware of fake products without authorization"; string Name = "Beware of fake products without authorization"; string Province = "Beware of fake products without authorization"; string DatCreate = "Beware of fake products without authorization"; if (!string.IsNullOrWhiteSpace(ID)) { List <ScaleOutStoke> Scale = ScaleOutStoke.GetSmallScaleList(ID); if (Scale.Count > 0) { ScaleOutStokeShow show = ScaleOutStoke.GetProductC_UserByBig(ID); if (show != null) { Name = show.Name; ProductName = show.ProductName; ProductNumber = show.ProductNumber; O_ID = show.OutOrderNo; C_User user = C_User.GetC_UserByUserName(show.Consignee); Province = user == null ? "" : user.Province + user.City; DatCreate = CommonFunc.GetDateTimeFromTimestamp(show.CreateTime).ToString("yyyy-MM-dd"); } } else { ScaleOutStokeShow showbig = ScaleOutStoke.GetProductC_UserByBig(ID); if (showbig != null && showbig.Name != null && showbig.ProductName != null) { Name = showbig.Name; ProductName = showbig.ProductName; ProductNumber = showbig.ProductNumber; O_ID = showbig.OutOrderNo; C_User user = C_User.GetC_UserByUserName(showbig.Consignee); Province = user == null ? "" : user.Province + user.City; DatCreate = CommonFunc.GetDateTimeFromTimestamp(showbig.CreateTime).ToString("yyyy-MM-dd"); } } } ViewData["O_ID"] = O_ID; ViewData["ProductNumber"] = ProductNumber; ViewData["ProductName"] = ProductName; ViewData["Name"] = Name; ViewData["Province"] = Province; ViewData["DatCreate"] = DatCreate; } catch (Exception ex) { DAL.Log.Instance.Write(ex.Message, "查询出错!"); } return(View()); }
public ActionResult GetC_UserScaleDetail(ScaleOutStokeShow condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += " and isnull(BigCode,'')+isnull(MiddleCode,'')+SmallCode like '%" + condition.keyword + "%'"; } PageJsonModel <OutScaleDetail> page = new PageJsonModel <OutScaleDetail>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "ScaleOutStoke"; page.strSelect = "BigCode,MiddleCode,SmallCode"; page.strWhere = string.Format(" and Shipper='{0}' and OutOrderNo='{1}' and ProductNo='{2}' and CreateTime={3} and Consignee='{4}'", CurrentUser.UserName, condition.OutOrderNo, condition.ProductNumber, condition.CreateTime, condition.Consignee) + where; page.strOrder = "SmallCode asc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetC_Usertuitj2(ScaleOutStokeShow condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += " and ProductName like '%" + condition.keyword + "%'"; } PageJsonModel <C_UserAdvice> page = new PageJsonModel <C_UserAdvice>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = "C_UserAdvice left join ScaleOutStoke on ScaleOutStoke.SmallCode=C_UserAdvice.SN left join Product on ScaleOutStoke.P_ID=Product.ProductNumber left join C_User on ScaleOutStoke.Consignee=C_User.UserName "; page.strSelect = " Product.ProductName ProductName,C_UserAdvice.State,ScaleOutStoke.Consignee ,count(C_User.Name) sl,ScaleOutStoke.Shipper,C_User.Name XName "; page.strWhere = string.Format(" and ScaleOutStoke.Shipper='{0}' and C_UserAdvice.state2='已审核' and C_UserAdvice.OrderNo is null group by ProductName,C_UserAdvice.State,ScaleOutStoke.Consignee,ScaleOutStoke.Shipper,C_User.Name ", CurrentUser.UserName) + where; page.strOrder = "ProductName"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult Index(string ID) { try { // string O_ID = "", ProductNumber = "", ProductName = "", Name = "", Province = "", DatCreate = "", kw = "", ProductImg = ""; string O_ID = "产品未经授权,谨防假冒!"; string ProductNumber = "产品未经授权,谨防假冒!"; string ProductName = "产品未经授权,谨防假冒!"; string Name = "产品未经授权,谨防假冒!"; string Province = "产品未经授权,谨防假冒!"; string DatCreate = "产品未经授权,谨防假冒!"; string kw = "产品未经授权,谨防假冒!"; string ProductImg = ""; string ycd = "产品未经授权,谨防假冒!"; string zzs = "产品未经授权,谨防假冒!"; if (!string.IsNullOrWhiteSpace(ID)) { List <ScaleOutStoke> Scale = ScaleOutStoke.GetSmallScaleList(ID); if (Scale.Count > 0) { ScaleOutStokeShow show = ScaleOutStoke.GetProductC_UserByBig(ID); if (show != null) { Name = show.Name; ProductName = show.ProductName; ProductNumber = show.ProductNumber; ProductImg = show.ProductImg; O_ID = show.OutOrderNo; kw = show.kw.ToString(); ycd = "中国"; zzs = "zunko"; C_User user = C_User.GetC_UserByUserName(show.Consignee); Province = user == null ? "" : user.Province + user.City; DatCreate = CommonFunc.GetDateTimeFromTimestamp(show.CreateTime).ToString("yyyy-MM-dd"); DAL.Log.Instance.Write(" " + show.CreateTime + " || " + DatCreate, "111111"); } } else { ScaleOutStokeShow showbig = ScaleOutStoke.GetProductC_UserByBig(ID); if (showbig != null && showbig.Name != null && showbig.ProductName != null) { Name = showbig.Name; ProductName = showbig.ProductName; ProductNumber = showbig.ProductNumber; ProductImg = showbig.ProductImg; O_ID = showbig.OutOrderNo; kw = showbig.kw.ToString(); ycd = "中国"; zzs = "zunko"; C_User user = C_User.GetC_UserByUserName(showbig.Consignee); Province = user == null ? "" : user.Province + user.City; DatCreate = CommonFunc.GetDateTimeFromTimestamp(showbig.CreateTime).ToString("yyyy-MM-dd"); DAL.Log.Instance.Write(" " + showbig.CreateTime + " || " + DatCreate, "111111"); } } } /*if (string.IsNullOrWhiteSpace(O_ID) && string.IsNullOrWhiteSpace(ProductName)) * { * return Redirect("/cuanhuo/pre?Error=1"); * }*/ ViewData["O_ID"] = O_ID; ViewData["ProductNumber"] = ProductNumber; ViewData["ProductName"] = ProductName; ViewData["Name"] = Name; ViewData["ProductImg"] = ProductImg; ViewData["Province"] = Province; ViewData["DatCreate"] = DatCreate; ViewData["kw"] = kw; ViewData["ycd"] = ycd; ViewData["zzs"] = zzs; } catch (Exception ex) { DAL.Log.Instance.Write(ex.Message, "防窜货查询出错!"); } return(View()); }