patrol_response_entity.dart 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. import 'package:deus_app/generated/json/base/json_convert_content.dart';
  2. import 'package:json2dart_safe/json2dart.dart';
  3. class PatrolJobDataResponseEntity
  4. with JsonConvert<PatrolJobDataResponseEntity> {
  5. late int code;
  6. late PatrolJobDataVO data;
  7. late String msg;
  8. }
  9. class PatrolJobDataVO with JsonConvert<PatrolJobDataVO> {
  10. late PatrolJobData query;
  11. late List<PatrolJobData> list;
  12. }
  13. class PatrolJobDetailResponseEntity
  14. with JsonConvert<PatrolJobDetailResponseEntity> {
  15. late int code;
  16. late PatrolJobDetailData data;
  17. late String msg;
  18. }
  19. class PatrolJobDeviceResponseData with JsonConvert<PatrolJobDeviceData> {
  20. late int code;
  21. late List<PatrolJobDeviceData> data;
  22. late String msg;
  23. }
  24. class PatrolJobItemResponseData with JsonConvert<PatrolJobItemData> {
  25. late int code;
  26. late List<PatrolJobItemData> data;
  27. late String msg;
  28. }
  29. class PatrolJobDeviceData with JsonConvert<PatrolJobDeviceData> {
  30. late int id;
  31. late String name;
  32. late String showName;
  33. late String deviceKey;
  34. late String itemCompleteTime;
  35. late String itemPerson;
  36. PatrolJobDeviceData(this.name, this.showName, this.deviceKey,
  37. this.itemCompleteTime, this.itemPerson);
  38. }
  39. class PatrolJobDetailData with JsonConvert<PatrolJobDetailData> {
  40. late String name;
  41. late String number;
  42. late String planName;
  43. late String planNumber;
  44. late int termType;
  45. late String startDate;
  46. late String endDate;
  47. late String personnel;
  48. late String finishTime;
  49. late int status;
  50. late String remark;
  51. late List<PatrolJobImageData> fileUrls;
  52. PatrolJobDetailData(
  53. this.name,
  54. this.number,
  55. this.planName,
  56. this.planNumber,
  57. this.termType,
  58. this.startDate,
  59. this.endDate,
  60. this.personnel,
  61. this.finishTime,
  62. this.status,
  63. this.remark);
  64. }
  65. class PatrolJobItemData with JsonConvert<PatrolJobItemData> {
  66. late String name;
  67. late String result;
  68. PatrolJobItemData(this.name, this.result);
  69. }
  70. class PatrolJobImageData with JsonConvert<PatrolJobImageData> {
  71. late int id;
  72. late String url;
  73. PatrolJobImageData(this.id, this.url);
  74. }
  75. /**
  76. * 巡检任务列表响应
  77. */
  78. class PatrolJobResponse {
  79. int? code;
  80. PatrolJobQuery? data;
  81. String? msg;
  82. PatrolJobResponse({
  83. this.code,
  84. this.data,
  85. this.msg,
  86. });
  87. Map<String, dynamic> toJson() {
  88. return Map<String, dynamic>()
  89. ..put('code', this.code)
  90. ..put('data', this.data?.toJson())
  91. ..put('msg', this.msg);
  92. }
  93. PatrolJobResponse.fromJson(Map<String, dynamic> json) {
  94. if (json['code'] != null) {
  95. this.code = json.asInt('code');
  96. }
  97. if (json['data'] != null) {
  98. this.data = PatrolJobQuery.fromJson(json['data']);
  99. }
  100. if (json['msg'] != null) {
  101. this.msg = json.asString('msg');
  102. }
  103. }
  104. @override
  105. String toString(){
  106. return 'PatrolJobResponse{code: $code,data: $data,msg: $msg}';
  107. }
  108. static PatrolJobResponse toBean(Map<String, dynamic> json) =>
  109. PatrolJobResponse.fromJson(json);
  110. }
  111. class PatrolJobQuery {
  112. int? total;
  113. int? index;
  114. int? size;
  115. String? sortBy;
  116. int? sort;
  117. PatrolJobData? query;
  118. List<PatrolJobData>? patrolJobVOS;
  119. @override
  120. String toString(){
  121. return 'PatrolJobQuery{total: $total,index: $index,size: $size,sortBy: $sortBy,sort: $sort,query: $query,patrolJobVOS: $patrolJobVOS}';
  122. }
  123. PatrolJobQuery({
  124. this.total,
  125. this.index,
  126. this.size,
  127. this.sortBy,
  128. this.sort,
  129. this.query,
  130. this.patrolJobVOS,
  131. });
  132. Map<String, dynamic> toJson() {
  133. return Map<String, dynamic>()
  134. ..put('total', this.total)
  135. ..put('index', this.index)
  136. ..put('size', this.size)
  137. ..put('sortBy', this.sortBy)
  138. ..put('sort', this.sort)
  139. ..put('query', this.query?.toJson())
  140. ..put('patrolJobVOS', this.patrolJobVOS?.map((v) => v.toJson()).toList());
  141. }
  142. PatrolJobQuery.fromJson(Map<String, dynamic> json) {
  143. if (null != json['total']) {
  144. this.total = json.asInt('total');
  145. }
  146. if (null != json['index']) {
  147. this.index = json.asInt('index');
  148. }
  149. if (null != json['size']) {
  150. this.size = json.asInt('size');
  151. }
  152. if (null != json['sortBy']) {
  153. this.sortBy = json.asString('sortBy');
  154. }
  155. if (null != json['sort']) {
  156. this.sort = json.asInt('sort');
  157. }
  158. if (null != json['query']) {
  159. this.query = PatrolJobData.fromJson(json['query']);
  160. }
  161. if (null != json['patrolJobVOS']) {
  162. this.patrolJobVOS = (json['patrolJobVOS'] as List)
  163. .map((v) => PatrolJobData.fromJson(v))
  164. .toList();
  165. }
  166. }
  167. }
  168. class PatrolJobData {
  169. int? id;
  170. String? name;
  171. String? number;
  172. String? planName;
  173. String? planNumber;
  174. int? termType;
  175. int? personnelId;
  176. String? personnel;
  177. String? remarks;
  178. String? finishTime;
  179. List<FileUrls>? fileUrls;
  180. String? startDate;
  181. String? endDate;
  182. int? status;
  183. String? closeReason;
  184. String? customerName;
  185. String? channelName;
  186. String? closeUser;
  187. String? closeUserName;
  188. String? closeTime;
  189. String? createTime;
  190. int? creator;
  191. String? creatorName;
  192. List<PatrolItemVOS>? patrolItemVOS;
  193. List<EquipmentVOS>? equipmentVOS;
  194. @override
  195. String toString(){
  196. return 'PatrolJobData{id: $id,name: $name,number: $number,planName: $planName,planNumber: $planNumber,termType: $termType,personnelId: $personnelId,personnel: $personnel'
  197. ',remarks: $remarks,finishTime: $finishTime,fileUrls: $fileUrls,startDate: $startDate,endDate: $endDate,status $status,closeReson: $closeReason'
  198. ',customerName: $customerName,channelName: $channelName,closeUser: $closeUser,closeUserName: $closeUserName,patrolItemVOS: $patrolItemVOS,equipmentVOS: $equipmentVOS}';
  199. }
  200. PatrolJobData({
  201. this.id,
  202. this.name,
  203. this.number,
  204. this.planName,
  205. this.planNumber,
  206. this.termType,
  207. this.personnelId,
  208. this.personnel,
  209. this.remarks,
  210. this.finishTime,
  211. this.fileUrls,
  212. this.startDate,
  213. this.endDate,
  214. this.status,
  215. this.closeReason,
  216. this.customerName,
  217. this.channelName,
  218. this.closeUser,
  219. this.closeUserName,
  220. this.closeTime,
  221. this.createTime,
  222. this.creator,
  223. this.creatorName,
  224. this.patrolItemVOS,
  225. this.equipmentVOS,
  226. });
  227. Map<String, dynamic> toJson() {
  228. return Map<String, dynamic>()
  229. ..put('id', this.id)
  230. ..put('name', this.name)
  231. ..put('number', this.number)
  232. ..put('planName', this.planName)
  233. ..put('planNumber', this.planNumber)
  234. ..put('termType', this.termType)
  235. ..put('personnelId', this.personnelId)
  236. ..put('personnel', this.personnel)
  237. ..put('remarks', this.remarks)
  238. ..put('finishTime', this.finishTime)
  239. ..put('fileUrls', this.fileUrls?.map((v) => v.toJson()).toList())
  240. ..put('startDate', this.startDate)
  241. ..put('endDate', this.endDate)
  242. ..put('status', this.status)
  243. ..put('closeReason', this.closeReason)
  244. ..put('customerName', this.customerName)
  245. ..put('channelName', this.channelName)
  246. ..put('closeUser', this.closeUser)
  247. ..put('closeUserName', this.closeUserName)
  248. ..put('closeTime', this.closeTime)
  249. ..put('createTime', this.createTime)
  250. ..put('creator', this.creator)
  251. ..put('creatorName', this.creatorName)
  252. ..put(
  253. 'patrolItemVOS', this.patrolItemVOS?.map((v) => v.toJson()).toList())
  254. ..put('equipmentVOS', this.equipmentVOS?.map((v) => v.toJson()).toList());
  255. }
  256. PatrolJobData.fromJson(Map<String, dynamic> json) {
  257. if (null != json['id']) {
  258. this.id = json.asInt('id');
  259. }
  260. if (null != json['name']) {
  261. this.name = json.asString('name');
  262. }
  263. if (null != json['number']) {
  264. this.number = json.asString('number');
  265. }
  266. if (null != json['planName']) {
  267. this.planName = json.asString('planName');
  268. }
  269. if (null != json['planNumber']) {
  270. this.planNumber = json.asString('planNumber');
  271. }
  272. if (null != json['termType']) {
  273. this.termType = json.asInt('termType');
  274. }
  275. if (null != json['personnelId']) {
  276. this.personnelId = json.asInt('personnelId');
  277. }
  278. if (null != json['personnel']) {
  279. this.personnel = json.asString('personnel');
  280. }
  281. if (null != json['remarks']) {
  282. this.remarks = json.asString('remarks');
  283. }
  284. if (null != json['finishTime']) {
  285. this.finishTime = json.asString('finishTime');
  286. }
  287. if (null != json['fileUrls']) {
  288. this.fileUrls =
  289. (json['fileUrls'] as List).map((v) => FileUrls.fromJson(v)).toList();
  290. }
  291. if (null != json['startDate']) {
  292. this.startDate = json.asString('startDate');
  293. }
  294. if (null != json['endDate']) {
  295. this.endDate = json.asString('endDate');
  296. }
  297. if (null != json['status']) {
  298. this.status = json.asInt('status');
  299. }
  300. if (null != json['closeReason']) {
  301. this.closeReason = json.asString('closeReason');
  302. }
  303. if (null != json['customerName']) {
  304. this.customerName = json.asString('customerName');
  305. }
  306. if (null != json['channelName']) {
  307. this.channelName = json.asString('channelName');
  308. }
  309. if (null != json['closeUser']) {
  310. this.closeUser = json.asString('closeUser');
  311. }
  312. if (null != json['closeUserName']) {
  313. this.closeUserName = json.asString('closeUserName');
  314. }
  315. if (null != json['closeTime']) {
  316. this.closeTime = json.asString('closeTime');
  317. }
  318. if (null != json['createTime']) {
  319. this.createTime = json.asString('createTime');
  320. }
  321. if (null != json['creator']) {
  322. this.creator = json.asInt('creator');
  323. }
  324. if (null != json['creatorName']) {
  325. this.creatorName = json.asString('creatorName');
  326. }
  327. if (null != json['patrolItemVOS']) {
  328. this.patrolItemVOS = (json['patrolItemVOS'] as List)
  329. .map((v) => PatrolItemVOS.fromJson(v))
  330. .toList();
  331. }
  332. if (null != json['equipmentVOS']) {
  333. this.equipmentVOS = (json['equipmentVOS'] as List)
  334. .map((v) => EquipmentVOS.fromJson(v))
  335. .toList();
  336. }
  337. }
  338. }
  339. /**
  340. * 巡检任务实体类
  341. */
  342. class FileUrls {
  343. int? imgId;
  344. String? url;
  345. int? step;
  346. @override
  347. String toString(){
  348. return 'FilrUrls{imgId: $imgId,url: $url,step: $step}';
  349. }
  350. FileUrls({
  351. this.imgId,
  352. this.url,
  353. this.step,
  354. });
  355. Map<String, dynamic> toJson() {
  356. return Map<String, dynamic>()
  357. ..put('imgId', this.imgId)
  358. ..put('url', this.url)
  359. ..put('step', this.step);
  360. }
  361. FileUrls.fromJson(Map<String, dynamic> json) {
  362. if (null != json['imgId']) {
  363. this.imgId = json.asInt('imgId');
  364. }
  365. if (null != json['url']) {
  366. this.url = json.asString('url');
  367. }
  368. if (null != json['step']) {
  369. this.step = json.asInt('step');
  370. }
  371. }
  372. }
  373. class PatrolItemVOS {
  374. int? id;
  375. String? number;
  376. String? name;
  377. String? requirement;
  378. String? result;
  379. int? patrolJobId;
  380. String? results;
  381. @override
  382. String toString(){
  383. return 'PatrolItemVOS{id: $id,number: $number,name: $name,requirement: $requirement,result: $result,patrolJobId: $patrolJobId,results: $results}';
  384. }
  385. PatrolItemVOS({
  386. this.id,
  387. this.number,
  388. this.name,
  389. this.requirement,
  390. this.result,
  391. this.patrolJobId,
  392. this.results,
  393. });
  394. Map<String, dynamic> toJson() {
  395. return Map<String, dynamic>()
  396. ..put('id', this.id)
  397. ..put('number', this.number)
  398. ..put('name', this.name)
  399. ..put('requirement', this.requirement)
  400. ..put('result', this.result)
  401. ..put('patrolJobId', this.patrolJobId)
  402. ..put('results', this.results);
  403. }
  404. PatrolItemVOS.fromJson(Map<String, dynamic> json) {
  405. if (null != json['id']) {
  406. this.id = json.asInt('id');
  407. }
  408. if (null != json['number']) {
  409. this.number = json.asString('number');
  410. }
  411. if (null != json['name']) {
  412. this.name = json.asString('name');
  413. }
  414. if (null != json['requirement']) {
  415. this.requirement = json.asString('requirement');
  416. }
  417. if (null != json['result']) {
  418. this.result = json.asString('result');
  419. }
  420. if (null != json['patrolJobId']) {
  421. this.patrolJobId = json.asInt('patrolJobId');
  422. }
  423. if (null != json['results']) {
  424. this.results = json.asString('results');
  425. }
  426. }
  427. }
  428. class EquipmentVOS {
  429. int? id;
  430. int? equipmentId;
  431. String? name;
  432. String? showName;
  433. String? deviceKey;
  434. String? productName;
  435. String? itemCompleteTime;
  436. String? itemPerson;
  437. int? patrolJobId;
  438. int? isComplete;
  439. @override
  440. String toString(){
  441. return 'EquipmentVOS{id: $id,equipmentId: $equipmentId,name: $name,showName: $showName, deviceKey: $deviceKey,productName: $productName, itemCompleteTime: $itemCompleteTime,itemPerson: $itemPerson,patrolJobId: $patrolJobId,isComplete: $isComplete}';
  442. }
  443. EquipmentVOS({
  444. this.id,
  445. this.equipmentId,
  446. this.name,
  447. this.showName,
  448. this.deviceKey,
  449. this.productName,
  450. this.itemCompleteTime,
  451. this.itemPerson,
  452. this.patrolJobId,
  453. this.isComplete,
  454. });
  455. Map<String, dynamic> toJson() {
  456. return Map<String, dynamic>()
  457. ..put('id', this.id)
  458. ..put('equipmentId', this.equipmentId)
  459. ..put('name', this.name)
  460. ..put('showName', this.showName)
  461. ..put('deviceKey', this.deviceKey)
  462. ..put('productName', this.productName)
  463. ..put('itemCompleteTime', this.itemCompleteTime)
  464. ..put('itemPerson', this.itemPerson)
  465. ..put('patrolJobId', this.patrolJobId)
  466. ..put('isComplete', this.isComplete);
  467. }
  468. EquipmentVOS.fromJson(Map<String, dynamic> json) {
  469. if (null != json['id']) {
  470. this.id = json.asInt('id');
  471. }
  472. if (null != json['equipmentId']) {
  473. this.equipmentId = json.asInt('equipmentId');
  474. }
  475. if (null != json['name']) {
  476. this.name = json.asString('name');
  477. }
  478. if (null != json['showName']) {
  479. this.showName = json.asString('showName');
  480. }
  481. if (null != json['deviceKey']) {
  482. this.deviceKey = json.asString('deviceKey');
  483. }
  484. if (null != json['productName']) {
  485. this.productName = json.asString('productName');
  486. }
  487. if (null != json['itemCompleteTime']) {
  488. this.itemCompleteTime = json.asString('itemCompleteTime');
  489. }
  490. if (null != json['itemPerson']) {
  491. this.itemPerson = json.asString('itemPerson');
  492. }
  493. if (null != json['patrolJobId']) {
  494. this.patrolJobId = json.asInt('patrolJobId');
  495. }
  496. if (null != json['isComplete']) {
  497. this.isComplete = json.asInt('isComplete');
  498. }
  499. }
  500. }