Beispiel #1
0
        public ActionResult getShowContent(EboardSearchModel search, Page page)
        {
            var apiUrl = "Chart/getShowContentAPI";
            HttpResponseMessage responMessage = APIHelper.APIPostAsync(search, page, apiUrl);
            var result = responMessage.Content.ReadAsStringAsync().Result;

            return(Content(result, "application/json"));
        }
Beispiel #2
0
        /// <summary>
        /// 获取电子看板
        /// </summary>
        /// <param name="search"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        public ActionResult GetTopTenQeboardInfo(EboardSearchModel search, Page page)
        {
            page.PageSize = 10;
            var selectProjectsArray = search.selectProjects.Split('_');
            var apiUrl = string.Format("Chart/GetTopTenQeboardAPI?Projects={0}&PageNumber={1}&PageSize={2}", selectProjectsArray[0], page.PageNumber, page.PageSize);
            HttpResponseMessage responMessage = APIHelper.APIGetAsync(apiUrl);
            var result = responMessage.Content.ReadAsStringAsync().Result;

            return(Content(result, "application/json"));
        }
Beispiel #3
0
        public PagedListModel <EboardVM> getShowContent(EboardSearchModel search, Page page)
        {
            var           totalCount = 0;
            List <int>    Projects   = NoticeRepository.GetSelectMasterUid(search.selectProjects);
            List <string> FunPlants  = search.selectFunplants.Split(',').ToList();
            //循环功能厂获取对应中文名称
            List <string> FunPlantLists = new List <string>();

            foreach (var item in FunPlants)
            {
                if (item == "Surface")
                {
                    FunPlantLists.Add("表面");
                }
                else if (item == "Anode")
                {
                    FunPlantLists.Add("阳极");
                }
                else if (item == "Assembly")
                {
                    FunPlantLists.Add("组装");
                }
                else if (item == "Top")
                {
                    FunPlantLists.Add("前十低达成");
                }
                else if (item == "ALL")
                {
                    FunPlantLists.Add("全部制程");
                }
                else
                {
                    FunPlantLists.Add(item);
                }
            }

            List <string> partS       = search.Part_Types.Split(',').ToList();
            var           searchModel = new EboardS
            {
                FunPlant    = FunPlantLists,
                MasterUID   = Projects,
                Part_Types  = partS,
                Optype      = search.Optype,
                QE_location = search.QE_location == null ? "ALL" : search.QE_location
            };

            var list    = NoticeRepository.getShowContent(searchModel, page, out totalCount);
            var listDTO = list.ToList();

            return(new PagedListModel <EboardVM>(totalCount, listDTO));
        }