ClassSet.h 9.1 KB

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