meterReading_common.get.dart 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. //*****************************************************************
  2. // Generate by vsc-wisdom-flutter-kit
  3. //*****************************************************************
  4. ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/10067](http://yapi.wisdomcity.com.cn/project/40/interface/api/10067)
  5. ///
  6. ///update 2020-10-14 17:43:33
  7. ///
  8. ///公共表列表
  9. // ignore: library_names
  10. library meterReading_common.get;
  11. import 'response_model.dart';
  12. import 'package:dio/dio.dart';
  13. ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/10067](http://yapi.wisdomcity.com.cn/project/40/interface/api/10067)
  14. ///
  15. ///update 2020-10-14 17:43:33
  16. ///
  17. ///公共表列表
  18. class Interface {
  19. Interface._();
  20. static const String path = '/app/admin/meterReading/common';
  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/10067
  60. ///
  61. ///
  62. ///
  63. ///`id` id
  64. ///
  65. ///`readerDate` 抄表日期
  66. ///
  67. ///`communityId` 小区id
  68. ///
  69. ///`buildId` 楼栋id
  70. ///
  71. ///`buildName` 楼栋名称
  72. ///
  73. ///`unitId` 单元id
  74. ///
  75. ///`unitName` 单元名称
  76. ///
  77. ///`meterName` 仪表名称
  78. ///
  79. ///`meterType` 表类型枚举
  80. ///
  81. ///`meterCode` 表编号
  82. ///
  83. ///`initalAmount` 初始读数
  84. ///
  85. ///`backhaulAmount` 仪表回程(最大读数)
  86. ///
  87. ///`multiple` 倍数
  88. ///
  89. ///`lastAmount` 上次最新读数
  90. ///
  91. ///`transcribes` 本期是否抄表
  92. ///
  93. ///`transcribeDate`
  94. ///
  95. ///`isVirtual` 是否虚拟表(默认为0 ;0:否 1:是)
  96. ///
  97. ///`lastActualAmount` 实际行度
  98. ///
  99. // ignore: camel_case_types
  100. class $DataModel {
  101. ///`id` id
  102. String? id;
  103. ///`readerDate` 抄表日期
  104. String? readerDate;
  105. ///`communityId` 小区id
  106. String? communityId;
  107. ///`buildId` 楼栋id
  108. String? buildId;
  109. ///`buildName` 楼栋名称
  110. String? buildName;
  111. ///`unitId` 单元id
  112. String? unitId;
  113. ///`unitName` 单元名称
  114. String? unitName;
  115. ///`meterName` 仪表名称
  116. String? meterName;
  117. ///`meterType` 表类型枚举
  118. String? meterType;
  119. ///`meterCode` 表编号
  120. String? meterCode;
  121. ///`initalAmount` 初始读数
  122. num? initalAmount;
  123. ///`backhaulAmount` 仪表回程(最大读数)
  124. num? backhaulAmount;
  125. ///`multiple` 倍数
  126. num? multiple;
  127. ///`lastAmount` 上次最新读数
  128. num? lastAmount;
  129. ///`transcribes` 本期是否抄表
  130. bool? transcribes;
  131. ///`transcribeDate`
  132. String? transcribeDate;
  133. ///`isVirtual` 是否虚拟表(默认为0 ;0:否 1:是)
  134. bool? isVirtual;
  135. ///`lastActualAmount` 实际行度
  136. num? lastActualAmount;
  137. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/10067
  138. ///
  139. ///
  140. ///
  141. ///`id` id
  142. ///
  143. ///`readerDate` 抄表日期
  144. ///
  145. ///`communityId` 小区id
  146. ///
  147. ///`buildId` 楼栋id
  148. ///
  149. ///`buildName` 楼栋名称
  150. ///
  151. ///`unitId` 单元id
  152. ///
  153. ///`unitName` 单元名称
  154. ///
  155. ///`meterName` 仪表名称
  156. ///
  157. ///`meterType` 表类型枚举
  158. ///
  159. ///`meterCode` 表编号
  160. ///
  161. ///`initalAmount` 初始读数
  162. ///
  163. ///`backhaulAmount` 仪表回程(最大读数)
  164. ///
  165. ///`multiple` 倍数
  166. ///
  167. ///`lastAmount` 上次最新读数
  168. ///
  169. ///`transcribes` 本期是否抄表
  170. ///
  171. ///`transcribeDate`
  172. ///
  173. ///`isVirtual` 是否虚拟表(默认为0 ;0:否 1:是)
  174. ///
  175. ///`lastActualAmount` 实际行度
  176. $DataModel({
  177. this.id,
  178. this.readerDate,
  179. this.communityId,
  180. this.buildId,
  181. this.buildName,
  182. this.unitId,
  183. this.unitName,
  184. this.meterName,
  185. this.meterType,
  186. this.meterCode,
  187. this.initalAmount,
  188. this.backhaulAmount,
  189. this.multiple,
  190. this.lastAmount,
  191. this.transcribes,
  192. this.transcribeDate,
  193. this.isVirtual,
  194. this.lastActualAmount,
  195. });
  196. $DataModel.fromJson(json) {
  197. Map<String, dynamic> map = Map.from(json);
  198. this.id = map['id'];
  199. this.readerDate = map['readerDate'];
  200. this.communityId = map['communityId'];
  201. this.buildId = map['buildId'];
  202. this.buildName = map['buildName'];
  203. this.unitId = map['unitId'];
  204. this.unitName = map['unitName'];
  205. this.meterName = map['meterName'];
  206. this.meterType = map['meterType'];
  207. this.meterCode = map['meterCode'];
  208. this.initalAmount = map['initalAmount'];
  209. this.backhaulAmount = map['backhaulAmount'];
  210. this.multiple = map['multiple'];
  211. this.lastAmount = map['lastAmount'];
  212. this.transcribes = map['transcribes'];
  213. this.transcribeDate = map['transcribeDate'];
  214. this.isVirtual = map['isVirtual'];
  215. this.lastActualAmount = map['lastActualAmount'];
  216. }
  217. Map<String, dynamic> toJson() {
  218. Map<String, dynamic> json = Map<String, dynamic>();
  219. json['id'] = this.id;
  220. json['readerDate'] = this.readerDate;
  221. json['communityId'] = this.communityId;
  222. json['buildId'] = this.buildId;
  223. json['buildName'] = this.buildName;
  224. json['unitId'] = this.unitId;
  225. json['unitName'] = this.unitName;
  226. json['meterName'] = this.meterName;
  227. json['meterType'] = this.meterType;
  228. json['meterCode'] = this.meterCode;
  229. json['initalAmount'] = this.initalAmount;
  230. json['backhaulAmount'] = this.backhaulAmount;
  231. json['multiple'] = this.multiple;
  232. json['lastAmount'] = this.lastAmount;
  233. json['transcribes'] = this.transcribes;
  234. json['transcribeDate'] = this.transcribeDate;
  235. json['isVirtual'] = this.isVirtual;
  236. json['lastActualAmount'] = this.lastActualAmount;
  237. return Map.from(json);
  238. }
  239. }