RQYDTQuestionModule.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. //
  2. // RQYDTQuestionModule.h
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/3/28.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. typedef NS_ENUM(NSUInteger, RQQuestionUpdateViewType) {
  10. /// 默认
  11. RQQuestionUpdateViewType_Default,
  12. /// 下载中
  13. RQQuestionUpdateViewType_Request,
  14. /// 下载结束
  15. RQQuestionUpdateViewType_Complete,
  16. /// 题库下载
  17. RQQuestionUpdateViewType_LibDownload,
  18. /// 解释下载
  19. RQQuestionUpdateViewType_ExplainDownload,
  20. /// 解释下载中
  21. RQQuestionUpdateViewType_ExplainDownloading,
  22. /// 解释下载中
  23. RQQuestionUpdateViewType_ExplainDownloaded,
  24. };
  25. #pragma mark - Model
  26. #import "RQYDTExamRuleModel.h"
  27. #import "RQYDTQuestionModel.h"
  28. #import "RQYDTPointModel.h"
  29. #import "RQHTTPService+RQGetChapterList.h"
  30. #import "RQHTTPService+RQGetUpdateQuestion.h"
  31. #pragma mark - ViewModel
  32. #pragma mark - View
  33. #import "RQUpdateView.h"
  34. #pragma mark - Module
  35. #import "RQExerciseModule.h"
  36. #import "RQYDTUserQuestionModule.h"
  37. #import "RQYDTJSQuestionModule.h"
  38. /// RQCarTypeChangeNotification
  39. FOUNDATION_EXTERN NSString * const RQCarTypeChangeNotification;
  40. #define RQ_YDTQuestion_Module [RQYDTQuestionModule sharedInstance]
  41. NS_ASSUME_NONNULL_BEGIN
  42. @interface RQYDTQuestionModule : NSObject
  43. @property (nonatomic, readwrite, assign) RQHomePageCarType carType;
  44. @property (nonatomic, readwrite, copy) NSString *carTypeStr;
  45. @property (nonatomic, readwrite, assign) RQHomePageSubjectType subject;
  46. @property (nonatomic, readwrite, copy) NSString *subjectStr;
  47. /**用户题库类型。数据库要用的。
  48. */
  49. @property (nonatomic, readwrite, copy) NSString *car_type;
  50. /**是否资格证
  51. */
  52. @property (nonatomic, readwrite, copy) NSString *isZhiGeZheng;
  53. /**科目一的顺序练习题号
  54. */
  55. @property (nonatomic, readwrite, copy) NSString *userSubj1Index;
  56. /**科目四的顺序练习题号
  57. */
  58. @property (nonatomic, readwrite, copy) NSString *userSubj4Index;
  59. /**科目一的背题题号
  60. */
  61. @property (nonatomic, readwrite, copy) NSString *user1Index;
  62. /**科目四的背题题号
  63. */
  64. @property (nonatomic, readwrite, copy) NSString *user4Index;
  65. /**
  66. * 下面全是对题号的记录 客车 货车 摩托车 教练 货运 客运 危险品 出租车
  67. */
  68. @property (nonatomic, readwrite, copy) NSString *A2Subj1Index;
  69. @property (nonatomic, readwrite, copy) NSString *A2Subj4Index;
  70. @property (nonatomic, readwrite, copy) NSString *A1Subj1Index;
  71. @property (nonatomic, readwrite, copy) NSString *A1Subj4Index;
  72. @property (nonatomic, readwrite, copy) NSString *DSubj1Index;
  73. @property (nonatomic, readwrite, copy) NSString *DSubj4Index;
  74. @property (nonatomic, readwrite, copy) NSString *coachIndex;
  75. @property (nonatomic, readwrite, copy) NSString *A1Index;
  76. @property (nonatomic, readwrite, copy) NSString *A2Index;
  77. @property (nonatomic, readwrite, copy) NSString *dangerIndex;
  78. @property (nonatomic, readwrite, copy) NSString *texiIndex;
  79. @property (nonatomic, readwrite, copy) NSString *wycIndex;
  80. /// 科目一顺序练习
  81. @property (nonatomic, readonly, copy) NSArray *subjectOneArr;
  82. /// 科目四顺序练习
  83. @property (nonatomic, readonly, copy) NSArray *subjectFourArr;
  84. /// 单例
  85. + (instancetype) sharedInstance;
  86. /// 更新题库
  87. - (void)rq_updateQuestion;
  88. - (NSInteger)getQuestionVersion;
  89. - (void)saveQuestionsWithSubjectOneArr:(NSArray *)subjectOneArr;
  90. - (void)saveQuestionsWithSubjectFourArr:(NSArray *)subjectFourArr;
  91. - (RQHomePageSubjectType)getSubjectWithSubjectName:(NSString *)subjectName;
  92. - (NSString *)getSubjectNameWithSubject:(RQHomePageSubjectType)subject;
  93. - (NSString *)getCarTypeCNNameWithCarType:(RQHomePageCarType)carType;
  94. - (NSString *)getCar_TypeNameWithCarType:(RQHomePageCarType)carType;
  95. - (NSString *)getCarTypeExamNameWithCarType:(RQHomePageCarType)carType;
  96. - (NSString *)getCarTypeCNTiKuUpdateNameWithCarType:(RQHomePageCarType)carType;
  97. - (RQHomePageCarType)getCarTypeWithCarTypeName:(NSString *)carTypeName;
  98. - (NSArray *)getQuestionWithExerciseType:(RQExerciseType)exerciseType;
  99. - (NSArray *)getQuestionWithSubject:(RQHomePageSubjectType)subject exerciseType:(RQExerciseType)exerciseType;
  100. - (NSArray *)getQuestionWithSubject:(RQHomePageSubjectType)subject exerciseType:(RQExerciseType)exerciseType isNeedMediaData:(BOOL)isNeedMediaData;
  101. - (NSInteger)getQuestionNumWithWithSubject:(RQHomePageSubjectType)subject exerciseType:(RQExerciseType)exerciseType;
  102. /// 章节练习
  103. - (NSArray *)getChapterArr;
  104. - (NSArray *)getChapterQuestionWithChapterName:(NSString *)chapterName;
  105. - (NSArray *)getChapterQuestionWithChapterName:(NSString *)chapterName exerciseType:(RQExerciseType)exerciseType;
  106. /// 强化练习(考点)
  107. - (NSArray *)getPoint;
  108. - (NSArray *)getPointQuestionWithPointID:(NSInteger)pointId;
  109. - (NSArray *)getPointQuestionWithPointID:(NSInteger)pointId exerciseType:(RQExerciseType)exerciseType;
  110. - (BOOL)isNewRuleQuestionWithQuestionId:(NSInteger)questionId;
  111. - (NSData *)getMediaDataWithMediaName:(NSString *)mediaName;
  112. /// 做到哪一题
  113. - (NSInteger)getHistoryQuestionNum;
  114. - (void)saveHistoryQuestionNumWithQuestionId:(NSInteger)questionId;
  115. @end
  116. NS_ASSUME_NONNULL_END