123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #pragma once
- #include "Identifor.h"
- #include "scan_common.h"
- #include "..\sqlite\CppSQLite3.h"
- #include "DataBaseHolder.h"
- #include "ScoreCounter.h"
- #include "..\ZLibWrapMemLib\MemZipFile.h"
- #include "basic_struct_result.h"
- #include "..\Schema\schema_struct.h"
- class CIdentifyService;
- class CResultHandler:public IService,public CDataBaseHolder
- {
- public:
- CResultHandler();
- ~CResultHandler();
- void SetIdentifor( CIdentifor* identifor );
- void SetImgClipsDir( CString img_clips_dir ){this->m_img_clips_dir=img_clips_dir;}
- void setHandlInfo(const boost::shared_ptr<const HANDLE_INFO>& handInfo);
- int SetHandlerWnd(HWND hwnd);
- void IdentifyTaskManager(CIdentifyTaskManager* taskManager);
- void SetIdentifyService(CIdentifyService* service);
- void SetErrorHandle(bool bErrorHandle){ m_bErrorHandle = bErrorHandle; }
- protected:
- virtual ServiceState OnRunning( void );
- virtual ServiceState OnStarting( void );
- virtual ServiceState OnStoping( void );
- virtual BOOL SupportPause( void );
- virtual ServiceState OnPausing(void);
- protected:
- int SavePage( OMR_RESULT * omr_result );
- void SavePaper( int handle_count_limit );
- virtual void SaveImages(vector<CUT_AREA_RESULT*> &area_results, CMemZipFile &zip, int subjectID, BOOL bOnlineCard = false, char *strPaperCode = NULL,
- const std::vector<std::string> &postMarkTypeIDVec = std::vector<std::string>(), std::map<std::string, int> &vecTwoPic = std::map<std::string, int>());
- bool existAbsentFlag(OMR_RESULT * omr_result);
- bool existABJuanFlag(OMR_RESULT * omr_result );
- bool existABJuanFlag();
- std::string absentFlag( OMR_RESULT * omr_result );
- std::string ABJuanFlag( OMR_RESULT * omr_result );
- void readOnlineCardPaperId(string strPaperCode, string strStudentId);//读取魔法词汇宝批次id
- void WriteOnlineCardPaperId(CString strPaperCode, wstring& strSubGroupId, wstring strStudentId);//写魔法词汇宝批次id
- protected:
- CIdentifor * m_identifor;
- int m_muban_page_count;
- HWND m_hwnd;
- CScoreCounter scoreCounter;
- BOOL m_isMubanLoaded;
- boost::shared_ptr<const HANDLE_INFO> m_handInfo;
- std::map<int ,const PAGE_RESULT_HANDLE_INFO> m_handInfoMap;
- CString m_img_clips_dir;
- CIdentifyTaskManager* taskManager;
- CIdentifyService * identifyService;
- UnhandledPageInfo * pUnhandledPageInfo;
- std::string m_strQr;
- bool m_bUseQr;
- bool m_bErrorHandle;
- bool m_bOnlineCard;
- bool m_bUseQrCode;//是否使用二维码
- bool m_bIdentifyQrCode;// 是否识别二维码
- bool m_bSvePage;
- bool m_bSend;
- string m_strOnlineCardPaperId;
- public:
- bool readPaperId(CString& strPaperId);
- bool readTimu(CString& strTimu);
- schema::SCHEMA m_schema;
- bool loadSchema();
- void SavePathImg(std::string path, CMemZipFile &zip, int i);
- void logForDbg(string strLog);
- void SetUseQr(bool bUseQr, const std::string&strQr){ m_strQr = strQr; m_bUseQr = bUseQr; }
- string GetOnlineCardPaperId(string strPaperCode, string strStudentId);//获取魔法词汇宝批次id
- public:
- int m_nOnlineScanType;//参数说明:-1 代表原理的在线答题卡扫描 0:代表英语魔法词汇宝扫描
- };
|