Exemplo n.º 1
0
        /// <summary>
        /// 批量执行界面获取
        /// </summary>
        /// <param name="clientKey"></param>
        /// <param name="hasExe"></param>
        /// <param name="noExe"></param>
        /// <returns></returns>
        public ActionResult SelectDataItemExe(string clientKey, string hasExe, string noExe)
        {
            var hasExeitemIdList = hasExe.Split(',').ToList();
            var noExeItemIdList  = noExe.Split(',').ToList();
            var hasExeItems      = _itemService.GetManay(i => hasExeitemIdList.Contains(i.SD_ITEM_ID.ToString())).Select(i => i.SD_ITEM_ID);
            var noExeItems       = _itemService.GetManay(i => noExeItemIdList.Contains(i.SD_ITEM_ID.ToString())).Select(i => i.SD_ITEM_ID);

            ViewBag.HasExeData = hasExeItems.ToJson();
            ViewBag.NoExeData  = noExeItems.ToJson();
            ViewBag.ClientKey  = clientKey;
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult CompareDataItem(int cdrId1, int cdrId2, string startTime, string endTime)
        {
            var sdId          = ProjectProvider.Instance.Current.SD_ID;
            var itemInfoList  = _itemService.GetManay(m => m.SD_ID == sdId);
            var compareResult = _itemCompareService.GetCompareResult(cdrId1, cdrId2, startTime, endTime, itemInfoList);
            var result        = new Dictionary <string, object>()
            {
                { "code", 0 },
                { "msg", "success" },
                { "data", compareResult },
                { "count", compareResult.Count }
            };

            return(Content(result.ToJson()));
        }
Exemplo n.º 3
0
        public ActionResult GetEkpiItem(string kpiId)
        {
            var id           = int.Parse(kpiId);
            var ekpiItemList = _ekpiItemService.GetManay(i => i.SD_EKPI_ID == id);
            var itemIdList   = ekpiItemList.Select(i => i.SD_ITEM_ID).ToList();
            var itemInfo     = _itemService.GetManay(i => itemIdList.Contains(i.SD_ITEM_ID)).ToList();

            foreach (var item in ekpiItemList)
            {
                item.UPD_USER_ID =
                    itemInfo.Where(i => i.SD_ITEM_ID == item.SD_ITEM_ID).ToList().FirstOrDefault().SD_ITEM_NAME;
            }
            return(Content(ekpiItemList.ToJson()));
        }
Exemplo n.º 4
0
        private List <USERSANDSTATES_VIEWMODEL> GetInfos(List <int> sdList)
        {
            try
            {
                var result = _ingroupService.GetManay(r => sdList.Contains(r.SD_ID)).GroupBy(r => new { r.SD_ID, r.CREATE_USER_ID }).Select(s => new USERSANDSTATES_VIEWMODEL
                {
                    SD_ID          = s.Key.SD_ID,
                    CAT_CODE       = "1",
                    CREATE_USER_ID = s.Key.CREATE_USER_ID
                }).Concat(_dataitemService.GetManay(r => sdList.Contains((int)r.SD_ID)).GroupBy(r => new { r.SD_ID, r.CREATE_USER_ID }).Select(s => new USERSANDSTATES_VIEWMODEL
                {
                    SD_ID          = (int)s.Key.SD_ID,
                    CAT_CODE       = "2",
                    CREATE_USER_ID = s.Key.CREATE_USER_ID
                })).Concat(_kpiService.GetManay(r => sdList.Contains((int)r.SD_ID)).GroupBy(r => new { r.SD_ID, r.CREATE_USER_ID }).Select(s => new USERSANDSTATES_VIEWMODEL
                {
                    SD_ID          = (int)s.Key.SD_ID,
                    CAT_CODE       = "3",
                    CREATE_USER_ID = s.Key.CREATE_USER_ID
                })).ToList();

                //var result = (from ingroup in _ingroupService.GetManay(r => sdList.Contains(r.SD_ID))
                //         select string.Format("{0};{1};{2}", ingroup.SD_ID, "1", ingroup.CREATE_USER_ID)
                //         ).Concat(from dataItem in _dataitemService.GetManay(r => sdList.Contains((int)r.SD_ID))
                //                  select string.Format("{0};{1};{2}", dataItem.SD_ID, "2", dataItem.CREATE_USER_ID))
                //                  .Concat(from kpi in _kpiService.GetManay(r => sdList.Contains((int)r.SD_ID))
                //                          select string.Format("{0};{1};{2}", kpi.SD_ID, "3", kpi.CREATE_USER_ID)).Distinct().Select(info=>  new USERSANDSTATES_VIEWMODEL()
                //                              {
                //                                  SD_ID = int.Parse(info.Split(';')[0]),
                //                                  CAT_CODE = info.Split(';')[1],
                //                                  CREATE_USER_ID = info.Split(';')[2]
                //                              }
                //                          ).ToList();

                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }