1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #pragma once
- #include "DataBaseHolder.h"
- #include "scan_common.h"
- class CBasicDataDownloader:public CDataBaseHolder,private IService
- {
- public:
- //数据状态
- enum DATA_STATE{
- //未工作
- DS_UNWORKING,
- //加载中
- DS_LOADING,
- //加载出错
- DS_ERROR,
- //加载完成
- DS_COMPLETE
- };
- //BasicDataDownloader错误代码
- enum BDD_ERROR_CODE{
- //正常
- BDD_ERROR_CODE_NORMAL,
- //请求失败
- BDD_ERROR_CODE_REQUEST_FAILTURE,
- //服务器发生错误
- BDD_ERROR_CODE_SERVER_ERROR,
- //试卷状态不正确
- BDD_ERROR_CODE_PAPER_STATE_ERROR,
- };
- public:
- CBasicDataDownloader(void);
- ~CBasicDataDownloader(void);
- //下载题型数据
- int download_question_std(CString examId,CString examCourseId);
- DATA_STATE GetDataState(){return m_data_state;}
- std::string GetExamName();
- std::string GetCourseCode();
- int GetErrorCode();
- std::string GetErrorMsg();
- protected:
- virtual ServiceState OnRunning(void);
- private:
- int download_question_std0( CString examId,CString examCourseId );
- DATA_STATE m_data_state;//数据状态
- enum TaskType{
- DOWNLOAD_QUESTION_STD,
- DOWNLOAD_SAME_CLASS_STUDENT
- } m_task_type;
- CString m_examId;
- CString m_exam_number;
- CString m_examCourseId;
- std::string m_exam_name;
- std::string m_course_code;
- BDD_ERROR_CODE m_error_code;
- std::string m_message;
- };
|