meterReading_record.get.dart 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. //*****************************************************************
  2. // Generate by vsc-wisdom-flutter-kit
  3. //*****************************************************************
  4. ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/10085](http://yapi.wisdomcity.com.cn/project/40/interface/api/10085)
  5. ///
  6. ///update 2020-10-16 16:5:23
  7. ///
  8. ///根据仪表id获取住户表抄表记录
  9. // ignore: library_names
  10. library meterReading_record.get;
  11. import 'response_model.dart';
  12. import 'package:dio/dio.dart';
  13. ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/10085](http://yapi.wisdomcity.com.cn/project/40/interface/api/10085)
  14. ///
  15. ///update 2020-10-16 16:5:23
  16. ///
  17. ///根据仪表id获取住户表抄表记录
  18. class Interface {
  19. Interface._();
  20. static const String path = '/app/admin/meterReading/record';
  21. static const String method = 'get';
  22. static Future<ResponseModel<ResponsePagingModel<$DataModel>>> request(
  23. Dio dio, {
  24. Options? options,
  25. Map<String, dynamic>? pathParameters,
  26. Map<String, dynamic>? queryParameters,
  27. data,
  28. CancelToken? cancelToken,
  29. ProgressCallback? onSendProgress,
  30. ProgressCallback? onReceiveProgress,
  31. }) async {
  32. final res = await dio.request(
  33. _path(pathParameters ?? {}),
  34. data: data,
  35. queryParameters: queryParameters,
  36. cancelToken: cancelToken,
  37. options: Options(method: 'get'),
  38. onSendProgress: onSendProgress,
  39. onReceiveProgress: onReceiveProgress,
  40. );
  41. return ResponseModel(
  42. json: res.data,
  43. to: (v) => v.toJson(),
  44. from: (v) => ResponsePagingModel(
  45. json: v,
  46. to: (v) => v.toJson(),
  47. from: (v) => $DataModel.fromJson(v),
  48. ),
  49. );
  50. }
  51. static String _path(Map<String, dynamic> pathParameters) {
  52. String back = path;
  53. for (final key in pathParameters.keys) {
  54. back = back.replaceAll('{$key}', pathParameters[key].toString());
  55. }
  56. return back;
  57. }
  58. }
  59. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/10085
  60. ///
  61. ///
  62. ///
  63. ///`id`
  64. ///
  65. ///`transcribeDate` 账期
  66. ///
  67. ///`transcribeAmount` 抄表读数
  68. ///
  69. ///`actualAmount` 实际行度
  70. ///
  71. ///`chargeAmount` 计费行度
  72. ///
  73. ///`readerName` 抄表员姓名
  74. ///
  75. // ignore: camel_case_types
  76. class $DataModel {
  77. ///`id`
  78. String? id;
  79. ///`transcribeDate` 账期
  80. String? transcribeDate;
  81. ///`transcribeAmount` 抄表读数
  82. num? transcribeAmount;
  83. ///`actualAmount` 实际行度
  84. num? actualAmount;
  85. ///`chargeAmount` 计费行度
  86. num? chargeAmount;
  87. ///`readerName` 抄表员姓名
  88. String? readerName;
  89. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/10085
  90. ///
  91. ///
  92. ///
  93. ///`id`
  94. ///
  95. ///`transcribeDate` 账期
  96. ///
  97. ///`transcribeAmount` 抄表读数
  98. ///
  99. ///`actualAmount` 实际行度
  100. ///
  101. ///`chargeAmount` 计费行度
  102. ///
  103. ///`readerName` 抄表员姓名
  104. $DataModel({
  105. this.id,
  106. this.transcribeDate,
  107. this.transcribeAmount,
  108. this.actualAmount,
  109. this.chargeAmount,
  110. this.readerName,
  111. });
  112. $DataModel.fromJson(json) {
  113. Map<String, dynamic> map = Map.from(json);
  114. this.id = map['id'];
  115. this.transcribeDate = map['transcribeDate'];
  116. this.transcribeAmount = map['transcribeAmount'];
  117. this.actualAmount = map['actualAmount'];
  118. this.chargeAmount = map['chargeAmount'];
  119. this.readerName = map['readerName'];
  120. }
  121. Map<String, dynamic> toJson() {
  122. Map<String, dynamic> json = Map<String, dynamic>();
  123. json['id'] = this.id;
  124. json['transcribeDate'] = this.transcribeDate;
  125. json['transcribeAmount'] = this.transcribeAmount;
  126. json['actualAmount'] = this.actualAmount;
  127. json['chargeAmount'] = this.chargeAmount;
  128. json['readerName'] = this.readerName;
  129. return Map.from(json);
  130. }
  131. }