71 lines
3.6 KiB
Dart
71 lines
3.6 KiB
Dart
/*
|
|
* @Author: wangyang 1147192855@qq.com
|
|
* @Date: 2022-07-13 11:29:05
|
|
* @LastEditors: wangyang 1147192855@qq.com
|
|
* @LastEditTime: 2022-09-27 17:51:16
|
|
* @FilePath: \marking_app\lib\config\RequestClient.dart
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
*/
|
|
|
|
import 'package:dio/dio.dart';
|
|
import 'package:marking_app/common/model/common/base_page_data_report.dart';
|
|
import 'package:marking_app/common/model/common/base_structure_result_report.dart';
|
|
import 'package:marking_app/common/model/report/marked_item.dart';
|
|
import 'package:marking_app/common/model/report/marked_item_params.dart';
|
|
import 'package:marking_app/common/model/report/report_for_class_teacher_model.dart';
|
|
import 'package:marking_app/common/model/report/report_for_class_teacher_params.dart';
|
|
import 'package:marking_app/common/model/report/report_for_marking_pagerdetail_model.dart';
|
|
import 'package:marking_app/common/model/report/report_for_marking_pagerdetail_params.dart';
|
|
import 'package:marking_app/common/model/report/report_for_subject_student_model.dart';
|
|
import 'package:marking_app/common/model/report/report_for_subject_student_params.dart';
|
|
import 'package:marking_app/common/model/report/report_for_subject_teacher_model.dart';
|
|
import 'package:marking_app/common/model/report/report_for_subject_teacher_params.dart';
|
|
import 'package:marking_app/common/model/report/report_home_model.dart';
|
|
import 'package:marking_app/common/model/user/user_info_report.dart';
|
|
import 'package:retrofit/retrofit.dart' as the_retrofit;
|
|
|
|
part 'rest_client_report.g.dart';
|
|
|
|
@the_retrofit.RestApi()
|
|
@the_retrofit.Headers(<String, dynamic>{"Content-Type": "application/json"})
|
|
abstract class RestClientReport {
|
|
factory RestClientReport(Dio dio, {String baseUrl}) = _RestClientReport;
|
|
|
|
// 报告 => 获取用户信息
|
|
@the_retrofit.GET("/api/user/users/getuserinfo")
|
|
Future<BaseStructureResultReport<UserInfoReport>> getReportSysUserinfo();
|
|
|
|
// 报告 => 用户相关考试列表集合
|
|
@the_retrofit.GET("/api/user/exam/getexamsbyuser")
|
|
Future<BaseStructureResultReport<BasePageDataReport<MarkedItem>>> getexamsbyuser(
|
|
@the_retrofit.Queries() MarkedItemParams params);
|
|
|
|
// 报告 => 用户相关考试列表集合
|
|
@the_retrofit.GET("/api/user/exam/gethomedata")
|
|
Future<BaseStructureResultReport<ReportHomeModel>> getReportHomeData(@the_retrofit.Query("examId") int? examId);
|
|
|
|
// 报告 => 用户相关考试列表集合
|
|
@the_retrofit.POST("/api/user/users/switchposition")
|
|
Future<BaseStructureResultReport<bool>> switchposition(@the_retrofit.Query('positionId') int positionId);
|
|
|
|
// 报告 => 学科老师报告
|
|
@the_retrofit.GET("/api/user/template/getreportteacher")
|
|
Future<BaseStructureResultReport<ReportForSubjectTeacherModel>> getreportsForSubjectTeacher(
|
|
@the_retrofit.Queries() ReportForSubjectTeacherParams params);
|
|
|
|
// 报告 => 学科老师报告
|
|
@the_retrofit.POST("/api/user/template/class/testteport")
|
|
Future<BaseStructureResultReport<ReportForClassTeacherModel>> getreportsForClassTeacher(
|
|
@the_retrofit.Body() ReportForClassTeacherParams params);
|
|
|
|
// 报告 => 学生个人报告
|
|
@the_retrofit.POST("/api/user/template/student/stubjecttestteport")
|
|
Future<BaseStructureResultReport<ReportForSubjectStudentModel>> getReportSubjectStudent(
|
|
@the_retrofit.Body() ReportForSubjectStudentParams params);
|
|
|
|
// 报告 => 查看原卷
|
|
@the_retrofit.POST("/api/user/template/getmarkingpagerdetails")
|
|
Future<BaseStructureResultReport<ReportForMarkingPagerdetailModel>> getMarkingPagerDetails(
|
|
@the_retrofit.Body() ReportForMarkingPagerdetailParams params);
|
|
}
|