httpDataDef.h 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400
  1. #ifndef HTTPDATADEF_H
  2. #define HTTPDATADEF_H
  3. #include <QString>
  4. #include <QStringList>
  5. #include <map>
  6. #include <QDateTime>
  7. enum class HttpParamType
  8. {
  9. hptUrl = 1, //放到url后面
  10. hptCustomBody,//自定义body
  11. hptBody, //放到body里面
  12. hptFormdata
  13. };
  14. enum class HttpType
  15. {
  16. htPost = 1,
  17. htGet,
  18. htGetUrl,//get固定url
  19. htPut,
  20. htDownload
  21. };
  22. enum class RequestType
  23. {
  24. rtUndefine = 0,
  25. rtUpgrade,//客户端版本升级接口
  26. rtGetSoftwareConfig,//获取检测黑名单
  27. rtAgreement,//获取隐私协议接口
  28. rtStudentClientConfig, //获取当前机构的客户端环境信息接口
  29. rtSysNotice,//平台通知接口
  30. rtLoginLimit,//登录限流接口
  31. rtLogin,//登录
  32. rtLogout,//退出登录接口
  33. rtEditPassword, //修改密码
  34. rtGetStudentClientMenu,//获取菜单列表
  35. rtGetStudentInfoBySession,// 获取考生信息
  36. rtOnlineSignal,//学生在线状态
  37. rtSpecialtyNameList,//查询考生的专业列表
  38. rtGetUserNoticeList,//获取用户公告列表
  39. rtUpdateNoticeReadStatus,//更新通知状态为已读
  40. rtAppDownLoadUrl,//app下载地址
  41. rtAppEnabled,//查询机构是否开放APP
  42. rtQueryBatchList,// 取考试批次列表 queryByNameLike
  43. rtGetExamProperty,//查询某考生的考试属性
  44. rtQueryExamList,//获取在线考试待考列表
  45. rtQueryExamEndList,//获取在线考试已结束列表
  46. rtQueryObjectiveScoreList,//根据examStudentId获取客观分信息
  47. rtQueryHomeworkList,//获取在线作业待考列表
  48. rtQueryPracticeCourseList,//练习课程列表
  49. rtQueryPracticeRecordList,//课程练习记录详情
  50. rtGetPracticeDetailInfo, //单次练习答题情况统计
  51. rtFindExamRecordDataEntity,//获取当前考试记录信息
  52. rtGetExamRecordQuestions,//获取交卷之后的所有试题作答信息
  53. rtGetOfflineCourse,//获取离线考试列表
  54. rtGetOffLineExamAnswerSheet,//下载离线考试答题纸接口
  55. rtStartOfflineExam,//离线考试 : 开始考试
  56. rtGetOffLineExamPaper, //离线考试 – 下载试卷
  57. rtPreviewOffLineExamPaper,//离线考试 – 查看试卷
  58. rtSubmitOfflinePaper,//离线考试:交卷 submitPaper
  59. rtStartExamLimit,//开始考试限流
  60. rtIpLimit,//检查考试是否IP限制
  61. rtCheckExamInProgress,//断点续考:检查正在进行中的考试
  62. rtStartExam,//开始考试
  63. rtFaceCheckEnabled,//检查考试是否支持人脸识别
  64. rtLivenessEnabled,//考试是否支持活体检测
  65. rtWeiXinAnswerEnabled, //考试是否可以微信作答
  66. rtGetCourseInfo,//获取课程名称
  67. rtGetExamById,//按ID获取考试信息接口
  68. rtStartAnswer,//开始答题
  69. rtGetQuestionContent,//取某个试题信息-考中
  70. rtGetQuestion,//取某个试题信息-考后
  71. rtSubmitQuestionAnswer,//考试过程中-考生试题作答
  72. rtEndExam,//结束考试:交卷
  73. rtGetEndExamInfo, //获取考试记录信息-交卷后获取考试分数
  74. rtExamHeartbeat,//考试心跳
  75. rtFindExamQuestionList,//考试过程中-获取已做答试题列表
  76. rtGetExamRecordPaperStruct,//获取考试记录试卷结构
  77. rtDownLoadFile, //下载文件
  78. rtGetWXQrCode,//获取微信二维码
  79. rtSaveUploadedFileAcknowledgeStatus,//修改上传音频或图片结果推送状态
  80. rtProcessUpload, //文件上传
  81. rtSaveFaceCompareResult,//保存人脸识别比对验证结果
  82. rtSaveFaceCaptureResult,//保存人脸抓拍比对验证结果
  83. rtSaveFaceLiveVerifyResult,//保存人脸活体验证结果
  84. rtStartFaceLiveVerify,//开始人脸活体验证接口,如:活检次数,活检开始时间等
  85. rtGetOrgPropertiesByGroupWithoutCache//获取活检配置参数接口
  86. };
  87. class CHttpRequestPackage
  88. {
  89. public:
  90. RequestType nRequestType;
  91. HttpType nHttpType;
  92. QString sUri;
  93. QString sCommonStr;
  94. QString sCommonStr1;
  95. QString sAdditionStr;
  96. HttpParamType eParamType;
  97. QStringList sParamList;
  98. QStringList sHeadList;
  99. int nRetryCount;
  100. CHttpRequestPackage()
  101. {
  102. nRequestType = RequestType::rtUndefine;
  103. nHttpType = HttpType::htPost;
  104. eParamType = HttpParamType::hptUrl;
  105. sUri = "";
  106. sCommonStr = "";
  107. sCommonStr1 = "";
  108. sAdditionStr = "";
  109. nRetryCount = 0;
  110. }
  111. };
  112. class CBaseResponsePackage
  113. {
  114. public:
  115. int nCode;
  116. QString sMessage;
  117. CBaseResponsePackage()
  118. {
  119. nCode = 0;
  120. sMessage = "";
  121. }
  122. };
  123. class CGetSoftwareConfig : public CBaseResponsePackage
  124. {
  125. public:
  126. QString sSoftwareConfig;
  127. CGetSoftwareConfig()
  128. {
  129. sSoftwareConfig = "";
  130. }
  131. };
  132. class CUpgrade : public CBaseResponsePackage
  133. {
  134. public:
  135. QString sVersion;
  136. int nBuild;
  137. QString sContent;
  138. bool bForce;
  139. QString sUpgradeUrl;
  140. CUpgrade()
  141. {
  142. sVersion = "";
  143. nBuild = 0;
  144. sContent = "";
  145. bForce = true;
  146. sUpgradeUrl = "";
  147. }
  148. };
  149. class CAgreement : public CBaseResponsePackage
  150. {
  151. public:
  152. QString sTitle;
  153. int nStaySeconds;
  154. QString sContent;
  155. CAgreement()
  156. {
  157. sTitle = "";
  158. nStaySeconds = 15;
  159. sContent = "";
  160. }
  161. };
  162. class CStudentClientConfig : public CBaseResponsePackage
  163. {
  164. public:
  165. QString sCusMenuLogoFileUrl;
  166. QString sIdentityNumberLoginAlias;//身份证号登录34s
  167. bool bIsCustomMenuLogo;// : "false",
  168. bool bStudentCodeLogin;
  169. bool bIdentifyNumberLogin;
  170. QString sLogoFileUrl;//" : "https://ecs-test-static.qmth.com.cn/org_logo/0/1613800689888.png",
  171. QString sStudentClientBgPictureUrl;
  172. QString sOeStudentSysName;//" : "网考 - 33d34sss3d",
  173. bool bDisableMutiScreen;
  174. bool bDisableRemoteAssistance;
  175. bool bFullScreenTop;
  176. bool bDisableVirtualCamera;
  177. QString sRootOrgId;// " : "0",
  178. bool bShowQmthLogo;// " : "false",
  179. bool bShowStudentClientAppQrcode;// " : "true",
  180. QString sStudentCodeLoginAlias;// " : "学号登录34s"
  181. CStudentClientConfig()
  182. {
  183. sCusMenuLogoFileUrl = "";
  184. sIdentityNumberLoginAlias = "";
  185. bIsCustomMenuLogo = false;
  186. bStudentCodeLogin = false;
  187. bIdentifyNumberLogin = false;
  188. sLogoFileUrl = "";
  189. sStudentClientBgPictureUrl = "";
  190. sOeStudentSysName = "";
  191. bDisableMutiScreen = false;
  192. bDisableRemoteAssistance = false;
  193. bFullScreenTop = false;
  194. bDisableVirtualCamera = false;
  195. sRootOrgId = "";// " : "0",
  196. bShowQmthLogo = false;// " : "false",
  197. bShowStudentClientAppQrcode = false;// " : "true",
  198. sStudentCodeLoginAlias = ""; // " : "学号登录34s"
  199. }
  200. };
  201. class CSysNotice : public CBaseResponsePackage
  202. {
  203. public:
  204. __int64 nId;// 1,
  205. __int64 nRootOrgId;//-1, //顶级机构ID,-1代表所有机构
  206. QString sContent;//"平台将于今天下午1点停服升级,请知悉!",
  207. QString sStartTime;// "2021 - 08 - 11 00:00 : 00", //生效开始时间
  208. QString sEndTime;//"2021 - 08 - 12 00:00 : 00", //生效截止开始时间
  209. QString sTitle;//"升级通知",
  210. bool bEnable;// false //是否启用
  211. CSysNotice()
  212. {
  213. nId = 0;
  214. nRootOrgId = -1;
  215. sContent = "";
  216. sStartTime = "";
  217. sEndTime = "";
  218. sTitle = "";
  219. bEnable = false;
  220. }
  221. };
  222. class CLoginLimit : public CBaseResponsePackage
  223. {
  224. public:
  225. int nCount;
  226. bool bPass; // true代表未限制
  227. CLoginLimit()
  228. {
  229. nCount = 0;
  230. bPass = false;
  231. }
  232. };
  233. class CLoginInfo : public CBaseResponsePackage
  234. {
  235. public:
  236. QString sUserType;// "STUDENT",
  237. __int64 nUserId;// 4,
  238. QString sDisplayName;// "张三",
  239. __int64 nRootOrgId;// 0,
  240. QString sRootOrgName;// 启明泰和",
  241. QString sCreationTime;//"2021 - 08 - 26 17:23 : 15",
  242. QString sClientIp;//"192.168.10.126",
  243. __int64 nSessionTimeout;// 7200,
  244. bool bPasswordWeak;// " : false
  245. CLoginInfo()
  246. {
  247. sUserType = "";
  248. nUserId = 0;
  249. sDisplayName = "";
  250. nRootOrgId = 0;
  251. sRootOrgName = "";
  252. sCreationTime = "";
  253. sClientIp = "";
  254. nSessionTimeout = 0;
  255. bPasswordWeak = false;
  256. }
  257. };
  258. class CLogout : public CBaseResponsePackage
  259. {
  260. public:
  261. };
  262. class CEditPassword : public CBaseResponsePackage
  263. {
  264. public:
  265. };
  266. class CStudentClientMenu
  267. {
  268. public:
  269. __int64 nId;
  270. QString sCode;
  271. QString sName;
  272. };
  273. class CGetStudentClientMenu : public CBaseResponsePackage
  274. {
  275. public:
  276. std::vector<CStudentClientMenu> vMenus;
  277. };
  278. class CGetStudentInfoBySession : public CBaseResponsePackage
  279. {
  280. public:
  281. __int64 nId;
  282. QString sName;
  283. __int64 nOrgId;
  284. QString sOrgCode;
  285. QString sOrgName;
  286. QString sStudentCode;
  287. QString sIdentityNumber;
  288. QString sPhotoPath;
  289. bool bEnable;
  290. CGetStudentInfoBySession()
  291. {
  292. nId = 0;
  293. sName = "";
  294. nOrgId = 0;
  295. sOrgCode = "";
  296. sOrgName = "";
  297. sStudentCode = "";
  298. sIdentityNumber = "";
  299. sPhotoPath = "";
  300. bEnable = false;
  301. }
  302. };
  303. class CDownLoadFileInfo : public CBaseResponsePackage
  304. {
  305. public:
  306. QString sFileName;
  307. QString sModuleName;
  308. QString sAdditionStr;
  309. CDownLoadFileInfo()
  310. {
  311. sFileName = "";
  312. sModuleName = "";
  313. sAdditionStr = "";
  314. }
  315. };
  316. class CSpecialtyNameList : public CBaseResponsePackage
  317. {
  318. public:
  319. QString sSpecialtyName;
  320. CSpecialtyNameList()
  321. {
  322. sSpecialtyName = "";
  323. }
  324. };
  325. class CNoticeInfo
  326. {
  327. public:
  328. __int64 nId;// 11,
  329. QString sTitle;
  330. QString sContent;
  331. QString sPublisher;
  332. QString sPublishTime;// " : "2021 - 08 - 27 16:22 : 29",
  333. bool bHasRead;// : false,
  334. bool bHasRecalled;
  335. CNoticeInfo()
  336. {
  337. nId = 0;
  338. sTitle = "";
  339. sContent = "";
  340. sPublisher = "";
  341. sPublishTime = "";
  342. bHasRead = false;
  343. bHasRecalled = false;
  344. }
  345. };
  346. class CGetUserNoticeList : public CBaseResponsePackage
  347. {
  348. public:
  349. std::vector<CNoticeInfo> vNoticeList;
  350. };
  351. class CUpdateNoticeReadStatus : public CBaseResponsePackage
  352. {
  353. public:
  354. QString sIds;
  355. CUpdateNoticeReadStatus()
  356. {
  357. sIds = "";
  358. }
  359. };
  360. class CAppDownLoadUrl : public CBaseResponsePackage
  361. {
  362. public:
  363. QString sUrl;
  364. CAppDownLoadUrl()
  365. {
  366. sUrl = "";
  367. }
  368. };
  369. class CAppEnabled : public CBaseResponsePackage
  370. {
  371. public:
  372. bool bEnable;
  373. CAppEnabled()
  374. {
  375. bEnable = false;
  376. }
  377. };
  378. class CBatchInfo
  379. {
  380. public:
  381. __int64 nId;
  382. QString sName;
  383. QString sExamType;
  384. CBatchInfo()
  385. {
  386. nId = 0;
  387. sName = "";
  388. sExamType = "";
  389. }
  390. };
  391. class CQueryBatchList : public CBaseResponsePackage
  392. {
  393. public:
  394. std::vector<CBatchInfo> vBatchList;
  395. };
  396. class CGetExamProperty : public CBaseResponsePackage
  397. {
  398. public:
  399. QString sType;
  400. QString sBeforeExamRemark;//考前说明
  401. bool bCheckEnvironment;//环境监测
  402. int nWarnThreshold;//预警阈值
  403. bool bIsFaceCheck;//进入考试是否验证人脸识别(强制、非强制)
  404. int nSnapshotInterval;//抓拍间隔时间
  405. int nFaceVerifyStartMinute;//活体检测开始分钟数
  406. int nFaceVerifyEndMinute;//活体检测结束分钟数
  407. bool bIsStrangerEnable;//是否启用陌生人检测
  408. QString sPracticeType;//AFTER_PRACTICE 在线练习-结束统一显示答案
  409. //IN_PRACTICE 在线练习-边答边显示答案
  410. //NO_ANSWER 在线练习-不显示答案
  411. int nFreezeTime;//冻结时间
  412. QString sAfterExamRemark;//考后说明
  413. bool bIsObjScoreView;//是否显示客观题成绩
  414. bool bShowCheatingRemark;//是否展示作弊
  415. QString sCheatingRemark;//作弊说明
  416. std::vector<QString> vOfflineUploadFileType;
  417. CGetExamProperty()
  418. {
  419. sType = "";
  420. sBeforeExamRemark = "";
  421. bCheckEnvironment = false;
  422. nWarnThreshold = 0;//预警阈值
  423. bIsFaceCheck = false;//进入考试是否验证人脸识别(强制、非强制)
  424. nSnapshotInterval = 0;
  425. nFaceVerifyStartMinute = 0;//活体检测开始分钟数
  426. nFaceVerifyEndMinute = 0;//活体检测结束分钟数
  427. bIsStrangerEnable = false;//是否启用陌生人检测
  428. sPracticeType = "";
  429. nFreezeTime = 0;
  430. sAfterExamRemark = "";
  431. bIsObjScoreView = false;
  432. bShowCheatingRemark = false;
  433. sCheatingRemark = "";
  434. }
  435. };
  436. class CStartExamLimit : public CBaseResponsePackage
  437. {
  438. public:
  439. int nCount;
  440. bool bPass;
  441. CStartExamLimit()
  442. {
  443. nCount = 0;
  444. bPass = false;
  445. }
  446. };
  447. class CIpLimit : public CBaseResponsePackage
  448. {
  449. public:
  450. bool bLimited;
  451. CIpLimit()
  452. {
  453. bLimited = false;
  454. }
  455. };
  456. class CStartExam : public CBaseResponsePackage
  457. {
  458. public:
  459. QString sCourseCode;// ,
  460. QString sCourseName;// ,
  461. __int64 nExamRecordDataId;// 0,
  462. int nFaceVerifyMinute;// 0,
  463. QString sStudentCode;// ,
  464. QString sStudentName;//
  465. CStartExam()
  466. {
  467. sCourseCode = "";
  468. sCourseName = "";
  469. nExamRecordDataId = 0;
  470. nFaceVerifyMinute = 0;
  471. sStudentCode = "";
  472. sStudentName = "";
  473. }
  474. };
  475. class CFaceCheckEnabled : public CBaseResponsePackage
  476. {
  477. public:
  478. bool bEnabled;
  479. CFaceCheckEnabled()
  480. {
  481. bEnabled = false;
  482. }
  483. };
  484. class CLivenessEnabled : public CBaseResponsePackage
  485. {
  486. public:
  487. bool bEnabled;
  488. CLivenessEnabled()
  489. {
  490. bEnabled = false;
  491. }
  492. };
  493. class CWeiXinAnswerEnabled : public CBaseResponsePackage
  494. {
  495. public:
  496. bool bEnabled;
  497. CWeiXinAnswerEnabled()
  498. {
  499. bEnabled = false;
  500. }
  501. };
  502. class CGetExamById : public CBaseResponsePackage
  503. {
  504. public:
  505. __int64 nId;
  506. QString sCode;
  507. __int64 nRootOrgId;
  508. QString sBeginTime;
  509. QString sEndTime;
  510. QString sName;
  511. QString sExamType;
  512. int nDuration;
  513. bool bEnable;
  514. bool bStarted;
  515. bool bExamLimit;
  516. bool bIpLimitSettingsEnabled;
  517. CGetExamById()
  518. {
  519. nId = 0;
  520. sCode = "";
  521. nRootOrgId = 0;
  522. sBeginTime = "";
  523. sEndTime = "";
  524. sName = "";
  525. sExamType = "";
  526. nDuration = 0;
  527. bEnable = false;
  528. bStarted = false;
  529. bExamLimit = false;
  530. bIpLimitSettingsEnabled = false;
  531. }
  532. };
  533. class CStartAnswer : public CBaseResponsePackage
  534. {
  535. public:
  536. __int64 nDuration;
  537. __int64 nExamRecordDataId;
  538. __int64 nUsedExamSeconds;
  539. CStartAnswer()
  540. {
  541. nDuration = 0;
  542. nExamRecordDataId = 0;
  543. nUsedExamSeconds = 0;
  544. }
  545. };
  546. class COption
  547. {
  548. public:
  549. QString sBody;
  550. COption()
  551. {
  552. sBody = "";
  553. }
  554. };
  555. class CSubQuestion
  556. {
  557. public:
  558. QString sQuestionType;
  559. QString sBody;
  560. std::vector<int> voptionPermutation;
  561. std::vector<COption> vOptions;
  562. std::vector<QString> vRightAnswer;
  563. QString sAnswerType;
  564. CSubQuestion()
  565. {
  566. sQuestionType = "";
  567. sBody = "";
  568. sAnswerType = "";
  569. }
  570. };
  571. class CGetQuestionContent : public CBaseResponsePackage
  572. {
  573. public:
  574. QString sOrder;
  575. QString sQuestionId;
  576. QString sBody;
  577. QString sVersion;
  578. bool bhasAudios;
  579. std::vector<CSubQuestion> vSubQuestion;
  580. CGetQuestionContent()
  581. {
  582. sQuestionId = "";
  583. sOrder = "";
  584. sBody = "";
  585. sVersion = "";
  586. bhasAudios = false;
  587. }
  588. };
  589. class CGetQuestion : public CBaseResponsePackage
  590. {
  591. public:
  592. QString sId;
  593. QString sBody;
  594. QString sVersion;
  595. bool bhasAudios;
  596. std::vector<CSubQuestion> vSubQuestion;
  597. CGetQuestion()
  598. {
  599. sId = "";
  600. sBody = "";
  601. sVersion = "";
  602. bhasAudios = false;
  603. }
  604. };
  605. class CSubmitQuestionAnswer : public CBaseResponsePackage
  606. {
  607. public:
  608. int nOrder;
  609. int nVersion;
  610. CSubmitQuestionAnswer()
  611. {
  612. nOrder = 0;
  613. }
  614. };
  615. class COfflineFileInfo
  616. {
  617. public:
  618. __int64 nExamRecordDataId;// 0,
  619. QString sFileType;// ,
  620. __int64 nId;// 0,
  621. QString sOfflineFileName;// ,
  622. QString sOfflineFileUrl;// ,
  623. QString sOriginalFileName;// ,
  624. QString sProperties;// ,
  625. QString sSuffix;//
  626. QString sLocalFileName;
  627. COfflineFileInfo()
  628. {
  629. nExamRecordDataId = 0;
  630. sFileType = "";
  631. nId = 0;
  632. sOfflineFileName = "";
  633. sOfflineFileUrl = "";
  634. sOriginalFileName = "";
  635. sProperties = "";
  636. sSuffix = "";
  637. sLocalFileName = "";
  638. }
  639. };
  640. class COfflineCourseInfo
  641. {
  642. public:
  643. QString sCourseCode;// ,
  644. QString sCourseLevel;// ,
  645. QString sCourseName;// ,
  646. QString sEndTime;// ,
  647. __int64 nExamId;// 0,
  648. QString sStartTime;// ,
  649. QString sExamName;// ,
  650. __int64 nExamRecordDataId;// 0,
  651. __int64 nExamStudentId;// 0,
  652. bool bIsvalid;// true,
  653. QString sOrgName;// ,
  654. QString sPaperId;// ,
  655. QString sSpecialtyName;// ,
  656. QString sStatus;// ,
  657. QString sStudentCode;// ,
  658. QString sStudentName;//
  659. std::vector<COfflineFileInfo> vOfflineFileInfo;
  660. COfflineCourseInfo()
  661. {
  662. sCourseCode = "";// ,
  663. sCourseLevel = "";// ,
  664. sCourseName = "";// ,
  665. sEndTime = "";// ,
  666. nExamId = 0;// 0,
  667. sStartTime = "";// ,
  668. sExamName = "";// ,
  669. nExamRecordDataId = 0;// 0,
  670. nExamStudentId = 0;// 0,
  671. bIsvalid = false;
  672. sOrgName = "";// ,
  673. sPaperId = "";// ,
  674. sSpecialtyName = "";// ,
  675. sStatus = "";// ,
  676. sStudentCode = "";// ,
  677. sStudentName = "";//
  678. }
  679. };
  680. class CWeekTransform
  681. {
  682. public:
  683. static QString getWeekCycles(std::vector<int> vWeek)
  684. {
  685. QStringList weekList;
  686. for (int nWeek : vWeek)
  687. {
  688. weekList << mWeekCycle.at(nWeek);
  689. }
  690. return weekList.join(QString::fromLocal8Bit(","));
  691. }
  692. static bool isInTimeRange(QTime tCurrent, QStringList sExamCycleTimeRange)
  693. {
  694. bool bRet = false;
  695. for (QString sTimeRange : sExamCycleTimeRange)
  696. {
  697. QStringList list = sTimeRange.split("~");
  698. if(list.count() == 2)
  699. {
  700. QTime sStart = QTime::fromString(list[0], "hh:mm");
  701. QTime sEnd = QTime::fromString(list[1], "hh:mm");
  702. if (sStart < tCurrent && tCurrent < sEnd)
  703. {
  704. bRet = true;
  705. }
  706. }
  707. }
  708. return bRet;
  709. }
  710. private:
  711. inline static const std::map<int, QString> mWeekCycle = {
  712. {1, QString::fromLocal8Bit("周一")},
  713. {2, QString::fromLocal8Bit("周二")},
  714. {3, QString::fromLocal8Bit("周三")},
  715. {4, QString::fromLocal8Bit("周四")},
  716. {5, QString::fromLocal8Bit("周五")},
  717. {6, QString::fromLocal8Bit("周六")},
  718. {7, QString::fromLocal8Bit("周日")},
  719. };
  720. };
  721. class CExamCourseInfo
  722. {
  723. public:
  724. int nAllowExamCount;// 0,
  725. bool bAppExamEnabled;// true,
  726. QString sCourseCode;// ,
  727. __int64 nCourseId;// 0,
  728. QString sCourseLevel;// ,
  729. QString sCourseName;// ,
  730. QString sEndTime;// ,
  731. bool bExamCycleEnabled;// true,
  732. QStringList sExamCycleTimeRange;// [],
  733. std::vector<int> vExamCycleWeek;// [],
  734. __int64 nExamId;// 0,
  735. QString sExamName;// ,
  736. QString sExamStatus;// ,
  737. __int64 nExamStudentId;// 0,
  738. bool bFaceCheck;// true,
  739. bool bFaceEnable;// true,
  740. QString sIdentityNumber;// ,
  741. bool bIsFinished;// ,
  742. bool bIsObjScoreView;// true,
  743. bool bIsPhotoUpload;// ,
  744. __int64 nOrgId;// 0,
  745. QString sOrgName;// ,
  746. int nPaperMins;// 0,
  747. __int64 nRootOrgId;// 0,
  748. QString sSpecialtyLevel;// ,
  749. QString sSpecialtyName;// ,
  750. QString sStartTime;// ,
  751. QString sStudentCode;// ,
  752. QString sStudentName;//
  753. CExamCourseInfo()
  754. {
  755. nAllowExamCount = 0;
  756. bAppExamEnabled = false;
  757. sCourseCode = "";// ,
  758. nCourseId = 0;// 0,
  759. sCourseLevel = "";// ,
  760. sCourseName = "";// ,
  761. sEndTime = "";// ,
  762. bExamCycleEnabled = false;// true,
  763. nExamId = 0;// 0,
  764. sExamName = "";// ,
  765. sExamStatus = "";// ,
  766. nExamStudentId = 0;// 0,
  767. bFaceCheck = false;// true,
  768. bFaceEnable = false;// true,
  769. sIdentityNumber = "";// ,
  770. bIsFinished = "";// ,
  771. bIsObjScoreView = false;
  772. bIsPhotoUpload = "";// ,
  773. nOrgId = 0;// 0,
  774. sOrgName = "";// ,
  775. nPaperMins = 0;// 0,
  776. nRootOrgId = 0;// 0,
  777. sSpecialtyLevel = "";//
  778. sSpecialtyName = "";// ,
  779. sStartTime = "";// ,
  780. sStudentCode = "";// ,
  781. sStudentName = "";//
  782. }
  783. };
  784. class CQueryExamList : public CBaseResponsePackage
  785. {
  786. public:
  787. std::vector<CExamCourseInfo> vOnlieExamList;
  788. };
  789. class CQueryExamEndList : public CBaseResponsePackage
  790. {
  791. public:
  792. std::vector<CExamCourseInfo> vOnlieEndExamList;
  793. };
  794. class CObjectiveScore
  795. {
  796. public:
  797. QString sEndTime;// ,
  798. int nExamOrder;// 0,
  799. __int64 nExamRecordDataId;// 0,
  800. bool bIsAuditing;// true,
  801. bool bIsExamEnded;// true,
  802. bool bIsIllegality;// true,
  803. double fObjectiveScore;// 0,
  804. QString sStartTime;//
  805. CObjectiveScore()
  806. {
  807. sEndTime = "";
  808. nExamOrder = 0;
  809. nExamRecordDataId = 0;
  810. bIsAuditing = 0;
  811. bIsExamEnded = 0;
  812. bIsIllegality = 0;
  813. fObjectiveScore = 0;
  814. sStartTime = "";
  815. }
  816. };
  817. class CQueryObjectiveScoreList : public CBaseResponsePackage
  818. {
  819. public:
  820. QString sExamStudentId;
  821. std::vector<CObjectiveScore> vObjectiveScore;
  822. CQueryObjectiveScoreList()
  823. {
  824. sExamStudentId = "";
  825. }
  826. };
  827. class CQueryHomeworkList : public CBaseResponsePackage
  828. {
  829. public:
  830. std::vector<CExamCourseInfo> vHomeworkExamList;
  831. };
  832. class CPracticeCourseInfo
  833. {
  834. public:
  835. double fAveObjectiveAccuracy;// 0,
  836. QString sCourseCode;// ,
  837. QString sCourseName;// ,
  838. QString sEndTime;// ,
  839. bool bExamCycleEnabled;// true,
  840. QStringList sExamCycleTimeRange;// [],
  841. std::vector<int> vExamCycleWeek;// [],
  842. __int64 nExamId;// 0,
  843. QString sExamName;// ,
  844. __int64 nExamStudentId;// 0,
  845. QString sExamType;// ,
  846. double fMaxObjectiveAccuracy;// 0,
  847. int nPracticeCount;// 0,
  848. double fRecentObjectiveAccuracy;// 0,
  849. QString sStartTime;// ,
  850. QString sStudentCode;// ,
  851. QString sStudentName;//
  852. CPracticeCourseInfo()
  853. {
  854. fAveObjectiveAccuracy = 0;
  855. sCourseCode = "";// ,
  856. sCourseName = "";// ,
  857. sEndTime = "";// ,
  858. bExamCycleEnabled = false;
  859. nExamId = 0;// 0,
  860. sExamName = "";// ,
  861. nExamStudentId = 0;// 0,
  862. sExamType = "";// ,
  863. fMaxObjectiveAccuracy = 0;// 0,
  864. nPracticeCount = 0;
  865. fRecentObjectiveAccuracy = 0;
  866. sStartTime = "";//
  867. sStudentCode = "";
  868. sStudentName = "";
  869. }
  870. };
  871. class CQueryPracticeCourseList : public CBaseResponsePackage
  872. {
  873. public:
  874. std::vector<CPracticeCourseInfo> vPracticeCourseInfo;
  875. };
  876. class CPracticeRecord
  877. {
  878. public:
  879. QString sCourseCode;// ,
  880. QString sCourseName;// ,
  881. QString sEndTime;// ,
  882. QString sExamName;// ,
  883. int nFailQuestionNum;// 0,
  884. __int64 nId;// 0,
  885. int nNotAnsweredCount;// 0,
  886. double fObjectiveAccuracy;// 0,
  887. int nObjectiveNum;// 0,
  888. QString sStartTime;// ,
  889. int nSuccQuestionNum;// 0,
  890. int nTotalQuestionCount;// 0,
  891. __int64 nUsedExamTime;// 0
  892. CPracticeRecord()
  893. {
  894. sCourseCode = "";
  895. sCourseName = "";
  896. sEndTime = "";
  897. sExamName = "";
  898. nFailQuestionNum = 0;
  899. nId = 0;
  900. nNotAnsweredCount = 0;
  901. fObjectiveAccuracy = 0;
  902. nObjectiveNum = 0;
  903. sStartTime = "";
  904. nSuccQuestionNum = 0;
  905. nTotalQuestionCount = 0;
  906. nUsedExamTime = 0;
  907. }
  908. };
  909. //课程练习记录详情
  910. class CQueryPracticeRecordList : public CBaseResponsePackage
  911. {
  912. public:
  913. std::vector<CPracticeRecord> vPracticeRecordList;
  914. };
  915. class CPracticePaperStructInfo
  916. {
  917. public:
  918. int nCount;
  919. int nFailQuestionNum;
  920. int nIndex;
  921. int nNotAnsweredCount;
  922. int nQuestionCount;
  923. QString sQuestionType;
  924. QString sScore;
  925. int nSuccQuestionNum;
  926. QString sTitle;
  927. double fTotalScore;
  928. CPracticePaperStructInfo()
  929. {
  930. nCount = 0;
  931. nFailQuestionNum = 0;
  932. nIndex = 0;
  933. nNotAnsweredCount = 0;
  934. nQuestionCount = 0;
  935. sQuestionType = "";
  936. sScore = "";
  937. nSuccQuestionNum = 0;
  938. sTitle = "";
  939. fTotalScore = 0;
  940. }
  941. };
  942. //单次练习答题情况统计
  943. class CGetPracticeDetailInfo : public CBaseResponsePackage
  944. {
  945. public:
  946. QString sCourseCode;
  947. QString sCourseName;
  948. __int64 nId;
  949. double fObjectiveAccuracy;
  950. std::vector<CPracticePaperStructInfo> vPracticePaperStructList;
  951. CGetPracticeDetailInfo()
  952. {
  953. sCourseCode = "";
  954. sCourseName = "";
  955. nId = 0;
  956. fObjectiveAccuracy = 0;
  957. }
  958. };
  959. //获取当前考试记录信息
  960. class CFindExamRecordDataEntity : public CBaseResponsePackage
  961. {
  962. public:
  963. __int64 nExamId;
  964. QString sPaperType;
  965. CFindExamRecordDataEntity()
  966. {
  967. nExamId = 0;
  968. sPaperType = "";
  969. }
  970. };
  971. //获取交卷之后的所有试题作答信息
  972. class CAnsweredQuestion
  973. {
  974. public:
  975. QString sAnswerType;// ,
  976. QString sAudioPlayTimes;// ,
  977. QString sCorrectAnswer;// ,
  978. QString sExamQuestionTempId;// ,
  979. __int64 nExamRecordDataId;// 0,
  980. bool bIsAnswer;// true,
  981. bool bIsInMongo;// true,
  982. bool bIsSign;// true,
  983. int nMainNumber;// 0,
  984. std::vector<int> vOptionPermutation;// [],
  985. int nOrder;// 0,
  986. QString sQuestionId;// ,
  987. double fQuestionScore;// 0,
  988. QString sQuestionType;// ,
  989. QString sStudentAnswer;// ,
  990. double fStudentScore;// 0
  991. bool bHasQuestonInfo;
  992. CAnsweredQuestion()
  993. {
  994. sAnswerType = "";
  995. sAudioPlayTimes = "";
  996. sCorrectAnswer = "";
  997. sExamQuestionTempId = "";
  998. nExamRecordDataId = 0;
  999. bIsAnswer = false;
  1000. bIsInMongo = false;
  1001. bIsSign = false;
  1002. nMainNumber = 0;
  1003. nOrder = 0;
  1004. sQuestionId = "";
  1005. fQuestionScore = 0;
  1006. sQuestionType = "";
  1007. sStudentAnswer = "";
  1008. fStudentScore = 0;
  1009. }
  1010. };
  1011. class CGetExamRecordQuestions : public CBaseResponsePackage
  1012. {
  1013. public:
  1014. std::vector<CAnsweredQuestion> vExamRecordQuestions;
  1015. };
  1016. class CGetOfflineCourse : public CBaseResponsePackage
  1017. {
  1018. public:
  1019. std::vector<COfflineCourseInfo> vOfflineCourseInfo;
  1020. };
  1021. class CGetOffLineExamAnswerSheet : public CBaseResponsePackage
  1022. {
  1023. public:
  1024. QString sAnswerSheetUrl;
  1025. CGetOffLineExamAnswerSheet()
  1026. {
  1027. sAnswerSheetUrl = "";
  1028. }
  1029. };//下载离线考试答题纸接口
  1030. class CGetOffLineExamPaper : public CBaseResponsePackage
  1031. {
  1032. public:
  1033. QString sPaperUrl;
  1034. int nRow;
  1035. CGetOffLineExamPaper()
  1036. {
  1037. sPaperUrl = "";
  1038. nRow = 0;
  1039. }
  1040. };
  1041. class CPreviewOffLineExamPaper : public CBaseResponsePackage
  1042. {
  1043. public:
  1044. QString sUrl;
  1045. int nRow;
  1046. CPreviewOffLineExamPaper()
  1047. {
  1048. sUrl = "";
  1049. nRow = -1;
  1050. }
  1051. };
  1052. class CStartOfflineExam : public CBaseResponsePackage
  1053. {
  1054. public:
  1055. int nRow;
  1056. CStartOfflineExam()
  1057. {
  1058. nRow = 0;
  1059. }
  1060. };
  1061. class CSubmitOfflinePaper : public CBaseResponsePackage
  1062. {
  1063. public:
  1064. };
  1065. namespace EXAM_INPROGRESS_ENTER_TYPE
  1066. {
  1067. const QString EIET_COURSE_LIST = "COURSE_LIST";
  1068. const QString EIET_ENTER_EXAM = "ENTER_EXAM";
  1069. }
  1070. class CCheckExamInProgress : public CBaseResponsePackage
  1071. {
  1072. public:
  1073. bool bHasExamInProgress;
  1074. int nInterruptNum;
  1075. int nMaxInterruptNum;
  1076. bool bIsExceed;
  1077. __int64 nExamRecordDataId;
  1078. __int64 nExamId;
  1079. __int64 nUsedTime;
  1080. int nFaceVerifyMinute;
  1081. QString sExamType;
  1082. QString sEnterType;
  1083. CCheckExamInProgress()
  1084. {
  1085. bHasExamInProgress = false;
  1086. nInterruptNum = 0;
  1087. nMaxInterruptNum = 0;
  1088. bIsExceed = false;
  1089. nExamRecordDataId = 0;
  1090. nExamId = 0;
  1091. nUsedTime = 0;
  1092. nFaceVerifyMinute = 0;
  1093. sExamType = "";
  1094. }
  1095. };
  1096. class CGetCourseInfo : public CBaseResponsePackage
  1097. {
  1098. public:
  1099. QString sCourseCode;
  1100. QString sCourseName;
  1101. CGetCourseInfo()
  1102. {
  1103. sCourseCode = "";
  1104. sCourseName = "";
  1105. }
  1106. };
  1107. class CEndExam : public CBaseResponsePackage
  1108. {
  1109. public:
  1110. QString sModuleName;
  1111. CEndExam()
  1112. {
  1113. sModuleName = "";
  1114. }
  1115. };
  1116. class CGetEndExamInfo : public CBaseResponsePackage
  1117. {
  1118. public:
  1119. __int64 nExamRecordDataId;
  1120. bool bIsWarn;
  1121. double fObjectiveAccuracy;
  1122. double fObjectiveScore;
  1123. bool bIsCalculate;
  1124. CGetEndExamInfo()
  1125. {
  1126. nExamRecordDataId = 0;
  1127. bIsWarn = false;
  1128. fObjectiveAccuracy = 0;
  1129. fObjectiveScore = 0;
  1130. bIsCalculate = false;
  1131. }
  1132. };
  1133. class CExamHeartbeat : public CBaseResponsePackage
  1134. {
  1135. public:
  1136. __int64 nLeftTime;//毫秒
  1137. CExamHeartbeat()
  1138. {
  1139. nLeftTime = 0;
  1140. }
  1141. };
  1142. class CFindExamQuestionList : public CBaseResponsePackage
  1143. {
  1144. public:
  1145. std::vector<CAnsweredQuestion> vAnsweredQuestion;
  1146. };
  1147. namespace QUESTION_TYPE
  1148. {
  1149. const QString SingleChoice = "SINGLE_CHOICE";
  1150. const QString MultipleChoice = "MULTIPLE_CHOICE";
  1151. const QString TrueOrFalse = "TRUE_OR_FALSE";
  1152. const QString FillUp = "FILL_UP";
  1153. const QString Essay = "ESSAY";
  1154. };
  1155. class CSubQuestionStruct
  1156. {
  1157. public:
  1158. std::vector<int> voptionPermutation;
  1159. double fQuestionScore;
  1160. QString sQuestionType;
  1161. QString sAnswerType;
  1162. bool bMarked;
  1163. bool bAnswered;
  1164. int nVersion;
  1165. bool bUpload;
  1166. QString sSubjectiveTempAns;
  1167. QString sUploadAnswer;
  1168. bool bCurrent;
  1169. QString sStudentAnswer;
  1170. int nShowNumber;
  1171. int nOrder;
  1172. QString sBody;
  1173. std::vector<COption> vOptions;
  1174. std::vector<QString> vRightAnswer;
  1175. int nLimitedPlayTimes;
  1176. CSubQuestionStruct()
  1177. {
  1178. fQuestionScore = 0;
  1179. sQuestionType = "";
  1180. sAnswerType = "";
  1181. bMarked = false;
  1182. bAnswered = false;
  1183. nVersion = 0;
  1184. bUpload = true;
  1185. sUploadAnswer = "";
  1186. sSubjectiveTempAns = "";
  1187. bCurrent = false;
  1188. nShowNumber = 0;
  1189. nOrder = 0;
  1190. sBody = "";
  1191. nLimitedPlayTimes = 0;
  1192. }
  1193. };
  1194. class CQuestionStruct
  1195. {
  1196. public:
  1197. QString sQuestionId;
  1198. QString sVersion;
  1199. double fQuestionScore;
  1200. int nLimitedPlayTimes;
  1201. int nPlayedTimes;
  1202. int nTimeLimit;
  1203. bool bHasContent;
  1204. QString sBody;
  1205. bool bhasAudios;
  1206. std::vector<CSubQuestionStruct> vSubQuestionStruct;
  1207. CQuestionStruct()
  1208. {
  1209. sQuestionId = "";
  1210. sVersion = "";
  1211. fQuestionScore = 0;
  1212. nLimitedPlayTimes = 0;
  1213. nPlayedTimes = 0;
  1214. nTimeLimit = 0;
  1215. sBody = "";
  1216. sVersion = "";
  1217. bhasAudios = false;
  1218. bHasContent = false;
  1219. }
  1220. };
  1221. class CPaperGroupStruct
  1222. {
  1223. public:
  1224. QString sGroupName;
  1225. double fGroupScore;
  1226. int nNumber;
  1227. int nTotalSubquestion;
  1228. int nAnsweredCount;
  1229. std::vector<CQuestionStruct> vQuestionStruct;
  1230. CPaperGroupStruct()
  1231. {
  1232. sGroupName = "";
  1233. fGroupScore = 0;
  1234. nNumber = 0;
  1235. nTotalSubquestion = 0;
  1236. nAnsweredCount = 0;
  1237. }
  1238. };
  1239. class CGetExamRecordPaperStruct : public CBaseResponsePackage
  1240. {
  1241. public:
  1242. QString sPaperId;
  1243. QString sPaperName;
  1244. bool bFullyObjective;
  1245. std::vector<CPaperGroupStruct> vPaperGroupStruct;
  1246. CGetExamRecordPaperStruct()
  1247. {
  1248. sPaperId = "";
  1249. sPaperName = "";
  1250. }
  1251. };
  1252. class CGetWXQrCode : public CBaseResponsePackage
  1253. {
  1254. public:
  1255. QString sUrl;
  1256. CGetWXQrCode()
  1257. {
  1258. sUrl = "";
  1259. }
  1260. };
  1261. class CSaveUploadedFileAcknowledgeStatus : public CBaseResponsePackage
  1262. {
  1263. public:
  1264. QString sFileUrl;
  1265. CSaveUploadedFileAcknowledgeStatus()
  1266. {
  1267. sFileUrl = "";
  1268. }
  1269. };
  1270. class CProcessUpload : public CBaseResponsePackage
  1271. {
  1272. public:
  1273. QString sFileUrl;
  1274. QString sCommonStr;
  1275. CProcessUpload()
  1276. {
  1277. sFileUrl = "";
  1278. }
  1279. };
  1280. class CGetOrgPropertiesByGroupWithoutCache : public CBaseResponsePackage
  1281. {
  1282. public:
  1283. int nActionNum;
  1284. QString sActionOptions;//SHAKE,BLINK,NOD
  1285. QString sActionOrder;//FIXED
  1286. int nActionDuration;//单个动作最大时长
  1287. int nActionAlert;//指定动作检测提醒N秒后开始检测
  1288. CGetOrgPropertiesByGroupWithoutCache()
  1289. {
  1290. nActionNum = 0;
  1291. sActionOptions = "";
  1292. sActionOrder = "";
  1293. nActionDuration = 0;
  1294. nActionAlert = 0;
  1295. }
  1296. };
  1297. class CStartFaceLiveVerify : public CBaseResponsePackage
  1298. {
  1299. public:
  1300. __int64 nFaceLiveVerifyId;
  1301. int nStartMinute;
  1302. int nTimes;
  1303. CStartFaceLiveVerify()
  1304. {
  1305. nFaceLiveVerifyId = 0;
  1306. nStartMinute = 0;
  1307. nTimes = 0;
  1308. }
  1309. };
  1310. #endif // HTTPDATADEF_H