| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511 |
- import 'package:deus_app/generated/json/base/json_convert_content.dart';
- import 'package:json2dart_safe/json2dart.dart';
- import 'ImgVO.dart';
- class PatrolJobDataResponseEntity
- with JsonConvert<PatrolJobDataResponseEntity> {
- late int code;
- late PatrolJobDataVO data;
- late String msg;
- }
- class PatrolJobDataVO with JsonConvert<PatrolJobDataVO> {
- late PatrolJobData query;
- late List<PatrolJobData> list;
- }
- class PatrolJobDetailResponseEntity
- with JsonConvert<PatrolJobDetailResponseEntity> {
- late int code;
- late PatrolJobDetailData data;
- late String msg;
- }
- class PatrolJobDeviceResponseData with JsonConvert<PatrolJobDeviceData> {
- late int code;
- late List<PatrolJobDeviceData> data;
- late String msg;
- }
- class PatrolJobItemResponseData with JsonConvert<PatrolJobItemData> {
- late int code;
- late List<PatrolJobItemData> data;
- late String msg;
- }
- class PatrolJobDeviceData with JsonConvert<PatrolJobDeviceData> {
- late int id;
- late String name;
- late String showName;
- late String deviceKey;
- late String itemCompleteTime;
- late String itemPerson;
- PatrolJobDeviceData(this.name, this.showName, this.deviceKey,
- this.itemCompleteTime, this.itemPerson,this.id);
- }
- class PatrolJobDetailData with JsonConvert<PatrolJobDetailData> {
- late String name;
- late String number;
- late String planName;
- late String planNumber;
- late int termType;
- late String startDate;
- late String endDate;
- late String personnel;
- late String finishTime;
- late int status;
- late String remark;
- late List<PatrolJobImageData> fileUrls;
- PatrolJobDetailData(
- this.name,
- this.number,
- this.planName,
- this.planNumber,
- this.termType,
- this.startDate,
- this.endDate,
- this.personnel,
- this.finishTime,
- this.status,
- this.remark);
- }
- class PatrolJobItemData with JsonConvert<PatrolJobItemData> {
- late String name;
- late String result;
- late int id;
- PatrolJobItemData(this.name,this.result,this.id);
- }
- class PatrolJobImageData with JsonConvert<PatrolJobImageData> {
- late int id;
- late String url;
- PatrolJobImageData(this.id, this.url);
- }
- /**
- * 巡检任务列表响应
- */
- class PatrolJobResponse {
- int? code;
- PatrolJobQuery? data;
- String? msg;
- PatrolJobResponse({
- this.code,
- this.data,
- this.msg,
- });
- Map<String, dynamic> toJson() {
- return Map<String, dynamic>()
- ..put('code', this.code)
- ..put('data', this.data?.toJson())
- ..put('msg', this.msg);
- }
- PatrolJobResponse.fromJson(Map<String, dynamic> json) {
- if (json['code'] != null) {
- this.code = json.asInt('code');
- }
- if (json['data'] != null) {
- this.data = PatrolJobQuery.fromJson(json['data']);
- }
- if (json['msg'] != null) {
- this.msg = json.asString('msg');
- }
- }
- @override
- String toString(){
- return 'PatrolJobResponse{code: $code,data: $data,msg: $msg}';
- }
- static PatrolJobResponse toBean(Map<String, dynamic> json) =>
- PatrolJobResponse.fromJson(json);
- }
- class PatrolJobQuery {
- int? total;
- int? index;
- int? size;
- String? sortBy;
- int? sort;
- PatrolJobData? query;
- List<PatrolJobData>? patrolJobVOS;
- @override
- String toString(){
- return 'PatrolJobQuery{total: $total,index: $index,size: $size,sortBy: $sortBy,sort: $sort,query: $query,patrolJobVOS: $patrolJobVOS}';
- }
- PatrolJobQuery({
- this.total,
- this.index,
- this.size,
- this.sortBy,
- this.sort,
- this.query,
- this.patrolJobVOS,
- });
- Map<String, dynamic> toJson() {
- return Map<String, dynamic>()
- ..put('total', this.total)
- ..put('index', this.index)
- ..put('size', this.size)
- ..put('sortBy', this.sortBy)
- ..put('sort', this.sort)
- ..put('query', this.query?.toJson())
- ..put('patrolJobVOS', this.patrolJobVOS?.map((v) => v.toJson()).toList());
- }
- PatrolJobQuery.fromJson(Map<String, dynamic> json) {
- if (null != json['total']) {
- this.total = json.asInt('total');
- }
- if (null != json['index']) {
- this.index = json.asInt('index');
- }
- if (null != json['size']) {
- this.size = json.asInt('size');
- }
- if (null != json['sortBy']) {
- this.sortBy = json.asString('sortBy');
- }
- if (null != json['sort']) {
- this.sort = json.asInt('sort');
- }
- if (null != json['query']) {
- this.query = PatrolJobData.fromJson(json['query']);
- }
- if (null != json['patrolJobVOS']) {
- this.patrolJobVOS = (json['patrolJobVOS'] as List)
- .map((v) => PatrolJobData.fromJson(v))
- .toList();
- }
- }
- }
- class PatrolJobData {
- int? id;
- String? name;
- String? number;
- String? planName;
- String? planNumber;
- int? termType;
- int? personnelId;
- String? personnel;
- String? remarks;
- String? finishTime;
- List<FileUrls>? fileUrls;
- String? startDate;
- String? endDate;
- int? status;
- String? closeReason;
- String? customerName;
- String? channelName;
- String? closeUser;
- String? closeUserName;
- String? closeTime;
- String? createTime;
- int? creator;
- String? creatorName;
- List<PatrolItemVOS>? patrolItemVOS;
- List<EquipmentVOS>? equipmentVOS;
- @override
- String toString(){
- return 'PatrolJobData{id: $id,name: $name,number: $number,planName: $planName,planNumber: $planNumber,termType: $termType,personnelId: $personnelId,personnel: $personnel'
- ',remarks: $remarks,finishTime: $finishTime,fileUrls: $fileUrls,startDate: $startDate,endDate: $endDate,status $status,closeReson: $closeReason'
- ',customerName: $customerName,channelName: $channelName,closeUser: $closeUser,closeUserName: $closeUserName,patrolItemVOS: $patrolItemVOS,equipmentVOS: $equipmentVOS}';
- }
- PatrolJobData({
- this.id,
- this.name,
- this.number,
- this.planName,
- this.planNumber,
- this.termType,
- this.personnelId,
- this.personnel,
- this.remarks,
- this.finishTime,
- this.fileUrls,
- this.startDate,
- this.endDate,
- this.status,
- this.closeReason,
- this.customerName,
- this.channelName,
- this.closeUser,
- this.closeUserName,
- this.closeTime,
- this.createTime,
- this.creator,
- this.creatorName,
- this.patrolItemVOS,
- this.equipmentVOS,
- });
- Map<String, dynamic> toJson() {
- return Map<String, dynamic>()
- ..put('id', this.id)
- ..put('name', this.name)
- ..put('number', this.number)
- ..put('planName', this.planName)
- ..put('planNumber', this.planNumber)
- ..put('termType', this.termType)
- ..put('personnelId', this.personnelId)
- ..put('personnel', this.personnel)
- ..put('remarks', this.remarks)
- ..put('finishTime', this.finishTime)
- ..put('fileUrls', this.fileUrls?.map((v) => v.toJson()).toList())
- ..put('startDate', this.startDate)
- ..put('endDate', this.endDate)
- ..put('status', this.status)
- ..put('closeReason', this.closeReason)
- ..put('customerName', this.customerName)
- ..put('channelName', this.channelName)
- ..put('closeUser', this.closeUser)
- ..put('closeUserName', this.closeUserName)
- ..put('closeTime', this.closeTime)
- ..put('createTime', this.createTime)
- ..put('creator', this.creator)
- ..put('creatorName', this.creatorName)
- ..put(
- 'patrolItemVOS', this.patrolItemVOS?.map((v) => v.toJson()).toList())
- ..put('equipmentVOS', this.equipmentVOS?.map((v) => v.toJson()).toList());
- }
- PatrolJobData.fromJson(Map<String, dynamic> json) {
- if (null != json['id']) {
- this.id = json.asInt('id');
- }
- if (null != json['name']) {
- this.name = json.asString('name');
- }
- if (null != json['number']) {
- this.number = json.asString('number');
- }
- if (null != json['planName']) {
- this.planName = json.asString('planName');
- }
- if (null != json['planNumber']) {
- this.planNumber = json.asString('planNumber');
- }
- if (null != json['termType']) {
- this.termType = json.asInt('termType');
- }
- if (null != json['personnelId']) {
- this.personnelId = json.asInt('personnelId');
- }
- if (null != json['personnel']) {
- this.personnel = json.asString('personnel');
- }
- if (null != json['remarks']) {
- this.remarks = json.asString('remarks');
- }
- if (null != json['finishTime']) {
- this.finishTime = json.asString('finishTime');
- }
- if (null != json['fileUrls']) {
- this.fileUrls =
- (json['fileUrls'] as List).map((v) => FileUrls.fromJson(v)).toList();
- }
- if (null != json['startDate']) {
- this.startDate = json.asString('startDate');
- }
- if (null != json['endDate']) {
- this.endDate = json.asString('endDate');
- }
- if (null != json['status']) {
- this.status = json.asInt('status');
- }
- if (null != json['closeReason']) {
- this.closeReason = json.asString('closeReason');
- }
- if (null != json['customerName']) {
- this.customerName = json.asString('customerName');
- }
- if (null != json['channelName']) {
- this.channelName = json.asString('channelName');
- }
- if (null != json['closeUser']) {
- this.closeUser = json.asString('closeUser');
- }
- if (null != json['closeUserName']) {
- this.closeUserName = json.asString('closeUserName');
- }
- if (null != json['closeTime']) {
- this.closeTime = json.asString('closeTime');
- }
- if (null != json['createTime']) {
- this.createTime = json.asString('createTime');
- }
- if (null != json['creator']) {
- this.creator = json.asInt('creator');
- }
- if (null != json['creatorName']) {
- this.creatorName = json.asString('creatorName');
- }
- if (null != json['patrolItemVOS']) {
- this.patrolItemVOS = (json['patrolItemVOS'] as List)
- .map((v) => PatrolItemVOS.fromJson(v))
- .toList();
- }
- if (null != json['equipmentVOS']) {
- this.equipmentVOS = (json['equipmentVOS'] as List)
- .map((v) => EquipmentVOS.fromJson(v))
- .toList();
- }
- }
- }
- /**
- * 巡检任务实体类
- */
- class PatrolItemVOS {
- int? id;
- String? number;
- String? name;
- String? requirement;
- String? result;
- int? patrolJobId;
- String? results;
- @override
- String toString(){
- return 'PatrolItemVOS{id: $id,number: $number,name: $name,requirement: $requirement,result: $result,patrolJobId: $patrolJobId,results: $results}';
- }
- PatrolItemVOS({
- this.id,
- this.number,
- this.name,
- this.requirement,
- this.result,
- this.patrolJobId,
- this.results,
- });
- Map<String, dynamic> toJson() {
- return Map<String, dynamic>()
- ..put('id', this.id)
- ..put('number', this.number)
- ..put('name', this.name)
- ..put('requirement', this.requirement)
- ..put('result', this.result)
- ..put('patrolJobId', this.patrolJobId)
- ..put('results', this.results);
- }
- PatrolItemVOS.fromJson(Map<String, dynamic> json) {
- if (null != json['id']) {
- this.id = json.asInt('id');
- }
- if (null != json['number']) {
- this.number = json.asString('number');
- }
- if (null != json['name']) {
- this.name = json.asString('name');
- }
- if (null != json['requirement']) {
- this.requirement = json.asString('requirement');
- }
- if (null != json['result']) {
- this.result = json.asString('result');
- }
- if (null != json['patrolJobId']) {
- this.patrolJobId = json.asInt('patrolJobId');
- }
- if (null != json['results']) {
- this.results = json.asString('results');
- }
- }
- }
- class EquipmentVOS {
- int? id;
- int? equipmentId;
- String? name;
- String? showName;
- String? deviceKey;
- String? productName;
- String? itemCompleteTime;
- String? itemPerson;
- int? patrolJobId;
- int? isComplete;
- @override
- String toString(){
- return 'EquipmentVOS{id: $id,equipmentId: $equipmentId,name: $name,showName: $showName, deviceKey: $deviceKey,productName: $productName, itemCompleteTime: $itemCompleteTime,itemPerson: $itemPerson,patrolJobId: $patrolJobId,isComplete: $isComplete}';
- }
- EquipmentVOS({
- this.id,
- this.equipmentId,
- this.name,
- this.showName,
- this.deviceKey,
- this.productName,
- this.itemCompleteTime,
- this.itemPerson,
- this.patrolJobId,
- this.isComplete,
- });
- Map<String, dynamic> toJson() {
- return Map<String, dynamic>()
- ..put('id', this.id)
- ..put('equipmentId', this.equipmentId)
- ..put('name', this.name)
- ..put('showName', this.showName)
- ..put('deviceKey', this.deviceKey)
- ..put('productName', this.productName)
- ..put('itemCompleteTime', this.itemCompleteTime)
- ..put('itemPerson', this.itemPerson)
- ..put('patrolJobId', this.patrolJobId)
- ..put('isComplete', this.isComplete);
- }
- EquipmentVOS.fromJson(Map<String, dynamic> json) {
- if (null != json['id']) {
- this.id = json.asInt('id');
- }
- if (null != json['equipmentId']) {
- this.equipmentId = json.asInt('equipmentId');
- }
- if (null != json['name']) {
- this.name = json.asString('name');
- }
- if (null != json['showName']) {
- this.showName = json.asString('showName');
- }
- if (null != json['deviceKey']) {
- this.deviceKey = json.asString('deviceKey');
- }
- if (null != json['productName']) {
- this.productName = json.asString('productName');
- }
- if (null != json['itemCompleteTime']) {
- this.itemCompleteTime = json.asString('itemCompleteTime');
- }
- if (null != json['itemPerson']) {
- this.itemPerson = json.asString('itemPerson');
- }
- if (null != json['patrolJobId']) {
- this.patrolJobId = json.asInt('patrolJobId');
- }
- if (null != json['isComplete']) {
- this.isComplete = json.asInt('isComplete');
- }
- }
- }
|