ProjectService.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef PROJECTSERVICE_H
  2. #define PROJECTSERVICE_H
  3. #include "ClassSet.h"
  4. class ProjectService
  5. {
  6. public:
  7. ProjectService(QObject *parent = nullptr);
  8. //添加项目
  9. int AddProjectInfo(const ProjectInfo &projectInfo);
  10. bool SaveProjectInfo(const ProjectInfo &projectInfo);
  11. //更新项目
  12. bool UpdateProjectInfo(const ProjectInfo &projectInfo);
  13. //根据ID更新脑图ID
  14. bool UpdateDemandById(int enjId, int demandId);
  15. bool UpdateProgrammeById(int enjId, int programmeId);
  16. bool UpdateGeneralById(int enjId, int generalId);
  17. /*根据项目id查询项目信息*/
  18. bool QueryProjectById(ProjectInfo *proJectInfo, int id);
  19. /*根据项目名称查询项目*/
  20. bool QueryProjectByName(QString name);
  21. //查询所有
  22. bool QueryAll(QList<ProjectInfo *> *projectInfoList);
  23. //根据id删除
  24. bool DeleteById(int id);
  25. bool DeleteAll();
  26. //分页查询
  27. bool SelectAllByPage(QList<ProjectInfo *> *projectInfoList, int &totalPages, int page, int pageSize, QString name);
  28. };
  29. #endif // PROJECTSERVICE_H