ErrorCode.cs 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. using Furion.FriendlyException;
  2. namespace YBEE.EQM.Core;
  3. /// <summary>
  4. /// 系统错误码
  5. /// </summary>
  6. [ErrorCodeType]
  7. public enum ErrorCode
  8. {
  9. /// <summary>
  10. /// 用户名或密码不正确
  11. /// </summary>
  12. [ErrorCodeItemMetadata("用户名或密码不正确")]
  13. E1001,
  14. /// <summary>
  15. /// 获取账户信息失败,请重新登录
  16. /// </summary>
  17. [ErrorCodeItemMetadata("获取账户信息失败,请重新登录")]
  18. E1002,
  19. /// <summary>
  20. /// 账号已冻结
  21. /// </summary>
  22. [ErrorCodeItemMetadata("账户已冻结")]
  23. E1003,
  24. /// <summary>
  25. /// 无权限
  26. /// </summary>
  27. [ErrorCodeItemMetadata("无权限")]
  28. E1004,
  29. /// <summary>
  30. /// 旧密码验证失败
  31. /// </summary>
  32. [ErrorCodeItemMetadata("旧密码验证失败")]
  33. E1005,
  34. /// <summary>
  35. /// 密码长度应为在6至32位之间
  36. /// </summary>
  37. [ErrorCodeItemMetadata("密码长度应为在6至32位之间")]
  38. E1006,
  39. /// <summary>
  40. /// 未初始化
  41. /// </summary>
  42. [ErrorCodeItemMetadata("{0}未初始化", "")]
  43. E1007,
  44. /// <summary>
  45. /// 账户未激活
  46. /// </summary>
  47. [ErrorCodeItemMetadata("账户未激活")]
  48. E1008,
  49. /// <summary>
  50. /// 新密码不能与初始密码相同
  51. /// </summary>
  52. [ErrorCodeItemMetadata("新密码不能与初始密码相同")]
  53. E1009,
  54. /// <summary>
  55. /// 文件必须为.xls或.xlsx格式
  56. /// </summary>
  57. [ErrorCodeItemMetadata("文件必须为.xls或.xlsx格式")]
  58. E1010,
  59. /// <summary>
  60. /// 文件不存在
  61. /// </summary>
  62. [ErrorCodeItemMetadata("文件不存在")]
  63. E1011,
  64. /// <summary>
  65. /// 缺少佐证材料
  66. /// </summary>
  67. [ErrorCodeItemMetadata("{0}缺少佐证材料")]
  68. E1012,
  69. /// <summary>
  70. /// 自编监测号长度错误
  71. /// </summary>
  72. [ErrorCodeItemMetadata("{0}自编监测号长度错误")]
  73. E1013,
  74. /// <summary>
  75. /// 类型错误
  76. /// </summary>
  77. [ErrorCodeItemMetadata("{0}类型错误")]
  78. E1014,
  79. /// <summary>
  80. /// {0}不存在"
  81. /// </summary>
  82. [ErrorCodeItemMetadata("{0}不存在")]
  83. E2001,
  84. /// <summary>
  85. /// {0}已存在 默认参数:0-"记录"
  86. /// </summary>
  87. [ErrorCodeItemMetadata("{0}已存在", "记录")]
  88. E2002,
  89. /// <summary>
  90. /// {0}已存相同{1} 默认参数:0-"",1-"名称"
  91. /// </summary>
  92. [ErrorCodeItemMetadata("{0}中已存相同{1}", "", "名称")]
  93. E2003,
  94. /// <summary>
  95. /// 已存相同{0}{1} 默认参数:0-"名称",1-""
  96. /// </summary>
  97. [ErrorCodeItemMetadata("已存相同{0}{1}", "名称", "")]
  98. E2004,
  99. /// <summary>
  100. /// 已存相同名称或代码
  101. /// </summary>
  102. [ErrorCodeItemMetadata("已存相同名称或代码")]
  103. E2005,
  104. /// <summary>
  105. /// 当前状态不能操作
  106. /// </summary>
  107. [ErrorCodeItemMetadata("{0}当前状态不能操作", "")]
  108. E2006,
  109. /// <summary>
  110. /// {0}未设置 默认参数:0-""
  111. /// </summary>
  112. [ErrorCodeItemMetadata("{0}未设置", "")]
  113. E2007,
  114. /// <summary>
  115. /// 已截止,不能上报
  116. /// </summary>
  117. [ErrorCodeItemMetadata("已截止,不能上报")]
  118. E2008,
  119. /// <summary>
  120. /// 该学校未在监测范围内
  121. /// </summary>
  122. [ErrorCodeItemMetadata("该学校未在监测范围内")]
  123. E2009,
  124. /// <summary>
  125. /// {0}已存在
  126. /// </summary>
  127. [ErrorCodeItemMetadata("{0}已存在")]
  128. E2010,
  129. /// <summary>
  130. /// 已存相同{0}
  131. /// </summary>
  132. [ErrorCodeItemMetadata("已存相同{0}")]
  133. E2011,
  134. /// <summary>
  135. /// {0}已存相同{1}
  136. /// </summary>
  137. [ErrorCodeItemMetadata("{0}中已存相同{1}")]
  138. E2012,
  139. /// <summary>
  140. /// 匹配错误({0})
  141. /// </summary>
  142. [ErrorCodeItemMetadata("匹配错误({0})")]
  143. E2013,
  144. /// <summary>
  145. /// 非法操作!禁止删除{0} 默认参数:0-""
  146. /// </summary>
  147. [ErrorCodeItemMetadata("非法操作,禁止删除{0}", "")]
  148. E3001,
  149. /// <summary>
  150. /// 提交失败,还有{0}个小题的题型、认知能力、预估难度、知识模块或知识点未完善。
  151. /// </summary>
  152. [ErrorCodeItemMetadata("提交失败,还有{0}个小题的题型、认知能力、预估难度、知识模块或知识点未完善。")]
  153. E3002,
  154. /// <summary>
  155. /// 提交失败,问题或建议未填写完整。
  156. /// </summary>
  157. [ErrorCodeItemMetadata("提交失败,问题或建议未填写完整")]
  158. E3003,
  159. /// <summary>
  160. /// 菜单已存在
  161. /// </summary>
  162. [ErrorCodeItemMetadata("菜单已存在")]
  163. E8101,
  164. /// <summary>
  165. /// 路由地址为空
  166. /// </summary>
  167. [ErrorCodeItemMetadata("路由地址为空")]
  168. E8102,
  169. /// <summary>
  170. /// 打开方式为空
  171. /// </summary>
  172. [ErrorCodeItemMetadata("打开方式为空")]
  173. E8103,
  174. /// <summary>
  175. /// 权限标识格式为空
  176. /// </summary>
  177. [ErrorCodeItemMetadata("权限标识格式为空")]
  178. E8104,
  179. /// <summary>
  180. /// 权限标识格式错误
  181. /// </summary>
  182. [ErrorCodeItemMetadata("权限标识格式错误")]
  183. E8105,
  184. /// <summary>
  185. /// 权限不存在
  186. /// </summary>
  187. [ErrorCodeItemMetadata("权限不存在")]
  188. E8106,
  189. /// <summary>
  190. /// 父级菜单不能为当前节点,请重新选择父级菜单
  191. /// </summary>
  192. [ErrorCodeItemMetadata("父级菜单不能为当前节点,请重新选择父级菜单")]
  193. E8107,
  194. /// <summary>
  195. /// 禁止删除固定角色
  196. /// </summary>
  197. [ErrorCodeItemMetadata("禁止删除固定角色")]
  198. E8201,
  199. /// <summary>
  200. /// 禁止修改固定角色
  201. /// </summary>
  202. [ErrorCodeItemMetadata("禁止修改固定角色")]
  203. E8202,
  204. /// <summary>
  205. /// 该类型不是枚举类型
  206. /// </summary>
  207. [ErrorCodeItemMetadata("该类型不是枚举类型")]
  208. E9001,
  209. }