示例#1
0
        public async Task <IActionResult> QueryOrgList(SearchOrgModel search)
        {
            if (string.IsNullOrEmpty(search.pcode)) // 根组织
            {
                //判断用户是否为超级管理员,如果是超级管理员则 获取所有的组织结构,否则获取当前用户的可见组织结构
                bool admin = await this._contextService.IsInRole(base.UserId, Constans.SUPPER_ADMIN_ROLE);

                if (!admin)
                {
                    var user = await base.GetSignedUser();

                    if (!string.IsNullOrEmpty(user.ViewRootCode))
                    {
                        search.pcode = user.ViewRootCode;
                    }
                }
            }
            if (search.pcode == rootId)
            {
                search.pcode = "";
            }
            List <IOrganization> list = await this._service.QueryOrgListByParentCode(search.pcode);

            var ret = JsonQTable.ConvertFromList(list, search.colkey, search.colsArray);

            return(Json(ret));
        }
示例#2
0
        public async Task <IActionResult> QueryUserList(SearchUserModel search)
        {
            if (search.orgCode == rootId)
            {
                search.orgCode = "";
            }

            if (string.IsNullOrEmpty(search.orgCode)) // 权限控制
            {
                string userId = base.UserId;
                var    user   = await base.GetSignedUser();

                string viewCode = user.ViewRootCode;
                bool   admin    = await this._contextService.IsInRole(userId, Constans.SUPPER_ADMIN_ROLE);

                if (!admin)
                {
                    if (!string.IsNullOrEmpty(viewCode))
                    {
                        search.orgCode = viewCode;
                    }
                }
            }

            PageView view = new PageView(search.page, search.rp);
            PagedList <IUserInfo> list = await this._service.QueryUserList(search.orgCode, search.qText, view);

            var ret = JsonQTable.ConvertFromPagedList(list.DataList, list.PageIndex, list.Total, search.colkey, search.colsArray);

            return(Json(ret));
        }
示例#3
0
        public ActionResult QueryEmpList(FormCollection form)
        {
            EmpInfoSearch search = new EmpInfoSearch();

            search.EmpName = form["EMP_NAME"];
            string sGroupId = form["SelectGroupId"];

            if (string.IsNullOrEmpty(sGroupId))
            {
                search.GroupID = 0;
            }
            else
            {
                search.GroupID = int.Parse(sGroupId);
            }
            PageView view     = new PageView(form);
            string   colkey   = form["colkey"];
            string   colsinfo = form["colsinfo"];
            //员工列表
            PagedList <EMPLOYEE> pList = EmployeeService.QueryEmpList(search, view);
            JsonQTable           fdata = JsonQTable.ConvertFromPagedList <EMPLOYEE>(pList, colkey, colsinfo.Split(','));

            //var list = EmployeeService.QueryEmpList(search.GroupID);
            //JsonQTable fdata = JsonQTable.ConvertFromList<EMPLOYEE_EX>(list, colkey, colsinfo.Split(','), CheckState<EMPLOYEE_EX>);
            return(Json(fdata));
        }
示例#4
0
        public JsonResult List(EmpSearch search, FormCollection form)
        {
            PageView view = new PageView(form);

            if (search == null)
            {
                search = new EmpSearch();
            }
            search.FirstTime = form["FirstTime"];
            search.EndTime   = form["EndTime"];
            search.DeptId    = form["DeptId"];
            search.StoreName = form["StoreName"];
            List <string> deptIdList = new List <string>();

            if (deptTree == null)
            {
                setDeptTree();
            }
            List <EMPLOYEE_EX> pList    = _service.QueryEmplReport(search);
            string             colkey   = form["colkey"];
            string             colsinfo = form["colsinfo"];
            JsonQTable         fdata    = JsonQTable.ConvertFromList <EMPLOYEE_EX>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#5
0
        public async Task <IActionResult> QueryList(SearchPrivilegeModel search)
        {
            if (search == null)
            {
                return(Json(new JsonQTable()
                {
                    error = "参数为空,请检查后重试"
                }));
            }
            if (string.IsNullOrEmpty(search.appCode))
            {
                return(Json(new JsonQTable()
                {
                    error = "请先选择系统"
                }));
            }
            List <IRoleInfo> list;

            if (string.IsNullOrEmpty(search.pCode))
            {
                list = await this._service.QueryUserTopRole(search.appCode, base.UserId);
            }
            else
            {
                list = await this._service.QueryRoleByParentCode(search.appCode, search.pCode);
            }

            var jsonData = JsonQTable.ConvertFromList(list, search.colkey, search.colsArray);

            return(Json(jsonData));
        }
示例#6
0
        public JsonResult QueryStoreList(FormCollection form)
        {
            string     colkey   = form["colkey"];
            string     colsinfo = form["colsinfo"];
            var        stores   = _ss.GetStores(CurrentMerchants.ID);
            JsonQTable fdata    = JsonQTable.ConvertFromList <WXStore>(stores, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#7
0
        public JsonResult List(string name, FormCollection form)
        {
            PageView view = new PageView(form);
            PagedList <QMActivity_EX> pList = _service.QueryGetQm(name, view);
            string     colkey   = form["colkey"];
            string     colsinfo = form["colsinfo"];
            JsonQTable fdata    = JsonQTable.ConvertFromPagedList <QMActivity_EX>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
        public JsonResult QueryRight(FormCollection form)
        {
            PageView view     = new PageView(form);
            string   colkey   = form["colkey"];
            string   colsinfo = form["colsinfo"];

            int id = form["id"] == null ? 0 : int.Parse(form["id"].ToString());

            PagedList <SYS_RIGHT> cList = _service.GetRightListByPid(id, view);
            JsonQTable            fdata = JsonQTable.ConvertFromPagedList <SYS_RIGHT>(cList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
        public JsonResult QueryRight(FormCollection form)
        {
            PageView view     = new PageView(form);
            string   colkey   = form["colkey"];
            string   colsinfo = form["colsinfo"];

            Guid id = form["id"] == null ? Guid.Empty : Guid.Parse(form["id"].ToString());

            PagedList <ORG_DICT> cList = _service.GetORG_DICTByParentId(id, view, CurrentLoginUser.ORG_ID);
            JsonQTable           fdata = JsonQTable.ConvertFromPagedList <ORG_DICT>(cList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#10
0
 public JsonResult List(RoleSearch search, FormCollection form)
 {
     PageView view = new PageView(form);
     if (search == null)
     {
         search = new RoleSearch();
     }
     search.ORG_ID = base.CurrentUserOrgId;
     string colkey = form["colkey"];
     string colsinfo = form["colsinfo"];
     PagedList<SYS_ROLE> pList = _cservice.QueryRoleList(search, view);
     JsonQTable fdata = JsonQTable.ConvertFromPagedList<SYS_ROLE>(pList, colkey, colsinfo.Split(','));
     return Json(fdata);
 }
示例#11
0
        public JsonResult ListEmp(EmpSearch search, FormCollection form)
        {
            PageView view = new PageView(form);

            if (search == null)
            {
                search = new EmpSearch();
            }
            PagedList <EMPLOYEE> pList = _service.QueryGetEmp(search, view);
            string     colkey          = form["colkey"];
            string     colsinfo        = form["colsinfo"];
            JsonQTable fdata           = JsonQTable.ConvertFromPagedList <EMPLOYEE>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#12
0
        public JsonResult GetBookingList(RoleSearch search, FormCollection form)
        {
            PageView view = new PageView(form);

            if (search == null)
            {
                search = new RoleSearch();
            }
            search.ORG_ID = base.CurrentLoginUser.ID;
            string colkey   = form["colkey"];
            string colsinfo = form["colsinfo"];
            PagedList <WD_BOOKING> pList = _spservice.GetBookingListByMid(CurrentMerchants.ID, view);
            JsonQTable             fdata = JsonQTable.ConvertFromPagedList <WD_BOOKING>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#13
0
        public JsonResult GetGroupLists(GroupSearch search, FormCollection form)
        {
            PageView view = new PageView(form);

            if (search == null)
            {
                search = new GroupSearch();
            }

            string colkey   = form["colkey"];
            string colsinfo = form["colsinfo"];
            PagedList <SURREY_GROUP_EX> pList = _custMember.QueryGetGroups(search, view);
            JsonQTable fdata = JsonQTable.ConvertFromPagedList <SURREY_GROUP_EX>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#14
0
        public JsonResult ListBD(FansSearch search, FormCollection form)
        {
            if (search == null)
            {
                search = new FansSearch();
            }
            string mdsel = search.Mobile;

            search.ToUserName = base.CurrentMerchants.ToUserName == null ? "" : CurrentMerchants.ToUserName;
            PageView view     = new PageView(form);
            string   colkey   = form["colkey"];
            string   colsinfo = form["colsinfo"];
            PagedList <CUST_FANS_EX> pList = _service.QueryGetFansByMobile(search, view);
            JsonQTable fdata = JsonQTable.ConvertFromPagedList <CUST_FANS_EX>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#15
0
        public ActionResult QueryFansList(FormCollection form)
        {
            string name     = form["EMP_NAME"];
            string sGroupId = form["SelectGroupId"];

            if (string.IsNullOrEmpty(sGroupId))
            {
                sGroupId = "";
            }

            PageView view                 = new PageView(form);
            string   colkey               = form["colkey"];
            string   colsinfo             = form["colsinfo"];
            PagedList <WXCUST_FANS> pList = _sys.QueryTemplateFansListT(sGroupId, name, view);
            JsonQTable fdata              = JsonQTable.ConvertFromPagedList <WXCUST_FANS>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#16
0
        public async Task <IActionResult> QueryAppList(SearchAppInfoModel search)
        {
            JsonQTable ret = null;

            try
            {
                var list = await this._service.QueryAppInfoList(search.AppCode, search.AppName);

                ret = JsonQTable.ConvertFromList(list, search.colkey, search.colsArray);
            }
            catch (Exception ex)
            {
                ret = new JsonQTable {
                    error = "操作失败:" + ex.Message
                };
            }
            return(Json(ret));
        }
        public JsonResult List(EmployeeSearch search, FormCollection form)
        {
            if (search == null)
            {
                search = new EmployeeSearch();
            }
            search.ORG_ID   = base.CurrentUserOrgId;
            search.CuEmpId  = base.CurrentUserEmployeeId;
            search.UserType = form["USER_TYPE"] == null ? "" : form["USER_TYPE"].ToString();
            PageView view     = new PageView(form);
            string   colkey   = form["colkey"];
            string   colsinfo = form["colsinfo"];
            //员工列表
            PagedList <ORG_EMPLOYEE_EX> pList = _eservice.QueryEmployeeList(search, view);
            JsonQTable fdata = JsonQTable.ConvertFromPagedList <ORG_EMPLOYEE_EX>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#18
0
        public async Task <IActionResult> QueryRoleUsers([FromForm] SearchRoleModel search)
        {
            JsonQTable ret;

            if (search == null || string.IsNullOrEmpty(search.roleCode))
            {
                ret       = new JsonQTable();
                ret.error = "角色代码不能为空";
                return(Json(ret));
            }
            PageView page = new PageView();

            page.PageIndex = search.page - 1;
            page.PageSize  = search.rp;
            page.SortName  = search.sortname;
            page.SortOrder = search.sortorder;
            PagedList <IUserInfo> list = await _service.QueryRoleUsers(search.roleCode, search.queryText, page);

            ret = JsonQTable.ConvertFromPagedList(list, search.colkey, search.colsArray);
            return(Json(ret));
        }
示例#19
0
        public JsonResult QueryFansMessages(FormCollection form)
        {
            PageView view     = new PageView(form);
            string   colkey   = form["colkey"];
            string   colsinfo = form["colsinfo"];

            FansMessageSearch fms = new FansMessageSearch();

            fms.ToUserName = WXMyContext.CurrentMerchants.ToUserName;
            if (!string.IsNullOrEmpty(form["SEARCHTYPE"]))
            {
                switch (form["SEARCHTYPE"])
                {
                case "0":
                    break;

                case "1":
                    fms.IsReturn = false;
                    break;

                case "2":
                    fms.IsReturn = true;
                    break;

                case "3":
                    fms.IsStar = true;
                    break;
                }
            }

            if (!string.IsNullOrEmpty(form["SearchText"]))
            {
                fms.SearchText = form["SearchText"];
            }

            PagedList <CUST_MSG_RECORD_EX> pList = _mrs.QueryFansMessages(view, fms);
            JsonQTable fdata = JsonQTable.ConvertFromPagedList <CUST_MSG_RECORD_EX>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
        public JsonResult ListDlzh(FormCollection form)
        {
            UserInfoSearch search = new UserInfoSearch();

            search.ORG_ID    = base.CurrentUserOrgId;
            search.USER_NO   = form["USER_NO1"].ToString();
            search.USER_TYPE = form["USER_TYPES"].ToString();//当前用户的用户类型 STORE_ID
            search.STORE_ID  = form["STORE_IDS"] == null ? 0 : int.Parse(form["STORE_IDS"].ToString());
            search.CUUSER_ID = base.CurrentLoginUserId;

            PageView view = new PageView(form);

            search.ORG_ID = base.CurrentUserOrgId;

            string colkey   = form["colkey"];
            string colsinfo = form["colsinfo"];
            //账户列表
            PagedList <USER_INFO_EX> pList = _eservice.QueryUSER_INFO_EXList(search, view);
            JsonQTable fdata = JsonQTable.ConvertFromPagedList <USER_INFO_EX>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }
示例#21
0
        public JsonResult GetDetail(ExcelSearch search, FormCollection form)
        {
            PageView view = new PageView(form);

            try
            {
                if (search == null)
                {
                    search = new ExcelSearch();
                }

                string colkey   = form["colkey"];
                string colsinfo = form["colsinfo"];

                PagedList <STORES_EXCEL> pList = _bcjStore.QueryExcels(search, view);
                JsonQTable fdata = JsonQTable.ConvertFromPagedList <STORES_EXCEL>(pList, colkey, colsinfo.Split(','));
                return(Json(fdata));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
示例#22
0
        public JsonResult QueryStoreList(FormCollection form)
        {
            //string colkey = form["colkey"];
            //string colsinfo = form["colsinfo"];
            //var stores = _ss.GetStores(CurrentMerchants.ID);
            //JsonQTable fdata = JsonQTable.ConvertFromList<WXStore>(stores, colkey, colsinfo.Split(','));
            //return Json(fdata);

            StoreSearch search = new StoreSearch();

            search.ORG_ID = base.CurrentUserOrgId;
            //search.REGION_ID = Int32.Parse(form["REGION_ID1"].ToString());
            //search.STYPE = form["STYPE"].ToString();
            //search.SSTATUS = form["SSTATUS"].ToString();
            //search.SNAME = form["SNAME"].ToString();

            PageView view     = new PageView(form);
            string   colkey   = form["colkey"];
            string   colsinfo = form["colsinfo"];
            PagedList <ORG_STORE_EX> pList = _ss.QueryAllStoreDate(search, view);
            JsonQTable fdata = JsonQTable.ConvertFromPagedList <ORG_STORE_EX>(pList, colkey, colsinfo.Split(','));

            return(Json(fdata));
        }