|
|
|
|
@ -26,7 +26,7 @@ class SearchWorkOrders {
|
|
|
|
|
num travelingHours;
|
|
|
|
|
num travelingExpenses;
|
|
|
|
|
ModelDefRelatedDefects faultDescription;
|
|
|
|
|
List sparePartsWorkOrders;
|
|
|
|
|
List<SparePartWorkOrder> sparePartsWorkOrders;
|
|
|
|
|
String reviewComment;
|
|
|
|
|
String comment;
|
|
|
|
|
String attachmentsWorkOrder;
|
|
|
|
|
@ -79,9 +79,9 @@ class SearchWorkOrders {
|
|
|
|
|
workOrderNo = json['workOrderNo'];
|
|
|
|
|
workOrderYear = json['workOrderYear'];
|
|
|
|
|
workOrderSequennce = json['workOrderSequennce'];
|
|
|
|
|
callRequest = json['callRequest'] != null ? new CallRequest.fromJson(json['callRequest']) : CallRequest();
|
|
|
|
|
callRequest = json['callRequest'] != null ? CallRequest.fromJson(json['callRequest']) : CallRequest();
|
|
|
|
|
assetType = json['assetType'];
|
|
|
|
|
assignedEmployee = json['assignedEmployee'] != null ? new AssignedEmployee.fromJson(json['assignedEmployee']) : AssignedEmployee();
|
|
|
|
|
assignedEmployee = json['assignedEmployee'] != null ? AssignedEmployee.fromJson(json['assignedEmployee']) : AssignedEmployee();
|
|
|
|
|
visitDate = json['visitDate'];
|
|
|
|
|
startDate = json['startDate'];
|
|
|
|
|
endDate = json['endDate'];
|
|
|
|
|
@ -93,8 +93,8 @@ class SearchWorkOrders {
|
|
|
|
|
if (json['contactPersonWorkOrders'] != null) {
|
|
|
|
|
contactPersonWorkOrders = json['contactPersonWorkOrders'];
|
|
|
|
|
}
|
|
|
|
|
calllastSituation = json['calllastSituation'] != null ? new Lookup.fromJson(json['calllastSituation']) : Lookup();
|
|
|
|
|
currentSituation = json['currentSituation'] != null ? new Lookup.fromJson(json['currentSituation']) : Lookup();
|
|
|
|
|
calllastSituation = json['calllastSituation'] != null ? Lookup.fromJson(json['calllastSituation']) : const Lookup();
|
|
|
|
|
currentSituation = json['currentSituation'] != null ? Lookup.fromJson(json['currentSituation']) : const Lookup();
|
|
|
|
|
repairLocation = json['repairLocation'];
|
|
|
|
|
reason = json['reason'];
|
|
|
|
|
startofWorkTime = json['startofWorkTime'];
|
|
|
|
|
@ -102,9 +102,12 @@ class SearchWorkOrders {
|
|
|
|
|
workingHours = json['workingHours'];
|
|
|
|
|
travelingHours = json['travelingHours'];
|
|
|
|
|
travelingExpenses = json['travelingExpenses'];
|
|
|
|
|
faultDescription = json['faultDescription'] != null ? new ModelDefRelatedDefects.fromJson(json['faultDescription']) : ModelDefRelatedDefects();
|
|
|
|
|
faultDescription = json['faultDescription'] != null ? ModelDefRelatedDefects.fromJson(json['faultDescription']) : ModelDefRelatedDefects();
|
|
|
|
|
if (json['sparePartsWorkOrders'] != null) {
|
|
|
|
|
sparePartsWorkOrders = json['sparePartsWorkOrders'];
|
|
|
|
|
sparePartsWorkOrders = <SparePartWorkOrder>[];
|
|
|
|
|
json['sparePartsWorkOrders'].forEach((v) {
|
|
|
|
|
sparePartsWorkOrders.add(SparePartWorkOrder.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
reviewComment = json['reviewComment'];
|
|
|
|
|
comment = json['comment'];
|
|
|
|
|
@ -119,63 +122,148 @@ class SearchWorkOrders {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['parentWOId'] = this.parentWOId;
|
|
|
|
|
data['workOrderNo'] = this.workOrderNo;
|
|
|
|
|
data['workOrderYear'] = this.workOrderYear;
|
|
|
|
|
data['workOrderSequennce'] = this.workOrderSequennce;
|
|
|
|
|
if (this.callRequest != null) {
|
|
|
|
|
data['callRequest'] = this.callRequest.toJson();
|
|
|
|
|
}
|
|
|
|
|
data['assetType'] = this.assetType;
|
|
|
|
|
if (this.assignedEmployee != null) {
|
|
|
|
|
data['assignedEmployee'] = this.assignedEmployee.toJson();
|
|
|
|
|
}
|
|
|
|
|
data['visitDate'] = this.visitDate;
|
|
|
|
|
data['startDate'] = this.startDate;
|
|
|
|
|
data['endDate'] = this.endDate;
|
|
|
|
|
if (this.assistantEmployees != null) {
|
|
|
|
|
data['assistantEmployees'] = this.assistantEmployees.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
data['supplier'] = this.supplier;
|
|
|
|
|
data['vendorTicketNumber'] = this.vendorTicketNumber;
|
|
|
|
|
if (this.contactPersonWorkOrders != null) {
|
|
|
|
|
data['contactPersonWorkOrders'] = this.contactPersonWorkOrders.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
if (this.calllastSituation != null) {
|
|
|
|
|
data['calllastSituation'] = this.calllastSituation.toMap();
|
|
|
|
|
}
|
|
|
|
|
if (this.currentSituation != null) {
|
|
|
|
|
data['currentSituation'] = this.currentSituation.toMap();
|
|
|
|
|
}
|
|
|
|
|
data['repairLocation'] = this.repairLocation;
|
|
|
|
|
data['reason'] = this.reason;
|
|
|
|
|
data['startofWorkTime'] = this.startofWorkTime;
|
|
|
|
|
data['endofWorkTime'] = this.endofWorkTime;
|
|
|
|
|
data['workingHours'] = this.workingHours;
|
|
|
|
|
data['travelingHours'] = this.travelingHours;
|
|
|
|
|
data['travelingExpenses'] = this.travelingExpenses;
|
|
|
|
|
if (this.faultDescription != null) {
|
|
|
|
|
data['faultDescription'] = this.faultDescription.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (this.sparePartsWorkOrders != null) {
|
|
|
|
|
data['sparePartsWorkOrders'] = this.sparePartsWorkOrders.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
data['reviewComment'] = this.reviewComment;
|
|
|
|
|
data['comment'] = this.comment;
|
|
|
|
|
data['attachmentsWorkOrder'] = this.attachmentsWorkOrder;
|
|
|
|
|
data['equipmentStatus'] = this.equipmentStatus;
|
|
|
|
|
if (this.suppEngineerWorkOrders != null) {
|
|
|
|
|
data['suppEngineerWorkOrders'] = this.suppEngineerWorkOrders.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
data['engSignature'] = this.engSignature;
|
|
|
|
|
data['nurseSignature'] = this.nurseSignature;
|
|
|
|
|
data['woParentDto'] = this.woParentDto;
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['parentWOId'] = parentWOId;
|
|
|
|
|
data['workOrderNo'] = workOrderNo;
|
|
|
|
|
data['workOrderYear'] = workOrderYear;
|
|
|
|
|
data['workOrderSequennce'] = workOrderSequennce;
|
|
|
|
|
if (callRequest != null) {
|
|
|
|
|
data['callRequest'] = callRequest.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (assetType != null) data['assetType'] = assetType;
|
|
|
|
|
if (assignedEmployee != null) {
|
|
|
|
|
data['assignedEmployee'] = assignedEmployee.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (data['visitDate'] != null) data['visitDate'] = visitDate;
|
|
|
|
|
if (data['startDate'] != null) data['startDate'] = startDate;
|
|
|
|
|
if (data['endDate'] != null) data['endDate'] = endDate;
|
|
|
|
|
if (assistantEmployees != null) {
|
|
|
|
|
data['assistantEmployees'] = assistantEmployees.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
if (supplier != null) data['supplier'] = supplier;
|
|
|
|
|
data['vendorTicketNumber'] = vendorTicketNumber;
|
|
|
|
|
if (contactPersonWorkOrders != null) {
|
|
|
|
|
data['contactPersonWorkOrders'] = contactPersonWorkOrders.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
if (calllastSituation != null) {
|
|
|
|
|
data['calllastSituation'] = calllastSituation.toMap();
|
|
|
|
|
}
|
|
|
|
|
if (currentSituation != null) {
|
|
|
|
|
data['currentSituation'] = currentSituation.toMap();
|
|
|
|
|
}
|
|
|
|
|
if (repairLocation != null) data['repairLocation'] = repairLocation;
|
|
|
|
|
if (reason != null) data['reason'] = reason;
|
|
|
|
|
if (startofWorkTime != null) data['startofWorkTime'] = startofWorkTime;
|
|
|
|
|
if (endofWorkTime != null) data['endofWorkTime'] = endofWorkTime;
|
|
|
|
|
if (workingHours != null) data['workingHours'] = workingHours;
|
|
|
|
|
if (travelingHours != null) data['travelingHours'] = travelingHours;
|
|
|
|
|
if (travelingExpenses != null) data['travelingExpenses'] = travelingExpenses;
|
|
|
|
|
if (faultDescription != null) {
|
|
|
|
|
data['faultDescription'] = faultDescription.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (sparePartsWorkOrders != null) {
|
|
|
|
|
data['sparePartsWorkOrders'] = sparePartsWorkOrders.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
data['reviewComment'] = reviewComment;
|
|
|
|
|
data['comment'] = comment;
|
|
|
|
|
data['attachmentsWorkOrder'] = attachmentsWorkOrder;
|
|
|
|
|
data['equipmentStatus'] = equipmentStatus;
|
|
|
|
|
if (suppEngineerWorkOrders != null) {
|
|
|
|
|
data['suppEngineerWorkOrders'] = suppEngineerWorkOrders.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
data['engSignature'] = engSignature;
|
|
|
|
|
data['nurseSignature'] = nurseSignature;
|
|
|
|
|
data['woParentDto'] = woParentDto;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SparePart {
|
|
|
|
|
int id;
|
|
|
|
|
String partNo;
|
|
|
|
|
String partName;
|
|
|
|
|
SparePart({
|
|
|
|
|
this.id,
|
|
|
|
|
this.partNo,
|
|
|
|
|
this.partName,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
SparePart.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
partNo = json['partNo'];
|
|
|
|
|
partName = json['partName'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SparePart copyWith({
|
|
|
|
|
int id,
|
|
|
|
|
String partNo,
|
|
|
|
|
String partName,
|
|
|
|
|
}) =>
|
|
|
|
|
SparePart(
|
|
|
|
|
id: id ?? this.id,
|
|
|
|
|
partNo: partNo ?? this.partNo,
|
|
|
|
|
partName: partName ?? this.partName,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
|
map['id'] = id ?? 0;
|
|
|
|
|
map['partNo'] = partNo;
|
|
|
|
|
map['partName'] = partName;
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SparePartWorkOrder {
|
|
|
|
|
int id;
|
|
|
|
|
SparePart sparePart;
|
|
|
|
|
double qty;
|
|
|
|
|
double returnQty;
|
|
|
|
|
double installQty;
|
|
|
|
|
|
|
|
|
|
SparePartWorkOrder({
|
|
|
|
|
this.id,
|
|
|
|
|
this.sparePart,
|
|
|
|
|
this.qty,
|
|
|
|
|
this.returnQty,
|
|
|
|
|
this.installQty,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
SparePartWorkOrder.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
sparePart = SparePart.fromJson(json['sparePart'] ?? {});
|
|
|
|
|
qty = json['qty'];
|
|
|
|
|
returnQty = json['returnQty'];
|
|
|
|
|
installQty = json['installQty'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SparePartWorkOrder copyWith({
|
|
|
|
|
int id,
|
|
|
|
|
SparePart sparePart,
|
|
|
|
|
double qty,
|
|
|
|
|
double returnQty,
|
|
|
|
|
double installQty,
|
|
|
|
|
}) =>
|
|
|
|
|
SparePartWorkOrder(
|
|
|
|
|
id: id ?? this.id,
|
|
|
|
|
sparePart: sparePart ?? this.sparePart,
|
|
|
|
|
qty: qty ?? this.qty,
|
|
|
|
|
returnQty: returnQty ?? this.returnQty,
|
|
|
|
|
installQty: installQty ?? this.installQty,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
|
map['id'] = id ?? 0;
|
|
|
|
|
map['sparePart'] = sparePart?.toJson();
|
|
|
|
|
map['qty'] = qty;
|
|
|
|
|
map['returnQty'] = returnQty;
|
|
|
|
|
map['installQty'] = installQty;
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class CallRequest {
|
|
|
|
|
int id;
|
|
|
|
|
String callNo;
|
|
|
|
|
@ -193,40 +281,40 @@ class CallRequest {
|
|
|
|
|
CallRequest.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
callNo = json['callNo'];
|
|
|
|
|
asset = json['asset'] != null ? new Asset.fromJson(json['asset']) : Asset();
|
|
|
|
|
assignedEmployee = json['assignedEmployee'] != null ? new AssignedEmployee.fromJson(json['assignedEmployee']) : AssignedEmployee();
|
|
|
|
|
asset = json['asset'] != null ? Asset.fromJson(json['asset']) : Asset();
|
|
|
|
|
assignedEmployee = json['assignedEmployee'] != null ? AssignedEmployee.fromJson(json['assignedEmployee']) : AssignedEmployee();
|
|
|
|
|
if (json['callSiteContactPerson'] != null) {
|
|
|
|
|
callSiteContactPerson = json['callSiteContactPerson'];
|
|
|
|
|
}
|
|
|
|
|
status = json['status'] != null ? new Lookup.fromJson(json['status']) : Lookup();
|
|
|
|
|
callLastSituation = json['callLastSituation'] != null ? new Lookup.fromJson(json['callLastSituation']) : Lookup();
|
|
|
|
|
status = json['status'] != null ? Lookup.fromJson(json['status']) : const Lookup();
|
|
|
|
|
callLastSituation = json['callLastSituation'] != null ? Lookup.fromJson(json['callLastSituation']) : const Lookup();
|
|
|
|
|
defectType = json['defectType'];
|
|
|
|
|
firstAction = json['firstAction'];
|
|
|
|
|
assetType = json['assetType'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['callNo'] = this.callNo;
|
|
|
|
|
if (this.asset != null) {
|
|
|
|
|
data['asset'] = this.asset.toJson();
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['callNo'] = callNo;
|
|
|
|
|
if (asset != null) {
|
|
|
|
|
data['asset'] = asset.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (this.assignedEmployee != null) {
|
|
|
|
|
data['assignedEmployee'] = this.assignedEmployee.toJson();
|
|
|
|
|
if (assignedEmployee != null) {
|
|
|
|
|
data['assignedEmployee'] = assignedEmployee.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (this.callSiteContactPerson != null) {
|
|
|
|
|
data['callSiteContactPerson'] = this.callSiteContactPerson.map((v) => v.toJson()).toList();
|
|
|
|
|
if (callSiteContactPerson != null) {
|
|
|
|
|
data['callSiteContactPerson'] = callSiteContactPerson.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
if (this.status != null) {
|
|
|
|
|
data['status'] = this.status.toMap();
|
|
|
|
|
if (status != null) {
|
|
|
|
|
data['status'] = status.toMap();
|
|
|
|
|
}
|
|
|
|
|
if (this.callLastSituation != null) {
|
|
|
|
|
data['callLastSituation'] = this.callLastSituation.toMap();
|
|
|
|
|
if (callLastSituation != null) {
|
|
|
|
|
data['callLastSituation'] = callLastSituation.toMap();
|
|
|
|
|
}
|
|
|
|
|
data['defectType'] = this.defectType;
|
|
|
|
|
data['firstAction'] = this.firstAction;
|
|
|
|
|
data['assetType'] = this.assetType;
|
|
|
|
|
data['defectType'] = defectType;
|
|
|
|
|
data['firstAction'] = firstAction;
|
|
|
|
|
data['assetType'] = assetType;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -336,7 +424,7 @@ class Asset {
|
|
|
|
|
assetSerialNo = json['assetSerialNo'];
|
|
|
|
|
systemID = json['systemID'];
|
|
|
|
|
assetNumber = json['assetNumber'];
|
|
|
|
|
modelDefinition = json['modelDefinition'] != null ? new ModelDefinition.fromJson(json['modelDefinition']) : ModelDefinition();
|
|
|
|
|
modelDefinition = json['modelDefinition'] != null ? ModelDefinition.fromJson(json['modelDefinition']) : ModelDefinition();
|
|
|
|
|
supplier = json['supplier'];
|
|
|
|
|
ipAddress = json['ipAddress'];
|
|
|
|
|
macAddress = json['macAddress'];
|
|
|
|
|
@ -346,70 +434,70 @@ class Asset {
|
|
|
|
|
isParent = json['isParent'];
|
|
|
|
|
parentAsset = json['parentAsset'];
|
|
|
|
|
assetType = json['assetType'];
|
|
|
|
|
site = json['site'] != null ? new Site.fromJson(json['site']) : Site();
|
|
|
|
|
site = json['site'] != null ? Site.fromJson(json['site']) : Site();
|
|
|
|
|
building = json['building'];
|
|
|
|
|
floor = json['floor'];
|
|
|
|
|
department = json['department'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['assetSerialNo'] = this.assetSerialNo;
|
|
|
|
|
data['systemID'] = this.systemID;
|
|
|
|
|
data['assetNumber'] = this.assetNumber;
|
|
|
|
|
if (this.modelDefinition != null) {
|
|
|
|
|
data['modelDefinition'] = this.modelDefinition.toJson();
|
|
|
|
|
}
|
|
|
|
|
data['supplier'] = this.supplier;
|
|
|
|
|
data['ipAddress'] = this.ipAddress;
|
|
|
|
|
data['macAddress'] = this.macAddress;
|
|
|
|
|
data['portNumber'] = this.portNumber;
|
|
|
|
|
data['assetReplace'] = this.assetReplace;
|
|
|
|
|
data['oldAsset'] = this.oldAsset;
|
|
|
|
|
data['isParent'] = this.isParent;
|
|
|
|
|
data['parentAsset'] = this.parentAsset;
|
|
|
|
|
data['assetType'] = this.assetType;
|
|
|
|
|
if (this.site != null) {
|
|
|
|
|
data['site'] = this.site.toJson();
|
|
|
|
|
}
|
|
|
|
|
data['building'] = this.building;
|
|
|
|
|
data['floor'] = this.floor;
|
|
|
|
|
data['department'] = this.department;
|
|
|
|
|
data['room'] = this.room;
|
|
|
|
|
data['testsDay'] = this.testsDay;
|
|
|
|
|
data['purchasingPrice'] = this.purchasingPrice;
|
|
|
|
|
data['nbv'] = this.nbv;
|
|
|
|
|
data['currency'] = this.currency;
|
|
|
|
|
data['poNo'] = this.poNo;
|
|
|
|
|
data['invoiceNumber'] = this.invoiceNumber;
|
|
|
|
|
data['invoiceDate'] = this.invoiceDate;
|
|
|
|
|
data['replacementDate'] = this.replacementDate;
|
|
|
|
|
data['originDepartment'] = this.originDepartment;
|
|
|
|
|
if (this.originSite != null) {
|
|
|
|
|
data['originSite'] = this.originSite.toJson();
|
|
|
|
|
}
|
|
|
|
|
data['budgetYear'] = this.budgetYear;
|
|
|
|
|
data['lastPOPrice'] = this.lastPOPrice;
|
|
|
|
|
data['commissioningStatus'] = this.commissioningStatus;
|
|
|
|
|
data['productionDate'] = this.productionDate;
|
|
|
|
|
data['edd'] = this.edd;
|
|
|
|
|
data['technicalInspectionDate'] = this.technicalInspectionDate;
|
|
|
|
|
data['deliveryInspectionDate'] = this.deliveryInspectionDate;
|
|
|
|
|
data['endUserAcceptanceDate'] = this.endUserAcceptanceDate;
|
|
|
|
|
data['receivingCommittee'] = this.receivingCommittee;
|
|
|
|
|
data['siteWarrantyMonths'] = this.siteWarrantyMonths;
|
|
|
|
|
data['extendedWarrantyMonths'] = this.extendedWarrantyMonths;
|
|
|
|
|
data['remainderWarrantyMonths'] = this.remainderWarrantyMonths;
|
|
|
|
|
data['eomWarrantyMonthsNo'] = this.eomWarrantyMonthsNo;
|
|
|
|
|
data['warrantyValue'] = this.warrantyValue;
|
|
|
|
|
data['warrantyEndDate'] = this.warrantyEndDate;
|
|
|
|
|
data['warrantyContractConditions'] = this.warrantyContractConditions;
|
|
|
|
|
if (this.technicalGuidanceBooks != null) {
|
|
|
|
|
data['technicalGuidanceBooks'] = this.technicalGuidanceBooks.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
data['comment'] = this.comment;
|
|
|
|
|
data['tagCode'] = this.tagCode;
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['assetSerialNo'] = assetSerialNo;
|
|
|
|
|
data['systemID'] = systemID;
|
|
|
|
|
data['assetNumber'] = assetNumber;
|
|
|
|
|
if (modelDefinition != null) {
|
|
|
|
|
data['modelDefinition'] = modelDefinition.toJson();
|
|
|
|
|
}
|
|
|
|
|
data['supplier'] = supplier;
|
|
|
|
|
data['ipAddress'] = ipAddress;
|
|
|
|
|
data['macAddress'] = macAddress;
|
|
|
|
|
data['portNumber'] = portNumber;
|
|
|
|
|
data['assetReplace'] = assetReplace;
|
|
|
|
|
data['oldAsset'] = oldAsset;
|
|
|
|
|
data['isParent'] = isParent;
|
|
|
|
|
data['parentAsset'] = parentAsset;
|
|
|
|
|
data['assetType'] = assetType;
|
|
|
|
|
if (site != null) {
|
|
|
|
|
data['site'] = site.toJson();
|
|
|
|
|
}
|
|
|
|
|
data['building'] = building;
|
|
|
|
|
data['floor'] = floor;
|
|
|
|
|
data['department'] = department;
|
|
|
|
|
data['room'] = room;
|
|
|
|
|
data['testsDay'] = testsDay;
|
|
|
|
|
data['purchasingPrice'] = purchasingPrice;
|
|
|
|
|
data['nbv'] = nbv;
|
|
|
|
|
data['currency'] = currency;
|
|
|
|
|
data['poNo'] = poNo;
|
|
|
|
|
data['invoiceNumber'] = invoiceNumber;
|
|
|
|
|
data['invoiceDate'] = invoiceDate;
|
|
|
|
|
data['replacementDate'] = replacementDate;
|
|
|
|
|
data['originDepartment'] = originDepartment;
|
|
|
|
|
if (originSite != null) {
|
|
|
|
|
data['originSite'] = originSite.toJson();
|
|
|
|
|
}
|
|
|
|
|
data['budgetYear'] = budgetYear;
|
|
|
|
|
data['lastPOPrice'] = lastPOPrice;
|
|
|
|
|
data['commissioningStatus'] = commissioningStatus;
|
|
|
|
|
data['productionDate'] = productionDate;
|
|
|
|
|
if (edd != null) data['edd'] = edd;
|
|
|
|
|
data['technicalInspectionDate'] = technicalInspectionDate;
|
|
|
|
|
data['deliveryInspectionDate'] = deliveryInspectionDate;
|
|
|
|
|
data['endUserAcceptanceDate'] = endUserAcceptanceDate;
|
|
|
|
|
data['receivingCommittee'] = receivingCommittee;
|
|
|
|
|
data['siteWarrantyMonths'] = siteWarrantyMonths;
|
|
|
|
|
data['extendedWarrantyMonths'] = extendedWarrantyMonths;
|
|
|
|
|
data['remainderWarrantyMonths'] = remainderWarrantyMonths;
|
|
|
|
|
data['eomWarrantyMonthsNo'] = eomWarrantyMonthsNo;
|
|
|
|
|
data['warrantyValue'] = warrantyValue;
|
|
|
|
|
data['warrantyEndDate'] = warrantyEndDate;
|
|
|
|
|
data['warrantyContractConditions'] = warrantyContractConditions;
|
|
|
|
|
if (technicalGuidanceBooks != null) {
|
|
|
|
|
data['technicalGuidanceBooks'] = technicalGuidanceBooks.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
data['comment'] = comment;
|
|
|
|
|
data['tagCode'] = tagCode;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -453,7 +541,7 @@ class ModelDefinition {
|
|
|
|
|
if (json['modelDefRelatedDefects'] != null) {
|
|
|
|
|
modelDefRelatedDefects = <ModelDefRelatedDefects>[];
|
|
|
|
|
json['modelDefRelatedDefects'].forEach((v) {
|
|
|
|
|
modelDefRelatedDefects.add(new ModelDefRelatedDefects.fromJson(v));
|
|
|
|
|
modelDefRelatedDefects.add(ModelDefRelatedDefects.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (json['suppliers'] != null) {
|
|
|
|
|
@ -462,21 +550,21 @@ class ModelDefinition {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['assetName'] = this.assetName;
|
|
|
|
|
data['modelDefCode'] = this.modelDefCode;
|
|
|
|
|
data['modelName'] = this.modelName;
|
|
|
|
|
data['manufacturerId'] = this.manufacturerId;
|
|
|
|
|
data['manufacturerName'] = this.manufacturerName;
|
|
|
|
|
data['supplierName'] = this.supplierName;
|
|
|
|
|
data['replacementDate'] = this.replacementDate;
|
|
|
|
|
data['lifeSpan'] = this.lifeSpan;
|
|
|
|
|
if (this.modelDefRelatedDefects != null) {
|
|
|
|
|
data['modelDefRelatedDefects'] = this.modelDefRelatedDefects.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
if (this.suppliers != null) {
|
|
|
|
|
data['suppliers'] = this.suppliers.map((v) => v.toJson()).toList();
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['assetName'] = assetName;
|
|
|
|
|
data['modelDefCode'] = modelDefCode;
|
|
|
|
|
data['modelName'] = modelName;
|
|
|
|
|
data['manufacturerId'] = manufacturerId;
|
|
|
|
|
data['manufacturerName'] = manufacturerName;
|
|
|
|
|
data['supplierName'] = supplierName;
|
|
|
|
|
data['replacementDate'] = replacementDate;
|
|
|
|
|
data['lifeSpan'] = lifeSpan;
|
|
|
|
|
if (modelDefRelatedDefects != null) {
|
|
|
|
|
data['modelDefRelatedDefects'] = modelDefRelatedDefects.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
if (suppliers != null) {
|
|
|
|
|
data['suppliers'] = suppliers.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
@ -498,11 +586,11 @@ class ModelDefRelatedDefects {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['defectName'] = this.defectName;
|
|
|
|
|
data['workPerformed'] = this.workPerformed;
|
|
|
|
|
data['estimatedTime'] = this.estimatedTime;
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['defectName'] = defectName;
|
|
|
|
|
data['workPerformed'] = workPerformed;
|
|
|
|
|
data['estimatedTime'] = estimatedTime;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -525,12 +613,12 @@ class Site {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['customerCode'] = this.customerCode;
|
|
|
|
|
data['custName'] = this.custName;
|
|
|
|
|
if (this.buildings != null) {
|
|
|
|
|
data['buildings'] = this.buildings.map((v) => v.toJson()).toList();
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['customerCode'] = customerCode;
|
|
|
|
|
data['custName'] = custName;
|
|
|
|
|
if (buildings != null) {
|
|
|
|
|
data['buildings'] = buildings.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
@ -548,9 +636,9 @@ class AssignedEmployee {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['name'] = this.name;
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['name'] = name;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|