123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef MINDSCORESERVICE_H
- #define MINDSCORESERVICE_H
- class MindScoreInfo;
- #include <QObject>
- ///
- /// \brief The MindScoreService class
- /// 技术重要度指标得分
- ///
- class MindScoreService : public QObject
- {
- Q_OBJECT
- public:
- explicit MindScoreService(QObject *parent = nullptr);
- /// 保存数据
- /// 保存前先查询数据是否已存在, 是则更新数据, 否则新增数据
- /// 数据的唯一性由项目id,指标体系类型,数据来源,算法共同确定
- bool saveUniqueScoreData(int projId, const QString &score);
- ///
- /// \brief queryScoreData 查询权重数据
- /// \param info 存储权重数据
- /// \param projId 项目 id
- /// \return 成功 or 失败
- bool queryScoreData(MindScoreInfo *info, int projId);
- ///
- /// \brief updateScoreData 更新权重数据
- /// \param id 主键
- /// \param weight 权重
- /// \return 成功 or 失败
- bool updateScoreData(int id, const QString &score);
- private:
- /// 保存权重数据
- bool saveScoreData(MindScoreInfo *info);
- };
- #endif // MINDSCORESERVICE_H
|