basic_struct.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. #pragma once
  2. #include <string>
  3. #include <vector>
  4. //Examination paper image recognition result
  5. typedef struct
  6. {
  7. std::string stu_name;
  8. std::string stu_code1;
  9. std::string stu_code2;
  10. std::string stu_class;
  11. std::string stu_grade;
  12. std::string stu_state;
  13. }coverStu;
  14. typedef struct
  15. {
  16. std::string stu_no;
  17. std::string stu_type;
  18. int option_cout;
  19. }questionAi;
  20. enum EPIR_RESULT
  21. {
  22. EPIR_SUCCESS,
  23. };
  24. struct img_param{
  25. int paper_id;
  26. int phy_number;
  27. int schema_index;
  28. int x_s[3];
  29. int y_s[3];
  30. int x_m[3];
  31. int y_m[3];
  32. char img_path[512];//画板修改之后的图像
  33. char img_path_src[512];//原始图像
  34. };
  35. struct Cross
  36. {
  37. int x;
  38. int y;
  39. int signal;
  40. double angle;
  41. };
  42. //学生信息
  43. struct STUDENT_INFO{
  44. int _index;
  45. long student_id;
  46. std::string student_name;
  47. std::string class_name;
  48. std::string student_code;
  49. //-1表示没有分数
  50. float score;
  51. long class_id;
  52. //试卷ID 值为-1时表示试卷还没有扫描
  53. int paper_id;
  54. int location_id;//督学卡定位编号
  55. };
  56. //扫描仪信息
  57. struct SCANNER_INFO{
  58. //扫描仪ID
  59. unsigned int Id;
  60. //制造商
  61. char Manufacturer[34];
  62. //产品家族(系列)
  63. char ProductFamily[34];
  64. //产品名称
  65. char ProductName[34];
  66. //协议主版本号
  67. unsigned short ProtocolMajor;
  68. //协议次版本号
  69. unsigned short ProtocolMinor;
  70. };
  71. //异常位移
  72. enum EXCEPTION_SHIFT{
  73. //定位点异常
  74. SHIFT_DINGWEIDIAN =0,
  75. //试卷删除
  76. SHIFT_SHIJUANSHANCHU,
  77. //非法试卷
  78. SHIFT_FEIFASHIJUAN,
  79. //AB卷未识别
  80. SHIFT_ABJUANWEISHIBIE,
  81. //考号待匹配
  82. SHIFT_KAOHAODAIPIPEI,
  83. //考号未识别
  84. SHIFT_KAOHAOWEISHIBIE,
  85. //考号不存在
  86. SHIFT_KAOHAOBUCUNZAI,
  87. //考号冲突
  88. SHIFT_KAOHAOCHONGTU,
  89. //漏涂
  90. SHIFT_LOUTU,
  91. //漏批
  92. SHIFT_LOUPI,
  93. //教师误判(判分超过满分)
  94. SHIFT_WUPAN,
  95. //无法识别主观题
  96. SHIFT_WUFASHIBIE_ZHUGUANTI,
  97. //试卷缺页
  98. SHIFT_SHIJUANQUEYE,
  99. //试卷识别中
  100. SHIFT_SHIJUANCHONGXINSHIBIEZHONG,
  101. //试卷缺考
  102. SHIFT_SHIJUANQUEKAO,
  103. //客观题异常
  104. SHIFT_KEGUANTIYICHANG,
  105. // 被覆盖
  106. SHIFT_COVERD,
  107. //异常状态数
  108. EX_TYPE_COUNT,
  109. };
  110. //异常类型定义
  111. enum EXCEPTION_TYPE{
  112. //正常
  113. EX_NOMARL =0,
  114. //试卷删除
  115. EX_SHIJUANSHANCHU =1<<SHIFT_SHIJUANSHANCHU,
  116. //定位点异常
  117. EX_DINGWEIDIAN =1<<SHIFT_DINGWEIDIAN,
  118. //非法试卷
  119. EX_FEIFASHIJUAN =1<<SHIFT_FEIFASHIJUAN,
  120. //非法试卷
  121. EX_ABJUANWEISHIBIE =1<<SHIFT_ABJUANWEISHIBIE,
  122. //考号待匹配
  123. EX_KAOHAODAIPIPEI =1<<SHIFT_KAOHAODAIPIPEI,
  124. //考号未识别
  125. EX_KAOHAOWEISHIBIE =1<<SHIFT_KAOHAOWEISHIBIE,
  126. //考号不存在
  127. EX_KAOHAOBUCUNZAI =1<<SHIFT_KAOHAOBUCUNZAI,
  128. //考号冲突
  129. EX_KAOHAOCHONGTU =1<<SHIFT_KAOHAOCHONGTU,
  130. //漏涂
  131. EX_LOUTU =1<<SHIFT_LOUTU,
  132. //漏批
  133. EX_LOUPI =1<<SHIFT_LOUPI,
  134. //教师误判(判分超过满分)
  135. EX_WUPAN =1<<SHIFT_WUPAN,
  136. //无法识别主观题
  137. EX_WUFASHIBIE_ZHUGUANTI =1<<SHIFT_WUFASHIBIE_ZHUGUANTI,
  138. //试卷缺页
  139. EX_SHIJUANQUEYE =1<<SHIFT_SHIJUANQUEYE,
  140. //试卷重新识别中
  141. EX_SHIJUANCHONGXINSHIBIEZHONG =1<<SHIFT_SHIJUANCHONGXINSHIBIEZHONG,
  142. //试卷缺考
  143. EX_SHIJUANQUEKAO =1<<SHIFT_SHIJUANQUEKAO,
  144. //客观题异常
  145. EX_KEGUANTIYICHANG =1<<SHIFT_KEGUANTIYICHANG,
  146. };
  147. //异常类型的组合用于某些组合状态
  148. enum MUTIL_EXCEPTION_TYPE{
  149. //考号异常
  150. MEX_KAOHAOYICHANG=EX_KAOHAOWEISHIBIE|EX_KAOHAOCHONGTU|EX_KAOHAOBUCUNZAI,
  151. //识别异常
  152. MEX_SHIBIEYICHANG =EX_DINGWEIDIAN|EX_FEIFASHIJUAN|EX_WUFASHIBIE_ZHUGUANTI|EX_SHIJUANQUEYE,
  153. //归于异常目录的状态
  154. MEX_YICHANG=EX_DINGWEIDIAN|EX_FEIFASHIJUAN|EX_ABJUANWEISHIBIE|EX_KAOHAODAIPIPEI|EX_KAOHAOWEISHIBIE|EX_KAOHAOBUCUNZAI|EX_KAOHAOCHONGTU|EX_WUFASHIBIE_ZHUGUANTI|EX_SHIJUANQUEYE|EX_SHIJUANSHANCHU,
  155. //不可上传的状态
  156. MEX_BUKESHANGCHUANG =EX_DINGWEIDIAN|EX_FEIFASHIJUAN|EX_KAOHAOWEISHIBIE|EX_KAOHAOBUCUNZAI|EX_KAOHAOCHONGTU|EX_KAOHAODAIPIPEI|EX_ABJUANWEISHIBIE|EX_WUFASHIBIE_ZHUGUANTI|EX_SHIJUANQUEYE|EX_SHIJUANCHONGXINSHIBIEZHONG|EX_SHIJUANSHANCHU,
  157. //不可查询分数
  158. MEX_BUKECHAXUNFENSHU=EX_DINGWEIDIAN|EX_FEIFASHIJUAN|EX_WUFASHIBIE_ZHUGUANTI|EX_ABJUANWEISHIBIE|EX_WUFASHIBIE_ZHUGUANTI|EX_SHIJUANQUEYE|EX_SHIJUANCHONGXINSHIBIEZHONG|EX_SHIJUANSHANCHU,
  159. //必须处理的异常类型
  160. MEX_BIXUCHULIYICHANG=EX_DINGWEIDIAN|EX_FEIFASHIJUAN|EX_KAOHAOWEISHIBIE|EX_KAOHAOBUCUNZAI|EX_KAOHAOCHONGTU|EX_WUFASHIBIE_ZHUGUANTI|EX_SHIJUANQUEYE,
  161. //非必须处理异常
  162. MEX_FEIBIXUCHULIYICHANG=EX_LOUTU|EX_LOUPI|EX_WUPAN,
  163. //可以处理异常
  164. MEX_KECHULIYICHANG=EX_DINGWEIDIAN|EX_FEIFASHIJUAN|EX_ABJUANWEISHIBIE|EX_KAOHAOWEISHIBIE|EX_KAOHAOBUCUNZAI|EX_KAOHAOCHONGTU|EX_LOUTU|EX_LOUPI|EX_WUPAN|EX_WUFASHIBIE_ZHUGUANTI|EX_SHIJUANQUEYE,
  165. //正常状态
  166. MEX_ZHENGCHANGLIEBIAO=EX_KAOHAODAIPIPEI|EX_SHIJUANQUEKAO,
  167. //异常状态
  168. MEX_YICHANGCHANGLIEBIAO=EX_DINGWEIDIAN|EX_FEIFASHIJUAN|EX_ABJUANWEISHIBIE|EX_KAOHAOWEISHIBIE|EX_KAOHAOBUCUNZAI|EX_KAOHAOCHONGTU|EX_LOUTU|EX_LOUPI|EX_WUPAN|EX_WUFASHIBIE_ZHUGUANTI|EX_SHIJUANQUEYE,
  169. };
  170. //异常信息
  171. struct EXCEPTION_INFO{
  172. int exception_id;//异常ID
  173. EXCEPTION_TYPE type;//异常类型
  174. int x;//异常区域X坐标
  175. int y;//异常区域Y坐标
  176. int w;//异常区域宽度
  177. int h;//异常区域高度
  178. };
  179. //异常类型信息
  180. struct EXCEPTION_TYPE_INFO{
  181. long exception_type;
  182. char exception_name[20];
  183. int exception_count;
  184. };
  185. //页面详情
  186. struct PAGE_DETAIL{
  187. int page_id;
  188. int page_index;//从1开始的页码
  189. int phy_number;//物理序号
  190. std::string img_path;
  191. std::string img_oldpath;
  192. std::vector<EXCEPTION_INFO> exceptions;
  193. };
  194. //矩形区
  195. struct AI_RET_RECT
  196. {
  197. int x1;
  198. int x2;
  199. int y1;
  200. int y2;
  201. };
  202. enum AI_RECT_TYPEP
  203. { AI_TIANTUKAOHAO,AI_DINGWEIDIAN,AI_DINGWEIQU,AI_JIAOCHADIAN, AI_TIAOXINGMA, AI_QUEKAOBIAOJI, AI_XUANZETI, AI_TIANKONGTI, AI_ZHUGUANTI, AI_XUANZUOTI, AI_XUANZUOTUDIAN, AI_ZHUGUANTI2, AI_QUEKAO };
  204. struct AI_RET_RECT2
  205. {
  206. AI_RECT_TYPEP rect_type;
  207. int x;
  208. int y;
  209. int width;
  210. int height;
  211. int directoin; //方向 180-- 水平 90--垂直
  212. //填涂考号参数
  213. int nCols;//列数
  214. float widthH; //涂点宽度
  215. float gapH;
  216. int nRows; //行数
  217. float widthV; //涂点高度
  218. float gapV;
  219. std::string outputChar;
  220. std::vector<int> tihao;
  221. std::string tihao_aiExamper;
  222. std::vector<float> default_points;
  223. std::vector<float> half_points;
  224. int showMarkTypeIndex;
  225. int postMarkTypeID;
  226. bool isSplit;//分页
  227. int unitID;//分页ID
  228. bool duoxuanti;
  229. };
  230. struct PAPER_DETAIL{
  231. int paper_id;
  232. char examnumber[64];
  233. char student_id[64];
  234. char student_name[64];
  235. char class_name[64];
  236. long exceptionsFlag;
  237. bool has_covered;
  238. float score;
  239. float fullScore;
  240. float fullScoreObjective;
  241. std::vector<EXCEPTION_INFO> exceptions;
  242. int location_id;//督学卡定位编号
  243. int paper_upload_state;
  244. char sz_upload_error_msg[512];
  245. };
  246. //题型枚举
  247. enum QUESTION_TYPE{
  248. xuanze,
  249. panduan,
  250. tiankong,
  251. zhuguanti1
  252. };
  253. enum QUESTION_STATE_FLAG{
  254. QSF_LOUTU=1,
  255. QSF_LOUPI=2,
  256. QSF_WUPAN=3,
  257. QSF_WUFASHIBIE=4,
  258. QSF_UNSELECT =16,
  259. };
  260. //题目状态
  261. enum QUESTION_STATE{
  262. //正常
  263. QUESTION_STATE_NORMAL =0,
  264. //漏涂,该异常现在不会抛出(保留)
  265. QUESTION_STATE_LOUTU =QSF_LOUTU,
  266. //漏批
  267. QUESTION_STATE_LOUPI =QSF_LOUPI,
  268. //误判
  269. QUESTION_STATE_WUPAN =QSF_WUPAN,
  270. //无法识别,该异常现在不会抛出(保留)
  271. QUESTION_STATE_WUFASHIBIE =QSF_WUFASHIBIE,
  272. //未选该题
  273. QUESTION_STATE_UNSELECT =QSF_UNSELECT,
  274. //未选该题并且没涂
  275. QUESTION_STATE_UNSELECT_LOUTU =QSF_UNSELECT|QSF_LOUTU,
  276. //未选该题并且没有识别该题
  277. QUESTION_STATE_UNSELECT_WUFASHIBIE =QSF_UNSELECT|QSF_WUFASHIBIE,
  278. };
  279. //小题详情
  280. struct QUESTION_INFO{
  281. int _index;
  282. //int question_id;
  283. std::string question_code;//题号(只有数字)
  284. std::string answer_std;//标准答案
  285. std::string answer_stu;//学生答案
  286. QUESTION_TYPE question_type; //选择,判断,填空,主管题 0 选择题;1判断题;2填空题;3主观题
  287. int is_mutil;//是否多选
  288. int option_count;//选项数
  289. float score_full;//满分
  290. float score_half;//半对得分
  291. float score_stu;
  292. QUESTION_STATE question_state;//题目状态
  293. };
  294. //题目分组
  295. struct GROUP_QUESTION{
  296. int _index;
  297. int question_type;//题型
  298. std::string question_type_name;//题型名称
  299. std::vector<QUESTION_INFO> questionList;//该类型题目的小题详情
  300. };
  301. struct IDENTIFY_MSG{
  302. //学生ID(为-1时表示学生证号未识别)
  303. long student_id;
  304. //是否已识别
  305. bool identified;
  306. //学生姓名
  307. char student_name[30];
  308. //考号
  309. char examnumber[30];
  310. //班级信息
  311. char class_info[30];
  312. //试卷异常
  313. long exceptions ;
  314. //班级Id
  315. long class_id;
  316. //分数
  317. float score;
  318. //试卷ID
  319. int paper_id;
  320. //班级学生总数(大于0时有效,只在第一次识别该班级考生时有值)
  321. int class_total;
  322. int locationID;//督学卡定位编号
  323. };
  324. struct SCAN_ANALYSIS_MSG{
  325. //考试名称
  326. char exam_name[256];
  327. //科目代码
  328. char course_code[10];
  329. //考试ID(不一定是数字)
  330. char paper_id[20];
  331. };
  332. //识别器错误事件
  333. struct IDENTIFOR_ERROR_MSG{
  334. //类型,目前无需处理
  335. int type ;//2:缺页 3:文件命名长度不一致
  336. //错误消息,目前仅需要弹出消息即可,不涉及后续处理
  337. char msg[256];
  338. };
  339. //图像上传任务状态枚举
  340. enum IMG_UPLOAD_TASK_STATE{
  341. //新任务
  342. UPLOAD_TASK_STATE_NOTSTART,
  343. //上传中
  344. UPLOAD_TASK_STATE_UPLOADING,
  345. //已暂停
  346. UPLOAD_TASK_STATE_PAUSED,
  347. //已完成
  348. UPLOAD_TASK_STATE_COMPLETED
  349. };
  350. struct IMG_UPLOAD_TASK{
  351. //任务ID
  352. int upload_task_id;
  353. //任务名称
  354. char task_name[128];
  355. //扫描时间
  356. char time[32];
  357. //任务状态
  358. IMG_UPLOAD_TASK_STATE upload_task_state;
  359. //已上传数量
  360. int upload_count;
  361. //任务总量
  362. int total_count;
  363. __int64 exam_id;
  364. __int64 exam_course_id;
  365. int scan_type;
  366. __int64 exam_course_id_from;
  367. std::string batch_code_from;
  368. std::string examinne_id_from;
  369. };
  370. /************************************************************************/
  371. /* 试卷送入器类型 */
  372. /* 2014年12月9日16:04:06 */
  373. /* 作者:唐林 */
  374. /************************************************************************/
  375. enum FEEDER_TYPE{
  376. Folder = 1,
  377. Scanner =2,
  378. //Restart =3,
  379. AdjustBatch =4,
  380. AdjustExaminne=5,
  381. ManualMatch =6,
  382. AutoSchemaFlag = 0x100,
  383. FEEDER_TYPE_MASK = AutoSchemaFlag - 1,
  384. AutoSchemaFolder = AutoSchemaFlag | Folder,
  385. AutoSchemaScanner = AutoSchemaFlag | Scanner,
  386. //AutoSchemaRestart = AutoSchemaFlag | Restart,
  387. AutoSchemaAdjustBatch = AutoSchemaFlag | AdjustBatch,
  388. AutoSchemaAdjustExaminne = AutoSchemaFlag | AdjustExaminne,
  389. AutoSchemaManualMatch = AutoSchemaFlag | ManualMatch,
  390. };
  391. struct ScanParam{
  392. __int64 examId;
  393. __int64 examCourseId;
  394. std::string examName;
  395. std::string courseName;
  396. int scanner_id;
  397. std::string img_dir;
  398. __int64 examCourseIdOld;
  399. std::string batch;
  400. std::string examinneid;
  401. };
  402. enum {
  403. IDF_LOAD_SUCCESS =0,
  404. IDF_LOAD_FAILURE =1,
  405. IDF_LOAD_SUB_LEN =16,
  406. IDF_LOAD_SUBMASK =(1<<IDF_LOAD_SUB_LEN)-1,
  407. IDF_LOAD_CLASS_LOAD =0<<IDF_LOAD_SUB_LEN,
  408. IDF_LOAD_CLASS_SCHEMA =1<<IDF_LOAD_SUB_LEN
  409. };
  410. #define BIG_CLASS(v) (v&(~IDF_LOAD_SUBMASK))
  411. #define SUB_CLASS(v) (v&IDF_LOAD_SUBMASK)
  412. enum {
  413. //试卷扫描结果报告(WPARAM 字段为 IDENTIFY_MSG 类型指针)
  414. WM_IDENTIFOR_REPORT=0x0400+61,
  415. //通知试卷状态已经改变 lparam 位试卷ID
  416. WM_IDENTIFOR_PAPER_STATE_CHAGED,
  417. //试卷被覆盖
  418. WM_IDENTIFOR_PAPER_COVERD,
  419. // 覆盖所有考号冲突
  420. WM_IDENTIFOR_PAPER_COVERD_ALL_KAOHAOCHONGTU,
  421. //识别器准备就绪事件
  422. WM_IDENTIFOR_READY,
  423. //识别器启动事件
  424. WM_IDENTIFOR_STARTED,
  425. //识别器停止事件
  426. WM_IDENTIFOR_STOPED ,
  427. //识别器已恢复
  428. WM_IDENTIFOR_RESUMED,
  429. //识别器已暂停
  430. WM_IDENTIFOR_PAUSED,
  431. //试卷结果上传开始
  432. WM_IDENTIFOR_RESULT_UPLOAD_STARTED,
  433. //试卷结果上传进度报告(wParam字段为进度信息0-10000)
  434. WM_IDENTIFOR_RESULT_UPLOAD_PROGRESS,
  435. //试卷结果上传完成
  436. WM_IDENTIFOR_RESULT_UPLOAD_COMPLETED,
  437. //识别器发生错误事件(WPARAM 字段为 IDENTIFOR_ERROR_MSG 类型指针)
  438. WM_IDENTIFOR_ERROR,
  439. //识别器发生错误事件(WPARAM 字段为 SCAN_ANALYSIS_MSG 类型指针)
  440. WM_IDENTIFOR_ANALYSIS,
  441. //识别完成事件
  442. WM_IDENTIFOR_COMPLETE,
  443. //图片上传线程已开始(无参数)
  444. WM_IDENTIFOR_IMG_UPLOAD_STARTED,
  445. //图片上传新任务报告(WPARAM 字段为 IMG_UPLOAD_TASK 类型指针)(这个消息是指新增了一个任务,并未开始上传)
  446. WM_IDENTIFOR_IMG_UPLOAD_NEWTASK,
  447. //图片上传状态报告 (总的状态) WPARAM 字段为 BOOL 类型 TRUE 标准正在上传 否则 等待中
  448. WM_IDENTIFOR_IMG_UPLOAD_STATE,
  449. //图片上传任务状态改变(WPARAM 字段为 IMG_UPLOAD_TASK 类型指针)
  450. WM_IDENTIFOR_IMG_UPLOAD_TASK_STATE,
  451. //图片上传进度报告(WPARAM 字段为 IMG_UPLOAD_TASK 类型指针)
  452. WM_IDENTIFOR_IMG_UPLOAD_TASK_PROGRESS,
  453. //图片上传线程已停止(无参数)
  454. WM_IDENTIFOR_IMG_UPLOAD_STOPED,
  455. //扫描仪连接报告事件(wParam字段为扫描仪id lParam字段为是否[BOOL]成功)
  456. WM_IDENTIFOR_SANNER_CONNECT,
  457. //扫描仪断开连接报告事件(该事件暂时没有使用,保留)
  458. WM_IDENTIFOR_SANNER_DISCONNECT,
  459. //扫描设置结果报告(该事件暂时没有使用,保留)
  460. WM_IDENTIFOR_SANNER_SETTING_RESULT,
  461. //下载图片
  462. WM_IMG_DOWNLOAD_OVER,
  463. WM_IMG_CLOUD_OVER,
  464. //筛选
  465. WM_SCAN_LIST_FILTER,
  466. WM_UPLOAD_ON_CAN_NOTIFY,
  467. WM_QUICK_HANDLE_STOPED,
  468. WM_IS_NOT_SAME_EXAM_ID,
  469. };
  470. enum UPLOAD_ON_SCAN_CMD
  471. {
  472. CMD_UPLOAD_YICHANGEJUAN, // 上传异常卷
  473. CMD_UPLOAD_SUCCESSSJUAN,// 上传成功试卷
  474. CMD_RE_UPLOADERROR,//重传【上传失败】的试卷
  475. CMD_IS_HAS_UPLOADERROR, // 是否有上传失败的记录
  476. CMD_UPLOAD_STOP,
  477. CMD_UPLOAD_START,
  478. CMD_GET_UPLOAD_PROCESS,
  479. CMD_SET_SCAN_STOP_FLAG,
  480. CMD_SEND_UPLAOD_RST_TO_ZXHX,
  481. CMD_START_SCAN,
  482. CMD_DEL_UPLOAD_REPORT,
  483. };
  484. enum BATCH_SRV_CMD
  485. {
  486. BS_CMD_DEL_REDIFY_TMP_IMG,
  487. BS_CMD_GET_BE_COVERD_PAPERS, // 获取被覆盖的试卷信息
  488. BS_CMD_IS_HAS_COVERD, // 是否有被覆盖的
  489. BS_CMD_IS_HAS_KAOHAOCHONGTU, // 是否有考号冲突
  490. BS_CMD_COVERD_ALL_KAOHAOCHONGTU, // 覆盖所有考号冲突
  491. };
  492. struct UploadProcess
  493. {
  494. int m_nErrorUploadSuccess;// 异常卷上传成功数量
  495. int m_nErrorUploadBad; // 异常卷上传失败数量
  496. int m_nErrorUploadTotal; // 异常卷上传总量
  497. int m_nOriUploadSuccess; // 原卷卷上传成功数量
  498. int m_nOriUploadBad; // 原卷卷上传失败数量
  499. int m_nOriUploadTotal; // 答卷上传总量
  500. int m_nRstUploadSuccess; // 答卷卷上传成功数量
  501. int m_nRstUploadBad; // 答卷卷上传失败数量
  502. int m_nRstUploadTotal; // 答卷上传总量
  503. UploadProcess(){
  504. memset(this, 0, sizeof(UploadProcess));
  505. }
  506. };
  507. enum UPLOAD_STATUS{
  508. UPLOAD_SUCCESS,
  509. UPLOAD_ERROR,
  510. UPLOAD_START,
  511. };
  512. struct MY_UPLOAD_REV_INFO{
  513. UPLOAD_STATUS status; //状态
  514. long paperid; //id
  515. };
  516. enum UPLOAD_SHIJUAN_TYPE
  517. {
  518. TYPE_RST, //答卷
  519. TYPE_ORI, // 原卷
  520. TYPE_ERROR, // 异常卷
  521. UPLOAD_PROCESS_RST,
  522. TYPE_END,
  523. };
  524. typedef struct MY_DB_INFO
  525. {
  526. char sUrl[1024];
  527. char sabsentUrl[1024];
  528. char sDbBasePath[520];
  529. char sSeesion[520];
  530. char sExamName[256];
  531. char sSubjectName[256];
  532. int ntype;
  533. int nmode;//模式(0,第三方正常数据,1,第三方异常数据收集)
  534. int course_id;
  535. int bScanType;// 是否是在线答题卡
  536. int total_error; //总共多少份异常
  537. int cur_process_error; // 已经下载了的异常
  538. int upload_ori_success; // 成功上传原卷数量
  539. int upload_rst_success; // 成功上传答卷数量
  540. int upload_error_success; // 成功上传异常卷数量
  541. }my_database_info;
  542. // 该结构用于处理客观题异
  543. struct KEGUANTI_DETAIL{
  544. char question_code[64];
  545. int question_type; // 存的QuestionType枚举的值 0 单选 1 多选 2 判断题
  546. char answer_all[64];
  547. char answer_std[64];
  548. char answer[64];
  549. float score_full;
  550. float score_half;
  551. float score; // 该题得分
  552. std::string question_nick_code;
  553. KEGUANTI_DETAIL()
  554. {
  555. memset(question_code, 0, sizeof(question_code) / sizeof(char));
  556. memset(answer_all, 0, sizeof(answer_all) / sizeof(char));
  557. memset(answer_std, 0, sizeof(answer_std) / sizeof(char));
  558. memset(answer, 0, sizeof(answer) / sizeof(char));
  559. question_type = 0;
  560. score_full = 0;
  561. score_half = 0;
  562. score = 0;
  563. }
  564. };