Exemplo n.º 1
0
        /// <summary>
        /// 新增一个部门/组织,顶级部门名称不能再数据库中重复
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal static ReplayBase CreateDepartment(CreateMembersDepartmentReqeustModel condtion)
        {
            ReplayBase result = new ReplayBase();

            try
            {
                int num = 0;
                //如果父级为空则需要检查根节点是否有同名的组织
                if (string.IsNullOrEmpty(condtion.pid))
                {
                    num = CheckDepartmentCationNumInRootList(condtion.caption);
                }
                if (num == 0)
                {
                    //保存信息
                    result = BaseSysTemDataBaseManager.DepCreateDepartment(condtion);
                }
                else
                {
                    result.ReturnCode    = EnumErrorCode.EmptyDate;
                    result.ReturnMessage = "该组织名称已存在,不能重复创建";
                }
            }
            catch (Exception e) {
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
            }
            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 查询分类树树形集合
 /// </summary>
 /// <returns></returns>
 internal List <Tree> SearchCatTreeList()
 {
     SearchCatTreeListReplay = new List <Tree>();
     try
     {
         List <CatInfoModel> root = BaseSysTemDataBaseManager.RsSearchCatInfoList(this.SearchCatInfoCondtion);
         if (root.Count > 0)
         {
             //取子集
             foreach (CatInfoModel row in root)
             {
                 Dep = 1;
                 Tree Node = new Tree()
                 {
                     attributes = new TreeAttributes()
                     {
                         Sort = row.sort
                     },
                     id       = row.id,
                     text     = row.caption,
                     children = GetCatChildTreeInfo(row.id)
                 };
                 SearchCatTreeListReplay.Add(Node);
             }
         }
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), this.SearchCatInfoCondtion);
     }
     return(SearchCatTreeListReplay);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 查询分类树集合
 /// </summary>
 /// <returns></returns>
 internal List <CatInfoModel> SearchCatInfoList()
 {
     SearchCatInfoListReplay = new List <CatInfoModel>();
     try
     {
         //获取集合
         List <CatInfoModel> root = BaseSysTemDataBaseManager.RsSearchCatInfoList(this.SearchCatInfoCondtion);
         if (root.Count > 0)
         {
             //取子集
             foreach (CatInfoModel row in root)
             {
                 if (!string.IsNullOrEmpty(this.SearchCatInfoCondtion.id) || !string.IsNullOrEmpty(this.SearchCatInfoCondtion.KeyWords))
                 {
                     row._parentId = null;
                 }
                 Dep = 1;
                 GetCatChildInfo(row);
             }
         }
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), this.SearchCatInfoCondtion);
     }
     return(SearchCatInfoListReplay);
 }
Exemplo n.º 4
0
        /// <summary>
        /// 标记删除分类树及其他的子集
        /// </summary>
        /// <returns></returns>
        internal ReplayBase DelCatInfoAndChilds()
        {
            ReplayBase result = new ReplayBase();

            try
            {
                List <string> Ids = new List <string>();
                //获取他自己和自己
                SearchCatInfoCondtion = new SearchCatInfoRequest()
                {
                    id = this.CatInfo.id
                };
                SearchCatInfoList();
                if (this.SearchCatInfoListReplay.Count > 0)
                {
                    foreach (CatInfoModel info in this.SearchCatInfoListReplay)
                    {
                        Ids.Add(info.id);
                    }
                    result = BaseSysTemDataBaseManager.RsDelCatTree(Ids);
                }
                else
                {
                    result.ReturnCode    = EnumErrorCode.EmptyDate;
                    result.ReturnMessage = "没有找到需要删除的数据";
                }
            }
            catch (Exception e) {
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), this.CatInfo);
            }
            return(result);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 标记删除用户输入规范项
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal static ReplayBase DelUserInputRules(DelResourceUserInputRulesReqeust condtion)
        {
            ReplayBase result = new ReplayBase();

            try
            {
                List <string> Ids = new List <string>();
                if (condtion.rows.Count > 0)
                {
                    foreach (ResourceUserInputRuleModel row in condtion.rows)
                    {
                        Ids.Add(row.RuleId);
                    }
                    result = BaseSysTemDataBaseManager.RsDelUserInputRules(Ids);
                }
                else
                {
                    result.ReturnCode    = EnumErrorCode.EmptyDate;
                    result.ReturnMessage = "删除行的集合不能为空";
                }
            }
            catch (Exception e) {
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
            }
            return(result);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 查询文档信息
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal static SearchDocumentsResourceListReplayModel SearchDocument(SearchDocumentsResourceListRequestModel condtion)
        {
            SearchDocumentsResourceListReplayModel result = new SearchDocumentsResourceListReplayModel();

            try
            {
                result = BaseSysTemDataBaseManager.RsSearchDocumentResource(condtion);
                if (result.rowlist.Count > 0)
                {
                    //截取内容
                    if (!condtion.GetContent)
                    {
                        foreach (DocumentsResourceModel row in result.rowlist)
                        {
                            row.Content = Helps.GetShotContent(row.Content, condtion.ContentLength);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
            }
            return(result);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 发送个推信息【可批量,支持IOS和安卓 批量与单个用户,通知与传透】
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal static ReplayBase SendGTuiPushByPusSets(SendGeTuiPushBySetRequestModel condtion)
        {
            ReplayBase result = new ReplayBase();

            try
            {
                condtion.sets = condtion.pushSets;
                if (condtion.sets.Count > 0)
                {
                    ReplayBase          record = SysSmsDataBaseManager.RunSaveSentPush(condtion);
                    SendGeTuiPushReplay r      = GTuiPushInterFaceService.PushMessage(condtion);
                    SysSmsDataBaseManager.RunUpdateSentPushStatus(record.ReturnMessage, r);
                    result.ReturnMessage = r.sentResultAndroid + "&" + r.sentResultIos;
                }
                else
                {
                    result.ReturnCode    = EnumErrorCode.ServiceError;
                    result.ReturnMessage = "请至少传入一条接收者的推送设置";
                }
            }
            catch (Exception e)
            {
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
            }
            return(result);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 用户登录验证
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal RegisterMembersReplayModel CheckMemberLoginNameandPwd(RequestLogOnMembersModel condtion)
        {
            RegisterMembersReplayModel result = new RegisterMembersReplayModel();

            try
            {
                //请求参数验证
                if (string.IsNullOrEmpty(condtion.deviceUUid) && string.IsNullOrEmpty(condtion.mobilePhone))
                {
                    result.ReturnCode    = EnumErrorCode.EmptyDate;
                    result.ReturnMessage = "设备ID或者手机号码不能同时为空";
                    return(result);
                }

                result = BaseSysTemDataBaseManager.MemberCheckMemberLoginNameandPwd(condtion);
                if (result.ReturnCode == EnumErrorCode.Success)
                {
                    //登陆成功后获取用户基础信息
                    GetMemberBaseInfo(new GetMembersInfoRequestModel()
                    {
                        userId = result.UserInfo.UserId
                    });
                    result.UserInfo = this.MemberBaseInfo;
                }
            }
            catch (Exception e)
            {
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
            }
            return(result);
        }
Exemplo n.º 9
0
 /// <summary>
 /// 获取分类树信息
 /// </summary>
 /// <param name="id">分类信息ID</param>
 internal void GetCatInfoById(string id)
 {
     try
     {
         this.CatInfo = BaseSysTemDataBaseManager.RsGetCatInfoById(id);
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), id);
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// 获取用户信息
 /// </summary>
 /// <param name="Id">用户Id</param>
 internal void GetSysUser(string Id)
 {
     try
     {
         this.SysUserInfo = BaseSysTemDataBaseManager.SysGetSysUserById(Id);
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), Id);
     }
 }
Exemplo n.º 11
0
 /// <summary>
 /// 获取组织基础信息
 /// </summary>
 internal void GetOrgBaseInfo(string orgId)
 {
     try
     {
         this.orgInfo.baseInfo = BaseSysTemDataBaseManager.DepGetOrgBaseInfoById(orgId);
         this.orgInfo.exList   = BaseSysTemDataBaseManager.RsGetExInfoList(orgId);
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), orgId);
     }
 }
Exemplo n.º 12
0
 /// <summary>
 /// 将FKID下的常旅客的地址全部设置为非默认
 /// </summary>
 /// <param name="fkid"></param>
 internal static void RsSetTravellertoUndefault(string fkid)
 {
     try
     {
         MembersExDataBaseManager.RsSetTravellertoUndefault(fkid);
     }
     catch (Exception e)
     {
         SysManagerService.SysSaveErrorLogMsg(e.ToString());
     }
 }
Exemplo n.º 13
0
 /// <summary>
 /// 获取部门基础信息
 /// </summary>
 /// <param name="condtion"></param>
 internal void GetDepBaseInfo(GetDepInfoRequestModel condtion)
 {
     try
     {
         depInfo = BaseSysTemDataBaseManager.DepGetDepBaseInfoById(condtion.depmentid);
     }
     catch (Exception e)
     {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
     }
 }
Exemplo n.º 14
0
 /// <summary>
 /// 检查登录名在数据库中出现的次数
 /// </summary>
 /// <param name="LoginName">登录名</param>
 /// <param name="SysUserId">需要排除的用户ID(编辑情况时用户自己)</param>
 /// <returns></returns>
 internal static int CheckLoginNameisExist(string LoginName, string SysUserId = null)
 {
     try
     {
         return(BaseSysTemDataBaseManager.SysCheckSysUserLoginNameisExist(LoginName, SysUserId));
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), LoginName + "[" + SysUserId + "]");
         return(1);
     }
 }
Exemplo n.º 15
0
 /// <summary>
 /// 获取系统菜单列表
 /// </summary>
 /// <returns></returns>
 public static List <SysMenuModel> GetSysMenuList()
 {
     try
     {
         List <SysMenuModel> result = BaseSysTemDataBaseManager.SysGetSysMenuList();
         return(result);
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString());
         return(new List <SysMenuModel>());
     }
 }
Exemplo n.º 16
0
 /// <summary>
 /// 获取后台全部角色信息
 /// </summary>
 /// <returns></returns>
 internal static List <SysUserRoleListModel> GetSysRoleAllRowsList()
 {
     try
     {
         List <SysUserRoleListModel> result = BaseSysTemDataBaseManager.SysGetSysRoleAllRowsList();
         return(result);
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString());
         return(new List <SysUserRoleListModel>());
     }
 }
Exemplo n.º 17
0
 /// <summary>
 /// 获取已有的输入类型集合
 /// </summary>
 /// <returns></returns>
 internal static List <Combobox> GetUserInputRuleTypes()
 {
     try
     {
         List <Combobox> result = BaseSysTemDataBaseManager.RsGetUserInputRuleTypes();
         return(result);
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString());
         return(new List <Combobox>());
     }
 }
Exemplo n.º 18
0
 /// <summary>
 /// 获取用户基础信息
 /// </summary>
 /// <param name="condtion">用户ID与组织ID,传入组织ID会对用户所属部门产生影响</param>
 public void GetMemberBaseInfo(GetMembersInfoRequestModel condtion)
 {
     try
     {
         MembersBaseInfoModel Info = BaseSysTemDataBaseManager.MemberGetMemberBaseInfo(condtion);
         Info.numOfDep       = GetMemberNumofDep(Info);
         this.MemberBaseInfo = Info;
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
     }
 }
Exemplo n.º 19
0
 /// <summary>
 /// 查询系统用户日志
 /// </summary>
 /// <param name="condtion"></param>
 /// <returns></returns>
 internal static ReplaySearchSysUserLog SearchSysUserLog(RequestSearchSysUserLog condtion)
 {
     try
     {
         ReplaySearchSysUserLog result = BaseSysTemDataBaseManager.SysSearchSysUserLog(condtion);
         return(result);
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
         return(new ReplaySearchSysUserLog());
     }
 }
Exemplo n.º 20
0
        /// <summary>
        /// 获取所有已存在的分组
        /// </summary>
        /// <returns></returns>
        internal static List <Combobox> GetAllDocumentsGroupInfo()
        {
            List <Combobox> result = new List <Combobox>();

            try
            {
                result = BaseSysTemDataBaseManager.RsGetAllDocumentsResourceGroupInfoList();
            }
            catch (Exception e) {
                SysManagerService.SysSaveErrorLogMsg(e.ToString());
            }
            return(result);
        }
Exemplo n.º 21
0
        /// <summary>
        /// 获取省份信息列表
        /// </summary>
        /// <returns></returns>
        internal static List <Combobox> GetProvniceList()
        {
            List <Combobox> result = new List <Combobox>();

            try
            {
                result = BaseSysTemDataBaseManager.RsGetProvniceList();
            }
            catch (Exception e) {
                SysManagerService.SysSaveErrorLogMsg(e.ToString());
            }
            return(result);
        }
Exemplo n.º 22
0
        /// <summary>
        /// 获取全国热门城市列表,按省排列,每个省去前3个城市
        /// </summary>
        /// <returns></returns>
        internal static List <GeoCityInfoModel> GetHotCityList()
        {
            List <GeoCityInfoModel> result = new List <GeoCityInfoModel>();

            try
            {
                result = BaseSysTemDataBaseManager.RsGetHotCityList();
            }
            catch (Exception e) {
                SysManagerService.SysSaveErrorLogMsg(e.ToString());
            }
            return(result);
        }
Exemplo n.º 23
0
        /// <summary>
        /// 根据查看的默认常用旅客数量从而可以获取当前FKID下是否有历史数据
        /// </summary>
        /// <param name="fkid"></param>
        /// <returns></returns>
        internal static int RsGetTravellerDefaultCount(string fkid)
        {
            int defaultcount = 0;

            try
            {
                defaultcount = MembersExDataBaseManager.RsGetTravellerDefaultCount(fkid);
            }
            catch (Exception e)
            {
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), fkid);
            }
            return(defaultcount);
        }
Exemplo n.º 24
0
        /// <summary>
        /// 获取历史推送
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal static SearchSentPushListReplayModel SearchPushHistoryList(SearchSentPushListRequestModel condtion)
        {
            SearchSentPushListReplayModel result = new SearchSentPushListReplayModel();

            try
            {
                result = SysSmsDataBaseManager.RunSearchHistoryPushList(condtion);
            }
            catch (Exception e) {
                result.rows = new List <SentPushInfoModel>();
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
            }
            return(result);
        }
Exemplo n.º 25
0
        /// <summary>
        /// 编辑用户基础信息
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal ReplayBase EditMemberBaseInfo(MembersBaseInfoModel condtion)
        {
            ReplayBase result = new ReplayBase();

            try
            {
                result = BaseSysTemDataBaseManager.MemberEditMemberBaseInfo(condtion);
            }
            catch (Exception e) {
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
            }
            return(result);
        }
Exemplo n.º 26
0
        /// <summary>
        /// 设置用户的部门
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal static ReplayBase SetMemberDepartments(SetMemberDepartmentsRequestModel condtion)
        {
            ReplayBase result = new ReplayBase();

            try
            {
                result = BaseSysTemDataBaseManager.DepSetMemberDepartments(condtion);
            }
            catch (Exception e) {
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
            }
            return(result);
        }
Exemplo n.º 27
0
 /// <summary>
 /// 检索根组织(可翻页,后台列表与企业名片数据展示)
 /// </summary>
 /// <param name="condtion"></param>
 /// <returns></returns>
 internal SearchMemberRootDepartMentReplay SearchRootDepartments(SearchMemberRootDepartmentRequest condtion)
 {
     try
     {
         SearchMemberRootDepartMentReplay result = BaseSysTemDataBaseManager.DepSearchRootDepartments(condtion);
         return(result);
     }
     catch (Exception e) {
         SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
         return(new SearchMemberRootDepartMentReplay()
         {
             rows = new List <MemberDepartmentInfoModel>()
         });
     }
 }
Exemplo n.º 28
0
        /// <summary>
        /// 新增或保存资源文档
        /// </summary>
        /// <returns></returns>
        internal ReplayBase Save()
        {
            ReplayBase result = new ReplayBase();

            try
            {
                result = BaseSysTemDataBaseManager.RsSaveDocumentResource(this.Document);
            }
            catch (Exception e) {
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), this.Document);
            }
            return(result);
        }
Exemplo n.º 29
0
        /// <summary>
        /// 标记删除用户扩展信息
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal static ReplayBase DelExInfo(EditInfoExInfoRequestModel condtion)
        {
            ReplayBase result = new ReplayBase();

            try
            {
                result = BaseSysTemDataBaseManager.RsDelExInfo(condtion);
            }
            catch (Exception e)
            {
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
            }
            return(result);
        }
Exemplo n.º 30
0
        /// <summary>
        /// 文档批量排序
        /// </summary>
        /// <param name="condtion"></param>
        /// <returns></returns>
        internal static ReplayBase SortDocuments(SortDocumentsRequest condtion)
        {
            ReplayBase result = new ReplayBase();

            try
            {
                result = BaseSysTemDataBaseManager.RsSortDocumentsResource(condtion);
            }
            catch (Exception e)
            {
                result.ReturnCode    = EnumErrorCode.ServiceError;
                result.ReturnMessage = "服务器错误 500";
                SysManagerService.SysSaveErrorLogMsg(e.ToString(), condtion);
            }
            return(result);
        }