public LayUITableResponse <List <Producer_Invoice_Views> > GetInvoice(GetAllBuyerInfoRequest request) { var ProduterId = ""; var ProduterSelectId = HttpContext.Current.Request.QueryString["ProduterSelectId"]; if (ProduterSelectId != null) { ProduterId = ProduterSelectId; } else { ProduterId = request.ProduterId; } var List_Invoice = ProducerFunc.Instance.GetInvoicePage(request.pageIndex, request.pageSize, request.order, request.sort, request.name, ProduterId); LayUITableResponse <List <Producer_Invoice_Views> > response = new LayUITableResponse <List <Producer_Invoice_Views> >(); foreach (var item in List_Invoice.Item1) { response.list.Add(new Producer_Invoice_Views(item)); } response.count = List_Invoice.Item2; response.rel = true; response.msg = "成功"; response.pageno = request.pageIndex.ToString(); if (response.count == 0) { response.rel = false; response.msg = "暂无数据"; } return(response); }
public LayUITableResponse <List <Buyers> > GetAllBuyerInfo(GetAllBuyerInfoRequest request) { var ProduterId = ""; var ProducerText = HttpContext.Current.Request.QueryString["ProducerText"]; if (ProducerText != "") { ProduterId = ProducerText; } else { ProduterId = request.ProduterId; } var List_Buyer = BuyerFunc.Instance.SelectAllBuyer(request.pageIndex, request.pageSize, request.order, request.sort, request.name, ProduterId, request.StartTime, request.EndTime, request.CheckStatus); LayUITableResponse <List <Buyers> > response = new LayUITableResponse <List <Buyers> >(); foreach (var item in List_Buyer.Item1) { response.list.Add(new Buyers(item)); } response.count = List_Buyer.Item2; response.rel = true; response.msg = "成功"; response.pageno = request.pageIndex.ToString(); if (response.count == 0) { response.rel = false; response.msg = "暂无数据"; } return(response); }
public LayUITableResponse <List <Storages> > GetStorageBuyerInfo(GetAllBuyerInfoRequest request) { var ProduterId = request.ProduterId.ParseInt(); List <string> materialsIds = null; if (ProduterId != null) { var materialsproducer = Materials_ProducerFunc.Instance.SelectByModel(new Materials_Producer { ProducerId = ProduterId }); materialsIds = materialsproducer.Where(p => p.MaterialsId != null).Select(p => p.MaterialsId.Value.ToString()).Distinct().ToList(); } var List_Storage = StorageFunc.Instance.SelectMaterial_Stock_View(request.pageIndex, request.pageSize, request.order, request.sort, request.name, materialsIds); LayUITableResponse <List <Storages> > response = new LayUITableResponse <List <Storages> >(); foreach (var item in List_Storage.Item1) { response.list.Add(new Storages(item)); } response.count = List_Storage.Item2; response.rel = true; response.msg = "成功"; response.pageno = request.pageIndex.ToString(); if (response.count == 0) { response.rel = false; response.msg = "暂无数据"; } return(response); }
public LayUITableResponse <List <MaterialManger> > GetMaterialManger(GetAllBuyerInfoRequest request) { var ProduterId = request.ProduterId.ParseInt(); List <string> materialsIds = null; if (ProduterId != null) { var materialsproducer = Materials_ProducerFunc.Instance.SelectByModel(new Materials_Producer { ProducerId = ProduterId }); materialsIds = materialsproducer.Where(p => p.MaterialsId != null).Select(p => p.MaterialsId.Value.ToString()).Distinct().ToList(); } //KdApiSearchDemo.Instance.getOrderTracesByJson("中通快递","218704868683"); var List_Materials = MaterialFunc.Instance.GetLikePage(request.pageIndex, request.pageSize, request.order, request.sort, request.name, materialsIds); var MaterialsIDList = List_Materials.Item1.Select(p => p.Id.ToString()).ToList(); var MaterialsStockList = Materials_Stock_ViewFunc.Instance.SelectByKeys("Raw_materialsId", MaterialsIDList); LayUITableResponse <List <MaterialManger> > response = new LayUITableResponse <List <MaterialManger> >(); foreach (var item in List_Materials.Item1) { response.list.Add(new MaterialManger(item, MaterialsStockList)); } response.count = List_Materials.Item2; response.rel = true; response.msg = "成功"; if (response.count == 0) { response.rel = false; response.msg = "暂无数据"; } return(response); }
public LayUITableResponse <List <Buyers> > GetFinance(GetAllBuyerInfoRequest request) { var List_Finance = BuyerFunc.Instance.SelectBuyerFinance(request.pageIndex, request.pageSize, request.order, request.sort, request.name, request.ProduterId, request.StartTime, request.EndTime); LayUITableResponse <List <Buyers> > response = new LayUITableResponse <List <Buyers> >(); foreach (var item in List_Finance.Item1) { response.list.Add(new Buyers(item)); } response.count = List_Finance.Item2; response.rel = true; response.msg = "成功"; response.pageno = request.pageIndex.ToString(); if (response.count == 0) { response.rel = false; response.msg = "暂无数据"; } return(response); }