示例#1
0
        /// <summary>
        /// 获取系统分组权限
        /// </summary>
        /// <param name="roleid">分组ID</param>
        /// <returns>分组权限列表</returns>
        public List <GI_RoleRight> GetRoleRight(string roleid)
        {
            string filter = "ROLEID = '" + roleid + "'";
            List <GI_RoleRight> list_ROLERIGHT = EntityOperate <GI_RoleRight> .GetEntityList(filter);

            return(list_ROLERIGHT);
        }
示例#2
0
 /// <summary>
 /// 获取所有树节点,用于一次性加载全部节点
 /// </summary>
 /// <returns></returns>
 public string GetTreeNode()
 {
     return(base.ExecuteActionJsonResult("获取结构化模板树结构", () =>
     {
         int TemplateType = 0;
         if (!int.TryParse(Request["TemplateType"], out TemplateType))
         {
             TemplateType = 10;
         }                                                                                   //如果没有IsCategory参数的话,默认显示全部
         List <V_FormEmrTemplate> list = EntityOperate <V_FormEmrTemplate> .GetEntityList("TemplateType=" + TemplateType).Where(f => f.Del != 1).OrderBy(f => f.TemplateId).ToList();
         List <TreeEntityForLayui> returnValue = new List <TreeEntityForLayui>();
         //returnValue.Add(new TreeEntityForLayui() { name = "可用同意书", id = "0", pid = "", open = true, children = service.CreateTreeNode(list, "0") });
         List <TreeEntityForLayui> secChild = new List <TreeEntityForLayui>();
         secChild.Add(new TreeEntityForLayui()
         {
             name = "已签同意书", id = "Signed", pid = "all", open = true, children = formEmrService.GetSingleTreeNode("Signed", Request["InpatientId"], TemplateType)
         });
         secChild.Add(new TreeEntityForLayui()
         {
             name = "可用同意书", id = "CanUse", pid = "all", open = true, children = formEmrTemplateService.CreateTreeNode(list, "0")
         });
         returnValue.Add(new TreeEntityForLayui()
         {
             name = "同意书", id = "all", pid = "", open = true, children = secChild
         });
         return new WebApi_Result()
         {
             data = returnValue, count = list.Count
         };
     }));
 }
示例#3
0
        /// <summary>
        /// 获取用户相关的功能定义集合
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <param name="SYSID">模块ID</param>
        /// <param name="funLevel">功能定义级别</param>
        /// <returns></returns>
        public List <GI_FunInfo> GetUserFunInfo(string userID, string SYSID, int funLevel)
        {
            string filter = " 1=1 ";

            if (!string.IsNullOrWhiteSpace(userID))
            {
                filter += " and FUNID in (select FUNID from GI_ROLERIGHT where ROLEID in (select ROLEID from GI_ROLEMEMBER where userid = '" + userID + "')) ";
            }
            if (!string.IsNullOrWhiteSpace(SYSID))
            {
                filter += " and SYSID = '" + SYSID + "' ";
            }
            else
            {
                filter += " and 1 = 2 ";
            }
            if (funLevel > -1)
            {
                filter += " and funLevel = " + funLevel;
            }
            //filter += " and SYSID in (select SYSID  from GI_USERSYS where userid = '" + userid + "') ";
            List <GI_FunInfo> list = EntityOperate <GI_FunInfo> .GetEntityList(filter, "DISPLAYSORT,funid");

            return(list);
        }
        /// <summary>
        /// 根据筛选条件查询病人诊断数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <CD_PatientDiagnosis> GetAll(PatientDiagnosisFilter iFilter)
        {
            string filter = "1=1";

            if (!string.IsNullOrWhiteSpace(iFilter.keyword))
            {
                filter += string.Format(" and DiagnosisName like '%{0}%'", iFilter.keyword);
            }
            filter += iFilter.GetQueryString();
            List <CD_PatientDiagnosis> list = EntityOperate <CD_PatientDiagnosis> .GetEntityList(filter, "SortOrder,OrganID");

            if (list == null || list.Count <= 0)
            {
                return(new List <CD_PatientDiagnosis>());
            }
            list.ForEach((f) =>
            {
                var Inpatient   = new InpatientService().GetInfoByInpatientId(f.InpatientId);
                f.InpatientName = Inpatient != null ? Inpatient.Name : "";//病人名字
                if (f.DiagnosisFlag != null)
                {
                    f.DiagnosisFlagName = codedictService.GetCodeDictByDictCodeAndEName(f.DiagnosisFlag.ToString(), "DiagnosisFlag").DictName;
                }                                                                                              //确诊标志中文
                GI_UserInfo RecordUser = EntityOperate <GI_UserInfo> .GetEntityById(f.RecordUserId, "USERID"); //记录医生实体类
                f.RecordUserESign      = RecordUser?.ESign;                                                    //电子签名
            });
            return(list);
        }
示例#5
0
        /// <summary>
        /// 获取与用户分组相关的系统功能定义树结构
        /// </summary>
        /// <returns></returns>
        public string GetRoleTreeNode()
        {
            return(base.ExecuteActionJsonResult("获取系统功能定义树结构", () =>
            {
                List <GI_FunInfo> list = EntityOperate <GI_FunInfo> .GetEntityList("", "DISPLAYSORT").Where(f => f.IsCance != 1).ToList();
                List <TreeEntityForLayui> returnValue = new List <TreeEntityForLayui>();

                List <GI_RoleRight> listROLERIGHT = new List <GI_RoleRight>();
                if (!string.IsNullOrWhiteSpace(Request["RoleID"]))
                {
                    listROLERIGHT = EntityOperate <GI_RoleRight> .GetEntityList("RoleID = '" + Request["RoleID"] + "'");
                }
                var childrenNode = new List <TreeEntityForLayui>();
                List <GI_SYSAPPINFO> listSYSAPPINFO = EntityOperate <GI_SYSAPPINFO> .GetEntityList("", "DISPLAYSORT").Where(f => f.IsCance != 1).ToList();
                listSYSAPPINFO.ForEach((f) =>
                {
                    TreeEntityForLayui treeEntity = new TreeEntityForLayui()
                    {
                        name = f.SYSName, id = "MODULE_" + f.SYSID, pid = "MODULE_0", open = true, children = funInfoService.GetRoleTreeNodeBySYSID(list, listROLERIGHT, f.SYSID), @checked = listROLERIGHT.Where(e => e.FUNID == "MODULE_" + f.SYSID).Count() > 0
                    };
                    childrenNode.Add(treeEntity);
                });
                returnValue.Add(new TreeEntityForLayui()
                {
                    name = "所有系统功能定义", id = "0", pid = "", open = true, children = childrenNode
                });
                return new WebApi_Result()
                {
                    data = returnValue, count = list.Count
                };
            }));
        }
示例#6
0
        /// <summary>
        /// 获取查询列表
        /// </summary>
        /// <param name="_TreeNodeFilter">过滤条件</param>
        /// <returns></returns>
        public List <V_FormEmrTemplate> GetAll(TreeNodeFilter _TreeNodeFilter)
        {
            string filter = "1=1";

            if (!string.IsNullOrWhiteSpace(_TreeNodeFilter.ParentID))
            {
                filter += string.Format("  and ParentId='{0}'", _TreeNodeFilter.ParentID);
            }
            if (!string.IsNullOrWhiteSpace(_TreeNodeFilter.keyword))
            {
                filter += string.Format(" and (TemplateName like '%{0}%') ", _TreeNodeFilter.keyword);
            }
            List <V_FormEmrTemplate> list = EntityOperate <V_FormEmrTemplate> .GetEntityList(filter, "ParentId,TemplateId");

            if (list == null || list.Count <= 0)
            {
                return(new List <V_FormEmrTemplate>());
            }
            list.ForEach((f) =>
            {
                f.DelName = f.Del != 1 ? "正常" : "作废";
                //f.IsCategoryName = f.IsCategory != 1 ? "非末级" : "末级";
            });
            return(list);
        }
示例#7
0
        public List <GI_RoleMember> GetUserGroup(string userid)
        {
            string filter = "USERID = '" + userid + "'";
            List <GI_RoleMember> list_ROLEMEMBER = EntityOperate <GI_RoleMember> .GetEntityList(filter);

            return(list_ROLEMEMBER);
        }
示例#8
0
        /// <summary>
        /// 获取查询列表
        /// </summary>
        /// <param name="_TreeNodeFilter">过滤条件</param>
        /// <returns></returns>
        public List <AI_DeptInfo> GetAll(TreeNodeFilter _TreeNodeFilter)
        {
            string filter = "1=1";

            if (!string.IsNullOrWhiteSpace(_TreeNodeFilter.ParentID))
            {
                filter += string.Format("  and ParentID='{0}'", _TreeNodeFilter.ParentID);
            }
            if (!string.IsNullOrWhiteSpace(_TreeNodeFilter.keyword))
            {
                filter += string.Format(" and (DEPTNAME like '%{0}%' or SpellCode like '%{0}%') ", _TreeNodeFilter.keyword);
            }
            List <AI_DeptInfo> list = EntityOperate <AI_DeptInfo> .GetEntityList(filter, "ParentID,DeptID");

            if (list == null || list.Count <= 0)
            {
                return(new List <AI_DeptInfo>());
            }
            list.ForEach((f) =>
            {
                f.IsInpatientName = f.IsInpatient == 0 ? "不是" : "是";
                f.IsCanceName     = f.IsCance != 1 ? "正常" : "作废";
            });
            return(list);
        }
示例#9
0
        /// <summary>
        /// 获取公用代码字典列表
        /// </summary>
        /// <param name="_TreeNodeFilter">通用的树结构数据检索器</param>
        /// <returns></returns>
        public List <GI_CodeDict> GetAll(TreeNodeFilter _TreeNodeFilter)
        {
            string filter = "1=1";

            //关键词搜索
            if (!string.IsNullOrWhiteSpace(_TreeNodeFilter.keyword))
            {
                filter += string.Format(" and (DICTNAME like '%{0}%' or DICTNAMEEN like '%{0}%' or DictCode='{0}' or SPELLCODE like '%{1}%')", _TreeNodeFilter.keyword, _TreeNodeFilter.keyword.ToUpper());
            }
            //根据父类的英文名搜索子类
            if (!string.IsNullOrWhiteSpace(_TreeNodeFilter.ParentDictNameEN))
            {
                filter += string.Format(" and ParentID in (select DictID from GI_CODEDICT where DictNameEN = '{0}')", _TreeNodeFilter.ParentDictNameEN);
            }

            filter += _TreeNodeFilter.GetQueryString();
            List <GI_CodeDict> list = EntityOperate <GI_CodeDict> .GetEntityList(filter, "PARENTID,DISPLAYSORT", true);

            if (list == null || list.Count <= 0)
            {
                return(new List <GI_CodeDict>());
            }
            list.ForEach((f) =>
            {
                f.IsLastName  = f.ISLast == 0 ? "非未级" : "是未级";
                f.IsCanceName = f.IsCance != 1 ? "正常" : "作废";
            });
            return(list);
        }
示例#10
0
        /// <summary>
        /// 获取系统功能定义数据列表
        /// </summary>
        /// <param name="_TreeNodeFilter">通用的树结构数据检索器</param>
        /// <returns></returns>
        public List <V_FunInfo> GetAll(TreeNodeFilter _TreeNodeFilter)
        {
            string filter = "1=1";

            if (!string.IsNullOrWhiteSpace(_TreeNodeFilter.keyword))
            {
                filter += string.Format(" and FUNNAME like '%{0}%'", _TreeNodeFilter.keyword);
            }
            if ((_TreeNodeFilter.ParentID + "").Contains("MODULE_"))
            {
                filter += " and SYSID = '" + _TreeNodeFilter.ParentID.Replace("MODULE_", "") + "'";
            }
            else
            {
                filter += _TreeNodeFilter.GetQueryString();
            }
            List <V_FunInfo> list = EntityOperate <V_FunInfo> .GetEntityList(filter, "PARENTID,DISPLAYSORT");

            if (list == null || list.Count <= 0)
            {
                return(new List <V_FunInfo>());
            }
            list.ForEach((f) =>
            {
                f.IsLastName = f.IsLast == 0 ? "非未级" : "是未级";
                f.IsShowName = f.IsShow == 0 ? "不显示" : "显示";
            });
            return(list);
        }
示例#11
0
        /// <summary>
        /// 获取单一树节点下的所有子节点,用于动态加载
        /// </summary>
        /// <param name="parentID">父级ID</param>
        /// <param name="roleID">用户分组ID</param>
        /// <returns></returns>
        public List <TreeEntityForLayui> GetSingleTreeNode(string parentID, string roleID)
        {
            List <TreeEntityForLayui> retValue = new List <TreeEntityForLayui>();
            List <GI_FunInfo>         list     = EntityOperate <GI_FunInfo> .GetEntityList(" PARENTID = '" + parentID + "'", "DISPLAYSORT").Where(f => f.IsCance != 1).ToList();

            list.Where(s => s.ParentID == parentID).ToList().ForEach((f) =>
            {
                TreeEntityForLayui tree = new TreeEntityForLayui()
                {
                    name = f.FUNName, id = f.FUNID, pid = f.ParentID, remark = f.SYSID
                };
                if (f.IsLast != 1)//如果不是末级,则加子级
                {
                    tree.children = new List <TreeEntityForLayui>();
                }
                retValue.Add(tree);
            });
            if (!string.IsNullOrWhiteSpace(roleID))
            {
                List <GI_RoleRight> list_ROLERIGHT = EntityOperate <GI_RoleRight> .GetEntityList("ROLEID = '" + roleID + "'");

                if (list_ROLERIGHT != null && list_ROLERIGHT.Count > 0)
                {
                    retValue.ForEach(e =>
                    {
                        if (list_ROLERIGHT.Where(f => f.FUNID == e.id).Count() > 0)
                        {
                            e.@checked = true;
                        }
                    });
                }
            }
            return(retValue);
        }
示例#12
0
        /// <summary>
        /// 通过病区判别获得科室或者病区
        /// </summary>
        /// <param name="IsInpatient">0科室,1病区</param>
        /// <returns></returns>
        public List <AI_DeptInfo> GetDeptInfoByIsInpatient(string IsInpatient, string keyword = "")
        {
            //如果IsInpatient传空,则查询所有的数据
            string filter = string.IsNullOrWhiteSpace(IsInpatient)?"": " IsInpatient=" + IsInpatient + " and ";

            filter += string.IsNullOrWhiteSpace(keyword) ? "" : " (DeptName like '%" + keyword + "%' or SpellCode like '%" + keyword.ToUpper() + "%') and";
            List <AI_DeptInfo> list = EntityOperate <AI_DeptInfo> .GetEntityList(" " + filter + " IsCance=0 ", "DeptID");

            return(list);
        }
        /// <summary>
        /// 环境检测列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <BUS_ENVIRONMENTTEST> GetAllEnvironmentTestService(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <BUS_ENVIRONMENTTEST> list = EntityOperate <BUS_ENVIRONMENTTEST> .GetEntityList(filter, "ENVID desc");

            if (list == null || list.Count <= 0)
            {
                return(new List <BUS_ENVIRONMENTTEST>());
            }
            return(list);
        }
示例#14
0
        /// <summary>
        /// 根据筛选条件查询死亡记录数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <CD_DeathRecord> GetAll(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <CD_DeathRecord> list = EntityOperate <CD_DeathRecord> .GetEntityList(filter, "DeathId");

            if (list == null || list.Count <= 0)
            {
                return(new List <CD_DeathRecord>());
            }
            return(list);
        }
示例#15
0
        /// <summary>
        /// 根据筛选条件查询病程记录数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <CD_ProgressNote> GetAll(ProgressNoteFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <CD_ProgressNote> list = EntityOperate <CD_ProgressNote> .GetEntityList(filter, "CreateTime");

            if (list == null || list.Count <= 0)
            {
                return(new List <CD_ProgressNote>());
            }
            return(list);
        }
示例#16
0
        /// <summary>
        /// 医院感染病例个案调查列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <BUS_INFECTIONEXAMINE> GetAllInfectionExamineService(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <BUS_INFECTIONEXAMINE> list = EntityOperate <BUS_INFECTIONEXAMINE> .GetEntityList(filter, "EXID desc");

            if (list == null || list.Count <= 0)
            {
                return(new List <BUS_INFECTIONEXAMINE>());
            }
            return(list);
        }
示例#17
0
        /// <summary>
        /// 根据筛选条件查询病程记录数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <CD_FormEmr> GetAll(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <CD_FormEmr> list = EntityOperate <CD_FormEmr> .GetEntityList(filter, "CreateTime");

            if (list == null || list.Count <= 0)
            {
                return(new List <CD_FormEmr>());
            }
            return(list);
        }
示例#18
0
        /// <summary>
        /// 获取手卫生依从性及正确性现场调查列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <BUS_HANDHYGIENE> GetAllHandHygieneService(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <BUS_HANDHYGIENE> list = EntityOperate <BUS_HANDHYGIENE> .GetEntityList(filter, "HANDID desc");

            if (list == null || list.Count <= 0)
            {
                return(new List <BUS_HANDHYGIENE>());
            }
            return(list);
        }
示例#19
0
        /// <summary>
        /// 根据筛选条件查询模板数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <AI_StructuredTemplate> GetAll(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <AI_StructuredTemplate> list = EntityOperate <AI_StructuredTemplate> .GetEntityList(filter, "CreateTime");

            if (list == null || list.Count <= 0)
            {
                return(new List <AI_StructuredTemplate>());
            }
            return(list);
        }
示例#20
0
        /// <summary>
        /// 多重耐药菌隔离措施列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <BUS_DRUGRESISTQUAR> GetAllDrugResistQuarService(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <BUS_DRUGRESISTQUAR> list = EntityOperate <BUS_DRUGRESISTQUAR> .GetEntityList(filter, "DCID desc");

            if (list == null || list.Count <= 0)
            {
                return(new List <BUS_DRUGRESISTQUAR>());
            }
            return(list);
        }
示例#21
0
        /// <summary>
        /// 获取所有洗手考核标准
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <BUS_DISINFECTION> GetAllDisInfection(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <BUS_DISINFECTION> list = EntityOperate <BUS_DISINFECTION> .GetEntityList(filter, "DISID desc");

            if (list == null || list.Count <= 0)
            {
                return(new List <BUS_DISINFECTION>());
            }
            return(list);
        }
示例#22
0
        /// <summary>
        /// 获取所有反馈单
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <BUS_YGDCFKD> GetAllFkd(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <BUS_YGDCFKD> list = EntityOperate <BUS_YGDCFKD> .GetEntityList(filter, "FKDID desc");

            if (list == null || list.Count <= 0)
            {
                return(new List <BUS_YGDCFKD>());
            }
            return(list);
        }
示例#23
0
        /// <summary>
        /// 获取所有洗手考核标准
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <BUS_WASHHANDOPERATION> GetAllWashHand(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <BUS_WASHHANDOPERATION> list = EntityOperate <BUS_WASHHANDOPERATION> .GetEntityList(filter, "WHOID desc");

            if (list == null || list.Count <= 0)
            {
                return(new List <BUS_WASHHANDOPERATION>());
            }
            return(list);
        }
示例#24
0
        /// <summary>
        /// 根据筛选条件查询住院病人授权数据列表
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public List <CD_InpatientAuthorized> GetAll(CommonFilter iFilter)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            List <CD_InpatientAuthorized> list = EntityOperate <CD_InpatientAuthorized> .GetEntityList(filter, "InpatientId");

            if (list == null || list.Count <= 0)
            {
                return(new List <CD_InpatientAuthorized>());
            }
            return(list);
        }
示例#25
0
        public List <GI_UserInfo> GetUserInfoByFilter(UserFilter userFilter)
        {
            string filter = "1=1";

            filter += userFilter.GetQueryString();
            List <GI_UserInfo> list = EntityOperate <GI_UserInfo> .GetEntityList(filter);

            if (list == null || list.Count <= 0)
            {
                return(new List <GI_UserInfo>());
            }
            return(list);
        }
        /// <summary>
        /// 获取树数据
        /// </summary>
        /// <returns></returns>
        public string GetSingleTreeNode()
        {
            var PARENTID = Request["PARENTID"];
            List <TreeEntityForLayui> returnValue = new List <TreeEntityForLayui>();
            int TemplateType = 0;

            if (!int.TryParse(Request["TemplateType"], out TemplateType))
            {
                TemplateType = 10;
            }                                                                                   //如果没有IsCategory参数的话,默认显示全部
            if (string.IsNullOrEmpty(PARENTID))
            {
                //returnValue.Add(new TreeEntityForLayui()
                //{
                //    name = "所有模板",
                //    id = "0",
                //    pid = "",
                //    open = true,
                //    children = service.GetSingleTreeNode("0")
                //});
            }
            else
            {
                List <V_FormEmrTemplate> list = EntityOperate <V_FormEmrTemplate> .GetEntityList("TemplateType=" + TemplateType).Where(f => f.Del != 1).OrderBy(f => f.TemplateId).ToList();

                switch (PARENTID)
                {
                case "Signed": returnValue = formEmrService.GetSingleTreeNode("Signed", Request["InpatientId"], TemplateType); break;

                case "CanUse":
                    returnValue = formEmrTemplateService.CreateTreeNode(list, "0"); break;

                case "all":
                    List <TreeEntityForLayui> secChild = new List <TreeEntityForLayui>();
                    secChild.Add(new TreeEntityForLayui()
                    {
                        name = "已签同意书", id = "Signed", pid = "all", open = true, children = formEmrService.GetSingleTreeNode("Signed", Request["InpatientId"], TemplateType)
                    });
                    secChild.Add(new TreeEntityForLayui()
                    {
                        name = "可用同意书", id = "CanUse", pid = "all", open = true, children = formEmrTemplateService.CreateTreeNode(list, "0")
                    });
                    returnValue = secChild;
                    break;

                default:
                    returnValue = formEmrTemplateService.GetSingleTreeNode(PARENTID); break;
                }
            }
            return(new JavaScriptSerializer().Serialize(returnValue));
        }
示例#27
0
        /// <summary>
        /// 获取系统用户分组数据列表
        /// </summary>
        /// <param name="commonFilter">通用的数据检索器</param>
        /// <returns>系统用户分组数据列表</returns>
        public List <GI_Role> GetAll(CommonFilter commonFilter)
        {
            string Filter = "1=1";

            if (!string.IsNullOrWhiteSpace(commonFilter.keyword))
            {
                Filter += string.Format(" and ROLENAME like '%{0}%'", commonFilter.keyword);
            }
            Filter += commonFilter.GetQueryString();
            List <GI_Role> list = EntityOperate <GI_Role> .GetEntityList(Filter);

            if (list == null || list.Count <= 0)
            {
                return(new List <GI_Role>());
            }
            list.ForEach((f) =>
            {
                if (!string.IsNullOrWhiteSpace(f.RolePower))
                {
                    f.PowerName = "";
                    foreach (string each in f.RolePower.Split(','))
                    {
                        switch (each)
                        {
                        case "1":
                            f.PowerName += "查看,";
                            break;

                        case "2":
                            f.PowerName += "编辑,";
                            break;

                        case "3":
                            f.PowerName += "删除,";
                            break;

                        case "4":
                            f.PowerName += "打印,";
                            break;

                        case "5":
                            f.PowerName += "授权,";
                            break;
                        }
                    }
                    f.PowerName = f.PowerName.Trim(',');
                }
            });
            return(list);
        }
示例#28
0
        /// <summary>
        /// 根据洗手考核ID获取单个洗手考核数据
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public Tuple <BUS_WASHHANDOPERATION, List <AI_DeptInfo> > GetWashHandModel(CommonFilter iFilter, string WHOID)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            //  if (!string.IsNullOrWhiteSpace(WHOID)) { filter += " and WHOID=" + WHOID + ""; }

            BUS_WASHHANDOPERATION model = EntityOperate <BUS_WASHHANDOPERATION> .GetEntityById(WHOID, "WHOID");

            var departList = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (model == null ? "" : " and deptid='" + model.DEPTID + "'"), "ParentID,DeptID");

            var tupe = new Tuple <BUS_WASHHANDOPERATION, List <AI_DeptInfo> >(model, departList);

            return(tupe);
        }
示例#29
0
        /// <summary>
        /// 根据洗手考核ID获取单个洗手考核数据
        /// </summary>
        /// <param name="iFilter"></param>
        /// <returns></returns>
        public Tuple <BUS_DISINFECTION, List <AI_DeptInfo> > GetDisInfectionModel(CommonFilter iFilter, string DISID)
        {
            string filter = "1=1";

            filter += iFilter.GetQueryString();
            // if (!string.IsNullOrWhiteSpace(DISID)) { filter += " and DISID=" + DISID + ""; }

            BUS_DISINFECTION model = EntityOperate <BUS_DISINFECTION> .GetEntityById(DISID, "DISID");

            var departList = EntityOperate <AI_DeptInfo> .GetEntityList(filter + (model == null ? "" : " and deptid='" + model.DEPTID + "'"), "ParentID,DeptID");

            var tupe = new Tuple <BUS_DISINFECTION, List <AI_DeptInfo> >(model, departList);

            return(tupe);
        }
示例#30
0
        /// <summary>
        /// 获取查询列表
        /// </summary>
        /// <param name="_TreeNodeFilter">过滤条件</param>
        /// <returns></returns>
        public List <GI_UserInfo> GetAll(TreeNodeFilter _TreeNodeFilter)
        {
            string filter = "1=1";

            if (!string.IsNullOrWhiteSpace(_TreeNodeFilter.ParentID))
            {
                filter += string.Format("  and ParentID='{0}'", _TreeNodeFilter.ParentID);
            }
            if (!string.IsNullOrWhiteSpace(_TreeNodeFilter.keyword))
            {
                filter += string.Format(" and (Name like '%{0}%' or SpellCode like '%{0}%') ", _TreeNodeFilter.keyword.ToUpper());
            }
            List <GI_UserInfo> list = EntityOperate <GI_UserInfo> .GetEntityList(filter, "UserId");

            if (list == null || list.Count <= 0)
            {
                return(new List <GI_UserInfo>());
            }


            list.ForEach((f) =>
            {
                f.IsCanceName   = f.IsCance != 1 ? "正常" : "作废";
                f.DpetName      = "";
                f.InpatientName = "";
                f.MedicalName   = "";
                //职位
                GI_CodeDict job = new CodeDictService().GetCodeDictByDictCodeAndEName(f.Job, "Job");
                f.JobName       = job == null ? "" : job.DictName;
                //职称
                GI_CodeDict userPosition = new CodeDictService().GetCodeDictByDictCodeAndEName(f.UserPosition, "Position");
                f.UserPositionName       = userPosition == null ? "" : userPosition.DictName;
                //职位级别
                GI_CodeDict joblevel = new CodeDictService().GetCodeDictByDictCodeAndEName(f.JobLevel, "JobLevel");
                f.JobLevelName       = joblevel == null ? "" : joblevel.DictName;

                #region 科室和病区组
                List <AI_DeptInfo> userDepts = deptinfoservice.GetDeptInfoByUserId(f.UserID);
                //科室
                f.DpetList = (from u in userDepts where u.IsInpatient == 0 select u).ToList();
                //病区
                f.InpatientList = (from u in userDepts where u.IsInpatient == 1 select u).ToList();
                #endregion
                //用户医疗组
                f.MedicalList = new DoctorGroupService().GetDoctorGroupByUserId(f.UserID);
            });
            return(list);
        }