meterReading_common_record.get.dart 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. //*****************************************************************
  2. // Generate by vsc-wisdom-flutter-kit
  3. //*****************************************************************
  4. ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/10769](http://yapi.wisdomcity.com.cn/project/40/interface/api/10769)
  5. ///
  6. ///update 2020-10-16 16:32:53
  7. ///
  8. ///根据仪表id获取公共抄表记录
  9. // ignore: library_names
  10. library meterReading_common_record.get;
  11. import 'response_model.dart';
  12. import 'package:dio/dio.dart';
  13. ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/10769](http://yapi.wisdomcity.com.cn/project/40/interface/api/10769)
  14. ///
  15. ///update 2020-10-16 16:32:53
  16. ///
  17. ///根据仪表id获取公共抄表记录
  18. class Interface {
  19. Interface._();
  20. static const String path = '/app/admin/meterReading/common/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/10769
  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. var updatedAt;
  90. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/10769
  91. ///
  92. ///
  93. ///
  94. ///`id`
  95. ///
  96. ///`transcribeDate` 账期
  97. ///
  98. ///`transcribeAmount` 抄表读数
  99. ///
  100. ///`actualAmount` 实际行度
  101. ///
  102. ///`chargeAmount` 计费行度
  103. ///
  104. ///`readerName` 抄表员姓名
  105. $DataModel({
  106. this.id,
  107. this.transcribeDate,
  108. this.transcribeAmount,
  109. this.actualAmount,
  110. this.chargeAmount,
  111. this.readerName,
  112. this.updatedAt,
  113. });
  114. $DataModel.fromJson(json) {
  115. Map<String, dynamic> map = Map.from(json);
  116. this.id = map['id'];
  117. this.transcribeDate = map['transcribeDate'];
  118. this.transcribeAmount = map['transcribeAmount'];
  119. this.actualAmount = map['actualAmount'];
  120. this.chargeAmount = map['chargeAmount'];
  121. this.readerName = map['readerName'];
  122. this.updatedAt = map['updatedAt'];
  123. }
  124. Map<String, dynamic> toJson() {
  125. Map<String, dynamic> json = Map<String, dynamic>();
  126. json['id'] = this.id;
  127. json['transcribeDate'] = this.transcribeDate;
  128. json['transcribeAmount'] = this.transcribeAmount;
  129. json['actualAmount'] = this.actualAmount;
  130. json['chargeAmount'] = this.chargeAmount;
  131. json['readerName'] = this.readerName;
  132. json['updatedAt'] = this.updatedAt;
  133. return Map.from(json);
  134. }
  135. }