ClassSet.h 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. #ifndef CLASSSET_H
  2. #define CLASSSET_H
  3. #include <QObject>
  4. #include <QDate>
  5. const int QF_CODE_SUCCEEDED = 1000;
  6. const int QF_CODE_ALREADY_LOGIN = 1001;
  7. const int QF_CODE_ADD_USER_SUCCEEDED = 1002;
  8. const int QF_CODE_DELETE_USER_SUCCEEDED = 1003;
  9. const int QF_CODE_FAILED = 2000;
  10. const int QF_CODE_EMPTY_ACCOUNT = 2001;
  11. const int QF_CODE_EMPTY_PASSWORD = 2002;
  12. const int QF_CODE_USER_NOT_EXISTS = 2003;
  13. const int QF_CODE_WRONG_PASSWORD = 2004;
  14. const int QF_CODE_NOT_LOGIN = 2005;
  15. const int QF_CODE_PASSWORD_NOT_SAME = 2006;
  16. const int QF_CODE_PASSWORD_UNCHANGED = 2007;
  17. const int QF_CODE_DATA_ERROR = 2008;
  18. const int QF_CODE_EMPTY_USERNAME = 2009;
  19. const int QF_CODE_ACCOUNT_OCCUPIED = 2010;
  20. const int QF_CODE_DELETE_USER_FAILED = 2011;
  21. const int QF_CODE_NEED_PROJ_SUMMARY = 2020;
  22. const int QF_CODE_NEED_PROJ_NAME = 2021;
  23. const int QF_CODE_NEED_PROJ_TYPE = 2022;
  24. const int QF_CODE_PROJ_CREATE_FALIED = 2023;
  25. const int QF_CODE_PROJ_NOT_EDITABLE = 2024;
  26. const int QF_CODE_PROJ_UPDATE_FALIED = 2025;
  27. const int QF_CODE_PROJ_DELETE_FALIED = 2026;
  28. const int QF_CODE_EVAL_NOT_SUPPORTED = 2030;
  29. /**
  30. * @projectName QFD
  31. * @author cyh
  32. * @date 2021-05-12
  33. * @desc 节点矩阵信息
  34. */
  35. class NodeMatrixInfo
  36. {
  37. public:
  38. int id = -1;
  39. QString expertName; //专家名称
  40. QString expertId; //专家id
  41. int engineerId; //工程id
  42. int mindId; //脑图名称
  43. QString node; //节点
  44. QString abscissa; //横坐标
  45. QString ordinate; //纵坐标
  46. QString nodeValue; //节点值
  47. QDateTime writeDate; //填写时间
  48. QString mark; //页码
  49. QString tableMsg;
  50. int tabIndex; // tab索引
  51. };
  52. class ClassSet
  53. {
  54. public:
  55. explicit ClassSet();
  56. static QList<NodeMatrixInfo *> datas;
  57. };
  58. class UserConfig;
  59. /**
  60. * @projectName QFD
  61. * @author cyh
  62. * @date 2021-05-12
  63. * @desc 工程信息
  64. */
  65. class EngineerInfo
  66. {
  67. public:
  68. /// 指标体系类型
  69. enum IndexType
  70. {
  71. Capability = 0b1, // 能力重要度评估指标体系
  72. TechMessaures = 0b1 << 1, // 技术措施重要度评估对象
  73. SchemaEval = 0b1 << 2, // 方案评估指标体系
  74. };
  75. static QString nameOFIndexType(IndexType t);
  76. /// 评估方案类型
  77. enum EvalType
  78. {
  79. Importance = Capability | TechMessaures, // 能力与技术重要度评估
  80. TechSchema = SchemaEval, // 技术方案评估
  81. // QFD2 新增
  82. Requirements = 0b1 << 5, // 需求分析评估
  83. SchemeOptimization = 0b1 << 6, // 方案优选评估
  84. OverallEfficiency = 0b1 << 7, // 综合效能评估
  85. };
  86. Q_DECLARE_FLAGS(EvalTypes, EvalType)
  87. static QString nameOfEvalType(EvalType t);
  88. static QList<IndexType> indexListOfEvalFlags(EvalTypes flags);
  89. int engineerId = -1; //工程id
  90. QString engineerName; //工程名称
  91. int indexSetId = -1; //指标体系id
  92. int measureFunctionId = -1; //测量方法id
  93. int schemaEvalId = -1; //方案评估id
  94. QString remark; //备注
  95. QString effectNameStr; //生效列(逗号分割)
  96. EvalTypes evalFlags() const;
  97. QList<IndexType> indexList() const;
  98. QList<UserConfig *> configs;
  99. };
  100. /**
  101. * @projectName QFD
  102. * @author cyh
  103. * @date 2021-05-12
  104. * @desc 用户信息
  105. */
  106. class QFUser
  107. {
  108. public:
  109. enum Role
  110. {
  111. SuperAdmin,
  112. GerneralAdmin,
  113. Expert
  114. };
  115. static QString nameOfRole(Role role);
  116. int id = -1; // id
  117. QString userName; //用户名称
  118. QString userNo; //用户账号
  119. QString password; //用户密码
  120. Role role; //角色 0-超级管理员,1-普通管理员,2-专家
  121. QString post; //职务
  122. QString major; //专业
  123. QString workPosition; //工作单位
  124. QString educationDegree; //文化程度
  125. QString phone; //联系方式
  126. QString remark; //注释信息
  127. QString projectId; //工程编号
  128. QString writeTime; //填写时间
  129. QFUser();
  130. QFUser(const QString userId, const QString password);
  131. const QString rawPassword() const;
  132. static QFUser *currentUser();
  133. QString roleName() const;
  134. int login(); // 登录
  135. static int logout(); // 退出
  136. int resetAdmin(QString account, QString password, QString repeatPassword); // 修改管理员账号
  137. private:
  138. QString m_rawPassword;
  139. };
  140. /**
  141. * @projectName QFD
  142. * @author cyh
  143. * @date 2021-05-12
  144. * @desc 评估方案信息类
  145. */
  146. class PlanInfo
  147. {
  148. public:
  149. int id = -1; // id
  150. QString planName; //方案名称
  151. int engineerId; //关联工程id
  152. QString desc; //方案描述
  153. };
  154. /**
  155. * @projectName QFD
  156. * @author cyh
  157. * @date 2021-05-12
  158. * @desc 评估方案信息与指标体系关系表
  159. */
  160. class IndexSetPlanInfo
  161. {
  162. public:
  163. int id = -1; // id
  164. int indexSetId; //指标体系id
  165. int planId; //方案id
  166. double weight; //权重值
  167. };
  168. /**
  169. * @projectName QFD
  170. * @author mimang
  171. * @date 2022-01-10
  172. * @desc 能力重要度评估指标体系 需求权重重要度
  173. */
  174. class DemandWeight
  175. {
  176. public:
  177. int id = -1; // id
  178. int engineerId; // 工程id
  179. QString expertId; // 专家id
  180. QString nodeName; //节点名称
  181. double nodeValue; //需求重要度
  182. double nodeWeight; //权重值
  183. int tableIndex; //表格索引
  184. int isValid; //是否有效
  185. int pageIndex; //页码
  186. QString tableMsg;
  187. };
  188. /**
  189. * @projectName QFD
  190. * @author mimang
  191. * @date 2022-01-10
  192. * @desc 能力重要度评估指标体系 需求权重重要度
  193. */
  194. class SchemaEval
  195. {
  196. public:
  197. int id = -1; // id
  198. int engineerId; // 工程id
  199. QString name; // 专家id
  200. QString remark; //节点名称
  201. QString valueStr; //指标得分
  202. double score; //得分
  203. };
  204. /**
  205. * @projectName QFD
  206. * @author mimang
  207. * @date 2022-01-11
  208. * @desc 技术措施重要度评估对象 技术重要度
  209. */
  210. class TechnicalImport
  211. {
  212. public:
  213. int id = -1; // id
  214. int engineerId; // 工程id
  215. int expertId; // 专家id
  216. QString nodeName; //节点名称
  217. double nodeValue; //技术重要度
  218. };
  219. /**
  220. * @brief 用户配置信息
  221. */
  222. class UserConfig
  223. {
  224. public:
  225. int id = -1;
  226. int userId; //用户id
  227. QString userName; //用户名称
  228. int engineerId; //工程id
  229. double weight; //工程权重
  230. QString createTime; //创建时间
  231. QString updateTime; //更新时间
  232. };
  233. /**
  234. * @projectName QFD2
  235. * @author mimang
  236. * @date 2023-09-12
  237. * @desc 项目信息
  238. */
  239. class ProjectInfo
  240. {
  241. public:
  242. int id = -1; //项目id
  243. QString projectName; //项目名称
  244. // int demandMindId = -1; //需求分享评估脑图ID
  245. // int programmeMindId = -1; //方案优选评估脑图ID
  246. // int generalMindId = -1; //综合效能评估脑图ID
  247. QString remark; //备注
  248. QString taskName; //任务名称
  249. QString estimateTime; //评估时间
  250. QString estimateObjective; //评估目的
  251. QString estimateDept; //评估单位
  252. QString estimatePerson; //评估人员
  253. QString estimateType; //评估类型
  254. QString positionalTitles; //职务
  255. QString createTime; //创建时间
  256. QString updateTime; //更新时间
  257. };
  258. /**
  259. * @projectName QFD2
  260. * @author mimang
  261. * @date 2023-09-14
  262. * @desc 算法信息
  263. */
  264. class AlgorithmInfo
  265. {
  266. public:
  267. int id = -1; //主键id
  268. QString code; //算法编码
  269. QString name; //算法名称
  270. QString desc; //算法描述
  271. int type; //算法类型
  272. int status = 1; //状态0不可用1可用
  273. QString createTime; //创建时间
  274. QString updateTime; //更新时间
  275. };
  276. /**
  277. * @projectName QFD2
  278. * @author mimang
  279. * @date 2023-09-15
  280. * @desc 工程算法关联信息
  281. */
  282. class ProjectAlgorithmRelation
  283. {
  284. public:
  285. int id = -1; //主键id
  286. QString code; //算法编码
  287. int projectId; //工程id
  288. int type; //评估类型
  289. int status = 1; //状态0不可用1可用
  290. QString createTime; //创建时间
  291. QString updateTime; //更新时间
  292. };
  293. /**
  294. * @projectName QFD2
  295. * @author mimang
  296. * @date 2023-09-15
  297. * @desc 工程脑图关联信息
  298. */
  299. class ProjectMindRelation
  300. {
  301. public:
  302. int id = -1; //主键id
  303. int mindId; //脑图ID
  304. int projectId; //工程id
  305. int type; //评估类型
  306. QString createTime; //创建时间
  307. QString updateTime; //更新时间
  308. };
  309. #endif // CLASSSET_H