ClassSet.h 8.8 KB

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