patrol_response_entity.dart 13 KB

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