コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        public LayUITableResponse <List <OrderInfoResponse> > GetAdminOrderList(LayTableOrderRequest request)
        {
            int?StatusType = null;

            if (request.StatusType != 0)
            {
                StatusType = request.StatusType;
            }
            var List_Order       = OrderListFunc.Instance.GetAdminOrderList((request.pageIndex - 1) * request.pageSize, request.pageSize, request.sort, request.order, request.name, StatusType);
            var List_OrderDetail = Order_DetailFunc.Instance.SelectByKeys("OrderId", List_Order.Item1.Select(p => p.Id.ToString()).ToList());
            var List_Commodity   = CommodityFunc.Instance.SelectByKeys("Id", List_OrderDetail.Select(p => p.CommodityId.ToString()).ToList());
            var List_Materials   = Raw_MaterialsFunc.Instance.SelectByKeys("Id", List_Commodity.Select(p => p.MaterialId.ToString()).ToList());
            LayUITableResponse <List <OrderInfoResponse> > response = new LayUITableResponse <List <OrderInfoResponse> >();
            var payList   = PayTypeFunc.Instance.GetAllPayTypeInfo();
            var orderList = StatusFunc.Instance.GetAllStatusInfo();

            foreach (var item in List_Order.Item1)
            {
                var order            = new OrderInfoResponse(item, payList, orderList);
                var this_OrderDetail = List_OrderDetail.Where(p => p.OrderId == item.Id).ToList();
                order.ProductNum = "";
                order.MaterName  = "";
                foreach (var orderdetailitem in this_OrderDetail)
                {
                    var commodity = List_Commodity.Where(p => p.Id == orderdetailitem.CommodityId).FirstOrDefault();
                    if (commodity == null)
                    {
                        continue;
                    }
                    var Material = List_Materials.Where(p => p.Id == commodity.MaterialId).FirstOrDefault();
                    if (Material == null)
                    {
                        continue;
                    }
                    if (orderdetailitem != this_OrderDetail[0])
                    {
                        order.ProductNum = $"{order.ProductNum},";
                        order.MaterName  = $"{order.MaterName},";
                    }
                    order.ProductNum   = $"{order.ProductNum}{orderdetailitem.Amount}";
                    order.MaterName    = $"{order.MaterName}{Material.ProductNo}";
                    order.UserSure     = orderdetailitem.UserSure == true ? true : false;
                    order.DesignCommit = orderdetailitem.DesignCommit == true ? true : false;
                }
                response.list.Add(order);
            }
            response.count = List_Order.Item2;
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #6
0
        public LayUITableResponse <List <GradeResForWeb> > GetScene(LayUITableRequestExtend req)
        {
            LayUITableResponse <List <GradeResForWeb> > response = new LayUITableResponse <List <GradeResForWeb> >();
            var ids = req.ids ?? new List <int>();

            response.list  = GradeFunc.Instance.GetAllSceneForAdmin(ids);
            response.count = GradeFunc.Instance.SelectAllSceneCount();
            response.rel   = true;
            response.msg   = "成功";
            return(response);
        }
コード例 #7
0
        public LayUITableResponse <List <EvaluateResponse> > GetEvaluateList(LayUITableRequest request)
        {
            var List_Evaluate = EvaluateFunc.Instance.SelectByPage(request.sort, request.order, (request.pageIndex - 1) * request.pageSize, request.pageSize);
            LayUITableResponse <List <EvaluateResponse> > response = new LayUITableResponse <List <EvaluateResponse> >();

            foreach (var item in List_Evaluate)
            {
                response.list.Add(new EvaluateResponse(item));
            }
            response.count = EvaluateFunc.Instance.SelectAllCount();
            response.rel   = true;
            response.msg   = "成功";
            return(response);
        }
コード例 #8
0
        public LayUITableResponse <List <CustomerserviceInfo> > GetService(LayUITableRequest request)
        {
            var List_Service = CustomerserviceFunc.Instance.SelectUserByPage(request.pageIndex, request.pageSize);
            LayUITableResponse <List <CustomerserviceInfo> > response = new LayUITableResponse <List <CustomerserviceInfo> >();

            foreach (var item in List_Service)
            {
                response.list.Add(new CustomerserviceInfo(item));
            }
            response.count = CustomerserviceFunc.Instance.SelectAllUserCount();
            response.rel   = true;
            response.msg   = "成功";
            return(response);
        }
コード例 #9
0
        public LayUITableResponse <List <ColorRes> > GetColorList()
        {
            var List_Color = ColorinfoFunc.Instance.GetColorList();
            LayUITableResponse <List <ColorRes> > response = new LayUITableResponse <List <ColorRes> >();

            response.count = 1;
            response.rel   = true;
            response.msg   = "成功";
            response.list  = List_Color;
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #10
0
        public LayUITableResponse <List <Warehouses> > GetWarehouseInfo()
        {
            var List_Warehouse = WarehouseFunc.Instance.SelectWarehouse();
            LayUITableResponse <List <Warehouses> > response = new LayUITableResponse <List <Warehouses> >();

            foreach (var item in List_Warehouse)
            {
                response.list.Add(new Warehouses(item));
            }
            response.count = WarehouseFunc.Instance.SelectAllWarehouseCount();
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #11
0
        public LayUITableResponse <List <Buyers> > GetInspectionInfo(GetInspectionInfoRequst request)
        {
            var List_Inspection = InspectionFunc.Instance.SelectInspection(request.pageIndex, request.pageSize, request.order, request.sort, request.name, request.Inspection);
            LayUITableResponse <List <Buyers> > response = new LayUITableResponse <List <Buyers> >();

            foreach (var item in List_Inspection.Item1)
            {
                response.list.Add(new Buyers(item));
            }
            response.count = List_Inspection.Item2;
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #12
0
        public LayUITableResponse <List <CommodityInfo> > GetCommodityList(LayUITableRequest request)
        {
            var CommodityList = CommodityFunc.Instance.SelectCommodityListByPage(request.sort, (request.pageIndex - 1) * request.pageSize, request.pageSize, request.order, request.name);
            LayUITableResponse <List <CommodityInfo> > response = new LayUITableResponse <List <CommodityInfo> >();

            foreach (var item in CommodityList)
            {
                response.list.Add(new CommodityInfo(item));
            }
            response.count = CommodityFunc.Instance.SelectCommodityListCount((request.pageIndex - 1) * request.pageSize, request.pageSize, request.name);
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #13
0
        public LayUITableResponse <List <GradeInfo> > GetGradeInfo(LayUITableRequest request)
        {
            var List_Grade = GradeFunc.Instance.SelectGradeByPage(request.pageIndex, request.pageSize);
            LayUITableResponse <List <GradeInfo> > response = new LayUITableResponse <List <GradeInfo> >();

            foreach (var item in List_Grade)
            {
                response.list.Add(new GradeInfo(item));
            }
            response.count = GradeFunc.Instance.SelectAllGradeCount();
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #14
0
        public LayUITableResponse <List <Technologys> > GetTechnologyInfo()
        {
            var List_Technology = TechnologyFunc.Instance.SelectTechnology();
            LayUITableResponse <List <Technologys> > response = new LayUITableResponse <List <Technologys> >();

            foreach (var item in List_Technology)
            {
                response.list.Add(new Technologys(item));
            }
            response.count = TechnologyFunc.Instance.SelectTechnologyCount();
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #15
0
        public LayUITableResponse <List <MessageResponse> > GetNewsList(LayUITableRequest request)
        {
            var List_Evaluate = NewsFunc.Instance.SelectNewsPage(request.sort, request.order, (request.pageIndex - 1) * request.pageSize, request.pageSize);
            LayUITableResponse <List <MessageResponse> > response = new LayUITableResponse <List <MessageResponse> >();

            foreach (var item in List_Evaluate)
            {
                response.list.Add(new MessageResponse(item));
            }
            response.count = NewsFunc.Instance.SelectNewsPageCount();
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #16
0
        public LayUITableResponse <List <CarouselImage> > GetOnlineGallery(LayUITableRequest request)
        {
            var List_Grade = Carousel_ImageFunc.Instance.SelectAllImages();
            LayUITableResponse <List <CarouselImage> > response = new LayUITableResponse <List <CarouselImage> >();

            foreach (var item in List_Grade.Item1)
            {
                response.list.Add(new CarouselImage(item));
            }
            response.count = List_Grade.Item2;
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #17
0
        public LayUITableResponse <List <UserInfo> > GetUserInfo(LayUITableRequest request)
        {
            var List_User = UserFunc.Instance.SelectUserByPage(request.pageIndex, request.pageSize);
            LayUITableResponse <List <UserInfo> > response = new LayUITableResponse <List <UserInfo> >();

            foreach (var item in List_User)
            {
                response.list.Add(new UserInfo(item));
            }
            response.count = UserFunc.Instance.SelectAllUserCount();
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #18
0
        public LayUITableResponse <List <Produtions> > GetOrderInfo(GetProductionRequest request)
        {
            var list_Order = ProductionFunc.Instance.GetProductionPage(request.pageIndex, request.pageSize, request.order, request.sort, request.name, request.Production, "订单管理");
            LayUITableResponse <List <Produtions> > response = new LayUITableResponse <List <Produtions> >();

            foreach (var item in list_Order.Item1)
            {
                response.list.Add(new Produtions(item));
            }
            response.count = list_Order.Item2;
            response.rel   = true;
            response.msg   = "采购";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #19
0
        public LayUITableResponse <List <Producers> > GetProducer(LayUITableRequest request)
        {
            var List_Producers = ProducerFunc.Instance.GetProducerPage(request.pageIndex, request.pageSize, request.order, request.sort, request.name);
            LayUITableResponse <List <Producers> > response = new LayUITableResponse <List <Producers> >();

            foreach (var item in List_Producers.Item1)
            {
                response.list.Add(new Producers(item));
            }
            response.count  = List_Producers.Item2;
            response.pageno = request.pageIndex.ToString();
            response.rel    = true;
            response.msg    = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #20
0
        public LayUITableResponse <List <Produtions> > GetDesigner(GetProductionRequest request)
        {
            var Status        = "设计师管理";
            var List_Designer = ProductionFunc.Instance.GetProductionPage(request.pageIndex, request.pageSize, request.order, request.sort, request.name, request.Production, Status);
            LayUITableResponse <List <Produtions> > response = new LayUITableResponse <List <Produtions> >();

            foreach (var item in List_Designer.Item1)
            {
                response.list.Add(new Produtions(item));
            }
            response.count = List_Designer.Item2;
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #21
0
        public LayUITableResponse <List <Erplogin_Role_Views> > GetErpLoginInfo(LayUITableRequest request)
        {
            var List_Storage = Erplogin_Role_ViewFunc.Instance.SelectloginUser(request.pageIndex, request.pageSize, request.order, request.sort, request.name);
            LayUITableResponse <List <Erplogin_Role_Views> > response = new LayUITableResponse <List <Erplogin_Role_Views> >();

            foreach (var item in List_Storage.Item1)
            {
                response.list.Add(new Erplogin_Role_Views(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);
        }
コード例 #22
0
        public LayUITableResponse <List <ChangeStorages> > GetChangeStorageInfo(GetChangeStorageInfoRequest request)
        {
            var List_Change = ChangesFunc.Instance.SelectChange(request.pageIndex, request.pageSize, request.order, request.sort, request.name, request.storageId);
            LayUITableResponse <List <ChangeStorages> > response = new LayUITableResponse <List <ChangeStorages> >();

            foreach (var item in List_Change.Item1)
            {
                response.list.Add(new ChangeStorages(item));
            }
            response.count  = List_Change.Item2;
            response.rel    = true;
            response.msg    = "成功";
            response.pageno = request.pageIndex.ToString();
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #23
0
        public LayUITableResponse <List <Receives> > GetReceivesInfo(LayUITableRequest request)
        {
            var List_Receives = ReceiveFunc.Instance.SelectBuyer(request.pageIndex, request.pageSize, request.order, request.sort, request.name);
            LayUITableResponse <List <Receives> > response = new LayUITableResponse <List <Receives> >();

            foreach (var item in List_Receives.Item1)
            {
                response.list.Add(new Receives(item));
            }
            response.count  = List_Receives.Item2;
            response.rel    = true;
            response.msg    = "成功";
            response.pageno = request.pageIndex.ToString();
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #24
0
        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);
        }
コード例 #25
0
        public LayUITableResponse <List <Erpusers> > GetErpUserInfo()
        {
            var List_ErpUser = ErpuserFunc.Instance.SelectByModel(new DbOpertion.Models.Erpuser {
            });
            LayUITableResponse <List <Erpusers> > response = new LayUITableResponse <List <Erpusers> >();

            foreach (var item in List_ErpUser)
            {
                response.list.Add(new Erpusers(item));
            }
            response.count = ErpuserFunc.Instance.SelectCount(new DbOpertion.Models.Erpuser {
            });
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #26
0
        public LayUITableResponse <List <Delivers> > GetListDeliver()
        {
            var Id           = 0;
            var List_Deliver = DeliverFunc.Instance.SelectAllDeliver(Id);

            List_Deliver = List_Deliver.OrderByDescending(p => p.Id).ToList();
            LayUITableResponse <List <Delivers> > response = new LayUITableResponse <List <Delivers> >();

            foreach (var item in List_Deliver)
            {
                response.list.Add(new Delivers(item));
            }
            response.count = DeliverFunc.Instance.SelectAllDeliversCount();
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }
コード例 #27
0
        public LayUITableResponse <List <CommodityInfo> > GetCommodityListSetting(LayUITableRequest request)
        {
            var List_Grade = CommodityFunc.Instance.GetCommodityListByPage((request.pageIndex - 1) * request.pageSize, request.pageSize);
            LayUITableResponse <List <SLSM.AdminWeb.Model.Response.Table.CommodityInfo> > response = new LayUITableResponse <List <SLSM.AdminWeb.Model.Response.Table.CommodityInfo> >();

            foreach (var item in List_Grade)
            {
                response.list.Add(new SLSM.AdminWeb.Model.Response.Table.CommodityInfo(item));
            }
            response.count = CommodityFunc.Instance.GetCommodityListCount();
            response.rel   = true;
            response.msg   = "成功";
            if (response.count == 0)
            {
                response.rel = false;
                response.msg = "暂无数据";
            }
            return(response);
        }