|
|
|
@ -783,136 +783,136 @@ class PreventiveVisitSuppliers {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class Supplier {
|
|
|
|
// class Supplier {
|
|
|
|
int? id;
|
|
|
|
// int? id;
|
|
|
|
String? suppliername;
|
|
|
|
// String? suppliername;
|
|
|
|
String? name;
|
|
|
|
// String? name;
|
|
|
|
String? website;
|
|
|
|
// String? website;
|
|
|
|
String? email;
|
|
|
|
// String? email;
|
|
|
|
String? code;
|
|
|
|
// String? code;
|
|
|
|
int? suppNo;
|
|
|
|
// int? suppNo;
|
|
|
|
String? suppStatusId;
|
|
|
|
// String? suppStatusId;
|
|
|
|
String? cityId;
|
|
|
|
// String? cityId;
|
|
|
|
String? person;
|
|
|
|
// String? person;
|
|
|
|
String? comment;
|
|
|
|
// String? comment;
|
|
|
|
String? zipcode;
|
|
|
|
// String? zipcode;
|
|
|
|
String? contact;
|
|
|
|
// String? contact;
|
|
|
|
List<String>? telephones;
|
|
|
|
// List<String>? telephones;
|
|
|
|
List<String>? faxes;
|
|
|
|
// List<String>? faxes;
|
|
|
|
List<String>? addresses;
|
|
|
|
// List<String>? addresses;
|
|
|
|
List<String>? attachments;
|
|
|
|
// List<String>? attachments;
|
|
|
|
List<SuppPersons>? suppPersons;
|
|
|
|
// List<SuppPersons>? suppPersons;
|
|
|
|
List<String>? suppTCodes;
|
|
|
|
// List<String>? suppTCodes;
|
|
|
|
|
|
|
|
//
|
|
|
|
Supplier(
|
|
|
|
// Supplier(
|
|
|
|
{this.id,
|
|
|
|
// {this.id,
|
|
|
|
this.suppliername,
|
|
|
|
// this.suppliername,
|
|
|
|
this.name,
|
|
|
|
// this.name,
|
|
|
|
this.website,
|
|
|
|
// this.website,
|
|
|
|
this.email,
|
|
|
|
// this.email,
|
|
|
|
this.code,
|
|
|
|
// this.code,
|
|
|
|
this.suppNo,
|
|
|
|
// this.suppNo,
|
|
|
|
this.suppStatusId,
|
|
|
|
// this.suppStatusId,
|
|
|
|
this.cityId,
|
|
|
|
// this.cityId,
|
|
|
|
this.person,
|
|
|
|
// this.person,
|
|
|
|
this.comment,
|
|
|
|
// this.comment,
|
|
|
|
this.zipcode,
|
|
|
|
// this.zipcode,
|
|
|
|
this.contact,
|
|
|
|
// this.contact,
|
|
|
|
this.telephones,
|
|
|
|
// this.telephones,
|
|
|
|
this.faxes,
|
|
|
|
// this.faxes,
|
|
|
|
this.addresses,
|
|
|
|
// this.addresses,
|
|
|
|
this.attachments,
|
|
|
|
// this.attachments,
|
|
|
|
this.suppPersons,
|
|
|
|
// this.suppPersons,
|
|
|
|
this.suppTCodes});
|
|
|
|
// this.suppTCodes});
|
|
|
|
|
|
|
|
//
|
|
|
|
Supplier.fromJson(Map<String, dynamic> json) {
|
|
|
|
// Supplier.fromJson(Map<String, dynamic> json) {
|
|
|
|
id = json['id'];
|
|
|
|
// id = json['id'];
|
|
|
|
suppliername = json['suppliername'];
|
|
|
|
// suppliername = json['suppliername'];
|
|
|
|
name = json['name'];
|
|
|
|
// name = json['name'];
|
|
|
|
website = json['website'];
|
|
|
|
// website = json['website'];
|
|
|
|
email = json['email'];
|
|
|
|
// email = json['email'];
|
|
|
|
code = json['code'];
|
|
|
|
// code = json['code'];
|
|
|
|
suppNo = json['suppNo'];
|
|
|
|
// suppNo = json['suppNo'];
|
|
|
|
suppStatusId = json['suppStatusId'];
|
|
|
|
// suppStatusId = json['suppStatusId'];
|
|
|
|
cityId = json['cityId'];
|
|
|
|
// cityId = json['cityId'];
|
|
|
|
person = json['person'];
|
|
|
|
// person = json['person'];
|
|
|
|
comment = json['comment'];
|
|
|
|
// comment = json['comment'];
|
|
|
|
zipcode = json['zipcode'];
|
|
|
|
// zipcode = json['zipcode'];
|
|
|
|
contact = json['contact'];
|
|
|
|
// contact = json['contact'];
|
|
|
|
if (json['telephones'] != null) {
|
|
|
|
// if (json['telephones'] != null) {
|
|
|
|
telephones = <String>[];
|
|
|
|
// telephones = <String>[];
|
|
|
|
json['telephones'].forEach((v) {
|
|
|
|
// json['telephones'].forEach((v) {
|
|
|
|
telephones!.add(v);
|
|
|
|
// telephones!.add(v);
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (json['faxes'] != null) {
|
|
|
|
// if (json['faxes'] != null) {
|
|
|
|
faxes = <String>[];
|
|
|
|
// faxes = <String>[];
|
|
|
|
json['faxes'].forEach((v) {
|
|
|
|
// json['faxes'].forEach((v) {
|
|
|
|
faxes!.add(v);
|
|
|
|
// faxes!.add(v);
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (json['addresses'] != null) {
|
|
|
|
// if (json['addresses'] != null) {
|
|
|
|
addresses = <String>[];
|
|
|
|
// addresses = <String>[];
|
|
|
|
json['addresses'].forEach((v) {
|
|
|
|
// json['addresses'].forEach((v) {
|
|
|
|
addresses!.add(v);
|
|
|
|
// addresses!.add(v);
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (json['attachments'] != null) {
|
|
|
|
// if (json['attachments'] != null) {
|
|
|
|
attachments = <String>[];
|
|
|
|
// attachments = <String>[];
|
|
|
|
json['attachments'].forEach((v) {
|
|
|
|
// json['attachments'].forEach((v) {
|
|
|
|
attachments!.add(v);
|
|
|
|
// attachments!.add(v);
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (json['suppPersons'] != null) {
|
|
|
|
// if (json['suppPersons'] != null) {
|
|
|
|
suppPersons = <SuppPersons>[];
|
|
|
|
// suppPersons = <SuppPersons>[];
|
|
|
|
json['suppPersons'].forEach((v) {
|
|
|
|
// json['suppPersons'].forEach((v) {
|
|
|
|
suppPersons!.add(SuppPersons.fromJson(v));
|
|
|
|
// suppPersons!.add(SuppPersons.fromJson(v));
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (json['suppTCodes'] != null) {
|
|
|
|
// if (json['suppTCodes'] != null) {
|
|
|
|
suppTCodes = <String>[];
|
|
|
|
// suppTCodes = <String>[];
|
|
|
|
json['suppTCodes'].forEach((v) {
|
|
|
|
// json['suppTCodes'].forEach((v) {
|
|
|
|
suppTCodes!.add(v);
|
|
|
|
// suppTCodes!.add(v);
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
// Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
// final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
data['id'] = id;
|
|
|
|
// data['id'] = id;
|
|
|
|
data['suppliername'] = suppliername;
|
|
|
|
// data['suppliername'] = suppliername;
|
|
|
|
data['name'] = name;
|
|
|
|
// data['name'] = name;
|
|
|
|
data['website'] = website;
|
|
|
|
// data['website'] = website;
|
|
|
|
data['email'] = email;
|
|
|
|
// data['email'] = email;
|
|
|
|
data['code'] = code;
|
|
|
|
// data['code'] = code;
|
|
|
|
data['suppNo'] = suppNo;
|
|
|
|
// data['suppNo'] = suppNo;
|
|
|
|
data['suppStatusId'] = suppStatusId;
|
|
|
|
// data['suppStatusId'] = suppStatusId;
|
|
|
|
data['cityId'] = cityId;
|
|
|
|
// data['cityId'] = cityId;
|
|
|
|
data['person'] = person;
|
|
|
|
// data['person'] = person;
|
|
|
|
data['comment'] = comment;
|
|
|
|
// data['comment'] = comment;
|
|
|
|
data['zipcode'] = zipcode;
|
|
|
|
// data['zipcode'] = zipcode;
|
|
|
|
data['contact'] = contact;
|
|
|
|
// data['contact'] = contact;
|
|
|
|
if (telephones != null) {
|
|
|
|
// if (telephones != null) {
|
|
|
|
data['telephones'] = telephones!.map((v) => v).toList();
|
|
|
|
// data['telephones'] = telephones!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (faxes != null) {
|
|
|
|
// if (faxes != null) {
|
|
|
|
data['faxes'] = faxes!.map((v) => v).toList();
|
|
|
|
// data['faxes'] = faxes!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (addresses != null) {
|
|
|
|
// if (addresses != null) {
|
|
|
|
data['addresses'] = addresses!.map((v) => v).toList();
|
|
|
|
// data['addresses'] = addresses!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (attachments != null) {
|
|
|
|
// if (attachments != null) {
|
|
|
|
data['attachments'] = attachments!.map((v) => v).toList();
|
|
|
|
// data['attachments'] = attachments!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (suppPersons != null) {
|
|
|
|
// if (suppPersons != null) {
|
|
|
|
data['suppPersons'] = suppPersons!.map((v) => v.toJson()).toList();
|
|
|
|
// data['suppPersons'] = suppPersons!.map((v) => v.toJson()).toList();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (suppTCodes != null) {
|
|
|
|
// if (suppTCodes != null) {
|
|
|
|
data['suppTCodes'] = suppTCodes!.map((v) => v).toList();
|
|
|
|
// data['suppTCodes'] = suppTCodes!.map((v) => v).toList();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
return data;
|
|
|
|
// return data;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// class SuppPersons {
|
|
|
|
// class SuppPersons {
|
|
|
|
// int? id;
|
|
|
|
// int? id;
|
|
|
|
|