|
|
|
|
@ -111,7 +111,7 @@ class Asset {
|
|
|
|
|
if (json['technicalGuidanceBooks'] != null) {
|
|
|
|
|
technicalGuidanceBooks = [];
|
|
|
|
|
json['technicalGuidanceBooks'].forEach((v) {
|
|
|
|
|
technicalGuidanceBooks.add(TechnicalGuidanceBook.fromJson(v));
|
|
|
|
|
technicalGuidanceBooks!.add(TechnicalGuidanceBook.fromJson(v)); // Use '!' since technicalGuidanceBooks is initialized here
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
comment = json['comment'];
|
|
|
|
|
@ -119,107 +119,106 @@ class Asset {
|
|
|
|
|
assetPhoto = json['assetPhoto'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
num id;
|
|
|
|
|
String assetSerialNo;
|
|
|
|
|
String systemID;
|
|
|
|
|
String assetNumber;
|
|
|
|
|
ModelDefinition modelDefinition;
|
|
|
|
|
Supplier supplier;
|
|
|
|
|
String ipAddress;
|
|
|
|
|
String macAddress;
|
|
|
|
|
String portNumber;
|
|
|
|
|
Lookup assetReplace;
|
|
|
|
|
AssetInfo oldAsset;
|
|
|
|
|
Lookup isParent;
|
|
|
|
|
AssetInfo parentAsset;
|
|
|
|
|
Lookup assetType;
|
|
|
|
|
Site site;
|
|
|
|
|
Building building;
|
|
|
|
|
Floor floor;
|
|
|
|
|
Department department;
|
|
|
|
|
Rooms room;
|
|
|
|
|
// String room;
|
|
|
|
|
num testsDay;
|
|
|
|
|
num purchasingPrice;
|
|
|
|
|
String nbv;
|
|
|
|
|
Lookup currency;
|
|
|
|
|
String poNo;
|
|
|
|
|
String invoiceNumber;
|
|
|
|
|
String invoiceDate;
|
|
|
|
|
String replacementDate;
|
|
|
|
|
Department originDepartment;
|
|
|
|
|
Site originSite;
|
|
|
|
|
num budgetYear;
|
|
|
|
|
num lastPOPrice;
|
|
|
|
|
Lookup commissioningStatus;
|
|
|
|
|
String productionDate;
|
|
|
|
|
String edd;
|
|
|
|
|
String technicalInspectionDate;
|
|
|
|
|
String deliveryInspectionDate;
|
|
|
|
|
String endUserAcceptanceDate;
|
|
|
|
|
String receivingCommittee;
|
|
|
|
|
Lookup siteWarrantyMonths;
|
|
|
|
|
Lookup extendedWarrantyMonths;
|
|
|
|
|
Lookup remainderWarrantyMonths;
|
|
|
|
|
num eomWarrantyMonthsNo;
|
|
|
|
|
num warrantyValue;
|
|
|
|
|
String warrantyEndDate;
|
|
|
|
|
String warrantyContractConditions;
|
|
|
|
|
List<TechnicalGuidanceBook> technicalGuidanceBooks;
|
|
|
|
|
String comment;
|
|
|
|
|
String tagCode;
|
|
|
|
|
String assetPhoto;
|
|
|
|
|
num? id; // Now nullable
|
|
|
|
|
String? assetSerialNo; // Now nullable
|
|
|
|
|
String? systemID; // Now nullable
|
|
|
|
|
String? assetNumber; // Now nullable
|
|
|
|
|
ModelDefinition? modelDefinition; // Now nullable
|
|
|
|
|
Supplier? supplier; // Now nullable
|
|
|
|
|
String? ipAddress; // Now nullable
|
|
|
|
|
String? macAddress; // Now nullable
|
|
|
|
|
String? portNumber; // Now nullable
|
|
|
|
|
Lookup? assetReplace; // Now nullable
|
|
|
|
|
AssetInfo? oldAsset; // Now nullable
|
|
|
|
|
Lookup? isParent; // Now nullable
|
|
|
|
|
AssetInfo? parentAsset; // Now nullable
|
|
|
|
|
Lookup? assetType; // Now nullable
|
|
|
|
|
Site? site; // Now nullable
|
|
|
|
|
Building? building; // Now nullable
|
|
|
|
|
Floor? floor; // Now nullable
|
|
|
|
|
Department? department; // Now nullable
|
|
|
|
|
Rooms? room; // Now nullable
|
|
|
|
|
num? testsDay; // Now nullable
|
|
|
|
|
num? purchasingPrice; // Now nullable
|
|
|
|
|
String? nbv; // Now nullable
|
|
|
|
|
Lookup? currency; // Now nullable
|
|
|
|
|
String? poNo; // Now nullable
|
|
|
|
|
String? invoiceNumber; // Now nullable
|
|
|
|
|
String? invoiceDate; // Now nullable
|
|
|
|
|
String? replacementDate; // Now nullable
|
|
|
|
|
Department? originDepartment; // Now nullable
|
|
|
|
|
Site? originSite; // Now nullable
|
|
|
|
|
num? budgetYear; // Now nullable
|
|
|
|
|
num? lastPOPrice; // Now nullable
|
|
|
|
|
Lookup? commissioningStatus; // Now nullable
|
|
|
|
|
String? productionDate; // Now nullable
|
|
|
|
|
String? edd; // Now nullable
|
|
|
|
|
String? technicalInspectionDate; // Now nullable
|
|
|
|
|
String? deliveryInspectionDate; // Now nullable
|
|
|
|
|
String? endUserAcceptanceDate; // Now nullable
|
|
|
|
|
String? receivingCommittee; // Now nullable
|
|
|
|
|
Lookup? siteWarrantyMonths; // Now nullable
|
|
|
|
|
Lookup? extendedWarrantyMonths; // Now nullable
|
|
|
|
|
Lookup? remainderWarrantyMonths; // Now nullable
|
|
|
|
|
num? eomWarrantyMonthsNo; // Now nullable
|
|
|
|
|
num? warrantyValue; // Now nullable
|
|
|
|
|
String? warrantyEndDate; // Now nullable
|
|
|
|
|
String? warrantyContractConditions; // Now nullable
|
|
|
|
|
List<TechnicalGuidanceBook>? technicalGuidanceBooks; // Now nullable
|
|
|
|
|
String? comment; // Now nullable
|
|
|
|
|
String? tagCode; // Now nullable
|
|
|
|
|
String? assetPhoto;
|
|
|
|
|
|
|
|
|
|
Asset copyWith({
|
|
|
|
|
num id,
|
|
|
|
|
String assetSerialNo,
|
|
|
|
|
String systemID,
|
|
|
|
|
String assetNumber,
|
|
|
|
|
ModelDefinition modelDefinition,
|
|
|
|
|
Supplier supplier,
|
|
|
|
|
String ipAddress,
|
|
|
|
|
String macAddress,
|
|
|
|
|
String portNumber,
|
|
|
|
|
Lookup assetReplace,
|
|
|
|
|
AssetInfo oldAsset,
|
|
|
|
|
Lookup isParent,
|
|
|
|
|
AssetInfo parentAsset,
|
|
|
|
|
Lookup assetType,
|
|
|
|
|
Site site,
|
|
|
|
|
Building building,
|
|
|
|
|
Floor floor,
|
|
|
|
|
Department department,
|
|
|
|
|
Rooms room,
|
|
|
|
|
num testsDay,
|
|
|
|
|
num purchasingPrice,
|
|
|
|
|
String nbv,
|
|
|
|
|
Lookup currency,
|
|
|
|
|
String poNo,
|
|
|
|
|
String invoiceNumber,
|
|
|
|
|
String invoiceDate,
|
|
|
|
|
String replacementDate,
|
|
|
|
|
Department originDepartment,
|
|
|
|
|
Site originSite,
|
|
|
|
|
num budgetYear,
|
|
|
|
|
num lastPOPrice,
|
|
|
|
|
Lookup commissioningStatus,
|
|
|
|
|
String productionDate,
|
|
|
|
|
String edd,
|
|
|
|
|
String technicalInspectionDate,
|
|
|
|
|
String deliveryInspectionDate,
|
|
|
|
|
String endUserAcceptanceDate,
|
|
|
|
|
String receivingCommittee,
|
|
|
|
|
Lookup siteWarrantyMonths,
|
|
|
|
|
Lookup extendedWarrantyMonths,
|
|
|
|
|
Lookup remainderWarrantyMonths,
|
|
|
|
|
num eomWarrantyMonthsNo,
|
|
|
|
|
num warrantyValue,
|
|
|
|
|
String warrantyEndDate,
|
|
|
|
|
String warrantyContractConditions,
|
|
|
|
|
List<TechnicalGuidanceBook> technicalGuidanceBooks,
|
|
|
|
|
String comment,
|
|
|
|
|
String tagCode,
|
|
|
|
|
String assetPhoto,
|
|
|
|
|
num? id,
|
|
|
|
|
String? assetSerialNo,
|
|
|
|
|
String? systemID,
|
|
|
|
|
String? assetNumber,
|
|
|
|
|
ModelDefinition? modelDefinition,
|
|
|
|
|
Supplier? supplier,
|
|
|
|
|
String? ipAddress,
|
|
|
|
|
String? macAddress,
|
|
|
|
|
String? portNumber,
|
|
|
|
|
Lookup? assetReplace,
|
|
|
|
|
AssetInfo? oldAsset,
|
|
|
|
|
Lookup? isParent,
|
|
|
|
|
AssetInfo? parentAsset,
|
|
|
|
|
Lookup? assetType,
|
|
|
|
|
Site? site,
|
|
|
|
|
Building? building,
|
|
|
|
|
Floor? floor,
|
|
|
|
|
Department? department,
|
|
|
|
|
Rooms? room,
|
|
|
|
|
num? testsDay,
|
|
|
|
|
num? purchasingPrice,
|
|
|
|
|
String? nbv,
|
|
|
|
|
Lookup? currency,
|
|
|
|
|
String? poNo,
|
|
|
|
|
String? invoiceNumber,
|
|
|
|
|
String? invoiceDate,
|
|
|
|
|
String? replacementDate,
|
|
|
|
|
Department? originDepartment,
|
|
|
|
|
Site? originSite,
|
|
|
|
|
num? budgetYear,
|
|
|
|
|
num? lastPOPrice,
|
|
|
|
|
Lookup? commissioningStatus,
|
|
|
|
|
String? productionDate,
|
|
|
|
|
String? edd,
|
|
|
|
|
String? technicalInspectionDate,
|
|
|
|
|
String? deliveryInspectionDate,
|
|
|
|
|
String? endUserAcceptanceDate,
|
|
|
|
|
String? receivingCommittee,
|
|
|
|
|
Lookup? siteWarrantyMonths,
|
|
|
|
|
Lookup? extendedWarrantyMonths,
|
|
|
|
|
Lookup? remainderWarrantyMonths,
|
|
|
|
|
num? eomWarrantyMonthsNo,
|
|
|
|
|
num? warrantyValue,
|
|
|
|
|
String? warrantyEndDate,
|
|
|
|
|
String? warrantyContractConditions,
|
|
|
|
|
List<TechnicalGuidanceBook>? technicalGuidanceBooks,
|
|
|
|
|
String? comment,
|
|
|
|
|
String? tagCode,
|
|
|
|
|
String? assetPhoto,
|
|
|
|
|
}) =>
|
|
|
|
|
Asset(
|
|
|
|
|
id: id ?? this.id,
|
|
|
|
|
@ -280,65 +279,65 @@ class Asset {
|
|
|
|
|
map['systemID'] = systemID;
|
|
|
|
|
map['assetNumber'] = assetNumber;
|
|
|
|
|
if (modelDefinition != null) {
|
|
|
|
|
map['modelDefinition'] = modelDefinition.toJson();
|
|
|
|
|
map['modelDefinition'] = modelDefinition!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (supplier != null) {
|
|
|
|
|
map['supplier'] = supplier.toJson();
|
|
|
|
|
map['supplier'] = supplier!.toJson();
|
|
|
|
|
}
|
|
|
|
|
map['ipAddress'] = ipAddress;
|
|
|
|
|
map['macAddress'] = macAddress;
|
|
|
|
|
map['portNumber'] = portNumber;
|
|
|
|
|
if (assetReplace != null) {
|
|
|
|
|
map['assetReplace'] = assetReplace.toJson();
|
|
|
|
|
map['assetReplace'] = assetReplace!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (oldAsset != null) {
|
|
|
|
|
map['oldAsset'] = oldAsset.toJson();
|
|
|
|
|
map['oldAsset'] = oldAsset!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (isParent != null) {
|
|
|
|
|
map['isParent'] = isParent.toJson();
|
|
|
|
|
map['isParent'] = isParent!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (parentAsset != null) {
|
|
|
|
|
map['parentAsset'] = parentAsset.toJson();
|
|
|
|
|
map['parentAsset'] = parentAsset!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (assetType != null) {
|
|
|
|
|
map['assetType'] = assetType.toJson();
|
|
|
|
|
map['assetType'] = assetType!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (site != null) {
|
|
|
|
|
map['site'] = site.toJson();
|
|
|
|
|
map['site'] = site!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (building != null) {
|
|
|
|
|
map['building'] = building.toJson();
|
|
|
|
|
map['building'] = building!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (floor != null) {
|
|
|
|
|
map['floor'] = floor.toJson();
|
|
|
|
|
map['floor'] = floor!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (department != null) {
|
|
|
|
|
map['department'] = department.toJson();
|
|
|
|
|
map['department'] = department!.toJson();
|
|
|
|
|
}
|
|
|
|
|
// map['room'] = room;
|
|
|
|
|
if (room != null) {
|
|
|
|
|
map['room'] = room.toJson();
|
|
|
|
|
map['room'] = room!.toJson();
|
|
|
|
|
}
|
|
|
|
|
map['testsDay'] = testsDay;
|
|
|
|
|
map['purchasingPrice'] = purchasingPrice;
|
|
|
|
|
map['nbv'] = nbv;
|
|
|
|
|
if (currency != null) {
|
|
|
|
|
map['currency'] = currency.toJson();
|
|
|
|
|
map['currency'] = currency!.toJson();
|
|
|
|
|
}
|
|
|
|
|
map['poNo'] = poNo;
|
|
|
|
|
map['invoiceNumber'] = invoiceNumber;
|
|
|
|
|
map['invoiceDate'] = invoiceDate;
|
|
|
|
|
map['replacementDate'] = replacementDate;
|
|
|
|
|
if (originDepartment != null) {
|
|
|
|
|
map['originDepartment'] = originDepartment.toJson();
|
|
|
|
|
map['originDepartment'] = originDepartment!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (originSite != null) {
|
|
|
|
|
map['originSite'] = originSite.toJson();
|
|
|
|
|
map['originSite'] = originSite!.toJson();
|
|
|
|
|
}
|
|
|
|
|
map['budgetYear'] = budgetYear;
|
|
|
|
|
map['lastPOPrice'] = lastPOPrice;
|
|
|
|
|
if (commissioningStatus != null) {
|
|
|
|
|
map['commissioningStatus'] = commissioningStatus.toJson();
|
|
|
|
|
map['commissioningStatus'] = commissioningStatus!.toJson();
|
|
|
|
|
}
|
|
|
|
|
map['productionDate'] = productionDate;
|
|
|
|
|
map['edd'] = edd;
|
|
|
|
|
@ -347,20 +346,20 @@ class Asset {
|
|
|
|
|
map['endUserAcceptanceDate'] = endUserAcceptanceDate;
|
|
|
|
|
map['receivingCommittee'] = receivingCommittee;
|
|
|
|
|
if (siteWarrantyMonths != null) {
|
|
|
|
|
map['siteWarrantyMonths'] = siteWarrantyMonths.toJson();
|
|
|
|
|
map['siteWarrantyMonths'] = siteWarrantyMonths!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (extendedWarrantyMonths != null) {
|
|
|
|
|
map['extendedWarrantyMonths'] = extendedWarrantyMonths.toJson();
|
|
|
|
|
map['extendedWarrantyMonths'] = extendedWarrantyMonths!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (remainderWarrantyMonths != null) {
|
|
|
|
|
map['remainderWarrantyMonths'] = remainderWarrantyMonths.toJson();
|
|
|
|
|
map['remainderWarrantyMonths'] = remainderWarrantyMonths!.toJson();
|
|
|
|
|
}
|
|
|
|
|
map['eomWarrantyMonthsNo'] = eomWarrantyMonthsNo;
|
|
|
|
|
map['warrantyValue'] = warrantyValue;
|
|
|
|
|
map['warrantyEndDate'] = warrantyEndDate;
|
|
|
|
|
map['warrantyContractConditions'] = warrantyContractConditions;
|
|
|
|
|
if (technicalGuidanceBooks != null) {
|
|
|
|
|
map['technicalGuidanceBooks'] = technicalGuidanceBooks.map((v) => v.toJson()).toList();
|
|
|
|
|
map['technicalGuidanceBooks'] = technicalGuidanceBooks!.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
map['comment'] = comment;
|
|
|
|
|
map['tagCode'] = tagCode;
|
|
|
|
|
@ -388,20 +387,20 @@ class AssetInfo {
|
|
|
|
|
assetName = json['assetName'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
num id;
|
|
|
|
|
String assetSerialNo;
|
|
|
|
|
String assetNumber;
|
|
|
|
|
String tagCode;
|
|
|
|
|
String systemId;
|
|
|
|
|
String assetName;
|
|
|
|
|
num? id; // Now nullable
|
|
|
|
|
String? assetSerialNo; // Now nullable
|
|
|
|
|
String? assetNumber; // Now nullable
|
|
|
|
|
String? tagCode; // Now nullable
|
|
|
|
|
String? systemId; // Now nullable
|
|
|
|
|
String? assetName; // Now nullable
|
|
|
|
|
|
|
|
|
|
AssetInfo copyWith({
|
|
|
|
|
num id,
|
|
|
|
|
String assetSerialNo,
|
|
|
|
|
String assetNumber,
|
|
|
|
|
String tagCode,
|
|
|
|
|
String systemId,
|
|
|
|
|
String assetName,
|
|
|
|
|
num? id, // Parameters are now nullable
|
|
|
|
|
String? assetSerialNo,
|
|
|
|
|
String? assetNumber,
|
|
|
|
|
String? tagCode,
|
|
|
|
|
String? systemId,
|
|
|
|
|
String? assetName,
|
|
|
|
|
}) =>
|
|
|
|
|
AssetInfo(
|
|
|
|
|
id: id ?? this.id,
|
|
|
|
|
|