|
|
|
@ -146,74 +146,89 @@ class PlanPreventiveVisit {
|
|
|
|
if (json['preventiveVisitSuppliers'] != null) {
|
|
|
|
if (json['preventiveVisitSuppliers'] != null) {
|
|
|
|
preventiveVisitSuppliers = <PreventiveVisitSuppliers>[];
|
|
|
|
preventiveVisitSuppliers = <PreventiveVisitSuppliers>[];
|
|
|
|
json['preventiveVisitSuppliers'].forEach((v) {
|
|
|
|
json['preventiveVisitSuppliers'].forEach((v) {
|
|
|
|
preventiveVisitSuppliers!.add(new PreventiveVisitSuppliers.fromJson(v));
|
|
|
|
preventiveVisitSuppliers!.add( PreventiveVisitSuppliers.fromJson(v));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
Map<String, dynamic> toJson({required int status}) {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
data['id'] = this.id;
|
|
|
|
data['id'] = id;
|
|
|
|
data['visitNo'] = this.visitNo;
|
|
|
|
data['acutalDateOfVisit'] = acutalDateOfVisit;
|
|
|
|
if (this.asset != null) {
|
|
|
|
data['statusValue'] = status;
|
|
|
|
data['asset'] = this.asset!.toJson();
|
|
|
|
data['typeOfServiceId'] = typeOfService?.id;
|
|
|
|
}
|
|
|
|
data['visitStatusValue'] = visitStatus?.value;
|
|
|
|
data['planNo'] = this.planNo;
|
|
|
|
data['travelingHours'] = travelingHours;
|
|
|
|
data['planName'] = this.planName;
|
|
|
|
data['comments'] = comments;
|
|
|
|
data['nextPMDate'] = this.nextPMDate;
|
|
|
|
data['taskStatusId'] = taskStatus?.id;
|
|
|
|
data['assetName'] = this.assetName;
|
|
|
|
data['deviceStatusId'] = deviceStatus?.id;
|
|
|
|
data['model'] = this.model;
|
|
|
|
data['assetAvailabilityId'] = assetAvailability?.id;
|
|
|
|
data['manufacturer'] = this.manufacturer;
|
|
|
|
data['safetyId'] = safety?.id;
|
|
|
|
data['supplierName'] = this.supplierName;
|
|
|
|
data['engSignature'] = engSignature;
|
|
|
|
data['siteName'] = this.siteName;
|
|
|
|
data['nurseSignature'] = nurseSignature;
|
|
|
|
data['buildingName'] = this.buildingName;
|
|
|
|
//
|
|
|
|
data['floorName'] = this.floorName;
|
|
|
|
// if (asset != null) {
|
|
|
|
data['departmentName'] = this.departmentName;
|
|
|
|
// data['asset'] = asset!.toJson();
|
|
|
|
data['roomName'] = this.roomName;
|
|
|
|
// }
|
|
|
|
data['fromDate'] = this.fromDate;
|
|
|
|
// data['visitNo'] = visitNo;
|
|
|
|
data['toDate'] = this.toDate;
|
|
|
|
// data['planNo'] = planNo;
|
|
|
|
if (this.assignedEmployee != null) {
|
|
|
|
// data['planName'] = planName;
|
|
|
|
data['assignedEmployee'] = this.assignedEmployee!.toJson();
|
|
|
|
// data['nextPMDate'] = nextPMDate;
|
|
|
|
}
|
|
|
|
// data['assetName'] = assetName;
|
|
|
|
data['acutalDateOfVisit'] = this.acutalDateOfVisit;
|
|
|
|
// data['model'] = model;
|
|
|
|
if (this.typeOfService != null) {
|
|
|
|
// data['manufacturer'] = manufacturer;
|
|
|
|
data['typeOfService'] = this.typeOfService!.toJson();
|
|
|
|
// data['supplierName'] = supplierName;
|
|
|
|
}
|
|
|
|
// data['siteName'] = siteName;
|
|
|
|
if (this.visitStatus != null) {
|
|
|
|
// data['buildingName'] = buildingName;
|
|
|
|
data['visitStatus'] = this.visitStatus!.toJson();
|
|
|
|
// data['floorName'] = floorName;
|
|
|
|
}
|
|
|
|
// data['departmentName'] = departmentName;
|
|
|
|
data['travelingHours'] = this.travelingHours;
|
|
|
|
// data['roomName'] = roomName;
|
|
|
|
data['comments'] = this.comments;
|
|
|
|
// data['fromDate'] = fromDate;
|
|
|
|
data['executionTimeFrame'] = this.executionTimeFrame;
|
|
|
|
// data['toDate'] = toDate;
|
|
|
|
if (this.taskStatus != null) {
|
|
|
|
// if (assignedEmployee != null) {
|
|
|
|
data['taskStatus'] = this.taskStatus!.toJson();
|
|
|
|
// data['assignedEmployee'] = assignedEmployee!.toJson();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (this.deviceStatus != null) {
|
|
|
|
// data['acutalDateOfVisit'] = acutalDateOfVisit;
|
|
|
|
data['deviceStatus'] = this.deviceStatus!.toJson();
|
|
|
|
// if (typeOfService != null) {
|
|
|
|
}
|
|
|
|
// data['typeOfService'] = typeOfService!.toJson();
|
|
|
|
data['assetAvailability'] = this.assetAvailability;
|
|
|
|
// }
|
|
|
|
if (this.safety != null) {
|
|
|
|
// if (visitStatus != null) {
|
|
|
|
data['safety'] = this.safety!.toJson();
|
|
|
|
// data['visitStatus'] = visitStatus!.toJson();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
data['engSignature'] = this.engSignature;
|
|
|
|
// data['travelingHours'] = travelingHours;
|
|
|
|
data['nurseSignature'] = this.nurseSignature;
|
|
|
|
// data['comments'] = comments;
|
|
|
|
if (this.preventiveVisitAttachments != null) {
|
|
|
|
// data['executionTimeFrame'] = executionTimeFrame;
|
|
|
|
data['preventiveVisitAttachments'] = this.preventiveVisitAttachments!.map((v) => v.toJson()).toList();
|
|
|
|
// if (taskStatus != null) {
|
|
|
|
}
|
|
|
|
// data['taskStatus'] = taskStatus!.toJson();
|
|
|
|
if (this.preventiveVisitCalibrations != null) {
|
|
|
|
// }
|
|
|
|
data['preventiveVisitCalibrations'] = this.preventiveVisitCalibrations!.map((v) => v.toJson()).toList();
|
|
|
|
// if (deviceStatus != null) {
|
|
|
|
}
|
|
|
|
// data['deviceStatus'] = deviceStatus!.toJson();
|
|
|
|
if (this.preventiveVisitChecklists != null) {
|
|
|
|
// }
|
|
|
|
data['preventiveVisitChecklists'] = this.preventiveVisitChecklists!.map((v) => v.toJson()).toList();
|
|
|
|
// data['assetAvailability'] = assetAvailability;
|
|
|
|
}
|
|
|
|
// if (safety != null) {
|
|
|
|
if (this.preventiveVisitKits != null) {
|
|
|
|
// data['safety'] = safety!.toJson();
|
|
|
|
data['preventiveVisitKits'] = this.preventiveVisitKits!.map((v) => v.toJson()).toList();
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// data['engSignature'] = engSignature;
|
|
|
|
if (this.preventiveVisitTimers != null) {
|
|
|
|
// data['nurseSignature'] = nurseSignature;
|
|
|
|
data['preventiveVisitTimers'] = this.preventiveVisitTimers!.map((v) => v.toJson()).toList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.preventiveVisitSuppliers != null) {
|
|
|
|
if (preventiveVisitAttachments != null) {
|
|
|
|
data['preventiveVisitSuppliers'] = this.preventiveVisitSuppliers!.map((v) => v.toJson()).toList();
|
|
|
|
data['preventiveVisitAttachments'] = preventiveVisitAttachments!.map((v) => v.toJson()).toList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (preventiveVisitCalibrations != null) {
|
|
|
|
|
|
|
|
data['preventiveVisitCalibrations'] = preventiveVisitCalibrations!.map((v) => v.toJson()).toList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (preventiveVisitChecklists != null) {
|
|
|
|
|
|
|
|
data['preventiveVisitChecklists'] = preventiveVisitChecklists!.map((v) => v.toJson()).toList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (preventiveVisitKits != null) {
|
|
|
|
|
|
|
|
data['preventiveVisitKits'] = preventiveVisitKits!.map((v) => v.toJson()).toList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (preventiveVisitTimers != null) {
|
|
|
|
|
|
|
|
data['preventiveVisitTimers'] = preventiveVisitTimers!.map((v) => v.toJson()).toList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (preventiveVisitSuppliers != null) {
|
|
|
|
|
|
|
|
data['preventiveVisitSuppliers'] = preventiveVisitSuppliers!.map((v) => v.toJson()).toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -687,9 +702,9 @@ class PreventiveVisitAttachments {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
data['id'] = this.id;
|
|
|
|
data['id'] = id;
|
|
|
|
data['attachmentName'] = this.attachmentName;
|
|
|
|
data['attachmentName'] = attachmentName;
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -703,24 +718,24 @@ class PreventiveVisitCalibrations {
|
|
|
|
|
|
|
|
|
|
|
|
PreventiveVisitCalibrations.fromJson(Map<String, dynamic> json) {
|
|
|
|
PreventiveVisitCalibrations.fromJson(Map<String, dynamic> json) {
|
|
|
|
id = json['id'];
|
|
|
|
id = json['id'];
|
|
|
|
asset = json['asset'] != null ? new Asset.fromJson(json['asset']) : null;
|
|
|
|
asset = json['asset'] != null ? Asset.fromJson(json['asset']) : null;
|
|
|
|
calibrationDateOfTesters = json['calibrationDateOfTesters'];
|
|
|
|
calibrationDateOfTesters = json['calibrationDateOfTesters'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
data['id'] = this.id;
|
|
|
|
data['id'] = id;
|
|
|
|
if (this.asset != null) {
|
|
|
|
if (asset != null) {
|
|
|
|
data['asset'] = this.asset!.toJson();
|
|
|
|
data['asset'] = asset!.toJson();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
data['calibrationDateOfTesters'] = this.calibrationDateOfTesters;
|
|
|
|
data['calibrationDateOfTesters'] = calibrationDateOfTesters;
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class PreventiveVisitSuppliers {
|
|
|
|
class PreventiveVisitSuppliers {
|
|
|
|
int? id;
|
|
|
|
int? id;
|
|
|
|
Supplier? supplier;
|
|
|
|
SupplierDetails? supplier;
|
|
|
|
SuppPersons? suppPerson;
|
|
|
|
SuppPersons? suppPerson;
|
|
|
|
String? startDateTime;
|
|
|
|
String? startDateTime;
|
|
|
|
String? endDateTime;
|
|
|
|
String? endDateTime;
|
|
|
|
@ -730,25 +745,25 @@ class PreventiveVisitSuppliers {
|
|
|
|
|
|
|
|
|
|
|
|
PreventiveVisitSuppliers.fromJson(Map<String, dynamic> json) {
|
|
|
|
PreventiveVisitSuppliers.fromJson(Map<String, dynamic> json) {
|
|
|
|
id = json['id'];
|
|
|
|
id = json['id'];
|
|
|
|
supplier = json['supplier'] != null ? new Supplier.fromJson(json['supplier']) : null;
|
|
|
|
supplier = json['supplier'] != null ? SupplierDetails.fromJson(json['supplier']) : null;
|
|
|
|
suppPerson = json['suppPerson'] != null ? new SuppPersons.fromJson(json['suppPerson']) : null;
|
|
|
|
suppPerson = json['suppPerson'] != null ? SuppPersons.fromJson(json['suppPerson']) : null;
|
|
|
|
startDateTime = json['startDateTime'];
|
|
|
|
startDateTime = json['startDateTime'];
|
|
|
|
endDateTime = json['endDateTime'];
|
|
|
|
endDateTime = json['endDateTime'];
|
|
|
|
workingHours = json['workingHours'];
|
|
|
|
workingHours = json['workingHours'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
data['id'] = this.id;
|
|
|
|
data['id'] = id;
|
|
|
|
if (this.supplier != null) {
|
|
|
|
if (supplier != null) {
|
|
|
|
data['supplier'] = this.supplier!.toJson();
|
|
|
|
data['supplier'] = supplier!.toJson();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.suppPerson != null) {
|
|
|
|
if (suppPerson != null) {
|
|
|
|
data['suppPerson'] = this.suppPerson!.toJson();
|
|
|
|
data['suppPerson'] = suppPerson!.toJson();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
data['startDateTime'] = this.startDateTime;
|
|
|
|
data['startDateTime'] = startDateTime;
|
|
|
|
data['endDateTime'] = this.endDateTime;
|
|
|
|
data['endDateTime'] = endDateTime;
|
|
|
|
data['workingHours'] = this.workingHours;
|
|
|
|
data['workingHours'] = workingHours;
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -848,37 +863,37 @@ class Supplier {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
data['id'] = this.id;
|
|
|
|
data['id'] = id;
|
|
|
|
data['suppliername'] = this.suppliername;
|
|
|
|
data['suppliername'] = suppliername;
|
|
|
|
data['name'] = this.name;
|
|
|
|
data['name'] = name;
|
|
|
|
data['website'] = this.website;
|
|
|
|
data['website'] = website;
|
|
|
|
data['email'] = this.email;
|
|
|
|
data['email'] = email;
|
|
|
|
data['code'] = this.code;
|
|
|
|
data['code'] = code;
|
|
|
|
data['suppNo'] = this.suppNo;
|
|
|
|
data['suppNo'] = suppNo;
|
|
|
|
data['suppStatusId'] = this.suppStatusId;
|
|
|
|
data['suppStatusId'] = suppStatusId;
|
|
|
|
data['cityId'] = this.cityId;
|
|
|
|
data['cityId'] = cityId;
|
|
|
|
data['person'] = this.person;
|
|
|
|
data['person'] = person;
|
|
|
|
data['comment'] = this.comment;
|
|
|
|
data['comment'] = comment;
|
|
|
|
data['zipcode'] = this.zipcode;
|
|
|
|
data['zipcode'] = zipcode;
|
|
|
|
data['contact'] = this.contact;
|
|
|
|
data['contact'] = contact;
|
|
|
|
if (this.telephones != null) {
|
|
|
|
if (telephones != null) {
|
|
|
|
data['telephones'] = this.telephones!.map((v) => v).toList();
|
|
|
|
data['telephones'] = telephones!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.faxes != null) {
|
|
|
|
if (faxes != null) {
|
|
|
|
data['faxes'] = this.faxes!.map((v) => v).toList();
|
|
|
|
data['faxes'] = faxes!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.addresses != null) {
|
|
|
|
if (addresses != null) {
|
|
|
|
data['addresses'] = this.addresses!.map((v) => v).toList();
|
|
|
|
data['addresses'] = addresses!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.attachments != null) {
|
|
|
|
if (attachments != null) {
|
|
|
|
data['attachments'] = this.attachments!.map((v) => v).toList();
|
|
|
|
data['attachments'] = attachments!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.suppPersons != null) {
|
|
|
|
if (suppPersons != null) {
|
|
|
|
data['suppPersons'] = this.suppPersons!.map((v) => v.toJson()).toList();
|
|
|
|
data['suppPersons'] = suppPersons!.map((v) => v.toJson()).toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.suppTCodes != null) {
|
|
|
|
if (suppTCodes != null) {
|
|
|
|
data['suppTCodes'] = this.suppTCodes!.map((v) => v).toList();
|
|
|
|
data['suppTCodes'] = suppTCodes!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -922,7 +937,7 @@ class PreventiveVisitKits {
|
|
|
|
int? id;
|
|
|
|
int? id;
|
|
|
|
PartCatalogItem? partCatalogItem;
|
|
|
|
PartCatalogItem? partCatalogItem;
|
|
|
|
|
|
|
|
|
|
|
|
PreventiveVisitKits({this.id, this.partCatalogItem});
|
|
|
|
PreventiveVisitKits({this.id, partCatalogItem});
|
|
|
|
|
|
|
|
|
|
|
|
PreventiveVisitKits.fromJson(Map<String, dynamic> json) {
|
|
|
|
PreventiveVisitKits.fromJson(Map<String, dynamic> json) {
|
|
|
|
id = json['id'];
|
|
|
|
id = json['id'];
|
|
|
|
@ -931,9 +946,9 @@ class PreventiveVisitKits {
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
data['id'] = this.id;
|
|
|
|
data['id'] = id;
|
|
|
|
if (this.partCatalogItem != null) {
|
|
|
|
if (partCatalogItem != null) {
|
|
|
|
data['partCatalogItem'] = this.partCatalogItem!.toJson();
|
|
|
|
data['partCatalogItem'] = partCatalogItem!.toJson();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -955,11 +970,11 @@ class PartCatalogItem {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
data['id'] = this.id;
|
|
|
|
data['id'] = id;
|
|
|
|
data['partName'] = this.partName;
|
|
|
|
data['partName'] = partName;
|
|
|
|
data['partNumber'] = this.partNumber;
|
|
|
|
data['partNumber'] = partNumber;
|
|
|
|
data['oracleCode'] = this.oracleCode;
|
|
|
|
data['oracleCode'] = oracleCode;
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|