|
|
|
|
class AllRequestsAndCount {
|
|
|
|
|
CountServiceRequest countServiceRequest;
|
|
|
|
|
CountServiceRequest countGasRefill;
|
|
|
|
|
CountServiceRequest countAssetTransfer;
|
|
|
|
|
CountServiceRequest countPPM;
|
|
|
|
|
DetailsStatusTotal detailsStatusTotal;
|
|
|
|
|
CountServiceRequest total;
|
|
|
|
|
List<RequestsDetails> requestsDetails;
|
|
|
|
|
|
|
|
|
|
AllRequestsAndCount({this.countServiceRequest, this.countGasRefill, this.countAssetTransfer, this.countPPM, this.detailsStatusTotal, this.total, this.requestsDetails});
|
|
|
|
|
|
|
|
|
|
AllRequestsAndCount.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
countServiceRequest = json['countServiceRequest'] != null ? CountServiceRequest.fromJson(json['countServiceRequest']) : null;
|
|
|
|
|
countGasRefill = json['countGasRefill'] != null ? CountServiceRequest.fromJson(json['countGasRefill']) : null;
|
|
|
|
|
countAssetTransfer = json['countAssetTransfer'] != null ? CountServiceRequest.fromJson(json['countAssetTransfer']) : null;
|
|
|
|
|
countPPM = json['countPPM'] != null ? CountServiceRequest.fromJson(json['countPPM']) : null;
|
|
|
|
|
detailsStatusTotal = json['detailsStatusTotal'] != null ? DetailsStatusTotal.fromJson(json['detailsStatusTotal']) : null;
|
|
|
|
|
total = json['total'] != null ? CountServiceRequest.fromJson(json['total']) : null;
|
|
|
|
|
if (json['requestsDetails'] != null) {
|
|
|
|
|
requestsDetails = <RequestsDetails>[];
|
|
|
|
|
json['requestsDetails'].forEach((v) {
|
|
|
|
|
requestsDetails.add(RequestsDetails.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
if (countServiceRequest != null) {
|
|
|
|
|
data['countServiceRequest'] = countServiceRequest.toJson();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (countGasRefill != null) {
|
|
|
|
|
data['countGasRefill'] = countGasRefill.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (countAssetTransfer != null) {
|
|
|
|
|
data['countAssetTransfer'] = countAssetTransfer.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (countPPM != null) {
|
|
|
|
|
data['countPPM'] = countPPM.toJson();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (detailsStatusTotal != null) {
|
|
|
|
|
data['detailsStatusTotal'] = detailsStatusTotal.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (total != null) {
|
|
|
|
|
data['total'] = total.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (requestsDetails != null) {
|
|
|
|
|
data['requestsDetails'] = requestsDetails.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class CountServiceRequest {
|
|
|
|
|
int count;
|
|
|
|
|
|
|
|
|
|
CountServiceRequest({this.count});
|
|
|
|
|
|
|
|
|
|
CountServiceRequest.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
count = json['count'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['count'] = count;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class DetailsStatusTotal {
|
|
|
|
|
int open;
|
|
|
|
|
int inProgress;
|
|
|
|
|
int closed;
|
|
|
|
|
|
|
|
|
|
DetailsStatusTotal({this.open, this.inProgress, this.closed});
|
|
|
|
|
|
|
|
|
|
DetailsStatusTotal.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
open = json['open'];
|
|
|
|
|
inProgress = json['inProgress'];
|
|
|
|
|
closed = json['closed'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['open'] = open;
|
|
|
|
|
data['inProgress'] = inProgress;
|
|
|
|
|
data['closed'] = closed;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class RequestsDetails {
|
|
|
|
|
int id;
|
|
|
|
|
String nameOfType;
|
|
|
|
|
String priority;
|
|
|
|
|
String status;
|
|
|
|
|
String assetName;
|
|
|
|
|
String assetNo;
|
|
|
|
|
String assetSN;
|
|
|
|
|
String model;
|
|
|
|
|
String supplier;
|
|
|
|
|
String manufacturer;
|
|
|
|
|
String requestType;
|
|
|
|
|
String requestNo;
|
|
|
|
|
String gasType;
|
|
|
|
|
String site;
|
|
|
|
|
String statusReceiver;
|
|
|
|
|
String assetTransferFrom;
|
|
|
|
|
String assetTransferTo;
|
|
|
|
|
String code;
|
|
|
|
|
String date;
|
|
|
|
|
String siteTransferFrom;
|
|
|
|
|
String siteTransferTo;
|
|
|
|
|
|
|
|
|
|
RequestsDetails(
|
|
|
|
|
{this.id,
|
|
|
|
|
this.nameOfType,
|
|
|
|
|
this.priority,
|
|
|
|
|
this.status,
|
|
|
|
|
this.assetName,
|
|
|
|
|
this.assetNo,
|
|
|
|
|
this.assetSN,
|
|
|
|
|
this.model,
|
|
|
|
|
this.supplier,
|
|
|
|
|
this.manufacturer,
|
|
|
|
|
this.requestType,
|
|
|
|
|
this.requestNo,
|
|
|
|
|
this.gasType,
|
|
|
|
|
this.site,
|
|
|
|
|
this.statusReceiver,
|
|
|
|
|
this.assetTransferFrom,
|
|
|
|
|
this.assetTransferTo,
|
|
|
|
|
this.code,
|
|
|
|
|
this.siteTransferFrom,
|
|
|
|
|
this.siteTransferTo,
|
|
|
|
|
this.date});
|
|
|
|
|
|
|
|
|
|
RequestsDetails.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
nameOfType = json['nameOfType'];
|
|
|
|
|
priority = json['priority'];
|
|
|
|
|
status = json['status'];
|
|
|
|
|
assetName = json['assetName'];
|
|
|
|
|
assetNo = json['assetNo'];
|
|
|
|
|
assetSN = json['assetSN'];
|
|
|
|
|
model = json['model'];
|
|
|
|
|
supplier = json['supplier'];
|
|
|
|
|
manufacturer = json['manufacturer'];
|
|
|
|
|
requestType = json['requestType'];
|
|
|
|
|
requestNo = json['requestNo'];
|
|
|
|
|
gasType = json['gasType'];
|
|
|
|
|
site = json['site'];
|
|
|
|
|
statusReceiver = json['statusReceiver'];
|
|
|
|
|
assetTransferFrom = json['assetTransferFrom'];
|
|
|
|
|
assetTransferTo = json['assetTransferTo'];
|
|
|
|
|
code = json['code'];
|
|
|
|
|
date = json['date'];
|
|
|
|
|
siteTransferFrom = json['siteTransferFrom'];
|
|
|
|
|
siteTransferTo = json['siteTransferTo'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['nameOfType'] = nameOfType;
|
|
|
|
|
data['priority'] = priority;
|
|
|
|
|
data['status'] = status;
|
|
|
|
|
data['assetName'] = assetName;
|
|
|
|
|
data['assetNo'] = assetNo;
|
|
|
|
|
data['assetSN'] = assetSN;
|
|
|
|
|
data['model'] = model;
|
|
|
|
|
data['supplier'] = supplier;
|
|
|
|
|
data['manufacturer'] = manufacturer;
|
|
|
|
|
data['requestType'] = requestType;
|
|
|
|
|
data['requestNo'] = requestNo;
|
|
|
|
|
data['gasType'] = gasType;
|
|
|
|
|
data['site'] = site;
|
|
|
|
|
data['statusReceiver'] = statusReceiver;
|
|
|
|
|
data['assetTransferFrom'] = assetTransferFrom;
|
|
|
|
|
data['assetTransferTo'] = assetTransferTo;
|
|
|
|
|
data['code'] = code;
|
|
|
|
|
data['date'] = date;
|
|
|
|
|
data['siteTransferFrom'] = siteTransferFrom;
|
|
|
|
|
data['siteTransferTo'] = siteTransferTo;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|