using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; namespace Ant.Service.Common.Enums { /// /// 枚举独特类 /// add 作者: 季健国 QQ:181589805 by 2016-10-10 /// public class EnumsClass { /// /// 枚举value /// public int Value { get; set; } /// /// 枚举显示值 /// public string Name { get; set; } /// /// 枚举说明 /// public string Text { get; set; } } #region 系统管理相关 /// /// 系统操作枚举 /// public enum enumOperator { /// /// 无 /// [Description("无")] None, /// /// 查询 /// [Description("查询")] Select, /// /// 添加 /// [Description("添加")] Add, /// /// 修改 /// [Description("修改")] Edit, /// /// 移除 /// [Description("移除")] Remove, /// /// 登录 /// [Description("登录")] Login, /// /// 登出 /// [Description("登出")] LogOut, /// /// 导出 /// [Description("导出")] Export, /// /// 导入 /// [Description("导入")] Import, /// /// 审核 /// [Description("审核")] Audit, /// /// 回复 /// [Description("回复")] Reply, /// /// 下载 /// [Description("下载")] Download, /// /// 上传 /// [Description("上传")] Upload, /// /// 分配 /// [Description("分配")] Allocation, /// /// 文件 /// [Description("文件")] Files, /// /// 流程 /// [Description("流程")] Flow } /// /// log4net枚举 /// public enum enumLog4net { [Description("普通")] INFO, [Description("警告")] WARN, [Description("错误")] ERROR, [Description("异常")] FATAL } /// /// 模块类别枚举,对应TBSYS_Module表的ModuleType字段 /// public enum enumModuleType { 无页面 = 1, 列表页 = 2, 弹出页 = 3 } /// /// 部门类型 /// public enum enumDepartmentType { 胜利石油管理局 = 1, 施工队=2, 工程部 = 3, 计划科=4, 其他单位=5 } #endregion #region 流程枚举 /// /// 流程枚举 /// public enum FLowEnums { /// /// 空白 /// [Description("空白")] Blank = 0, /// /// 草稿 /// [Description("草稿")] Draft = 1, /// /// 运行中 /// [Description("运行中")] Runing = 2, /// /// 已完成 /// [Description("已完成")] Complete = 3, /// /// 挂起 /// [Description("挂起")] HungUp = 4, /// /// 退回 /// [Description("退回")] ReturnSta = 5, /// /// 转发(移交) /// [Description("移交")] Shift = 6, /// /// 删除(逻辑删除状态) /// [Description("删除")] Delete = 7, /// /// 加签 /// [Description("加签")] Askfor = 8, /// /// 冻结 /// [Description("冻结")] Fix = 9, /// /// 批处理 /// [Description("批处理")] Batch = 10, /// /// 加签回复状态 /// [Description("加签回复")] AskForReplay = 11 } #endregion #region 系统字典 /// /// 类描述:系统字典 /// 创建标识:add by 季健国 2013-8-8 14:14 /// public class ClsDic { /// /// 根据DicKey值获取value /// public static string GetDicValueByKey(string key, Dictionary p) { if (p == null || p.Count == 0) return ""; var dic = p.GetEnumerator(); while (dic.MoveNext()) { var obj = dic.Current; if (key == obj.Key) return obj.Value; } return ""; } /// /// 根据DICValue获取Key /// public static string GetDicKeyByValue(string value, Dictionary p) { if (p == null || p.Count == 0) return ""; var dic = p.GetEnumerator(); while (dic.MoveNext()) { var obj = dic.Current; if (obj.Value == value) return obj.Key; } return ""; } /// /// 描述:实体与编码对应字典,在验证数据权限时,通过此处字典来枚举实体编号 /// 创建标识: add by 季健国 2013-8-8 14:18 /// public static Dictionary DicEntity { get { Dictionary _dic = new Dictionary(); _dic.Add("日志", ""); _dic.Add("用户", "18da4207-3bfc-49ea-90f7-16867721805c"); return _dic; } } /// /// 描述:存放特别的角色编号字典,在验证操作权限时用到 /// 创建标识:add by 季健国 2013-8-9 9:56 /// public static Dictionary DicRole { get { Dictionary _dic = new Dictionary(); _dic.Add("超级管理员", 1); return _dic; } } /// /// 字典类型 /// public static Dictionary DicCodeType { get { Dictionary _dic = new Dictionary(); try { string dicStr = Utils.GetFileContent(System.Web.HttpContext.Current.Server.MapPath("/Models/DicType.txt"), false); var diclist = dicStr.TrimEnd(',').TrimStart(',').Split(',').ToList(); if (diclist.Count>0) { foreach (var item in diclist) { _dic.Add(item.Split('-')[0], item.Split('-')[1]); } } } catch { } return _dic; } } /// /// 附件上传路径 /// 创建标识:add by 季健国 2013-8-21 13:58 /// public static Dictionary DicAttachmentPath { get { Dictionary _dic = new Dictionary(); _dic.Add("上传路径", System.Configuration.ConfigurationManager.AppSettings["upfile"]); _dic.Add("档案简历", System.Configuration.ConfigurationManager.AppSettings["upfile"]); _dic.Add("手机文件", System.Configuration.ConfigurationManager.AppSettings["upphone"]); _dic.Add("手机照片", System.Configuration.ConfigurationManager.AppSettings["photofile"]); _dic.Add("技术文件", System.Configuration.ConfigurationManager.AppSettings["upTsfile"]); _dic.Add("工程图", System.Configuration.ConfigurationManager.AppSettings["UploadFiles"]); _dic.Add("档案头像", System.Configuration.ConfigurationManager.AppSettings["upfile"]); return _dic; } } /// /// 业务办理图片宽高 /// 创建标识:add by 季健国 2013-8-21 13:58 /// public static Dictionary DicImageWH { get { Dictionary _dic = new Dictionary(); _dic.Add("图片宽度", System.Configuration.ConfigurationManager.AppSettings["imgWidth"]); _dic.Add("图片高度", System.Configuration.ConfigurationManager.AppSettings["imgHeight"]); _dic.Add("手机用户头像高", System.Configuration.ConfigurationManager.AppSettings["UserPhotoHeight"]); _dic.Add("手机用户头像宽", System.Configuration.ConfigurationManager.AppSettings["UserPhotoWidth"]); _dic.Add("用户头像高", System.Configuration.ConfigurationManager.AppSettings["PolicePhotoHeight"]); _dic.Add("用户头像宽", System.Configuration.ConfigurationManager.AppSettings["PolicePhotoWidth"]); return _dic; } } /// /// 警务室图片宽高 /// 创建标识:add by 季健国 2013-8-21 13:58 /// public static Dictionary DicPoliceHouseImageWH { get { Dictionary _dic = new Dictionary(); _dic.Add("图片宽度", System.Configuration.ConfigurationManager.AppSettings["imgPoliceWidth"]); _dic.Add("图片高度", System.Configuration.ConfigurationManager.AppSettings["imgPoliceHeight"]); return _dic; } } /// /// OracleReportData /// 创建标识:add by 季健国 2013-8-21 13:58 /// public static Dictionary OracleReportData { get { Dictionary _dic = new Dictionary(); _dic.Add("OrcalReport", System.Configuration.ConfigurationManager.AppSettings["connectionString"]); return _dic; } } /// /// 手机客户端命名 /// 创建标识:add by 季健国 2013-8-21 13:58 /// public static Dictionary DicPhone { get { Dictionary _dic = new Dictionary(); _dic.Add("安卓程序", System.Configuration.ConfigurationManager.AppSettings["AndroidName"]); _dic.Add("苹果程序", System.Configuration.ConfigurationManager.AppSettings["IOSName"]); return _dic; } } /// /// 功能描述:记录Cookie的Key值 /// 创建标识:徐戈 /// public static Dictionary DicCookie { get { Dictionary _dic = new Dictionary(); _dic.Add("Session中存储的帐号和CookieID", "AccountCookieID_Session"); _dic.Add("Cookie中存储的帐号和CookieID", "AccountCookieIDNew"); return _dic; } } /// /// 功能描述:记录Cookie的Key值 /// 创建标识:徐戈 /// public static Dictionary DicCookieTimeout { get { Dictionary _dic = new Dictionary(); _dic.Add("帐号过期时间", "30"); return _dic; } } } #endregion #region 业务相关 /// /// 计划流转状态 /// public enum enumHCA_RecognitionProgramProcessType { 上报 = 1, 同意 = 2, 不同意 = 3 } /// /// 上传文件类型 /// public enum enumFileType { 其他 = 0, Word = 1, Excel = 2, 图片 = 3, PPT = 4, PDF = 5, RAR=6 } /// ///路单状态 /// public enum enumWAYBILLSTATE { 分派 = 1, 打印 = 2, 数据录入 = 3, 数据填报=4, 车队审核回收=5, 删除=6, 作废=7, 交接=8, 纳入结算=9, 完成结算=10 } /// /// 来源 /// public enum enumORIGIN { 自建 = 1, 任务 = 2, 外委申请 = 3 } /// /// 应急物资规格型号 /// public enum enumReliefGoodsModel { 规格型号1 = 1, 规格型号2 = 2, 规格型号3 = 3 } /// /// 应急抢险救援物资类别 /// public enum enumReliefGoodsType { 溢油 = 1, 防汛 = 2 } /// /// 业务咨询枚举,对应业务咨询表的bptype字段 /// public enum enumBptType { 在线咨询 = 401002, 身份证 = 501001, 户籍 = 501002, 治安管理 = 501003, 出入境 = 501004, 消防 = 501005, 其他业务 = 501006, 交警 = 501007, 网安 = 501008, 法制 = 501009 } public enum enumNewsType { 警务信息 = 301001, 警方公告 = 301002, 防范提示 = 101501 } /// /// 上传文件类型 /// public enum enumBusType { 车辆图片上传 = 100001, 套管图片上传 = 103002, 三通图片上传 = 103003, 阀门图片上传 = 103004, 占压图片上传 = 103005, } /// /// 管道维修应急预案级别 /// public enum enumEmergencyPlanLevel { 中石化 = 1, 油田 = 2, 总厂 = 3, 分厂 = 4 } /// /// 阳极材料 /// public enum enumAnodeMaterial { 未知 = 0, 镀铂阳极 = 1, 磁性氧化铁 = 2, 混合金属氧化物 = 3, 镁 = 4, 锌 = 5, 铂 = 6, 高硅铸铁 = 7, 石墨 = 8, 废钢铁 = 9, 碳 = 10, 铝合金 = 11, 其它 = 99 } /// /// 业务咨询处理状态枚举,对应业务咨询表的requesStatus字段 /// public enum enumBussinessType { 后台办理本部门业务 = 1, 手机办理本部门业务 = 2, 手机业务 = 3, 社区民警 = 4 } /// /// 业务咨询处理状态枚举,对应业务咨询表的requesStatus字段 /// public enum enumRequesStatus { 用户提交 = 0, 指定处理 = 1, 处理完成 = 2 } public enum enumWorkType { 未指定 = -1, 手机方式 = 0, 电脑Web = 1 } public enum enumIsBool { 是 = 1, 否 = 2 } public enum enumPhoneUserType { 注册用户 = 1, 匿名用户 = 2 } public enum enumReplyType { 未处理 = 0, 审核通过 = 1, 审核不通过 = 2 } public enum enumBlogType { 新浪微博 = 0, 腾讯微博 = 1, 东营公安局的腾讯微博 = 2 } #endregion }