httpDataDef.h 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410
  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. bool bIsLivenessBefore;//考前活体检测
  418. CGetExamProperty()
  419. {
  420. sType = "";
  421. sBeforeExamRemark = "";
  422. bCheckEnvironment = false;
  423. nWarnThreshold = 0;//预警阈值
  424. bIsFaceCheck = false;//进入考试是否验证人脸识别(强制、非强制)
  425. nSnapshotInterval = 0;
  426. nFaceVerifyStartMinute = 0;//活体检测开始分钟数
  427. nFaceVerifyEndMinute = 0;//活体检测结束分钟数
  428. bIsStrangerEnable = false;//是否启用陌生人检测
  429. sPracticeType = "";
  430. nFreezeTime = 0;
  431. sAfterExamRemark = "";
  432. bIsObjScoreView = false;
  433. bShowCheatingRemark = false;
  434. sCheatingRemark = "";
  435. bIsLivenessBefore = false;
  436. }
  437. };
  438. class CStartExamLimit : public CBaseResponsePackage
  439. {
  440. public:
  441. int nCount;
  442. bool bPass;
  443. CStartExamLimit()
  444. {
  445. nCount = 0;
  446. bPass = false;
  447. }
  448. };
  449. class CIpLimit : public CBaseResponsePackage
  450. {
  451. public:
  452. bool bLimited;
  453. CIpLimit()
  454. {
  455. bLimited = false;
  456. }
  457. };
  458. class CStartExam : public CBaseResponsePackage
  459. {
  460. public:
  461. QString sCourseCode;// ,
  462. QString sCourseName;// ,
  463. __int64 nExamRecordDataId;// 0,
  464. int nFaceVerifyMinute;// 0,
  465. QString sStudentCode;// ,
  466. QString sStudentName;//
  467. CStartExam()
  468. {
  469. sCourseCode = "";
  470. sCourseName = "";
  471. nExamRecordDataId = 0;
  472. nFaceVerifyMinute = 0;
  473. sStudentCode = "";
  474. sStudentName = "";
  475. }
  476. };
  477. class CFaceCheckEnabled : public CBaseResponsePackage
  478. {
  479. public:
  480. bool bEnabled;
  481. CFaceCheckEnabled()
  482. {
  483. bEnabled = false;
  484. }
  485. };
  486. class CLivenessEnabled : public CBaseResponsePackage
  487. {
  488. public:
  489. bool bEnabled;
  490. CLivenessEnabled()
  491. {
  492. bEnabled = false;
  493. }
  494. };
  495. class CWeiXinAnswerEnabled : public CBaseResponsePackage
  496. {
  497. public:
  498. bool bEnabled;
  499. CWeiXinAnswerEnabled()
  500. {
  501. bEnabled = false;
  502. }
  503. };
  504. class CGetExamById : public CBaseResponsePackage
  505. {
  506. public:
  507. __int64 nId;
  508. QString sCode;
  509. __int64 nRootOrgId;
  510. QString sBeginTime;
  511. QString sEndTime;
  512. QString sName;
  513. QString sExamType;
  514. int nDuration;
  515. bool bEnable;
  516. bool bStarted;
  517. bool bExamLimit;
  518. bool bIpLimitSettingsEnabled;
  519. CGetExamById()
  520. {
  521. nId = 0;
  522. sCode = "";
  523. nRootOrgId = 0;
  524. sBeginTime = "";
  525. sEndTime = "";
  526. sName = "";
  527. sExamType = "";
  528. nDuration = 0;
  529. bEnable = false;
  530. bStarted = false;
  531. bExamLimit = false;
  532. bIpLimitSettingsEnabled = false;
  533. }
  534. };
  535. class CStartAnswer : public CBaseResponsePackage
  536. {
  537. public:
  538. __int64 nDuration;
  539. __int64 nExamRecordDataId;
  540. __int64 nUsedExamSeconds;
  541. CStartAnswer()
  542. {
  543. nDuration = 0;
  544. nExamRecordDataId = 0;
  545. nUsedExamSeconds = 0;
  546. }
  547. };
  548. class COption
  549. {
  550. public:
  551. QString sBody;
  552. COption()
  553. {
  554. sBody = "";
  555. }
  556. };
  557. class CSubQuestion
  558. {
  559. public:
  560. QString sQuestionType;
  561. QString sBody;
  562. std::vector<int> voptionPermutation;
  563. std::vector<COption> vOptions;
  564. std::vector<QString> vRightAnswer;
  565. QString sAnswerType;
  566. CSubQuestion()
  567. {
  568. sQuestionType = "";
  569. sBody = "";
  570. sAnswerType = "";
  571. }
  572. };
  573. class CGetQuestionContent : public CBaseResponsePackage
  574. {
  575. public:
  576. QString sOrder;
  577. QString sQuestionId;
  578. QString sBody;
  579. QString sVersion;
  580. bool bhasAudios;
  581. std::vector<CSubQuestion> vSubQuestion;
  582. CGetQuestionContent()
  583. {
  584. sQuestionId = "";
  585. sOrder = "";
  586. sBody = "";
  587. sVersion = "";
  588. bhasAudios = false;
  589. }
  590. };
  591. class CGetQuestion : public CBaseResponsePackage
  592. {
  593. public:
  594. QString sId;
  595. QString sBody;
  596. QString sVersion;
  597. bool bhasAudios;
  598. std::vector<CSubQuestion> vSubQuestion;
  599. CGetQuestion()
  600. {
  601. sId = "";
  602. sBody = "";
  603. sVersion = "";
  604. bhasAudios = false;
  605. }
  606. };
  607. class CSubmitQuestionAnswer : public CBaseResponsePackage
  608. {
  609. public:
  610. int nOrder;
  611. int nVersion;
  612. CSubmitQuestionAnswer()
  613. {
  614. nOrder = 0;
  615. }
  616. };
  617. class COfflineFileInfo
  618. {
  619. public:
  620. __int64 nExamRecordDataId;// 0,
  621. QString sFileType;// ,
  622. __int64 nId;// 0,
  623. QString sOfflineFileName;// ,
  624. QString sOfflineFileUrl;// ,
  625. QString sOriginalFileName;// ,
  626. QString sProperties;// ,
  627. QString sSuffix;//
  628. QString sLocalFileName;
  629. COfflineFileInfo()
  630. {
  631. nExamRecordDataId = 0;
  632. sFileType = "";
  633. nId = 0;
  634. sOfflineFileName = "";
  635. sOfflineFileUrl = "";
  636. sOriginalFileName = "";
  637. sProperties = "";
  638. sSuffix = "";
  639. sLocalFileName = "";
  640. }
  641. };
  642. class COfflineCourseInfo
  643. {
  644. public:
  645. QString sCourseCode;// ,
  646. QString sCourseLevel;// ,
  647. QString sCourseName;// ,
  648. QString sEndTime;// ,
  649. __int64 nExamId;// 0,
  650. QString sStartTime;// ,
  651. QString sExamName;// ,
  652. __int64 nExamRecordDataId;// 0,
  653. __int64 nExamStudentId;// 0,
  654. bool bIsvalid;// true,
  655. QString sOrgName;// ,
  656. QString sPaperId;// ,
  657. QString sSpecialtyName;// ,
  658. QString sStatus;// ,
  659. QString sStudentCode;// ,
  660. QString sStudentName;//
  661. std::vector<COfflineFileInfo> vOfflineFileInfo;
  662. COfflineCourseInfo()
  663. {
  664. sCourseCode = "";// ,
  665. sCourseLevel = "";// ,
  666. sCourseName = "";// ,
  667. sEndTime = "";// ,
  668. nExamId = 0;// 0,
  669. sStartTime = "";// ,
  670. sExamName = "";// ,
  671. nExamRecordDataId = 0;// 0,
  672. nExamStudentId = 0;// 0,
  673. bIsvalid = false;
  674. sOrgName = "";// ,
  675. sPaperId = "";// ,
  676. sSpecialtyName = "";// ,
  677. sStatus = "";// ,
  678. sStudentCode = "";// ,
  679. sStudentName = "";//
  680. }
  681. };
  682. class CWeekTransform
  683. {
  684. public:
  685. static QString getWeekCycles(std::vector<int> vWeek)
  686. {
  687. QStringList weekList;
  688. for (int nWeek : vWeek)
  689. {
  690. weekList << mWeekCycle.at(nWeek-1);
  691. }
  692. return weekList.join(QString::fromLocal8Bit(","));
  693. }
  694. static bool isInTimeRange(QTime tCurrent, QStringList sExamCycleTimeRange)
  695. {
  696. bool bRet = false;
  697. for (QString sTimeRange : sExamCycleTimeRange)
  698. {
  699. QStringList list = sTimeRange.split("~");
  700. if(list.count() == 2)
  701. {
  702. QTime sStart = QTime::fromString(list[0], "hh:mm");
  703. QTime sEnd = QTime::fromString(list[1], "hh:mm");
  704. if (sStart < tCurrent && tCurrent < sEnd)
  705. {
  706. bRet = true;
  707. }
  708. }
  709. }
  710. return bRet;
  711. }
  712. private:
  713. inline static std::vector<QString> mWeekCycle = {
  714. QString::fromLocal8Bit("周一"),
  715. QString::fromLocal8Bit("周二"),
  716. QString::fromLocal8Bit("周三"),
  717. QString::fromLocal8Bit("周四"),
  718. QString::fromLocal8Bit("周五"),
  719. QString::fromLocal8Bit("周六"),
  720. QString::fromLocal8Bit("周日"),
  721. };
  722. };
  723. class CExamCourseInfo
  724. {
  725. public:
  726. int nAllowExamCount;// 0,
  727. bool bAppExamEnabled;// true,
  728. QString sCourseCode;// ,
  729. __int64 nCourseId;// 0,
  730. QString sCourseLevel;// ,
  731. QString sCourseName;// ,
  732. QString sEndTime;// ,
  733. bool bExamCycleEnabled;// true,
  734. QStringList sExamCycleTimeRange;// [],
  735. std::vector<int> vExamCycleWeek;// [],
  736. __int64 nExamId;// 0,
  737. QString sExamName;// ,
  738. QString sExamStatus;// ,
  739. __int64 nExamStudentId;// 0,
  740. bool bFaceCheck;// true,
  741. bool bFaceEnable;// true,
  742. QString sIdentityNumber;// ,
  743. bool bIsFinished;// ,
  744. bool bIsObjScoreView;// true,
  745. bool bIsPhotoUpload;// ,
  746. __int64 nOrgId;// 0,
  747. QString sOrgName;// ,
  748. int nPaperMins;// 0,
  749. __int64 nRootOrgId;// 0,
  750. QString sSpecialtyLevel;// ,
  751. QString sSpecialtyName;// ,
  752. QString sStartTime;// ,
  753. QString sStudentCode;// ,
  754. QString sStudentName;//
  755. CExamCourseInfo()
  756. {
  757. nAllowExamCount = 0;
  758. bAppExamEnabled = false;
  759. sCourseCode = "";// ,
  760. nCourseId = 0;// 0,
  761. sCourseLevel = "";// ,
  762. sCourseName = "";// ,
  763. sEndTime = "";// ,
  764. bExamCycleEnabled = false;// true,
  765. nExamId = 0;// 0,
  766. sExamName = "";// ,
  767. sExamStatus = "";// ,
  768. nExamStudentId = 0;// 0,
  769. bFaceCheck = false;// true,
  770. bFaceEnable = false;// true,
  771. sIdentityNumber = "";// ,
  772. bIsFinished = "";// ,
  773. bIsObjScoreView = false;
  774. bIsPhotoUpload = "";// ,
  775. nOrgId = 0;// 0,
  776. sOrgName = "";// ,
  777. nPaperMins = 0;// 0,
  778. nRootOrgId = 0;// 0,
  779. sSpecialtyLevel = "";//
  780. sSpecialtyName = "";// ,
  781. sStartTime = "";// ,
  782. sStudentCode = "";// ,
  783. sStudentName = "";//
  784. }
  785. };
  786. class CQueryExamList : public CBaseResponsePackage
  787. {
  788. public:
  789. std::vector<CExamCourseInfo> vOnlieExamList;
  790. };
  791. class CQueryExamEndList : public CBaseResponsePackage
  792. {
  793. public:
  794. std::vector<CExamCourseInfo> vOnlieEndExamList;
  795. };
  796. class CObjectiveScore
  797. {
  798. public:
  799. QString sEndTime;// ,
  800. int nExamOrder;// 0,
  801. __int64 nExamRecordDataId;// 0,
  802. bool bIsAuditing;// true,
  803. bool bIsExamEnded;// true,
  804. bool bIsIllegality;// true,
  805. double fObjectiveScore;// 0,
  806. QString sStartTime;//
  807. CObjectiveScore()
  808. {
  809. sEndTime = "";
  810. nExamOrder = 0;
  811. nExamRecordDataId = 0;
  812. bIsAuditing = 0;
  813. bIsExamEnded = 0;
  814. bIsIllegality = 0;
  815. fObjectiveScore = 0;
  816. sStartTime = "";
  817. }
  818. };
  819. class CQueryObjectiveScoreList : public CBaseResponsePackage
  820. {
  821. public:
  822. QString sExamStudentId;
  823. std::vector<CObjectiveScore> vObjectiveScore;
  824. CQueryObjectiveScoreList()
  825. {
  826. sExamStudentId = "";
  827. }
  828. };
  829. class CQueryHomeworkList : public CBaseResponsePackage
  830. {
  831. public:
  832. std::vector<CExamCourseInfo> vHomeworkExamList;
  833. };
  834. class CPracticeCourseInfo
  835. {
  836. public:
  837. double fAveObjectiveAccuracy;// 0,
  838. QString sCourseCode;// ,
  839. QString sCourseName;// ,
  840. QString sEndTime;// ,
  841. bool bExamCycleEnabled;// true,
  842. QStringList sExamCycleTimeRange;// [],
  843. std::vector<int> vExamCycleWeek;// [],
  844. __int64 nExamId;// 0,
  845. QString sExamName;// ,
  846. __int64 nExamStudentId;// 0,
  847. QString sExamType;// ,
  848. double fMaxObjectiveAccuracy;// 0,
  849. int nPracticeCount;// 0,
  850. double fRecentObjectiveAccuracy;// 0,
  851. QString sStartTime;// ,
  852. QString sStudentCode;// ,
  853. QString sStudentName;//
  854. CPracticeCourseInfo()
  855. {
  856. fAveObjectiveAccuracy = 0;
  857. sCourseCode = "";// ,
  858. sCourseName = "";// ,
  859. sEndTime = "";// ,
  860. bExamCycleEnabled = false;
  861. nExamId = 0;// 0,
  862. sExamName = "";// ,
  863. nExamStudentId = 0;// 0,
  864. sExamType = "";// ,
  865. fMaxObjectiveAccuracy = 0;// 0,
  866. nPracticeCount = 0;
  867. fRecentObjectiveAccuracy = 0;
  868. sStartTime = "";//
  869. sStudentCode = "";
  870. sStudentName = "";
  871. }
  872. };
  873. class CQueryPracticeCourseList : public CBaseResponsePackage
  874. {
  875. public:
  876. std::vector<CPracticeCourseInfo> vPracticeCourseInfo;
  877. };
  878. class CPracticeRecord
  879. {
  880. public:
  881. QString sCourseCode;// ,
  882. QString sCourseName;// ,
  883. QString sEndTime;// ,
  884. QString sExamName;// ,
  885. int nFailQuestionNum;// 0,
  886. __int64 nId;// 0,
  887. int nNotAnsweredCount;// 0,
  888. double fObjectiveAccuracy;// 0,
  889. int nObjectiveNum;// 0,
  890. QString sStartTime;// ,
  891. int nSuccQuestionNum;// 0,
  892. int nTotalQuestionCount;// 0,
  893. __int64 nUsedExamTime;// 0
  894. CPracticeRecord()
  895. {
  896. sCourseCode = "";
  897. sCourseName = "";
  898. sEndTime = "";
  899. sExamName = "";
  900. nFailQuestionNum = 0;
  901. nId = 0;
  902. nNotAnsweredCount = 0;
  903. fObjectiveAccuracy = 0;
  904. nObjectiveNum = 0;
  905. sStartTime = "";
  906. nSuccQuestionNum = 0;
  907. nTotalQuestionCount = 0;
  908. nUsedExamTime = 0;
  909. }
  910. };
  911. //课程练习记录详情
  912. class CQueryPracticeRecordList : public CBaseResponsePackage
  913. {
  914. public:
  915. std::vector<CPracticeRecord> vPracticeRecordList;
  916. };
  917. class CPracticePaperStructInfo
  918. {
  919. public:
  920. int nCount;
  921. int nFailQuestionNum;
  922. int nIndex;
  923. int nNotAnsweredCount;
  924. int nQuestionCount;
  925. QString sQuestionType;
  926. QString sScore;
  927. int nSuccQuestionNum;
  928. QString sTitle;
  929. double fTotalScore;
  930. CPracticePaperStructInfo()
  931. {
  932. nCount = 0;
  933. nFailQuestionNum = 0;
  934. nIndex = 0;
  935. nNotAnsweredCount = 0;
  936. nQuestionCount = 0;
  937. sQuestionType = "";
  938. sScore = "";
  939. nSuccQuestionNum = 0;
  940. sTitle = "";
  941. fTotalScore = 0;
  942. }
  943. };
  944. //单次练习答题情况统计
  945. class CGetPracticeDetailInfo : public CBaseResponsePackage
  946. {
  947. public:
  948. QString sCourseCode;
  949. QString sCourseName;
  950. __int64 nId;
  951. double fObjectiveAccuracy;
  952. std::vector<CPracticePaperStructInfo> vPracticePaperStructList;
  953. CGetPracticeDetailInfo()
  954. {
  955. sCourseCode = "";
  956. sCourseName = "";
  957. nId = 0;
  958. fObjectiveAccuracy = 0;
  959. }
  960. };
  961. //获取当前考试记录信息
  962. class CFindExamRecordDataEntity : public CBaseResponsePackage
  963. {
  964. public:
  965. __int64 nExamId;
  966. QString sPaperType;
  967. CFindExamRecordDataEntity()
  968. {
  969. nExamId = 0;
  970. sPaperType = "";
  971. }
  972. };
  973. //获取交卷之后的所有试题作答信息
  974. class CAnsweredQuestion
  975. {
  976. public:
  977. QString sAnswerType;// ,
  978. QString sAudioPlayTimes;// ,
  979. QString sCorrectAnswer;// ,
  980. QString sExamQuestionTempId;// ,
  981. __int64 nExamRecordDataId;// 0,
  982. bool bIsAnswer;// true,
  983. bool bIsInMongo;// true,
  984. bool bIsSign;// true,
  985. int nMainNumber;// 0,
  986. std::vector<int> vOptionPermutation;// [],
  987. int nOrder;// 0,
  988. QString sQuestionId;// ,
  989. double fQuestionScore;// 0,
  990. QString sQuestionType;// ,
  991. QString sStudentAnswer;// ,
  992. double fStudentScore;// 0
  993. bool bHasQuestonInfo;
  994. CAnsweredQuestion()
  995. {
  996. sAnswerType = "";
  997. sAudioPlayTimes = "";
  998. sCorrectAnswer = "";
  999. sExamQuestionTempId = "";
  1000. nExamRecordDataId = 0;
  1001. bIsAnswer = false;
  1002. bIsInMongo = false;
  1003. bIsSign = false;
  1004. nMainNumber = 0;
  1005. nOrder = 0;
  1006. sQuestionId = "";
  1007. fQuestionScore = 0;
  1008. sQuestionType = "";
  1009. sStudentAnswer = "";
  1010. fStudentScore = 0;
  1011. }
  1012. };
  1013. class CGetExamRecordQuestions : public CBaseResponsePackage
  1014. {
  1015. public:
  1016. std::vector<CAnsweredQuestion> vExamRecordQuestions;
  1017. };
  1018. class CGetOfflineCourse : public CBaseResponsePackage
  1019. {
  1020. public:
  1021. std::vector<COfflineCourseInfo> vOfflineCourseInfo;
  1022. };
  1023. class CGetOffLineExamAnswerSheet : public CBaseResponsePackage
  1024. {
  1025. public:
  1026. QString sAnswerSheetUrl;
  1027. CGetOffLineExamAnswerSheet()
  1028. {
  1029. sAnswerSheetUrl = "";
  1030. }
  1031. };//下载离线考试答题纸接口
  1032. class CGetOffLineExamPaper : public CBaseResponsePackage
  1033. {
  1034. public:
  1035. QString sPaperUrl;
  1036. int nRow;
  1037. CGetOffLineExamPaper()
  1038. {
  1039. sPaperUrl = "";
  1040. nRow = 0;
  1041. }
  1042. };
  1043. class CPreviewOffLineExamPaper : public CBaseResponsePackage
  1044. {
  1045. public:
  1046. QString sUrl;
  1047. int nRow;
  1048. CPreviewOffLineExamPaper()
  1049. {
  1050. sUrl = "";
  1051. nRow = -1;
  1052. }
  1053. };
  1054. class CStartOfflineExam : public CBaseResponsePackage
  1055. {
  1056. public:
  1057. int nRow;
  1058. CStartOfflineExam()
  1059. {
  1060. nRow = 0;
  1061. }
  1062. };
  1063. class CSubmitOfflinePaper : public CBaseResponsePackage
  1064. {
  1065. public:
  1066. };
  1067. namespace EXAM_INPROGRESS_ENTER_TYPE
  1068. {
  1069. const QString EIET_COURSE_LIST = "COURSE_LIST";
  1070. const QString EIET_ENTER_EXAM = "ENTER_EXAM";
  1071. }
  1072. class CCheckExamInProgress : public CBaseResponsePackage
  1073. {
  1074. public:
  1075. bool bHasExamInProgress;
  1076. int nInterruptNum;
  1077. int nMaxInterruptNum;
  1078. bool bIsExceed;
  1079. __int64 nExamRecordDataId;
  1080. __int64 nExamId;
  1081. __int64 nUsedTime;
  1082. int nFaceVerifyMinute;
  1083. QString sExamType;
  1084. QString sEnterType;
  1085. CCheckExamInProgress()
  1086. {
  1087. bHasExamInProgress = false;
  1088. nInterruptNum = 0;
  1089. nMaxInterruptNum = 0;
  1090. bIsExceed = false;
  1091. nExamRecordDataId = 0;
  1092. nExamId = 0;
  1093. nUsedTime = 0;
  1094. nFaceVerifyMinute = 0;
  1095. sExamType = "";
  1096. }
  1097. };
  1098. class CGetCourseInfo : public CBaseResponsePackage
  1099. {
  1100. public:
  1101. QString sCourseCode;
  1102. QString sCourseName;
  1103. CGetCourseInfo()
  1104. {
  1105. sCourseCode = "";
  1106. sCourseName = "";
  1107. }
  1108. };
  1109. class CEndExam : public CBaseResponsePackage
  1110. {
  1111. public:
  1112. QString sModuleName;
  1113. bool bForce;
  1114. CEndExam()
  1115. {
  1116. sModuleName = "";
  1117. bForce = false;
  1118. }
  1119. };
  1120. class CGetEndExamInfo : public CBaseResponsePackage
  1121. {
  1122. public:
  1123. __int64 nExamRecordDataId;
  1124. bool bIsWarn;
  1125. double fObjectiveAccuracy;
  1126. double fObjectiveScore;
  1127. bool bIsCalculate;
  1128. CGetEndExamInfo()
  1129. {
  1130. nExamRecordDataId = 0;
  1131. bIsWarn = false;
  1132. fObjectiveAccuracy = 0;
  1133. fObjectiveScore = 0;
  1134. bIsCalculate = false;
  1135. }
  1136. };
  1137. class CExamHeartbeat : public CBaseResponsePackage
  1138. {
  1139. public:
  1140. __int64 nLeftTime;//毫秒
  1141. CExamHeartbeat()
  1142. {
  1143. nLeftTime = 0;
  1144. }
  1145. };
  1146. class CFindExamQuestionList : public CBaseResponsePackage
  1147. {
  1148. public:
  1149. std::vector<CAnsweredQuestion> vAnsweredQuestion;
  1150. };
  1151. namespace QUESTION_TYPE
  1152. {
  1153. const QString SingleChoice = "SINGLE_CHOICE";
  1154. const QString MultipleChoice = "MULTIPLE_CHOICE";
  1155. const QString TrueOrFalse = "TRUE_OR_FALSE";
  1156. const QString FillUp = "FILL_UP";
  1157. const QString Essay = "ESSAY";
  1158. };
  1159. class CSubQuestionStruct
  1160. {
  1161. public:
  1162. std::vector<int> voptionPermutation;
  1163. double fQuestionScore;
  1164. QString sQuestionType;
  1165. QString sAnswerType;
  1166. bool bMarked;
  1167. bool bAnswered;
  1168. int nVersion;
  1169. bool bUpload;
  1170. QString sSubjectiveTempAns;
  1171. QString sUploadAnswer;
  1172. bool bCurrent;
  1173. QString sStudentAnswer;
  1174. int nShowNumber;
  1175. int nOrder;
  1176. QString sBody;
  1177. std::vector<COption> vOptions;
  1178. std::vector<QString> vRightAnswer;
  1179. int nLimitedPlayTimes;
  1180. CSubQuestionStruct()
  1181. {
  1182. fQuestionScore = 0;
  1183. sQuestionType = "";
  1184. sAnswerType = "";
  1185. bMarked = false;
  1186. bAnswered = false;
  1187. nVersion = 0;
  1188. bUpload = true;
  1189. sUploadAnswer = "";
  1190. sSubjectiveTempAns = "";
  1191. bCurrent = false;
  1192. nShowNumber = 0;
  1193. nOrder = 0;
  1194. sBody = "";
  1195. nLimitedPlayTimes = 0;
  1196. }
  1197. };
  1198. class CQuestionStruct
  1199. {
  1200. public:
  1201. QString sQuestionId;
  1202. QString sVersion;
  1203. double fQuestionScore;
  1204. int nLimitedPlayTimes;
  1205. int nPlayedTimes;
  1206. int nTimeLimit;
  1207. bool bHasContent;
  1208. QString sBody;
  1209. bool bhasAudios;
  1210. std::vector<CSubQuestionStruct> vSubQuestionStruct;
  1211. CQuestionStruct()
  1212. {
  1213. sQuestionId = "";
  1214. sVersion = "";
  1215. fQuestionScore = 0;
  1216. nLimitedPlayTimes = 0;
  1217. nPlayedTimes = 0;
  1218. nTimeLimit = 0;
  1219. sBody = "";
  1220. sVersion = "";
  1221. bhasAudios = false;
  1222. bHasContent = false;
  1223. }
  1224. };
  1225. class CPaperGroupStruct
  1226. {
  1227. public:
  1228. QString sGroupName;
  1229. double fGroupScore;
  1230. int nNumber;
  1231. int nTotalSubquestion;
  1232. int nAnsweredCount;
  1233. std::vector<CQuestionStruct> vQuestionStruct;
  1234. CPaperGroupStruct()
  1235. {
  1236. sGroupName = "";
  1237. fGroupScore = 0;
  1238. nNumber = 0;
  1239. nTotalSubquestion = 0;
  1240. nAnsweredCount = 0;
  1241. }
  1242. };
  1243. class CGetExamRecordPaperStruct : public CBaseResponsePackage
  1244. {
  1245. public:
  1246. QString sPaperId;
  1247. QString sPaperName;
  1248. bool bFullyObjective;
  1249. std::vector<CPaperGroupStruct> vPaperGroupStruct;
  1250. CGetExamRecordPaperStruct()
  1251. {
  1252. sPaperId = "";
  1253. sPaperName = "";
  1254. }
  1255. };
  1256. class CGetWXQrCode : public CBaseResponsePackage
  1257. {
  1258. public:
  1259. QString sUrl;
  1260. CGetWXQrCode()
  1261. {
  1262. sUrl = "";
  1263. }
  1264. };
  1265. class CSaveUploadedFileAcknowledgeStatus : public CBaseResponsePackage
  1266. {
  1267. public:
  1268. QString sFileUrl;
  1269. CSaveUploadedFileAcknowledgeStatus()
  1270. {
  1271. sFileUrl = "";
  1272. }
  1273. };
  1274. class CProcessUpload : public CBaseResponsePackage
  1275. {
  1276. public:
  1277. QString sFileUrl;
  1278. QString sCommonStr;
  1279. CProcessUpload()
  1280. {
  1281. sFileUrl = "";
  1282. }
  1283. };
  1284. class CGetOrgPropertiesByGroupWithoutCache : public CBaseResponsePackage
  1285. {
  1286. public:
  1287. int nActionNum;
  1288. QString sActionOptions;//SHAKE,BLINK,NOD
  1289. QString sActionOrder;//FIXED
  1290. int nActionDuration;//单个动作最大时长
  1291. int nActionAlert;//指定动作检测提醒N秒后开始检测
  1292. int nAllActionDuration;//整体动作时长
  1293. CGetOrgPropertiesByGroupWithoutCache()
  1294. {
  1295. nActionNum = 0;
  1296. sActionOptions = "";
  1297. sActionOrder = "";
  1298. nActionDuration = 0;
  1299. nActionAlert = 15;
  1300. nAllActionDuration = 120;
  1301. }
  1302. };
  1303. class CStartFaceLiveVerify : public CBaseResponsePackage
  1304. {
  1305. public:
  1306. __int64 nFaceLiveVerifyId;
  1307. int nStartMinute;
  1308. int nTimes;
  1309. CStartFaceLiveVerify()
  1310. {
  1311. nFaceLiveVerifyId = 0;
  1312. nStartMinute = 0;
  1313. nTimes = 0;
  1314. }
  1315. };
  1316. #endif // HTTPDATADEF_H