12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #ifndef PROJECTMANAGER_H
- #define PROJECTMANAGER_H
- #include <QObject>
- class ProjectInfo;
- class ProjectManager : QObject
- {
- Q_OBJECT
- public:
- /// 指标体系类型
- /// @attention 枚举值与本地数据库关联,可以新增,但如无必要禁止修改,除非你知道自己在干什么
- enum IndexType
- {
- AbilityIndex = 0b1, // 能力重要度评估指标体系
- TechIndex = 0b1 << 1, // 技术措施重要度评估对象
- OptimalIndex = 0b1 << 2, // 方案评估指标体系
- EfficiencyIndex = 0b1 << 3, // 综合效能评估指标体系?
- };
- Q_ENUM(IndexType)
- static QString nameOfIndexType(IndexType t);
- /// 评估方案类型
- /// @attention 枚举值与本地数据库关联,可以新增,但如无必要禁止修改,除非你知道自己在干什么
- enum EvalType
- {
- None,
- DemandEval = AbilityIndex | TechIndex, // 需求分析评估
- OptimalEval = OptimalIndex, // 方案优选评估
- EfficiencyEval = EfficiencyIndex, // 综合效能评估
- };
- Q_ENUM(EvalType)
- Q_DECLARE_FLAGS(EvalTypes, EvalType)
- static QString nameOfEvalType(EvalType t);
- static QList<IndexType> indexListOfEvalTypes(EvalTypes flags);
- static EvalTypes evalTypes(ProjectInfo proj);
- static QList<EvalType> evalTypeList(EvalTypes types);
- static QList<EvalType> evalTypeList(ProjectInfo proj);
- static QList<IndexType> indexList(ProjectInfo proj);
- ///
- /// \brief queryProjects 查询全部项目
- /// \param projList 项目列表
- /// \return 错误码
- static int queryProjects(QList<ProjectInfo *> *projList);
- static int queryProjects(QList<ProjectInfo *> *list, int &total, int page, int pageSize, QString name);
- static int verifyProjectInfo(ProjectInfo proj);
- static int insertProject(ProjectInfo &proj);
- static int updateProject(ProjectInfo &proj);
- static int deleteProject(int id);
- };
- #endif // PROJECTMANAGER_H
|