CHttpBll.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. #ifndef CHTTPBLL_H
  2. #define CHTTPBLL_H
  3. #include "CHttpInterceptor.h"
  4. #include <QObject>
  5. //#include "logproc.h"
  6. class CHttpBll :public QObject , public CHttpInterceptor
  7. {
  8. Q_OBJECT
  9. signals:
  10. void sgnTokenExpired();
  11. void sgnUpgrade(CUpgrade upgrade);
  12. void sgnDownLoadFile(CDownLoadFileInfo downLoadFileInfo);
  13. void sgnAgreement(CAgreement agreement);
  14. void sgnGetSoftwareConfig(CGetSoftwareConfig getSoftwareConfig);
  15. void sgnStudentClientConfig(CStudentClientConfig studentClientConfig);
  16. void sgnSysNotice(CSysNotice sysNotice);
  17. void sgnLoginLimit(CLoginLimit loginLimit);
  18. void sgnLoginInfo(CLoginInfo loginInfo);
  19. void sgnLogout(CLogout logout);
  20. void sgnEditPassword(CEditPassword editPassword);
  21. void sgnGetStudentClientMenu(CGetStudentClientMenu getStudentClientMenu);
  22. void sgnGetStudentInfoBySession(CGetStudentInfoBySession getStudentInfoBySession);
  23. void sgnSpecialtyNameList(CSpecialtyNameList specialtyNameList);
  24. void sgnUpdateNoticeReadStatus(CUpdateNoticeReadStatus updateNoticeReadStatus);
  25. void sgnGetUserNoticeList(CGetUserNoticeList getUserNoticeList);
  26. void sgnAppDownLoadUrl(CAppDownLoadUrl appDownLoadUrl);
  27. void sgnAppEnabled(CAppEnabled appEnabled);
  28. void sgnQueryBatchList(CQueryBatchList queryBatchList);
  29. void sgnGetExamProperty(CGetExamProperty getExamProperty);
  30. void sgnStartExamLimit(CStartExamLimit startExamLimit);
  31. void sgnIpLimit(CIpLimit ipLimit);
  32. void sgnStartExam(CStartExam startExam);
  33. void sgnFaceCheckEnabled(CFaceCheckEnabled faceCheckEnabled);
  34. void sgnLivenessEnabled(CLivenessEnabled livenessEnabled);
  35. void sgnWeiXinAnswerEnabled(CWeiXinAnswerEnabled weiXinAnswerEnabled);
  36. void sgnGetExamById(CGetExamById getExamById);
  37. void sgnStartAnswer(CStartAnswer startAnswer);
  38. void sgnSubmitQuestionAnswer(CSubmitQuestionAnswer submitQuestionAnswer);
  39. void sgnGetQuestion(CGetQuestion getQuestion);
  40. void sgnGetQuestionContent(CGetQuestionContent getQuestionContent);
  41. void sgnQueryExamList(CQueryExamList queryExamList);
  42. void sgnQueryExamEndList(CQueryExamEndList queryExamEndList);
  43. void sgnQueryObjectiveScoreList(CQueryObjectiveScoreList queryObjectiveScoreList);
  44. void sgnQueryHomeworkList(CQueryHomeworkList queryHomeworkList);
  45. void sgnQueryPracticeCourseList(CQueryPracticeCourseList queryPracticeCourseList);
  46. void sgnQueryPracticeRecordList(CQueryPracticeRecordList queryPracticeRecordList);
  47. void sgnGetPracticeDetailInfo(CGetPracticeDetailInfo getPracticeDetailInfo);
  48. void sgnFindExamRecordDataEntity(CFindExamRecordDataEntity findExamRecordDataEntity);
  49. void sgnGetExamRecordQuestions(CGetExamRecordQuestions getExamRecordQuestions);
  50. void sgnGetOfflineCourse(CGetOfflineCourse getOfflineCourse);
  51. void sgnGetOffLineExamAnswerSheet(CGetOffLineExamAnswerSheet getOffLineExamAnswerSheet);
  52. void sgnStartOfflineExam(CStartOfflineExam startOfflineExam);
  53. void sgnGetOffLineExamPaper(CGetOffLineExamPaper getOffLineExamPaper);
  54. void sgnPreviewOffLineExamPaper(CPreviewOffLineExamPaper previewOffLineExamPaper);
  55. void sgnSubmitOfflinePaper(CSubmitOfflinePaper submitOfflinePaper);
  56. void sgnCheckExamInProgress(CCheckExamInProgress checkExamInProgress);
  57. void sgnGetCourseInfo(CGetCourseInfo getCourseInfo);
  58. void sgnEndExam(CEndExam endExam);
  59. void sgnGetEndExamInfo(CGetEndExamInfo getEndExamInfo);
  60. void sgnExamHeartbeat(CExamHeartbeat examHeartbeat);
  61. void sgnFindExamQuestionList(CFindExamQuestionList findExamQuestionList);
  62. void sgnGetExamRecordPaperStruct(CGetExamRecordPaperStruct getExamRecordPaperStruct);
  63. void sgnGetWXQrCode(CGetWXQrCode getWXQrCode);
  64. void sgnSaveUploadedFileAcknowledgeStatus(CSaveUploadedFileAcknowledgeStatus saveUploadedFileAcknowledgeStatus);
  65. // void sgnProcessUpload(CProcessUpload processUpload); //文件上传
  66. void sgnSaveFaceCompareResult(CBaseResponsePackage res);//保存人脸识别比对验证结果
  67. void sgnSaveFaceCaptureResult(CBaseResponsePackage res);//保存人脸抓拍比对验证结果
  68. void sgnSaveFaceLiveVerifyResult(CBaseResponsePackage res);//保存人脸活体验证结果
  69. void sgnGetOrgPropertiesByGroupWithoutCache(CGetOrgPropertiesByGroupWithoutCache orgProperties);
  70. void sgnStartFaceLiveVerify(CStartFaceLiveVerify startFaceLiveVerify);
  71. void sgnClientExamProcessUploadSign(CClientExamProcessUploadSign clientExamProcessUploadSign);
  72. void sgnUploadFileToAliyun(CUploadFileToAliyun uploadFileToAliyun);
  73. void sgnExamControlCheckTime(CBaseResponsePackage res);
  74. void sgnSkipFaceCheckParam(CSkipFaceCheckParam skipFaceCheckParam);
  75. void sgnGetWXUploadedFile(CGetWXUploadedFile getWXUploadedFile);
  76. public:
  77. CHttpBll();
  78. void requestProc(CHttpRequestPackage requestPkg);
  79. QString getToken();
  80. QString getKey();
  81. QString getAuthorization(QString sUri, QString sTimeStamp);
  82. private:
  83. void genUpgrade(CUpgrade *pUpgrade, const std::string &sResponse);
  84. void genAgreement(CAgreement *pAgreement, const std::string &sResponse);
  85. void genSoftwareConfig(CGetSoftwareConfig *pSoftwareConfig, const std::string &sResponse);
  86. void genStudentClientConfig(CStudentClientConfig *pStudentClientConfig, const std::string &sResponse);
  87. void genSysNotice(CSysNotice *pSysNotice, const std::string &sResponse);
  88. void genLoginLimit(CLoginLimit *pLoginLimit, const std::string &sResponse);
  89. void genLoginInfo(CLoginInfo *pLoginInfo, const std::string &sResponse);
  90. void genLogout(CLogout *pLogout, const std::string &sResponse);
  91. void genEditPassword(CEditPassword *pEditPassword, const std::string &sResponse);
  92. void genGetStudentClientMenu(CGetStudentClientMenu *pGetStudentClientMenu, const std::string &sResponse);
  93. void genGetStudentInfoBySession(CGetStudentInfoBySession *pGetStudentInfoBySession, const std::string &sResponse);
  94. void genSpecialtyNameList(CSpecialtyNameList *pSpecialtyNameList, const std::string &sResponse);
  95. void genGetUserNoticeList(CGetUserNoticeList *pGetUserNoticeList, const std::string &sResponse);
  96. void genAppDownLoadUrl(CAppDownLoadUrl *pAppDownLoadUrl, const std::string &sResponse);
  97. void genAppEnabled(CAppEnabled *pAppEnabled, const std::string &sResponse);
  98. void genQueryBatchList(CQueryBatchList *pQueryBatchList, const std::string &sResponse);
  99. void genGetExamProperty(CGetExamProperty *pGetExamProperty, const std::string &sResponse);
  100. void genStartExamLimit(CStartExamLimit *pStartExamLimit, const std::string &sResponse);
  101. void genIpLimit(CIpLimit *pIpLimit, const std::string &sResponse);
  102. void genStartExam(CStartExam *pStartExam, const std::string &sResponse);
  103. void genFaceCheckEnabled(CFaceCheckEnabled *pFaceCheckEnabled, const std::string &sResponse);
  104. void genLivenessEnabled(CLivenessEnabled *pLivenessEnabled, const std::string &sResponse);
  105. void genWeiXinAnswerEnabled(CWeiXinAnswerEnabled *pWeiXinAnswerEnabled, const std::string &sResponse);
  106. void genGetExamById(CGetExamById *pGetExamById, const std::string &sResponse);
  107. void genStartAnswer(CStartAnswer *pStartAnswer, const std::string &sResponse);
  108. void genSubmitQuestionAnswer(CSubmitQuestionAnswer submitQuestionAnswer, const std::string &sResponse);
  109. void genGetQuestion(CGetQuestion *pGetQuestion, const std::string &sResponse);
  110. void genGetQuestionContent(CGetQuestionContent *pGetQuestionContent, const std::string &sResponse);
  111. void genQueryExamList(CQueryExamList *pQueryExamList, const std::string &sResponse);
  112. void genQueryExamEndList(CQueryExamEndList *pQueryExamEndList, const std::string &sResponse);
  113. void genQueryObjectiveScoreList(CQueryObjectiveScoreList *pQueryObjectiveScoreList, const std::string &sResponse);
  114. void genQueryHomeworkList(CQueryHomeworkList *pQueryHomeworkList, const std::string &sResponse);
  115. void genQueryPracticeCourseList(CQueryPracticeCourseList *pQueryPracticeCourseList, const std::string &sResponse);
  116. void genQueryPracticeRecordList(CQueryPracticeRecordList *pQueryPracticeRecordList, const std::string &sResponse);
  117. void genGetPracticeDetailInfo(CGetPracticeDetailInfo *pGetPracticeDetailInfo, const std::string &sResponse);
  118. void genFindExamRecordDataEntity(CFindExamRecordDataEntity *pFindExamRecordDataEntity, const std::string &sResponse);
  119. void genGetExamRecordQuestions(CGetExamRecordQuestions *pGetExamRecordQuestions, const std::string &sResponse);
  120. void genGetOfflineCourse(CGetOfflineCourse *pGetOfflineCourse, const std::string &sResponse);
  121. void genGetOffLineExamAnswerSheet(CGetOffLineExamAnswerSheet *pGetOffLineExamAnswerSheet, const std::string &sResponse);
  122. void genGetOffLineExamPaper(CGetOffLineExamPaper *pGetOffLineExamPaper, const std::string &sResponse);
  123. void genPreviewOffLineExamPaper(CPreviewOffLineExamPaper *pPreviewOffLineExamPaper, const std::string &sResponse);
  124. void genCheckExamInProgress(CCheckExamInProgress *pCheckExamInProgress, const std::string &sResponse);
  125. void genGetCourseInfo(CGetCourseInfo *pGetCourseInfo, const std::string &sResponse);
  126. void genExamHeartbeat(CExamHeartbeat *pExamHeartbeat, const std::string &sResponse);
  127. void genFindExamQuestionList(CFindExamQuestionList *pFindExamQuestionList, const std::string &sResponse);
  128. void genGetExamRecordPaperStruct(CGetExamRecordPaperStruct *pGetExamRecordPaperStruct, const std::string &sResponse);
  129. void genGetEndExamInfo(CGetEndExamInfo *pGetEndExamInfo, const std::string &sResponse);
  130. void genGetWXQrCode(CGetWXQrCode *pGetWXQrCode, const std::string &sResponse);
  131. // void genProcessUpload(CProcessUpload *pProcessUpload, const std::string &sResponse);
  132. void genGetOrgPropertiesByGroupWithoutCache(CGetOrgPropertiesByGroupWithoutCache *pOrgProperties, const std::string &sResponse);
  133. void genStartFaceLiveVerify(CStartFaceLiveVerify *pStartFaceLiveVerify, const std::string &sResponse);
  134. void genClientExamProcessUploadSign(CClientExamProcessUploadSign *pClientExamProcessUploadSign, const std::string &sResponse);
  135. void genExamCourseInfo(const Json::Value &jExamItem, CExamCourseInfo &eci);
  136. void genSkipFaceCheckParam(CSkipFaceCheckParam *pSkipFaceCheckParam, const std::string &sResponse);
  137. void genGetWXUploadedFile(CGetWXUploadedFile *pGetWXUploadedFile, const std::string &sResponse);
  138. QString sKey;
  139. QString sToken;
  140. };
  141. extern std::shared_ptr<CHttpBll> g_httpBllPtr;
  142. #endif // CHTTPBLL_H