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