123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- import 'dart:io';
- import 'package:dio/dio.dart';
- import 'package:lszlgl/model/api_rsp.dart';
- import 'package:lszlgl/model/req/login_req.dart';
- import 'package:lszlgl/model/rsp/deviation_loaction_rsp.dart';
- import 'package:lszlgl/model/rsp/dict_rsp.dart';
- import 'package:lszlgl/model/rsp/login_rsp.dart';
- import 'package:lszlgl/model/rsp/sample_task_rsp.dart';
- import 'package:lszlgl/model/rsp/stock_points_rsp.dart';
- import 'package:lszlgl/model/rsp/storehouse_rsp.dart';
- import 'package:lszlgl/model/rsp/user_rsp.dart';
- import 'package:lszlgl/network/base_dio.dart';
- import 'package:retrofit/http.dart';
- import 'package:retrofit/retrofit.dart';
- import '../model/req/device_req.dart';
- import '../model/rsp/district_rsp.dart';
- part 'api.g.dart';
- @RestApi()
- abstract class Api {
- factory Api({Dio? dio, String? baseUrl}) {
- dio ??= BaseDio.get().dio;
- return _Api(dio, baseUrl: baseUrl);
- }
- /// 登录
- @POST('/admin-api/system/auth/login')
- Future<ApiRsp<LoginRsp>> login(@Body() LoginReq req);
- /// 个人信息
- @GET('/admin-api/system/user/profile/get')
- Future<ApiRsp<UserRsp>> userProfile();
- /// 修改用户个人密码
- /// * [oldPassword] 旧密码
- /// * [newPassword] 新密码
- @PUT('/admin-api/system/user/profile/update-password')
- Future<ApiRsp<bool>> updatePassword(@Body() Map<String, dynamic> map);
- /// 获取仓库详细信息
- @GET('/admin-api/coding/fmxx/queryLsxxList')
- Future<ApiRsp<List<storehouseRsp>>> getStoreMessage(@Query('ajbm') String ajbm,@Query('key') String key);
- /// 获取所有字典
- @GET('/admin-api/system/dict-data/simple-list')
- Future<ApiRsp<List<DictRsp>>> getAllDict();
- /// 扦样任务单列表
- @GET('/admin-api/zj/code-sampling-task-details-sgjc/sampling_task_detail_page')
- Future<ApiRsp<SampleTaskListRsp>> sampleTaskList(@Queries() Map<String, dynamic> map);
- /// 获取app下载地址
- @GET('/admin-api/zj/base-file/getAppDownLoadUrl')
- Future<ApiRsp<String?>> getAppDownloadUrl();
- /// 获取app下载地址 和 更新内容
- @GET('/admin-api/zj/base-file/getAppDownLoadUrlAndName')
- Future<ApiRsp<UrlItem?>> getAppDownLoadUrlAndName();
- /// 扦样任务单更新-收购
- @PUT('/admin-api/zj/code-sampling-task-details-sgjc/update')
- Future<ApiRsp<DeviationLoactionRsp?>> updateSampleTaskSgjc(@Body() Map<String, dynamic> map);
- /// 扦样任务单更新-库存
- @PUT('/admin-api/zj/code-sampling-task-details-kcjc/update')
- Future<ApiRsp<bool?>> updateSampleTaskKcjc(@Body() Map<String, dynamic> map);
- /// 扦样任务单详情-收购
- @GET('/admin-api/zj/code-sampling-task-details-sgjc/getSamplingTaskDetails')
- Future<ApiRsp<SampleTaskItem?>> sampleTaskDetailSgjc(@Query('id') num id);
- /// 扦样任务单详情-库存
- @GET('/admin-api/zj/code-sampling-task-details-kcjc/get')
- Future<ApiRsp<SampleTaskItemKcjcRsp?>> sampleTaskDetailKcjc(@Query('id') num id);
- /// 土壤信息列表
- @GET('/admin-api/zj/base-soil-information/trxxxz')
- Future<ApiRsp<List<TrxxRsp>?>> trxxList();
- /// 粮食信息列表
- @GET('/admin-api/zj/base-grain-information/lsxxfl')
- Future<ApiRsp<List<LsxxRsp>?>> lsxxList(@Query('zlmc') String zlmc);
- /// 领取扦样任务单-收购
- @GET('/admin-api/zj/code-sampling-task-details-sgjc/updateStatus')
- Future<ApiRsp<num?>> receiveSampleTaskSgjc(@Query('id') num id);
- /// 获得扦样机构对应的人员信息
- @GET('/admin-api/zj/base-personnel/selectByJhcyjg')
- Future<ApiRsp<List<PersonRsp>?>> getPersonMenu(@Query('jhcyjg') num jhcyjg);
- /// 省市县
- @GET('/admin-api/zj/base-administrative-division/list')
- Future<ApiRsp<List<DistrictRsp>?>> districtList(
- @Query('uLevel') num uLevel, {
- @Query('id') num? id,
- });
- /// 上传图片
- @POST('/admin-api/infra/file/upload')
- Future<ApiRsp<String?>> upload(@Part(name: 'file') File file);
- /// 提交设备绑定信息
- @POST('/admin-api/zj/base-device/createBatch')
- Future<ApiRsp> postDeviceInfos(@Body() List<DeviceReq> req);
-
- /// 获取手机验证码
- @POST('/admin-api/system/auth/reset_password_send_sms_code')
- Future<ApiRsp<bool?>> postPhoneMsg(@Body() Map<String, dynamic> map);
- ///忘记密码
- @POST('/admin-api/system/auth/reset_password')
- Future<ApiRsp<bool?>> resetPassword(@Body() Map<String, dynamic> map);
- /// 库存取样点
- @GET('/admin-api/zj/kcqydsyt-fsc/flat-sampling-points')
- Future<ApiRsp<List<StockPointsRsp>?>> stockPoints({
- @Query('width') double? width,
- @Query('length') double? length,
- @Query('height') double? height,
- @Query('partitionSize') double? partitionSize,
- @Query('randomOffset') bool? randomOffset,
- @Query('offsetRange') double? offsetRange,
- });
- /// 已扦样信息修改
- @PUT('/admin-api/zj/code-sampling-task-details-sgjc/appSgjcUpdate')
- Future<ApiRsp<bool?>> changeSampleTaskKcjc(@Body() Map<String, dynamic> map);
- }
|