Beispiel #1
0
        /// <summary>
        /// 获取我的所有工作站Json数据 ,用于填充树{id,pId,name}
        /// </summary>
        /// <param name="mode"></param>
        /// <returns></returns>
        public IActionResult StationsOfMyAll(int mode = 0)
        {
            var doctorId     = base.UserSelf.DoctorId;
            var topStationId = base.UserSelf.StationId;
            var find         = new BllCaller.DoctorMgrBllCaller().StationsOfDoctor(doctorId, topStationId, true)
                               .Select(a => new
            {
                id   = a.StationID,
                pId  = a.ParentStationID ?? 0,
                name = a.StationName
            });


            if (mode == 0)
            {
                var list = find.ToList();
                if (list.Count > 1)
                {
                    list.Add(new
                    {
                        id   = 0,
                        pId  = 0,
                        name = "所有工作站"
                    });
                }
                return(Json(list));
            }
            else
            {
                return(Json(find));
            }
        }
        public IActionResult GetDoctorPendingList(string searchText, string timeRange = "Today", bool?isNeedCheck = null, int?rootStationId = null, int pageIndex = 1, int pageSize = 20)
        {
            DateTime dt = DateTime.Now;
            DateTime?dt0 = null, dt1 = null;

            base.initialData_TimeRange(ref dt0, ref dt1, timeRange);
            rootStationId = rootStationId ?? UserSelf.StationId;
            var finds = new BllCaller.DoctorMgrBllCaller().GetDoctorPendingList(searchText, dt0, dt1, isNeedCheck, rootStationId);
            var total = finds.Count();

            finds = finds.OrderBy(m => m.DoctorId).Skip((pageIndex - 1) * pageSize).Take(pageSize);
            var model = new Ass.Mvc.PageListInfo <vwCHIS_Code_Doctor_Authenticate>
            {
                DataList    = finds,
                RecordTotal = total,
                PageIndex   = pageIndex,
                PageSize    = pageSize
            };

            base._setDebugText(dt);
            return(PartialView("_pvDoctorsPendingList", model));
        }