#include "stdafx.h" #include "Bantch.h" #include "SmartEvaluationService.h" #include "BatchService.h" extern int g_my_scan_type; CBatch::CBatch(bool bOnlineCard, int nSubjectID, int nOnlineScanType) :service(new CBatchService(bOnlineCard, nSubjectID, nOnlineScanType)) { } CBatch::~CBatch() { LOGI("~CBatch()"); } void CBatch::leaveCurrentBatch() { if (service) service->leaveCurrentBatch(); } string CBatch::GetBatchCode() { return service->GetBatchCode(); } int CBatch::LoadSchema(long long examId, std::string examName, long examCourseId, std::string courseName, const std::string schemaPath, std::string rule/* = ""*/) { return service->LoadSchema(examId, examName, examCourseId, courseName, schemaPath,rule); } int CBatch::ReadyScanEX(FEEDER_TYPE feederType, const ScanParam & param) { return service->ReadyScan(feederType, param); } int CBatch::SetFolderScanDir(const std::string img_dir) { if (1 == g_my_scan_type) { service->loadDuXueFirstMode(); } return service->SetFolderScanDir(img_dir); } int CBatch::GetServiceSate() { return service->GetServiceSate(); } int CBatch::Start() { return service->Start(); } int CBatch::Pause() { return service->Pause(); } int CBatch::Resume() { return service->Resume(); } int CBatch::Stop() { return service->Stop(); } int CBatch::GiveUpCurrentBatch() { return service->GiveUpCurrentBatch(); } int CBatch::StartUploadPaper(HWND hWnd) { return service->StartUploadPaper(hWnd); } int CBatch::ReIdentify(const int paper_id, const std::string& stu_code, const std::vector& params) { return service->ReIdentify(paper_id, stu_code, params); } int CBatch::QueryMubanImgPath(int page_index, std::string& imgPath) { return service->QueryMubanImgPath(page_index, imgPath); } int CBatch::QueryMubanImgCount(int& page_count) { return service->QueryMubanImgCount(page_count); } int CBatch::QueryExptionPaperCount(int & exc_count, int & total_count) { return service->QueryExptionPaperCount(exc_count ,total_count); } int CBatch::QueryExptionTypeInfo(vector & infos) { return service->QueryExptionTypeInfo(infos); } int CBatch::QueryExceptionPaper(const long exception_type, vector &studengList) { return service->QueryExceptionPaper(exception_type, studengList); } int CBatch::QueryNormalPaper(vector &studengList) { return service->QueryNormalPaper(studengList); } int CBatch::QueryPaperDetail(const int paper_id, PAPER_DETAIL &paper_detail, vector &pageList, vector &questionList) { return service->QueryPaperDetail(paper_id, paper_detail, pageList, questionList); } int CBatch::UpdatePaperStudent(const int paper_id, const std::string examinee_id, const std::string student_code, const std::string studentName, const long schoolId, const std::string stuCode, const std::string stuSchoolCode, const std::string className, const std::string gradeName, bool bReIdentify /*= false*/) { return service->UpdatePaperStudent(paper_id, examinee_id, student_code, studentName, schoolId, stuCode, stuSchoolCode, className, gradeName,bReIdentify); } int CBatch::IgnorePaper(const int paper_id) { return service->IgnorePaper(paper_id); } int CBatch::IgnoreException(const long exceptions) { return service->IgnoreException(exceptions); } int CBatch::ReplacePaper(const int paper_id, int &paper_id_ret) { return service->ReplacePaper(paper_id, paper_id_ret); } int CBatch::ClearDbTemp() { return service->ClearDbTemp(); } int CBatch::ReplaceAllKaoHaoChongTu(vector &paper_id_List) { return service->ReplaceAllKaoHaoChongTu(paper_id_List); } int CBatch::OnBnClickedButtonStartScan() { return service->Start(); } int CBatch::SetHandlerWnd(HWND hwnd) { return service->SetHandlerWnd(hwnd); } void CBatch::SetDataBaseManager(RTL_CRITICAL_SECTION* database_db_lock, CppSQLite3DB* database_db, int database_id) { service->SetDataBaseManager(database_db_lock, database_db, database_id); } void CBatch::getCurScanExam(std::string exam_code, std::vector> &stuInfo) { service->getCurScanExam(exam_code, stuInfo); } void CBatch::getCoverStuInfoByExamCode(std::string examCode, std::vector &stuInfo) { service->getCoverStuInfoByExamCode(examCode, stuInfo); } void CBatch::RestoreErrorHandleSite(const std::string& task_id, const std::string&type, const std::string& strPath) { service->RestoreErrorHandleSite(task_id,type, strPath); } int CBatch::PreErrorHandleRestoreSite(bool bcontinue, int scan_type, FEEDER_TYPE feederType, const ScanParam & param) { return service->PreErrorHandleRestoreSite(bcontinue,scan_type, feederType, param); } void CBatch::SetErrorHandle(bool bErrorHandle) { return service->SetErrorHandle(bErrorHandle); } void CBatch::InitUploadManager(bool bEanble, bool bCountiue, bool bErrorHanle, bool bOnlineCard, IUploudNotify*pNotify) { service->InitUploadManager(bEanble, bCountiue,bErrorHanle,bOnlineCard, pNotify); } void CBatch::OnScanListFilter(bool bsuccess, int nUploadState) { service->OnScanListFilter(bsuccess,nUploadState); } int CBatch::UploadOnScanCmd(int nCmd, const char*param, void*ret) { return service->UploadOnScanCmd(nCmd, param, ret); } int CBatch::BatchServiceCmd(int cmd, void*param, void*ret) { int nRet = -1; if (service){ nRet = service->BatchServiceCmd(cmd, param,ret); } return nRet; } void CBatch::QuickHandle(bool bGetPath, char*path_nor, int nor_len, char*path_exc, int exc_len) { service->QuickHandle(bGetPath, path_nor, nor_len, path_exc, exc_len); } vector CBatch::GetAllConfictPaper(int student_paper_id, string student_id)//»ñÈ¡³åÍ»ÊÔ¾í { return service->GetAllConfictPaper(student_paper_id, student_id); } int CBatch::ExamineThisScan(PAPER_DETAIL& paper_detail) { return service->ExamineThisScan(paper_detail); } int CBatch::SetAbsentExam(PAPER_DETAIL& paper_detail, int absent) { return service->SetAbsentExam(paper_detail, absent); } int CBatch::QueryKeGuanTiYiChang(const int paper_id, std::vector& keguantiList) { return service->QueryKeGuanTiYiChang(paper_id, keguantiList); } int CBatch::UpdateKeGuanTiYiChang(const int paper_id, std::vector& keguantiList) { return service->UpdateKeGuanTiYiChang(paper_id, keguantiList); }