meterReading_house.get.dart 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. //*****************************************************************
  2. // Generate by vsc-wisdom-flutter-kit
  3. //*****************************************************************
  4. ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/9806](http://yapi.wisdomcity.com.cn/project/40/interface/api/9806)
  5. ///
  6. ///update 2020-10-14 17:43:17
  7. ///
  8. ///住户表列表
  9. // ignore: library_names
  10. library meterReading_house.get;
  11. import 'response_model.dart';
  12. import 'package:dio/dio.dart';
  13. ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/9806](http://yapi.wisdomcity.com.cn/project/40/interface/api/9806)
  14. ///
  15. ///update 2020-10-14 17:43:17
  16. ///
  17. ///住户表列表
  18. class Interface {
  19. Interface._();
  20. static const String path = '/app/admin/meterReading/house';
  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 _options = options != null ? options.copyWith(method: method) : null;
  33. final res = await dio.request(
  34. _path(pathParameters ?? {}),
  35. data: data,
  36. queryParameters: queryParameters,
  37. cancelToken: cancelToken,
  38. options: Options(method: 'get'),
  39. onSendProgress: onSendProgress,
  40. onReceiveProgress: onReceiveProgress,
  41. );
  42. return ResponseModel(
  43. json: res.data,
  44. to: (v) => v.toJson(),
  45. from: (v) => ResponsePagingModel(
  46. json: v,
  47. to: (v) => v.toJson(),
  48. from: (v) => $DataModel.fromJson(v),
  49. ),
  50. );
  51. }
  52. static String _path(Map<String, dynamic> pathParameters) {
  53. String back = path;
  54. for (final key in pathParameters.keys) {
  55. back = back.replaceAll('{$key}', pathParameters[key].toString());
  56. }
  57. return back;
  58. }
  59. }
  60. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806
  61. ///
  62. ///
  63. ///
  64. ///`roomNo`
  65. ///
  66. ///`meterHouseInfos`
  67. ///
  68. // ignore: camel_case_types
  69. class $DataModel {
  70. ///`roomNo`
  71. late String roomNo;
  72. ///`meterHouseInfos`
  73. late List<$JuniorMeterHouseInfosModel> meterHouseInfos;
  74. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806
  75. ///
  76. ///
  77. ///
  78. ///`roomNo`
  79. ///
  80. ///`meterHouseInfos`
  81. $DataModel({
  82. required this.roomNo,
  83. required this.meterHouseInfos,
  84. });
  85. $DataModel.fromJson(json) {
  86. Map<String, dynamic> map = Map.from(json);
  87. this.roomNo = map['roomNo'];
  88. if (map['meterHouseInfos'] != null)
  89. this.meterHouseInfos = List.of(map['meterHouseInfos'])
  90. .map((e) => $JuniorMeterHouseInfosModel.fromJson(e ?? {}))
  91. .toList();
  92. }
  93. Map<String, dynamic> toJson() {
  94. Map<String, dynamic> json = Map<String, dynamic>();
  95. json['roomNo'] = this.roomNo;
  96. json['meterHouseInfos'] =
  97. this.meterHouseInfos.map((e) => e.toJson()).toList();
  98. return Map.from(json);
  99. }
  100. }
  101. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806
  102. ///
  103. ///
  104. ///
  105. ///`id`
  106. ///
  107. ///`houseId` 房屋id
  108. ///
  109. ///`roomNo` 房屋名称
  110. ///
  111. ///`meterName` 仪表名称
  112. ///
  113. ///`meterType` 表类型枚举
  114. ///
  115. ///`meterCode` 表编号
  116. ///
  117. ///`initalAmount` 初始读数
  118. ///
  119. ///`backhaulAmount` 仪表回程(最大读数)
  120. ///
  121. ///`multiple` 倍数
  122. ///
  123. ///`lastAmount` 上次最新读数
  124. ///
  125. ///`transcribes` 本期是否抄表
  126. ///
  127. ///`transcribeDate` 表时间
  128. ///
  129. ///`readerDate` 抄表日期
  130. ///
  131. ///`lastActualAmount` 实际行度
  132. ///
  133. // ignore: camel_case_types
  134. class $JuniorMeterHouseInfosModel {
  135. ///`id`
  136. String? id;
  137. ///`houseId` 房屋id
  138. String? houseId;
  139. ///`roomNo` 房屋名称
  140. String? roomNo;
  141. ///`meterName` 仪表名称
  142. String? meterName;
  143. ///`meterType` 表类型枚举
  144. $JuniorMeterTypeModel? meterType;
  145. ///`meterCode` 表编号
  146. String? meterCode;
  147. ///`initalAmount` 初始读数
  148. num? initalAmount;
  149. ///`backhaulAmount` 仪表回程(最大读数)
  150. num? backhaulAmount;
  151. ///`multiple` 倍数
  152. num? multiple;
  153. ///`lastAmount` 上次最新读数
  154. num? lastAmount;
  155. ///`transcribes` 本期是否抄表
  156. bool? transcribes;
  157. ///`transcribeDate` 表时间
  158. String? transcribeDate;
  159. ///`readerDate` 抄表日期
  160. String? readerDate;
  161. ///`lastActualAmount` 实际行度
  162. num? lastActualAmount;
  163. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806
  164. ///
  165. ///
  166. ///
  167. ///`id`
  168. ///
  169. ///`houseId` 房屋id
  170. ///
  171. ///`roomNo` 房屋名称
  172. ///
  173. ///`meterName` 仪表名称
  174. ///
  175. ///`meterType` 表类型枚举
  176. ///
  177. ///`meterCode` 表编号
  178. ///
  179. ///`initalAmount` 初始读数
  180. ///
  181. ///`backhaulAmount` 仪表回程(最大读数)
  182. ///
  183. ///`multiple` 倍数
  184. ///
  185. ///`lastAmount` 上次最新读数
  186. ///
  187. ///`transcribes` 本期是否抄表
  188. ///
  189. ///`transcribeDate` 表时间
  190. ///
  191. ///`readerDate` 抄表日期
  192. ///
  193. ///`lastActualAmount` 实际行度
  194. $JuniorMeterHouseInfosModel({
  195. this.id,
  196. this.houseId,
  197. this.roomNo,
  198. this.meterName,
  199. this.meterType,
  200. this.meterCode,
  201. this.initalAmount,
  202. this.backhaulAmount,
  203. this.multiple,
  204. this.lastAmount,
  205. this.transcribes,
  206. this.transcribeDate,
  207. this.readerDate,
  208. this.lastActualAmount,
  209. });
  210. $JuniorMeterHouseInfosModel.fromJson(json) {
  211. Map<String, dynamic> map = Map.from(json);
  212. this.id = map['id'];
  213. this.houseId = map['houseId'];
  214. this.roomNo = map['roomNo'];
  215. this.meterName = map['meterName'];
  216. if (map['meterType'] != null)
  217. this.meterType = $JuniorMeterTypeModel.fromJson(map['meterType']);
  218. this.meterCode = map['meterCode'];
  219. this.initalAmount = map['initalAmount'];
  220. this.backhaulAmount = map['backhaulAmount'];
  221. this.multiple = map['multiple'];
  222. this.lastAmount = map['lastAmount'];
  223. this.transcribes = map['transcribes'];
  224. this.transcribeDate = map['transcribeDate'];
  225. this.readerDate = map['readerDate'];
  226. this.lastActualAmount = map['lastActualAmount'];
  227. }
  228. Map<String, dynamic> toJson() {
  229. Map<String, dynamic> json = Map<String, dynamic>();
  230. json['id'] = this.id;
  231. json['houseId'] = this.houseId;
  232. json['roomNo'] = this.roomNo;
  233. json['meterName'] = this.meterName;
  234. json['meterType'] = this.meterType?.toJson();
  235. json['meterCode'] = this.meterCode;
  236. json['initalAmount'] = this.initalAmount;
  237. json['backhaulAmount'] = this.backhaulAmount;
  238. json['multiple'] = this.multiple;
  239. json['lastAmount'] = this.lastAmount;
  240. json['transcribes'] = this.transcribes;
  241. json['transcribeDate'] = this.transcribeDate;
  242. json['readerDate'] = this.readerDate;
  243. json['lastActualAmount'] = this.lastActualAmount;
  244. return Map.from(json);
  245. }
  246. }
  247. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806
  248. ///
  249. ///表类型枚举
  250. ///
  251. ///`code`
  252. ///
  253. ///`name`
  254. ///
  255. // ignore: camel_case_types
  256. class $JuniorMeterTypeModel {
  257. ///`code`
  258. String? code;
  259. ///`name`
  260. String? name;
  261. ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806
  262. ///
  263. ///表类型枚举
  264. ///
  265. ///`code`
  266. ///
  267. ///`name`
  268. $JuniorMeterTypeModel({
  269. this.code,
  270. this.name,
  271. });
  272. $JuniorMeterTypeModel.fromJson(json) {
  273. Map<String, dynamic> map = Map.from(json);
  274. this.code = map['code'];
  275. this.name = map['name'];
  276. }
  277. Map<String, dynamic> toJson() {
  278. Map<String, dynamic> json = Map<String, dynamic>();
  279. json['code'] = this.code;
  280. json['name'] = this.name;
  281. return Map.from(json);
  282. }
  283. }