123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350 |
- #ifndef CLASSSET_H
- #define CLASSSET_H
- #include <QObject>
- #include <QDate>
- const int QF_CODE_SUCCEEDED = 1000;
- const int QF_CODE_ALREADY_LOGIN = 1001;
- const int QF_CODE_ADD_USER_SUCCEEDED = 1002;
- const int QF_CODE_DELETE_USER_SUCCEEDED = 1003;
- const int QF_CODE_FAILED = 2000;
- const int QF_CODE_EMPTY_ACCOUNT = 2001;
- const int QF_CODE_EMPTY_PASSWORD = 2002;
- const int QF_CODE_USER_NOT_EXISTS = 2003;
- const int QF_CODE_WRONG_PASSWORD = 2004;
- const int QF_CODE_NOT_LOGIN = 2005;
- const int QF_CODE_PASSWORD_NOT_SAME = 2006;
- const int QF_CODE_PASSWORD_UNCHANGED = 2007;
- const int QF_CODE_DATA_ERROR = 2008;
- const int QF_CODE_EMPTY_USERNAME = 2009;
- const int QF_CODE_ACCOUNT_OCCUPIED = 2010;
- const int QF_CODE_DELETE_USER_FAILED = 2011;
- const int QF_CODE_NEED_PROJ_SUMMARY = 2020;
- const int QF_CODE_NEED_PROJ_NAME = 2021;
- const int QF_CODE_NEED_PROJ_TYPE = 2022;
- const int QF_CODE_PROJ_CREATE_FALIED = 2023;
- const int QF_CODE_PROJ_NOT_EDITABLE = 2024;
- const int QF_CODE_PROJ_UPDATE_FALIED = 2025;
- const int QF_CODE_PROJ_DELETE_FALIED = 2026;
- const int QF_CODE_EVAL_NOT_SUPPORTED = 2030;
- /**
- * @projectName QFD
- * @author cyh
- * @date 2021-05-12
- * @desc 节点矩阵信息
- */
- class NodeMatrixInfo
- {
- public:
- int id = -1;
- QString expertName; //专家名称
- QString expertId; //专家id
- int engineerId; //工程id
- int mindId; //脑图名称
- QString node; //节点
- QString abscissa; //横坐标
- QString ordinate; //纵坐标
- QString nodeValue; //节点值
- QDateTime writeDate; //填写时间
- QString mark; //页码
- QString tableMsg;
- int tabIndex; // tab索引
- };
- class ClassSet
- {
- public:
- explicit ClassSet();
- static QList<NodeMatrixInfo *> datas;
- };
- class UserConfig;
- /**
- * @projectName QFD
- * @author cyh
- * @date 2021-05-12
- * @desc 工程信息
- */
- class EngineerInfo
- {
- public:
- /// 指标体系类型
- enum IndexType
- {
- Capability = 0b1, // 能力重要度评估指标体系
- TechMessaures = 0b1 << 1, // 技术措施重要度评估对象
- SchemaEval = 0b1 << 2, // 方案评估指标体系
- };
- static QString nameOFIndexType(IndexType t);
- /// 评估方案类型
- enum EvalType
- {
- Importance = Capability | TechMessaures, // 能力与技术重要度评估
- TechSchema = SchemaEval, // 技术方案评估
- // QFD2 新增
- Requirements = 0b1 << 5, // 需求分析评估
- SchemeOptimization = 0b1 << 6, // 方案优选评估
- OverallEfficiency = 0b1 << 7, // 综合效能评估
- };
- Q_DECLARE_FLAGS(EvalTypes, EvalType)
- static QString nameOfEvalType(EvalType t);
- static QList<IndexType> indexListOfEvalFlags(EvalTypes flags);
- int engineerId = -1; //工程id
- QString engineerName; //工程名称
- int indexSetId = -1; //指标体系id
- int measureFunctionId = -1; //测量方法id
- int schemaEvalId = -1; //方案评估id
- QString remark; //备注
- QString effectNameStr; //生效列(逗号分割)
- EvalTypes evalFlags() const;
- QList<IndexType> indexList() const;
- QList<UserConfig *> configs;
- };
- /**
- * @projectName QFD
- * @author cyh
- * @date 2021-05-12
- * @desc 用户信息
- */
- class QFUser
- {
- public:
- enum Role
- {
- SuperAdmin,
- GerneralAdmin,
- Expert
- };
- static QString nameOfRole(Role role);
- int id = -1; // id
- QString userName; //用户名称
- QString userNo; //用户账号
- QString password; //用户密码
- Role role; //角色 0-超级管理员,1-普通管理员,2-专家
- QString post; //职务
- QString major; //专业
- QString workPosition; //工作单位
- QString educationDegree; //文化程度
- QString phone; //联系方式
- QString remark; //注释信息
- QString projectId; //工程编号
- QString writeTime; //填写时间
- QFUser();
- QFUser(const QString userId, const QString password);
- const QString rawPassword() const;
- static QFUser *currentUser();
- QString roleName() const;
- int login(); // 登录
- static int logout(); // 退出
- int resetAdmin(QString account, QString password, QString repeatPassword); // 修改管理员账号
- private:
- QString m_rawPassword;
- };
- /**
- * @projectName QFD
- * @author cyh
- * @date 2021-05-12
- * @desc 评估方案信息类
- */
- class PlanInfo
- {
- public:
- int id = -1; // id
- QString planName; //方案名称
- int engineerId; //关联工程id
- QString desc; //方案描述
- };
- /**
- * @projectName QFD
- * @author cyh
- * @date 2021-05-12
- * @desc 评估方案信息与指标体系关系表
- */
- class IndexSetPlanInfo
- {
- public:
- int id = -1; // id
- int indexSetId; //指标体系id
- int planId; //方案id
- double weight; //权重值
- };
- /**
- * @projectName QFD
- * @author mimang
- * @date 2022-01-10
- * @desc 能力重要度评估指标体系 需求权重重要度
- */
- class DemandWeight
- {
- public:
- int id = -1; // id
- int engineerId; // 工程id
- QString expertId; // 专家id
- QString nodeName; //节点名称
- double nodeValue; //需求重要度
- double nodeWeight; //权重值
- int tableIndex; //表格索引
- int isValid; //是否有效
- int pageIndex; //页码
- QString tableMsg;
- };
- /**
- * @projectName QFD
- * @author mimang
- * @date 2022-01-10
- * @desc 能力重要度评估指标体系 需求权重重要度
- */
- class SchemaEval
- {
- public:
- int id = -1; // id
- int engineerId; // 工程id
- QString name; // 专家id
- QString remark; //节点名称
- QString valueStr; //指标得分
- double score; //得分
- };
- /**
- * @projectName QFD
- * @author mimang
- * @date 2022-01-11
- * @desc 技术措施重要度评估对象 技术重要度
- */
- class TechnicalImport
- {
- public:
- int id = -1; // id
- int engineerId; // 工程id
- int expertId; // 专家id
- QString nodeName; //节点名称
- double nodeValue; //技术重要度
- };
- /**
- * @brief 用户配置信息
- */
- class UserConfig
- {
- public:
- int id = -1;
- int userId; //用户id
- QString userName; //用户名称
- int engineerId; //工程id
- double weight; //工程权重
- QString createTime; //创建时间
- QString updateTime; //更新时间
- };
- /**
- * @projectName QFD2
- * @author mimang
- * @date 2023-09-12
- * @desc 项目信息
- */
- class ProjectInfo
- {
- public:
- int id = -1; //项目id
- QString projectName; //项目名称
- // int demandMindId = -1; //需求分享评估脑图ID
- // int programmeMindId = -1; //方案优选评估脑图ID
- // int generalMindId = -1; //综合效能评估脑图ID
- QString remark; //备注
- QString taskName; //任务名称
- QString estimateTime; //评估时间
- QString estimateObjective; //评估目的
- QString estimateDept; //评估单位
- QString estimatePerson; //评估人员
- QString estimateType; //评估类型
- QString positionalTitles; //职务
- QString createTime; //创建时间
- QString updateTime; //更新时间
- };
- /**
- * @projectName QFD2
- * @author mimang
- * @date 2023-09-14
- * @desc 算法信息
- */
- class AlgorithmInfo
- {
- public:
- int id = -1; //主键id
- QString code; //算法编码
- QString name; //算法名称
- QString desc; //算法描述
- int type; //算法类型
- int status = 1; //状态0不可用1可用
- QString createTime; //创建时间
- QString updateTime; //更新时间
- };
- /**
- * @projectName QFD2
- * @author mimang
- * @date 2023-09-15
- * @desc 工程算法关联信息
- */
- class ProjectAlgorithmRelation
- {
- public:
- int id = -1; //主键id
- QString code; //算法编码
- int projectId; //工程id
- int type; //评估类型
- int status = 1; //状态0不可用1可用
- QString createTime; //创建时间
- QString updateTime; //更新时间
- };
- /**
- * @projectName QFD2
- * @author mimang
- * @date 2023-09-15
- * @desc 工程脑图关联信息
- */
- class ProjectMindRelation
- {
- public:
- int id = -1; //主键id
- int mindId; //脑图ID
- int projectId; //工程id
- int type; //评估类型
- QString createTime; //创建时间
- QString updateTime; //更新时间
- };
- #endif // CLASSSET_H
|