DBServiceSet.h 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. #ifndef DBSERVICESET_H
  2. #define DBSERVICESET_H
  3. #include "ClassSet.h"
  4. class DBServiceSet
  5. {
  6. public:
  7. explicit DBServiceSet(QObject *parent = nullptr);
  8. //////////////////////common-start////////////////////
  9. int getNextId(QString tableName);
  10. //////////////////////common-start////////////////////
  11. //////////////////////节点权重值持久化-start////////////////////
  12. /*单个节点信息新增*/
  13. //添加信息
  14. bool AddNodeWeightInfo(const DemandWeight &demandWeight);
  15. /*批量节点信息新增*/
  16. bool AddNodeWeightInfoList(const QList<DemandWeight *> &demandWeightList);
  17. /*修改节点值*/
  18. bool UpdateNodeValue(const DemandWeight &demandWeight);
  19. /*批量修改节点值*/
  20. bool UpdateNodeValueList(const QList<DemandWeight *> demandWeightList);
  21. bool QueryByTableIndexAndTableMsg(int expertId, int engineerId, int tableIndex, QString tableMsg);
  22. bool QueryByTableIndexAndTableMsg(QString expertId, int engineerId, int tableIndex, QString tableMsg);
  23. bool QueryByTableIndexAndTableMsgAndPage(QString expertId, int engineerId, int tableIndex, QString tableMsg,
  24. int page);
  25. bool QueryByTableIndexAndTableMsg(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
  26. int tableIndex, QString tableMsg);
  27. bool QueryByTableIndexAndTableMsg(QList<DemandWeight *> *demandWeightList, QString expertId, int engineerId,
  28. int tableIndex, QString tableMsg);
  29. bool QueryByPageIndexAndTableMsg(QList<DemandWeight *> *demandWeightList, QString expertId, int engineerId,
  30. int pageIndex, QString tableMsg);
  31. bool updateValidByExperIdAndEngineerId(int expertId, int engineerId);
  32. bool QuerySecondDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
  33. QString tableMsg);
  34. bool QuerySecondDemandWeightByEngineerIdAndMaxPage(QList<DemandWeight *> *demandWeightList, int expertId,
  35. int engineerId, QString tableMsg);
  36. bool QuerySecondDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, QString expertIds, int engineerId,
  37. QString tableMsg);
  38. // bool QueryFirstDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
  39. // QString tableMsg);
  40. bool QueryFirstDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
  41. QString tableMsg);
  42. bool QueryLastDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
  43. QString tableMsg, int tableIndex);
  44. bool QueryFirstDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, QString expertIds, int engineerId,
  45. QString tableMsg);
  46. bool QueryLastPageDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, QString expertIds,
  47. int engineerId, QString tableMsg, int page);
  48. //////////////////////common-start////////////////////
  49. ////////////////////方案持久化-start////////////////////
  50. bool AddSchemeInfoList(const QList<SchemaEval *> &schemaEvalList);
  51. bool DeleteSchemeByEngineerId(int engineerId);
  52. bool QuerySchemeInfoByEngineerId(QList<SchemaEval *> *schemeList, int engineerId);
  53. //////////////////////common-start////////////////////
  54. //////////////////////技术重要度持久化-start////////////////////
  55. //添加信息
  56. bool AddTechnicalImportInfo(const TechnicalImport &technicalImport);
  57. bool AddTechnicalImportInfoList(const QList<TechnicalImport *> &technicalImportList);
  58. /*批量修改节点值*/
  59. bool UpdateTechnicalImportInfoList(const QList<TechnicalImport *> technicalImportList);
  60. bool QueryTechnicalImportInfoByEngineerId(QList<TechnicalImport *> *technicalImportList, int expertId,
  61. int engineerId);
  62. bool QueryTechnicalImportInfoByEngineerId(int expertId, int engineerId);
  63. //////////////////////common-start////////////////////
  64. //////////////////////节点矩阵信息表-start////////////////////
  65. /*单个节点信息新增*/
  66. //添加信息
  67. bool AddNodeMatrixInfo(const NodeMatrixInfo &nodeMatrixInfo);
  68. /*批量节点信息新增*/
  69. bool AddNodeMatrixInfoList(const QList<NodeMatrixInfo *> &jbInfoList);
  70. /*批量节点信息新增----专家端*/
  71. bool AddNodeMatrixInfoList2(const QList<NodeMatrixInfo *> &jbInfoList);
  72. /*修改节点值*/
  73. bool UpdateNodeMatrixNodeValue(const NodeMatrixInfo &nodeMatrixInfo);
  74. /*批量修改节点值*/
  75. bool UpdateNodeMatrixNodeValueList(const QList<NodeMatrixInfo *> jbInfoList);
  76. /*批量修改节点值--专家端*/
  77. bool UpdateNodeMatrixNodeValueList2(const QList<NodeMatrixInfo *> jbInfoList);
  78. /*根据专家姓名查询对应的节点信息*/
  79. bool QueryNodeMatrixListByExpertName(QList<NodeMatrixInfo *> *nodeMatrixInfoList, QString expertName);
  80. bool QueryNodeMatrixListByExpertNameAndEngineerId(QString expertName, int engineerId, QString tableMsg,
  81. QString mark);
  82. /*根据专家id查询对应的节点信息*/
  83. bool QueryNodeMatrixListByExpertIdAndEngineerId(QString expertId, int engineerId, QString tableMsg);
  84. /*根据专家名称和工程ID查询对应的节点信息*/
  85. bool QueryNodeMatrixListByExpertNameAndEngineerId(QList<NodeMatrixInfo *> *nodeMatrixInfoList, QString expertName,
  86. int engineerId);
  87. /*根据专家名称和工程ID查询对应的节点信息--专家端*/
  88. bool QueryNodeMatrixListByExpertNameAndEngineerId2(QString expertName, int engineerId, QString tableMsg,
  89. QString mark, int tabIndex);
  90. bool QueryNodesByExpertNameAndEngineerId2(QList<NodeMatrixInfo *> *nodeMatrixInfoList, QString expertName,
  91. int engineerId, QString tableMsg, QString mark, int tabIndex);
  92. /*根据专家id和工程ID查询对应的节点信息*/
  93. bool QueryNodeMatrixListByExpertIdAndEngineerId(QList<NodeMatrixInfo *> *nodeMatrixInfoList, int expertId,
  94. int engineerId, QString tableMsg);
  95. /*判断专家是否已录入数据*/
  96. bool QueryNodeValueByUserIdAndEngineerId(int experId, int engineerId);
  97. /*根据专家id和工程ID查询对应的节点信息 ---专家端*/
  98. bool QueryNodeMatrixListByExpertIdAndEngineerId2(QList<NodeMatrixInfo *> *nodeMatrixInfoList, int expertId,
  99. int engineerId, QString tableMsg);
  100. /*根据专家编号查询对应的节点信息*/
  101. bool QueryNodeMatrixListByExpertId(QList<NodeMatrixInfo *> *nodeMatrixInfoList, int expertId);
  102. /*根据工程编号查询节点矩阵信息*/
  103. bool QueryNodeMatrixListByEngineerId(QList<NodeMatrixInfo *> *nodeMatrixInfoList, int engineerId);
  104. /*根据工程编号删除节点信息*/
  105. bool DeleteNodeMatrixListByEngineerId(int engineerId);
  106. /*根据专家姓名删除节点信息*/
  107. bool DeleteNodeMatrixListByExpertName(QString expertName);
  108. /*根据专家编号删除节点信息*/
  109. bool DeleteNodeMatrixListByExpertId(int expertId);
  110. //////////////////////节点矩阵信息表-end/////////////////////
  111. //////////////////////评估方案表-start////////////////////
  112. //添加信息
  113. bool AddPlanInfo(const PlanInfo &planInfo);
  114. /*修改评估方案信息*/
  115. bool UpdatePlanInfo(const PlanInfo &planInfo);
  116. /*根据评估方案id查询评估方案信息*/
  117. bool QueryPlanInfoById(PlanInfo *planInfo, int planId);
  118. /*根据列名称和列值模糊查询评估方案信息,列名称为实体类中的属性名称*/
  119. bool QueryPlanListByColumnAndColumnValue(QList<PlanInfo *> *planInfoList, QString columnName, QString columnValue);
  120. bool QueryPlanList(QList<PlanInfo *> *planInfoList);
  121. /*根据评估方案编号删除评估方案信息*/
  122. bool DeletePlanById(int planId);
  123. //////////////////////评估方案表-end////////////////////
  124. //////////////////////评估方案指标体系关系表-start////////////////////
  125. //添加信息
  126. // bool AddIndexSetPlanInfo(const IndexSetPlanInfo &planInfo);
  127. bool AddIndexSetPlanInfoList(const QList<IndexSetPlanInfo *> planInfoList);
  128. /*修改信息*/
  129. bool UpdateIndexSetPlanInfo(const IndexSetPlanInfo &planInfo);
  130. bool UpdateIndexSetPlanInfoList(const QList<IndexSetPlanInfo *> planInfoList);
  131. /*根据id查询信息*/
  132. bool QueryIndexSetPlanInfo(IndexSetPlanInfo *planInfo, int Id);
  133. /*根据列名称和列值模糊查询信息,列名称为实体类中的属性名称*/
  134. bool QueryIndexSetPlanListByColumnAndColumnValue(QList<IndexSetPlanInfo *> *planInfoList, QString columnName,
  135. QString columnValue);
  136. /*根据编号删除关联信息*/
  137. bool DeleteIndexSetPlanById(int Id);
  138. bool DeleteIndexSetPlanByPlanId(int planId);
  139. bool DeleteIndexSetPlanByIndexSetId(int indexSetId);
  140. //////////////////////评估方案指标体系关系表-end////////////////////
  141. };
  142. #endif // DBSERVICESET_H