ClassSet.h 9.0 KB

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