1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477 |
- #ifndef HTTPDATADEF_H
- #define HTTPDATADEF_H
- #include <QString>
- #include <QStringList>
- #include <map>
- #include <QDateTime>
- enum class HttpParamType
- {
- hptUrl = 1, //放到url后面
- hptCustomBody,//自定义body
- hptBody, //放到body里面
- hptFormdata
- };
- enum class HttpType
- {
- htPost = 1,
- htGet,
- htGetUrl,//get固定url
- htPut,
- htDownload
- };
- enum class RequestType
- {
- rtUndefine = 0,
- rtUpgrade,//客户端版本升级接口
- rtGetSoftwareConfig,//获取检测黑名单
- rtAgreement,//获取隐私协议接口
- rtStudentClientConfig, //获取当前机构的客户端环境信息接口
- rtSysNotice,//平台通知接口
- rtLoginLimit,//登录限流接口
- rtLogin,//登录
- rtLogout,//退出登录接口
- rtEditPassword, //修改密码
- rtGetStudentClientMenu,//获取菜单列表
- rtGetStudentInfoBySession,// 获取考生信息
- rtOnlineSignal,//学生在线状态
- rtSpecialtyNameList,//查询考生的专业列表
- rtGetUserNoticeList,//获取用户公告列表
- rtUpdateNoticeReadStatus,//更新通知状态为已读
- rtAppDownLoadUrl,//app下载地址
- rtAppEnabled,//查询机构是否开放APP
- rtQueryBatchList,// 取考试批次列表 queryByNameLike
- rtGetExamProperty,//查询某考生的考试属性
- rtQueryExamList,//获取在线考试待考列表
- rtQueryExamEndList,//获取在线考试已结束列表
- rtQueryObjectiveScoreList,//根据examStudentId获取客观分信息
- rtQueryHomeworkList,//获取在线作业待考列表
- rtQueryPracticeCourseList,//练习课程列表
- rtQueryPracticeRecordList,//课程练习记录详情
- rtGetPracticeDetailInfo, //单次练习答题情况统计
- rtFindExamRecordDataEntity,//获取当前考试记录信息
- rtGetExamRecordQuestions,//获取交卷之后的所有试题作答信息
- rtGetOfflineCourse,//获取离线考试列表
- rtGetOffLineExamAnswerSheet,//下载离线考试答题纸接口
- rtStartOfflineExam,//离线考试 : 开始考试
- rtGetOffLineExamPaper, //离线考试 – 下载试卷
- rtPreviewOffLineExamPaper,//离线考试 – 查看试卷
- rtSubmitOfflinePaper,//离线考试:交卷 submitPaper
- rtStartExamLimit,//开始考试限流
- rtIpLimit,//检查考试是否IP限制
- rtCheckExamInProgress,//断点续考:检查正在进行中的考试
- rtStartExam,//开始考试
- rtFaceCheckEnabled,//检查考试是否支持人脸识别
- rtLivenessEnabled,//考试是否支持活体检测
- rtWeiXinAnswerEnabled, //考试是否可以微信作答
- rtGetCourseInfo,//获取课程名称
- rtGetExamById,//按ID获取考试信息接口
- rtStartAnswer,//开始答题
- rtGetQuestionContent,//取某个试题信息-考中
- rtGetQuestion,//取某个试题信息-考后
- rtSubmitQuestionAnswer,//考试过程中-考生试题作答
- rtEndExam,//结束考试:交卷
- rtGetEndExamInfo, //获取考试记录信息-交卷后获取考试分数
- rtExamHeartbeat,//考试心跳
- rtFindExamQuestionList,//考试过程中-获取已做答试题列表
- rtGetExamRecordPaperStruct,//获取考试记录试卷结构
- rtDownLoadFile, //下载文件
- rtGetWXQrCode,//获取微信二维码
- rtSaveUploadedFileAcknowledgeStatus,//修改上传音频或图片结果推送状态
- // rtProcessUpload, //文件上传
- rtSaveFaceCompareResult,//保存人脸识别比对验证结果
- rtSaveFaceCaptureResult,//保存人脸抓拍比对验证结果
- rtSaveFaceLiveVerifyResult,//保存人脸活体验证结果
- rtStartFaceLiveVerify,//开始人脸活体验证接口,如:活检次数,活检开始时间等
- rtGetOrgPropertiesByGroupWithoutCache,//获取活检配置参数接口
- rtClientExamProcessUploadSign,//文件上传签名信息
- rtUploadFileToAliyun,
- rtExamControlCheckTime, //交卷冻结时间检查
- rtSkipFaceCheckParam,//检查当前考生是否跳过人脸识别接口
- rtGetWXUploadedFile //查询小程序端已上传的文件结果接口
- };
- class CHttpRequestPackage
- {
- public:
- RequestType nRequestType;
- HttpType nHttpType;
- QString sUri;
- QString sCommonStr;
- QString sCommonStr1;
- QString sAdditionStr;
- HttpParamType eParamType;
- QStringList sParamList;
- QStringList sHeadList;
- int nRetryCount;
- bool bNoHostPrefix;//不需要加http://host:port
- CHttpRequestPackage()
- {
- nRequestType = RequestType::rtUndefine;
- nHttpType = HttpType::htPost;
- eParamType = HttpParamType::hptUrl;
- sUri = "";
- sCommonStr = "";
- sCommonStr1 = "";
- sAdditionStr = "";
- nRetryCount = 0;
- bNoHostPrefix = false;
- }
- };
- class CBaseResponsePackage
- {
- public:
- int nCode;
- QString sMessage;
- CBaseResponsePackage()
- {
- nCode = 0;
- sMessage = "";
- }
- };
- class CGetSoftwareConfig : public CBaseResponsePackage
- {
- public:
- QString sSoftwareConfig;
- CGetSoftwareConfig()
- {
- sSoftwareConfig = "";
- }
- };
- class CUpgrade : public CBaseResponsePackage
- {
- public:
- QString sVersion;
- int nBuild;
- QString sContent;
- bool bForce;
- QString sUpgradeUrl;
- CUpgrade()
- {
- sVersion = "";
- nBuild = 0;
- sContent = "";
- bForce = true;
- sUpgradeUrl = "";
- }
- };
- class CAgreement : public CBaseResponsePackage
- {
- public:
- QString sTitle;
- int nStaySeconds;
- QString sContent;
- CAgreement()
- {
- sTitle = "";
- nStaySeconds = 15;
- sContent = "";
- }
- };
- class CStudentClientConfig : public CBaseResponsePackage
- {
- public:
- QString sCusMenuLogoFileUrl;
- QString sIdentityNumberLoginAlias;//身份证号登录34s
- bool bIsCustomMenuLogo;// : "false",
- bool bStudentCodeLogin;
- bool bIdentifyNumberLogin;
- QString sLogoFileUrl;//" : "https://ecs-test-static.qmth.com.cn/org_logo/0/1613800689888.png",
- QString sStudentClientBgPictureUrl;
- QString sOeStudentSysName;//" : "网考 - 33d34sss3d",
- bool bDisableMutiScreen;
- bool bDisableRemoteAssistance;
- bool bDisableVirtualMachine;
- bool bFullScreenTop;
- bool bDisableVirtualCamera;
- bool bExamingBlackListCheck;//考试中黑名单检测
- QString sRootOrgId;// " : "0",
- bool bShowQmthLogo;// " : "false",
- bool bShowStudentClientAppQrcode;// " : "true",
- QString sStudentCodeLoginAlias;// " : "学号登录34s"
- bool bShowStudentName;
- bool bShowStudentCode;
- bool bShowStudentIdentity;
- CStudentClientConfig()
- {
- sCusMenuLogoFileUrl = "";
- sIdentityNumberLoginAlias = "";
- bIsCustomMenuLogo = false;
- bStudentCodeLogin = false;
- bIdentifyNumberLogin = false;
- sLogoFileUrl = "";
- sStudentClientBgPictureUrl = "";
- sOeStudentSysName = "";
- bDisableMutiScreen = false;
- bDisableRemoteAssistance = false;
- bDisableVirtualMachine = false;
- bFullScreenTop = false;
- bDisableVirtualCamera = false;
- bExamingBlackListCheck = false;
- sRootOrgId = "";// " : "0",
- bShowQmthLogo = false;// " : "false",
- bShowStudentClientAppQrcode = false;// " : "true",
- sStudentCodeLoginAlias = ""; // " : "学号登录34s"
- bShowStudentName = true;
- bShowStudentCode = true;
- bShowStudentIdentity = true;
- }
- };
- class CSysNotice : public CBaseResponsePackage
- {
- public:
- __int64 nId;// 1,
- __int64 nRootOrgId;//-1, //顶级机构ID,-1代表所有机构
- QString sContent;//"平台将于今天下午1点停服升级,请知悉!",
- QString sStartTime;// "2021 - 08 - 11 00:00 : 00", //生效开始时间
- QString sEndTime;//"2021 - 08 - 12 00:00 : 00", //生效截止开始时间
- QString sTitle;//"升级通知",
- bool bEnable;// false //是否启用
- CSysNotice()
- {
- nId = 0;
- nRootOrgId = -1;
- sContent = "";
- sStartTime = "";
- sEndTime = "";
- sTitle = "";
- bEnable = false;
- }
- };
- class CLoginLimit : public CBaseResponsePackage
- {
- public:
- int nCount;
- bool bPass; // true代表未限制
- CLoginLimit()
- {
- nCount = 0;
- bPass = false;
- }
- };
- class CLoginInfo : public CBaseResponsePackage
- {
- public:
- QString sUserType;// "STUDENT",
- __int64 nUserId;// 4,
- QString sDisplayName;// "张三",
- __int64 nRootOrgId;// 0,
- QString sRootOrgName;// 启明泰和",
- QString sCreationTime;//"2021 - 08 - 26 17:23 : 15",
- QString sClientIp;//"192.168.10.126",
- __int64 nSessionTimeout;// 7200,
- bool bPasswordWeak;// " : false
- CLoginInfo()
- {
- sUserType = "";
- nUserId = 0;
- sDisplayName = "";
- nRootOrgId = 0;
- sRootOrgName = "";
- sCreationTime = "";
- sClientIp = "";
- nSessionTimeout = 0;
- bPasswordWeak = false;
- }
- };
- class CLogout : public CBaseResponsePackage
- {
- public:
- };
- class CEditPassword : public CBaseResponsePackage
- {
- public:
- };
- class CStudentClientMenu
- {
- public:
- __int64 nId;
- QString sCode;
- QString sName;
- };
- class CGetStudentClientMenu : public CBaseResponsePackage
- {
- public:
- std::vector<CStudentClientMenu> vMenus;
- };
- class CGetStudentInfoBySession : public CBaseResponsePackage
- {
- public:
- __int64 nId;
- QString sName;
- __int64 nOrgId;
- QString sOrgCode;
- QString sOrgName;
- QString sStudentCode;
- QString sIdentityNumber;
- QString sPhotoPath;
- bool bEnable;
- CGetStudentInfoBySession()
- {
- nId = 0;
- sName = "";
- nOrgId = 0;
- sOrgCode = "";
- sOrgName = "";
- sStudentCode = "";
- sIdentityNumber = "";
- sPhotoPath = "";
- bEnable = false;
- }
- };
- class CDownLoadFileInfo : public CBaseResponsePackage
- {
- public:
- QString sFileName;
- QString sModuleName;
- QString sAdditionStr;
- CDownLoadFileInfo()
- {
- sFileName = "";
- sModuleName = "";
- sAdditionStr = "";
- }
- };
- class CSpecialtyNameList : public CBaseResponsePackage
- {
- public:
- QString sSpecialtyName;
- CSpecialtyNameList()
- {
- sSpecialtyName = "";
- }
- };
- class CNoticeInfo
- {
- public:
- __int64 nId;// 11,
- QString sTitle;
- QString sContent;
- QString sPublisher;
- QString sPublishTime;// " : "2021 - 08 - 27 16:22 : 29",
- bool bHasRead;// : false,
- bool bHasRecalled;
- CNoticeInfo()
- {
- nId = 0;
- sTitle = "";
- sContent = "";
- sPublisher = "";
- sPublishTime = "";
- bHasRead = false;
- bHasRecalled = false;
- }
- };
- class CGetUserNoticeList : public CBaseResponsePackage
- {
- public:
- std::vector<CNoticeInfo> vNoticeList;
- };
- class CUpdateNoticeReadStatus : public CBaseResponsePackage
- {
- public:
- QString sIds;
- CUpdateNoticeReadStatus()
- {
- sIds = "";
- }
- };
- class CAppDownLoadUrl : public CBaseResponsePackage
- {
- public:
- QString sUrl;
- CAppDownLoadUrl()
- {
- sUrl = "";
- }
- };
- class CAppEnabled : public CBaseResponsePackage
- {
- public:
- bool bEnable;
- CAppEnabled()
- {
- bEnable = false;
- }
- };
- class CBatchInfo
- {
- public:
- __int64 nId;
- QString sName;
- QString sExamType;
- CBatchInfo()
- {
- nId = 0;
- sName = "";
- sExamType = "";
- }
- };
- class CQueryBatchList : public CBaseResponsePackage
- {
- public:
- std::vector<CBatchInfo> vBatchList;
- };
- class CGetExamProperty : public CBaseResponsePackage
- {
- public:
- QString sType;
- QString sBeforeExamRemark;//考前说明
- bool bCheckEnvironment;//环境监测
- // int nFaceThreshold;//预警阈值
- bool bIsFaceCheck;//进入考试是否验证人脸识别(强制、非强制)
- int nSnapshotInterval;//抓拍间隔时间
- int nFaceVerifyStartMinute;//活体检测开始分钟数
- int nFaceVerifyEndMinute;//活体检测结束分钟数
- bool bIsStrangerEnable;//是否启用陌生人检测
-
- QString sPracticeType;//AFTER_PRACTICE 在线练习-结束统一显示答案
- //IN_PRACTICE 在线练习-边答边显示答案
- //NO_ANSWER 在线练习-不显示答案
- int nFreezeTime;//冻结时间
- QString sAfterExamRemark;//考后说明
- bool bIsObjScoreView;//是否显示客观题成绩
- bool bShowCheatingRemark;//是否展示作弊
- QString sCheatingRemark;//作弊说明
- std::vector<QString> vOfflineUploadFileType;
- bool bIsLivenessBefore;//考前活体检测
- bool bFaceVerifyForceExit;//考中活体不通过强制退出
- bool bMutipleAnserCountTips;
- CGetExamProperty()
- {
- sType = "";
- sBeforeExamRemark = "";
- bCheckEnvironment = false;
- // nFaceThreshold = 50;//预警阈值
- bIsFaceCheck = false;//进入考试是否验证人脸识别(强制、非强制)
- nSnapshotInterval = 0;
- nFaceVerifyStartMinute = 0;//活体检测开始分钟数
- nFaceVerifyEndMinute = 0;//活体检测结束分钟数
- bIsStrangerEnable = false;//是否启用陌生人检测
-
- sPracticeType = "";
- nFreezeTime = 0;
- sAfterExamRemark = "";
- bIsObjScoreView = false;
- bShowCheatingRemark = false;
- sCheatingRemark = "";
- bIsLivenessBefore = false;
- bFaceVerifyForceExit = true;
- bMutipleAnserCountTips = false;
- }
- };
- class CStartExamLimit : public CBaseResponsePackage
- {
- public:
- int nCount;
- bool bPass;
- CStartExamLimit()
- {
- nCount = 0;
- bPass = false;
- }
- };
- class CIpLimit : public CBaseResponsePackage
- {
- public:
- bool bLimited;
- CIpLimit()
- {
- bLimited = false;
- }
- };
- class CStartExam : public CBaseResponsePackage
- {
- public:
- QString sCourseCode;// ,
- QString sCourseName;// ,
- __int64 nExamRecordDataId;// 0,
- int nFaceVerifyMinute;// 0,
- QString sStudentCode;// ,
- QString sStudentName;//
- CStartExam()
- {
- sCourseCode = "";
- sCourseName = "";
- nExamRecordDataId = 0;
- nFaceVerifyMinute = 0;
- sStudentCode = "";
- sStudentName = "";
- }
- };
- class CFaceCheckEnabled : public CBaseResponsePackage
- {
- public:
- bool bEnabled;
- CFaceCheckEnabled()
- {
- bEnabled = false;
- }
- };
- class CLivenessEnabled : public CBaseResponsePackage
- {
- public:
- bool bEnabled;
- CLivenessEnabled()
- {
- bEnabled = false;
- }
- };
- class CWeiXinAnswerEnabled : public CBaseResponsePackage
- {
- public:
- bool bEnabled;
- CWeiXinAnswerEnabled()
- {
- bEnabled = false;
- }
- };
- class CGetExamById : public CBaseResponsePackage
- {
- public:
- __int64 nId;
- QString sCode;
- __int64 nRootOrgId;
- QString sBeginTime;
- QString sEndTime;
- QString sName;
- QString sExamType;
- int nDuration;
- bool bEnable;
- bool bStarted;
- bool bExamLimit;
- bool bIpLimitSettingsEnabled;
- CGetExamById()
- {
- nId = 0;
- sCode = "";
- nRootOrgId = 0;
- sBeginTime = "";
- sEndTime = "";
- sName = "";
- sExamType = "";
- nDuration = 0;
- bEnable = false;
- bStarted = false;
- bExamLimit = false;
- bIpLimitSettingsEnabled = false;
- }
- };
- class CStartAnswer : public CBaseResponsePackage
- {
- public:
- __int64 nDuration;
- __int64 nExamRecordDataId;
- __int64 nUsedExamSeconds;
- CStartAnswer()
- {
- nDuration = 0;
- nExamRecordDataId = 0;
- nUsedExamSeconds = 0;
- }
- };
- class COption
- {
- public:
- QString sBody;
- COption()
- {
- sBody = "";
- }
- };
- class CSubQuestion
- {
- public:
- QString sQuestionType;
- QString sBody;
- std::vector<int> voptionPermutation;
- std::vector<COption> vOptions;
- std::vector<QString> vRightAnswer;
- QString sAnswerType;
- CSubQuestion()
- {
- sQuestionType = "";
- sBody = "";
- sAnswerType = "";
- }
- };
- class CGetQuestionContent : public CBaseResponsePackage
- {
- public:
- QString sOrder;
- QString sQuestionId;
- QString sBody;
- QString sVersion;
- bool bhasAudios;
- std::vector<CSubQuestion> vSubQuestion;
- CGetQuestionContent()
- {
- sQuestionId = "";
- sOrder = "";
- sBody = "";
- sVersion = "";
- bhasAudios = false;
- }
- };
- class CGetQuestion : public CBaseResponsePackage
- {
- public:
- QString sId;
- QString sBody;
- QString sVersion;
- bool bhasAudios;
- std::vector<CSubQuestion> vSubQuestion;
- CGetQuestion()
- {
- sId = "";
- sBody = "";
- sVersion = "";
- bhasAudios = false;
- }
- };
- class CSubmitQuestionAnswer : public CBaseResponsePackage
- {
- public:
- int nOrder;
- int nVersion;
- CSubmitQuestionAnswer()
- {
- nOrder = 0;
- }
- };
- class COfflineFileInfo
- {
- public:
- __int64 nExamRecordDataId;// 0,
- QString sFileType;// ,
- __int64 nId;// 0,
- QString sOfflineFileName;// ,
- QString sOfflineFileUrl;// ,
- QString sOriginalFileName;// ,
- QString sProperties;// ,
- QString sSuffix;//
- QString sLocalFileName;
- COfflineFileInfo()
- {
- nExamRecordDataId = 0;
- sFileType = "";
- nId = 0;
- sOfflineFileName = "";
- sOfflineFileUrl = "";
- sOriginalFileName = "";
- sProperties = "";
- sSuffix = "";
- sLocalFileName = "";
- }
- };
- class COfflineCourseInfo
- {
- public:
- QString sCourseCode;// ,
- QString sCourseLevel;// ,
- QString sCourseName;// ,
- QString sEndTime;// ,
- __int64 nExamId;// 0,
- QString sStartTime;// ,
- QString sExamName;// ,
- __int64 nExamRecordDataId;// 0,
- __int64 nExamStudentId;// 0,
- bool bIsvalid;// true,
- QString sOrgName;// ,
- QString sPaperId;// ,
- QString sSpecialtyName;// ,
- QString sStatus;// ,
- QString sStudentCode;// ,
- QString sStudentName;//
- std::vector<COfflineFileInfo> vOfflineFileInfo;
- COfflineCourseInfo()
- {
- sCourseCode = "";// ,
- sCourseLevel = "";// ,
- sCourseName = "";// ,
- sEndTime = "";// ,
- nExamId = 0;// 0,
- sStartTime = "";// ,
- sExamName = "";// ,
- nExamRecordDataId = 0;// 0,
- nExamStudentId = 0;// 0,
- bIsvalid = false;
- sOrgName = "";// ,
- sPaperId = "";// ,
- sSpecialtyName = "";// ,
- sStatus = "";// ,
- sStudentCode = "";// ,
- sStudentName = "";//
- }
- };
- class CWeekTransform
- {
- public:
- static QString getWeekCycles(std::vector<int> vWeek)
- {
- QStringList weekList;
- for (int nWeek : vWeek)
- {
- weekList << mWeekCycle.at(nWeek-1);
- }
- return weekList.join(QString::fromLocal8Bit(","));
- }
- static bool isInTimeRange(QTime tCurrent, QStringList sExamCycleTimeRange)
- {
- bool bRet = false;
- for (QString sTimeRange : sExamCycleTimeRange)
- {
- QStringList list = sTimeRange.split("~");
- if(list.count() == 2)
- {
- QTime sStart = QTime::fromString(list[0], "hh:mm");
- QTime sEnd = QTime::fromString(list[1], "hh:mm");
- if (sStart < tCurrent && tCurrent < sEnd)
- {
- bRet = true;
- }
- }
- }
- return bRet;
- }
- private:
- inline static std::vector<QString> mWeekCycle = {
- QString::fromLocal8Bit("周一"),
- QString::fromLocal8Bit("周二"),
- QString::fromLocal8Bit("周三"),
- QString::fromLocal8Bit("周四"),
- QString::fromLocal8Bit("周五"),
- QString::fromLocal8Bit("周六"),
- QString::fromLocal8Bit("周日"),
- };
- };
- class CExamCourseInfo
- {
- public:
- int nAllowExamCount;// 0,
- bool bAppExamEnabled;// true,
- QString sCourseCode;// ,
- __int64 nCourseId;// 0,
- QString sCourseLevel;// ,
- QString sCourseName;// ,
- QString sEndTime;// ,
- bool bExamCycleEnabled;// true,
- QStringList sExamCycleTimeRange;// [],
- std::vector<int> vExamCycleWeek;// [],
- __int64 nExamId;// 0,
- QString sExamName;// ,
- QString sExamStatus;// ,
- __int64 nExamStudentId;// 0,
- bool bFaceCheck;// true,
- bool bFaceEnable;// true,
- QString sIdentityNumber;// ,
- bool bIsFinished;// ,
- bool bIsObjScoreView;// true,
- bool bIsPhotoUpload;// ,
- __int64 nOrgId;// 0,
- QString sOrgName;// ,
- int nPaperMins;// 0,
- __int64 nRootOrgId;// 0,
- QString sSpecialtyLevel;// ,
- QString sSpecialtyName;// ,
- QString sStartTime;// ,
- QString sStudentCode;// ,
- QString sStudentName;//
- CExamCourseInfo()
- {
- nAllowExamCount = 0;
- bAppExamEnabled = false;
- sCourseCode = "";// ,
- nCourseId = 0;// 0,
- sCourseLevel = "";// ,
- sCourseName = "";// ,
- sEndTime = "";// ,
- bExamCycleEnabled = false;// true,
- nExamId = 0;// 0,
- sExamName = "";// ,
- sExamStatus = "";// ,
- nExamStudentId = 0;// 0,
- bFaceCheck = false;// true,
- bFaceEnable = false;// true,
- sIdentityNumber = "";// ,
- bIsFinished = "";// ,
- bIsObjScoreView = false;
- bIsPhotoUpload = "";// ,
- nOrgId = 0;// 0,
- sOrgName = "";// ,
- nPaperMins = 0;// 0,
- nRootOrgId = 0;// 0,
- sSpecialtyLevel = "";//
- sSpecialtyName = "";// ,
- sStartTime = "";// ,
- sStudentCode = "";// ,
- sStudentName = "";//
- }
- };
- class CQueryExamList : public CBaseResponsePackage
- {
- public:
- std::vector<CExamCourseInfo> vOnlieExamList;
- };
-
- class CQueryExamEndList : public CBaseResponsePackage
- {
- public:
- std::vector<CExamCourseInfo> vOnlieEndExamList;
- };
- class CObjectiveScore
- {
- public:
- QString sEndTime;// ,
- int nExamOrder;// 0,
- __int64 nExamRecordDataId;// 0,
- bool bIsAuditing;// true,
- bool bIsExamEnded;// true,
- bool bIsIllegality;// true,
- double fObjectiveScore;// 0,
- QString sStartTime;//
- CObjectiveScore()
- {
- sEndTime = "";
- nExamOrder = 0;
- nExamRecordDataId = 0;
- bIsAuditing = 0;
- bIsExamEnded = 0;
- bIsIllegality = 0;
- fObjectiveScore = 0;
- sStartTime = "";
- }
- };
- class CQueryObjectiveScoreList : public CBaseResponsePackage
- {
- public:
- QString sExamStudentId;
- std::vector<CObjectiveScore> vObjectiveScore;
- CQueryObjectiveScoreList()
- {
- sExamStudentId = "";
- }
- };
- class CQueryHomeworkList : public CBaseResponsePackage
- {
- public:
- std::vector<CExamCourseInfo> vHomeworkExamList;
- };
- class CPracticeCourseInfo
- {
- public:
- double fAveObjectiveAccuracy;// 0,
- QString sCourseCode;// ,
- QString sCourseName;// ,
- QString sEndTime;// ,
- bool bExamCycleEnabled;// true,
- QStringList sExamCycleTimeRange;// [],
- std::vector<int> vExamCycleWeek;// [],
- __int64 nExamId;// 0,
- QString sExamName;// ,
- __int64 nExamStudentId;// 0,
- QString sExamType;// ,
- double fMaxObjectiveAccuracy;// 0,
- int nPracticeCount;// 0,
- double fRecentObjectiveAccuracy;// 0,
- QString sStartTime;// ,
- QString sStudentCode;// ,
- QString sStudentName;//
- CPracticeCourseInfo()
- {
- fAveObjectiveAccuracy = 0;
- sCourseCode = "";// ,
- sCourseName = "";// ,
- sEndTime = "";// ,
- bExamCycleEnabled = false;
- nExamId = 0;// 0,
- sExamName = "";// ,
- nExamStudentId = 0;// 0,
- sExamType = "";// ,
- fMaxObjectiveAccuracy = 0;// 0,
- nPracticeCount = 0;
- fRecentObjectiveAccuracy = 0;
- sStartTime = "";//
- sStudentCode = "";
- sStudentName = "";
- }
- };
- class CQueryPracticeCourseList : public CBaseResponsePackage
- {
- public:
- std::vector<CPracticeCourseInfo> vPracticeCourseInfo;
- };
- class CPracticeRecord
- {
- public:
- QString sCourseCode;// ,
- QString sCourseName;// ,
- QString sEndTime;// ,
- QString sExamName;// ,
- int nFailQuestionNum;// 0,
- __int64 nId;// 0,
- int nNotAnsweredCount;// 0,
- double fObjectiveAccuracy;// 0,
- int nObjectiveNum;// 0,
- QString sStartTime;// ,
- int nSuccQuestionNum;// 0,
- int nTotalQuestionCount;// 0,
- __int64 nUsedExamTime;// 0
- CPracticeRecord()
- {
- sCourseCode = "";
- sCourseName = "";
- sEndTime = "";
- sExamName = "";
- nFailQuestionNum = 0;
- nId = 0;
- nNotAnsweredCount = 0;
- fObjectiveAccuracy = 0;
- nObjectiveNum = 0;
- sStartTime = "";
- nSuccQuestionNum = 0;
- nTotalQuestionCount = 0;
- nUsedExamTime = 0;
- }
- };
- //课程练习记录详情
- class CQueryPracticeRecordList : public CBaseResponsePackage
- {
- public:
- std::vector<CPracticeRecord> vPracticeRecordList;
- };
- class CPracticePaperStructInfo
- {
- public:
- int nCount;
- int nFailQuestionNum;
- int nIndex;
- int nNotAnsweredCount;
- int nQuestionCount;
- QString sQuestionType;
- QString sScore;
- int nSuccQuestionNum;
- QString sTitle;
- double fTotalScore;
- CPracticePaperStructInfo()
- {
- nCount = 0;
- nFailQuestionNum = 0;
- nIndex = 0;
- nNotAnsweredCount = 0;
- nQuestionCount = 0;
- sQuestionType = "";
- sScore = "";
- nSuccQuestionNum = 0;
- sTitle = "";
- fTotalScore = 0;
- }
- };
- //单次练习答题情况统计
- class CGetPracticeDetailInfo : public CBaseResponsePackage
- {
- public:
- QString sCourseCode;
- QString sCourseName;
- __int64 nId;
- double fObjectiveAccuracy;
- std::vector<CPracticePaperStructInfo> vPracticePaperStructList;
- CGetPracticeDetailInfo()
- {
- sCourseCode = "";
- sCourseName = "";
- nId = 0;
- fObjectiveAccuracy = 0;
- }
- };
- //获取当前考试记录信息
- class CFindExamRecordDataEntity : public CBaseResponsePackage
- {
- public:
- __int64 nExamId;
- QString sPaperType;
- CFindExamRecordDataEntity()
- {
- nExamId = 0;
- sPaperType = "";
- }
- };
- //获取交卷之后的所有试题作答信息
- class CAnsweredQuestion
- {
- public:
- QString sAnswerType;// ,
- QString sAudioPlayTimes;// ,
- QString sCorrectAnswer;// ,
- QString sExamQuestionTempId;// ,
- __int64 nExamRecordDataId;// 0,
- bool bIsAnswer;// true,
- bool bIsInMongo;// true,
- bool bIsSign;// true,
- int nMainNumber;// 0,
- std::vector<int> vOptionPermutation;// [],
- int nOrder;// 0,
- QString sQuestionId;// ,
- double fQuestionScore;// 0,
- QString sQuestionType;// ,
- QString sStudentAnswer;// ,
- double fStudentScore;// 0
- bool bHasQuestonInfo;
- CAnsweredQuestion()
- {
- sAnswerType = "";
- sAudioPlayTimes = "";
- sCorrectAnswer = "";
- sExamQuestionTempId = "";
- nExamRecordDataId = 0;
- bIsAnswer = false;
- bIsInMongo = false;
- bIsSign = false;
- nMainNumber = 0;
- nOrder = 0;
- sQuestionId = "";
- fQuestionScore = 0;
- sQuestionType = "";
- sStudentAnswer = "";
- fStudentScore = 0;
- }
- };
- class CGetExamRecordQuestions : public CBaseResponsePackage
- {
- public:
- std::vector<CAnsweredQuestion> vExamRecordQuestions;
- };
- class CGetOfflineCourse : public CBaseResponsePackage
- {
- public:
- std::vector<COfflineCourseInfo> vOfflineCourseInfo;
- };
- class CGetOffLineExamAnswerSheet : public CBaseResponsePackage
- {
- public:
- QString sAnswerSheetUrl;
- CGetOffLineExamAnswerSheet()
- {
- sAnswerSheetUrl = "";
- }
- };//下载离线考试答题纸接口
- class CGetOffLineExamPaper : public CBaseResponsePackage
- {
- public:
- QString sPaperUrl;
- int nRow;
- CGetOffLineExamPaper()
- {
- sPaperUrl = "";
- nRow = 0;
- }
- };
- class CPreviewOffLineExamPaper : public CBaseResponsePackage
- {
- public:
- QString sUrl;
- int nRow;
- CPreviewOffLineExamPaper()
- {
- sUrl = "";
- nRow = -1;
- }
- };
- class CStartOfflineExam : public CBaseResponsePackage
- {
- public:
- int nRow;
- CStartOfflineExam()
- {
- nRow = 0;
- }
- };
- class CSubmitOfflinePaper : public CBaseResponsePackage
- {
- public:
- };
- namespace EXAM_INPROGRESS_ENTER_TYPE
- {
- const QString EIET_COURSE_LIST = "COURSE_LIST";
- const QString EIET_ENTER_EXAM = "ENTER_EXAM";
- }
- class CCheckExamInProgress : public CBaseResponsePackage
- {
- public:
- bool bHasExamInProgress;
- int nInterruptNum;
- int nMaxInterruptNum;
- bool bIsExceed;
- __int64 nExamRecordDataId;
- __int64 nExamId;
- __int64 nUsedTime;
- int nFaceVerifyMinute;
- QString sExamType;
- QString sEnterType;
- CCheckExamInProgress()
- {
- bHasExamInProgress = false;
- nInterruptNum = 0;
- nMaxInterruptNum = 0;
- bIsExceed = false;
- nExamRecordDataId = 0;
- nExamId = 0;
- nUsedTime = 0;
- nFaceVerifyMinute = 0;
- sExamType = "";
- }
- };
- class CGetCourseInfo : public CBaseResponsePackage
- {
- public:
- QString sCourseCode;
- QString sCourseName;
- CGetCourseInfo()
- {
- sCourseCode = "";
- sCourseName = "";
- }
- };
- class CEndExam : public CBaseResponsePackage
- {
- public:
- QString sModuleName;
- bool bForce;
- CEndExam()
- {
- sModuleName = "";
- bForce = false;
- }
- };
- class CGetEndExamInfo : public CBaseResponsePackage
- {
- public:
- __int64 nExamRecordDataId;
- bool bIsWarn;
- double fObjectiveAccuracy;
- double fObjectiveScore;
- bool bIsCalculate;
- CGetEndExamInfo()
- {
- nExamRecordDataId = 0;
- bIsWarn = false;
- fObjectiveAccuracy = 0;
- fObjectiveScore = 0;
- bIsCalculate = false;
- }
- };
- class CExamHeartbeat : public CBaseResponsePackage
- {
- public:
- __int64 nLeftTime;//毫秒
- CExamHeartbeat()
- {
- nLeftTime = 0;
- }
- };
- class CFindExamQuestionList : public CBaseResponsePackage
- {
- public:
- std::vector<CAnsweredQuestion> vAnsweredQuestion;
- };
- namespace QUESTION_TYPE
- {
- const QString SingleChoice = "SINGLE_CHOICE";
- const QString MultipleChoice = "MULTIPLE_CHOICE";
- const QString TrueOrFalse = "TRUE_OR_FALSE";
- const QString FillUp = "FILL_UP";
- const QString Essay = "ESSAY";
- };
- class CSubQuestionStruct
- {
- public:
- std::vector<int> voptionPermutation;
- double fQuestionScore;
- QString sQuestionType;
- QString sAnswerType;
- bool bMarked;
- bool bAnswered;
- int nVersion;
- bool bUpload;
- QString sSubjectiveTempAns;
- QString sUploadAnswer;
- bool bCurrent;
- QString sStudentAnswer;
- int nShowNumber;
- int nOrder;
- QString sBody;
- std::vector<COption> vOptions;
- std::vector<QString> vRightAnswer;
- int nLimitedPlayTimes;
- CSubQuestionStruct()
- {
- fQuestionScore = 0;
- sQuestionType = "";
- sAnswerType = "";
- bMarked = false;
- bAnswered = false;
- nVersion = 0;
- bUpload = true;
- sUploadAnswer = "";
- sSubjectiveTempAns = "";
- bCurrent = false;
- nShowNumber = 0;
- nOrder = 0;
- sBody = "";
- nLimitedPlayTimes = 0;
- }
- };
- class CQuestionStruct
- {
- public:
- QString sQuestionId;
- QString sVersion;
- double fQuestionScore;
- int nLimitedPlayTimes;
- int nPlayedTimes;
- int nTimeLimit;
- bool bHasContent;
- QString sBody;
- bool bhasAudios;
- std::vector<CSubQuestionStruct> vSubQuestionStruct;
- CQuestionStruct()
- {
- sQuestionId = "";
- sVersion = "";
- fQuestionScore = 0;
- nLimitedPlayTimes = 0;
- nPlayedTimes = 0;
- nTimeLimit = 0;
- sBody = "";
- sVersion = "";
- bhasAudios = false;
- bHasContent = false;
- }
- };
- class CPaperGroupStruct
- {
- public:
- QString sGroupName;
- double fGroupScore;
- int nNumber;
- int nTotalSubquestion;
- int nAnsweredCount;
- std::vector<CQuestionStruct> vQuestionStruct;
- CPaperGroupStruct()
- {
- sGroupName = "";
- fGroupScore = 0;
- nNumber = 0;
- nTotalSubquestion = 0;
- nAnsweredCount = 0;
- }
- };
- class CGetExamRecordPaperStruct : public CBaseResponsePackage
- {
- public:
- QString sPaperId;
- QString sPaperName;
- bool bFullyObjective;
- std::vector<CPaperGroupStruct> vPaperGroupStruct;
- CGetExamRecordPaperStruct()
- {
- sPaperId = "";
- sPaperName = "";
- }
- };
- class CGetWXQrCode : public CBaseResponsePackage
- {
- public:
- QString sUrl;
- CGetWXQrCode()
- {
- sUrl = "";
- }
- };
- class CSaveUploadedFileAcknowledgeStatus : public CBaseResponsePackage
- {
- public:
- QString sFileUrl;
- CSaveUploadedFileAcknowledgeStatus()
- {
- sFileUrl = "";
- }
- };
- //class CProcessUpload : public CBaseResponsePackage
- //{
- //public:
- // QString sFileUrl;
- // QString sCommonStr;
- // CProcessUpload()
- // {
- // sFileUrl = "";
- // }
- //};
- class CGetOrgPropertiesByGroupWithoutCache : public CBaseResponsePackage
- {
- public:
- int nActionNum;
- QString sActionOptions;//SHAKE,BLINK,NOD
- QString sActionOrder;//FIXED
- int nActionDuration;//单个动作最大时长
- int nActionAlert;//指定动作检测提醒N秒后开始检测
- int nAllActionDuration;//整体动作时长
- int nFaceThreshold; //人脸比对阈值
- CGetOrgPropertiesByGroupWithoutCache()
- {
- nActionNum = 0;
- sActionOptions = "";
- sActionOrder = "";
- nActionDuration = 0;
- nActionAlert = 15;
- nAllActionDuration = 120;
- nFaceThreshold = 50;
- }
- };
- class CStartFaceLiveVerify : public CBaseResponsePackage
- {
- public:
- __int64 nFaceLiveVerifyId;
- int nStartMinute;
- int nTimes;
- CStartFaceLiveVerify()
- {
- nFaceLiveVerifyId = 0;
- nStartMinute = 0;
- nTimes = 0;
- }
- };
- class CClientExamProcessUploadSign : public CBaseResponsePackage
- {
- public:
- QString sCommonStr = "";
- QString sFilePath = "";
- QString sType = "";
- QString sAccessUrl = "";
- QString sSignIdentifier = "";
- QString sFormUrl = "";
- QString sOssAcessKeyId = "";
- QString sSignature = "";
- QString sKey = "";
- QString sPolicy = "";
- };
- class CUploadFileToAliyun : public CBaseResponsePackage
- {
- public:
- QString sCommonStr = "";
- QString sFileUrl = "";
- };
- class CSkipFaceCheckParam : public CBaseResponsePackage
- {
- public:
- bool bSkipFaceCheck = false;
- };
- class CGetWXUploadedFile : public CBaseResponsePackage
- {
- public:
- __int64 nExamRecordDataId = 0;
- int nQuestionOrder = 0;
- QString sFilePath = "";
- QString sStatus = "";
- QString sTransferFileType = "";
- };
- #endif // HTTPDATADEF_H
|