ClassSet.h 9.1 KB

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