123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #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);
- /// 评估类型
- /// 评估类型是根据指标类型体系定义的
- /// 一个评估类型包含一个或多个指标体系类型
- enum EvalType
- {
- None,
- DemandEval = AbilityIndex | TechIndex, // 需求分析评估
- OptimalEval = OptimalIndex, // 方案优选评估
- EfficiencyEval = EfficiencyIndex, // 综合效能评估
- };
- Q_ENUM(EvalType)
- Q_DECLARE_FLAGS(EvalTypes, EvalType)
- static QString nameOfEvalType(EvalType t);
- static QString reportNameOfEvalType(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);
- /**
- * 返回指标体系类型对应的评估类型
- * 2023-12-12 by chengxr
- */
- static int evalTypeOfIndexType(int type);
- ///
- /// \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
|