123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- #ifndef DBSERVICESET_H
- #define DBSERVICESET_H
- #include "ClassSet.h"
- class DBServiceSet
- {
- public:
- explicit DBServiceSet(QObject *parent = nullptr);
- //////////////////////common-start////////////////////
- int getNextId(QString tableName);
- //////////////////////common-start////////////////////
- //////////////////////节点权重值持久化-start////////////////////
- /*单个节点信息新增*/
- //添加信息
- bool AddNodeWeightInfo(const DemandWeight &demandWeight);
- /*批量节点信息新增*/
- bool AddNodeWeightInfoList(const QList<DemandWeight *> &demandWeightList);
- /*修改节点值*/
- bool UpdateNodeValue(const DemandWeight &demandWeight);
- /*批量修改节点值*/
- bool UpdateNodeValueList(const QList<DemandWeight *> demandWeightList);
- bool QueryByTableIndexAndTableMsg(int expertId, int engineerId, int tableIndex, QString tableMsg);
- bool QueryByTableIndexAndTableMsg(QString expertId, int engineerId, int tableIndex, QString tableMsg);
- bool QueryByTableIndexAndTableMsgAndPage(QString expertId, int engineerId, int tableIndex, QString tableMsg,
- int page);
- bool QueryByTableIndexAndTableMsg(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
- int tableIndex, QString tableMsg);
- bool QueryByTableIndexAndTableMsg(QList<DemandWeight *> *demandWeightList, QString expertId, int engineerId,
- int tableIndex, QString tableMsg);
- bool QueryByPageIndexAndTableMsg(QList<DemandWeight *> *demandWeightList, QString expertId, int engineerId,
- int pageIndex, QString tableMsg);
- bool updateValidByExperIdAndEngineerId(int expertId, int engineerId);
- bool QuerySecondDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
- QString tableMsg);
- bool QuerySecondDemandWeightByEngineerIdAndMaxPage(QList<DemandWeight *> *demandWeightList, int expertId,
- int engineerId, QString tableMsg);
- bool QuerySecondDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, QString expertIds, int engineerId,
- QString tableMsg);
- // bool QueryFirstDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
- // QString tableMsg);
- bool QueryFirstDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
- QString tableMsg);
- bool QueryLastDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, int expertId, int engineerId,
- QString tableMsg, int tableIndex);
- bool QueryFirstDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, QString expertIds, int engineerId,
- QString tableMsg);
- bool QueryLastPageDemandWeightByEngineerId(QList<DemandWeight *> *demandWeightList, QString expertIds,
- int engineerId, QString tableMsg, int page);
- //////////////////////common-start////////////////////
- ////////////////////方案持久化-start////////////////////
- bool AddSchemeInfoList(const QList<SchemaEval *> &schemaEvalList);
- bool DeleteSchemeByEngineerId(int engineerId);
- bool QuerySchemeInfoByEngineerId(QList<SchemaEval *> *schemeList, int engineerId);
- //////////////////////common-start////////////////////
- //////////////////////技术重要度持久化-start////////////////////
- //添加信息
- bool AddTechnicalImportInfo(const TechnicalImport &technicalImport);
- bool AddTechnicalImportInfoList(const QList<TechnicalImport *> &technicalImportList);
- /*批量修改节点值*/
- bool UpdateTechnicalImportInfoList(const QList<TechnicalImport *> technicalImportList);
- bool QueryTechnicalImportInfoByEngineerId(QList<TechnicalImport *> *technicalImportList, int expertId,
- int engineerId);
- bool QueryTechnicalImportInfoByEngineerId(int expertId, int engineerId);
- //////////////////////common-start////////////////////
- //////////////////////节点矩阵信息表-start////////////////////
- /*单个节点信息新增*/
- //添加信息
- bool AddNodeMatrixInfo(const NodeMatrixInfo &nodeMatrixInfo);
- /*批量节点信息新增*/
- bool AddNodeMatrixInfoList(const QList<NodeMatrixInfo *> &jbInfoList);
- /*批量节点信息新增----专家端*/
- bool AddNodeMatrixInfoList2(const QList<NodeMatrixInfo *> &jbInfoList);
- /*修改节点值*/
- bool UpdateNodeMatrixNodeValue(const NodeMatrixInfo &nodeMatrixInfo);
- /*批量修改节点值*/
- bool UpdateNodeMatrixNodeValueList(const QList<NodeMatrixInfo *> jbInfoList);
- /*批量修改节点值--专家端*/
- bool UpdateNodeMatrixNodeValueList2(const QList<NodeMatrixInfo *> jbInfoList);
- /*根据专家姓名查询对应的节点信息*/
- bool QueryNodeMatrixListByExpertName(QList<NodeMatrixInfo *> *nodeMatrixInfoList, QString expertName);
- bool QueryNodeMatrixListByExpertNameAndEngineerId(QString expertName, int engineerId, QString tableMsg,
- QString mark);
- /*根据专家id查询对应的节点信息*/
- bool QueryNodeMatrixListByExpertIdAndEngineerId(QString expertId, int engineerId, QString tableMsg);
- /*根据专家名称和工程ID查询对应的节点信息*/
- bool QueryNodeMatrixListByExpertNameAndEngineerId(QList<NodeMatrixInfo *> *nodeMatrixInfoList, QString expertName,
- int engineerId);
- /*根据专家名称和工程ID查询对应的节点信息--专家端*/
- bool QueryNodeMatrixListByExpertNameAndEngineerId2(QString expertName, int engineerId, QString tableMsg,
- QString mark, int tabIndex);
- bool QueryNodesByExpertNameAndEngineerId2(QList<NodeMatrixInfo *> *nodeMatrixInfoList, QString expertName,
- int engineerId, QString tableMsg, QString mark, int tabIndex);
- /*根据专家id和工程ID查询对应的节点信息*/
- bool QueryNodeMatrixListByExpertIdAndEngineerId(QList<NodeMatrixInfo *> *nodeMatrixInfoList, int expertId,
- int engineerId, QString tableMsg);
- /*判断专家是否已录入数据*/
- bool QueryNodeValueByUserIdAndEngineerId(int experId, int engineerId);
- /*根据专家id和工程ID查询对应的节点信息 ---专家端*/
- bool QueryNodeMatrixListByExpertIdAndEngineerId2(QList<NodeMatrixInfo *> *nodeMatrixInfoList, int expertId,
- int engineerId, QString tableMsg);
- /*根据专家编号查询对应的节点信息*/
- bool QueryNodeMatrixListByExpertId(QList<NodeMatrixInfo *> *nodeMatrixInfoList, int expertId);
- /*根据工程编号查询节点矩阵信息*/
- bool QueryNodeMatrixListByEngineerId(QList<NodeMatrixInfo *> *nodeMatrixInfoList, int engineerId);
- /*根据工程编号删除节点信息*/
- bool DeleteNodeMatrixListByEngineerId(int engineerId);
- /*根据专家姓名删除节点信息*/
- bool DeleteNodeMatrixListByExpertName(QString expertName);
- /*根据专家编号删除节点信息*/
- bool DeleteNodeMatrixListByExpertId(int expertId);
- //////////////////////节点矩阵信息表-end/////////////////////
- //////////////////////工程信息表-start////////////////////
- //添加信息
- bool AddEngineerInfo(const EngineerInfo &engineerInfo);
- int AddEngineerInfoReturnId(const EngineerInfo &engineerInfo);
- /*修改节点值*/
- bool UpdateEngineerInfo(const EngineerInfo &engineerInfo);
- bool UpdateEngineerIndex(int enjId, int indexId);
- bool UpdateEngineerMessaure(int enjId, int messaureId);
- bool UpdateEngineerSchema(int enjId, int schemaId);
- bool UpdateNameById(QString name, int id);
- /*根据指标体系id查询工程信息*/
- bool QueryEngineerByEngineerId(EngineerInfo *engineerInfo, int engineerId);
- /*根据指标体系名查询工程信息*/
- bool QueryEngineerByEngineerName(EngineerInfo *engineerInfo, QString engineerName);
- /*根据指标体系id查询工程信息*/
- bool QueryEngineerList(QList<EngineerInfo *> *engineerInfoList);
- bool QueryEngineerListByName(QList<EngineerInfo *> *engineerInfoList, QString engineerName);
- /*根据指标体系id查询工程信息*/
- bool QueryEngineerListByIndexSetId(QList<EngineerInfo *> *engineerInfoList, int indexSetId);
- /*根据测量方法ig查询对应的工程信息*/
- bool QueryEngineerListByMeasureFunctionId(QList<EngineerInfo *> *engineerInfoList, int measureFunctionId);
- /*根据工程编号删除工程信息*/
- bool DeleteEngineerByEngineerId(int engineerId);
- /*根据指标体系编号删除工程信息*/
- bool DeleteEngineerByIndexSetId(int indexSetId);
- /*根据测量方法编号删除工程信息*/
- bool DeleteEngineerByMeasureFunctionId(int measureFunctionId);
- /*删除所有工程*/
- bool DeleteEngineers();
- //删除其他工程id
- bool DeleteEngineerNotInId(int id, QString dbPath);
- bool QueryChlidNodeByPId(int pid, QString dbName, QString mindPath);
- //////////////////////工程信息表-end////////////////////
- //////////////////////用户信息表-start////////////////////
- //添加信息
- int AddUserInfo(const UserInfo &userInfo);
- /*修改用户信息*/
- bool UpdateUserInfo(const UserInfo &userInfo);
- bool UpdateUserPassword(QString userNo, QString password);
- bool UpdateUserById(QString userNo, QString password, int id);
- /*根据用户id查询用户信息*/
- bool QueryUserInfoById(UserInfo *userInfo, int userId);
- bool QueryUserInfoByUnserInfo(const UserInfo ¶mInfo, UserInfo &queryInfo);
- // int QueryUserInfoByUserNoAndPhone(QString);
- /*根据列名称和列值模糊查询用户信息,列名称为实体类中的属性名称*/
- bool QueryUserListByColumnAndColumnValue(QList<UserInfo *> *userInfoList, QString columnName, QString columnValue);
- bool QueryUserList(QList<UserInfo *> *userInfoList);
- bool QueryUserListNotAdmin(QList<UserInfo *> *userInfoList);
- /*根据用户编号删除用户信息*/
- bool DeleteUserById(int Id);
- bool QueryUserByNoAndPassword(UserInfo *userInfo, QString userNo, QString password);
- bool QueryUserByNo(UserInfo *userInfo, QString userNo);
- /*获取工程用户列表*/
- bool QueryUserListByEngineerId(QList<UserInfo *> *userInfoList, int engineerId);
- //删除除管理管外的所有用户
- bool DeleteUserByRole(int roleType);
- //专家本地库查询信息
- bool QueryUserInfoById2(UserInfo *userInfo, int userId);
- bool UpdateUserInfo2(const UserInfo &userInfo);
- int AddUserInfo2(const UserInfo &userInfo);
- //////////////////////用户信息表-end////////////////////
- //////////////////////评估方案表-start////////////////////
- //添加信息
- bool AddPlanInfo(const PlanInfo &planInfo);
- /*修改评估方案信息*/
- bool UpdatePlanInfo(const PlanInfo &planInfo);
- /*根据评估方案id查询评估方案信息*/
- bool QueryPlanInfoById(PlanInfo *planInfo, int planId);
- /*根据列名称和列值模糊查询评估方案信息,列名称为实体类中的属性名称*/
- bool QueryPlanListByColumnAndColumnValue(QList<PlanInfo *> *planInfoList, QString columnName, QString columnValue);
- bool QueryPlanList(QList<PlanInfo *> *planInfoList);
- /*根据评估方案编号删除评估方案信息*/
- bool DeletePlanById(int planId);
- //////////////////////评估方案表-end////////////////////
- //////////////////////评估方案指标体系关系表-start////////////////////
- //添加信息
- // bool AddIndexSetPlanInfo(const IndexSetPlanInfo &planInfo);
- bool AddIndexSetPlanInfoList(const QList<IndexSetPlanInfo *> planInfoList);
- /*修改信息*/
- bool UpdateIndexSetPlanInfo(const IndexSetPlanInfo &planInfo);
- bool UpdateIndexSetPlanInfoList(const QList<IndexSetPlanInfo *> planInfoList);
- /*根据id查询信息*/
- bool QueryIndexSetPlanInfo(IndexSetPlanInfo *planInfo, int Id);
- /*根据列名称和列值模糊查询信息,列名称为实体类中的属性名称*/
- bool QueryIndexSetPlanListByColumnAndColumnValue(QList<IndexSetPlanInfo *> *planInfoList, QString columnName,
- QString columnValue);
- /*根据编号删除关联信息*/
- bool DeleteIndexSetPlanById(int Id);
- bool DeleteIndexSetPlanByPlanId(int planId);
- bool DeleteIndexSetPlanByIndexSetId(int indexSetId);
- //////////////////////评估方案指标体系关系表-end////////////////////
- //////////////////////用户工程配置-start////////////////////
- //添加信息
- int AddUserConfig(const UserConfig &cfg);
- //添加配置列表
- bool AddUserConfigList(QList<UserConfig *> cfgList);
- /*修改用户工程配置*/
- bool UpdateUserConfig(const UserConfig &cfg);
- /*修改用户工程配置为无效状态*/
- bool UpdateUserValid(int userId, int flag);
- /*查询该工程用户权重和*/
- int QueryUserWeightSum(int engineerId);
- int QueryUserWeightSum(int engineerId, int userId);
- /*根据用户工程配置id查询用户工程配置*/
- bool QueryUserConfigInfoById(UserConfig *cfg, int cfgId);
- bool QueryUserConfigListInfoByUserId(QList<UserConfig *> *userCfgList, int userId);
- bool QueryUserConfigListInfoByUserIdAndEngineerId(UserConfig *userCfg, int userId, int engineerId);
- bool QueryUserConfigListInfoByEngineerId(QList<UserConfig *> *userCfgList, int engineerId);
- bool QueryAllUserConfig(QList<UserConfig *> *userCfgList);
- /*根据用户工程配置id删除用户工程配置*/
- bool DeleteUserConfigById(int cfgId);
- bool DeleteUserConfigByEngineerId(int enjId);
- bool DeleteUserConfigByUserId(int userId);
- //////////////////////用户工程配置-end////////////////////
- };
- #endif // DBSERVICESET_H
|