ClassSet.h 8.9 KB

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