|
|
|
|
@ -8,71 +8,76 @@ import 'package:test_sa/models/timer_model.dart';
|
|
|
|
|
import 'asset_transfer_attachment.dart';
|
|
|
|
|
|
|
|
|
|
class AssetTransfer {
|
|
|
|
|
AssetTransfer(
|
|
|
|
|
{this.id,
|
|
|
|
|
this.transferNo,
|
|
|
|
|
this.transferCode,
|
|
|
|
|
this.assetId,
|
|
|
|
|
this.destSiteId,
|
|
|
|
|
this.destBuildingId,
|
|
|
|
|
this.destFloorId,
|
|
|
|
|
this.destDepartmentId,
|
|
|
|
|
this.destRoomId,
|
|
|
|
|
this.senderSiteId,
|
|
|
|
|
this.senderBuildingId,
|
|
|
|
|
this.senderFloorId,
|
|
|
|
|
this.senderDepartmentId,
|
|
|
|
|
this.senderRoom,
|
|
|
|
|
this.senderAssignedEmployeeId,
|
|
|
|
|
this.senderMachineStatusId,
|
|
|
|
|
this.senderComment,
|
|
|
|
|
this.comment,
|
|
|
|
|
this.receiverEndUserId,
|
|
|
|
|
this.receiverEndUserName,
|
|
|
|
|
this.senderStartDate,
|
|
|
|
|
this.senderEndDate,
|
|
|
|
|
this.senderWorkingHours,
|
|
|
|
|
this.senderTravelingHours,
|
|
|
|
|
this.senderEngSignature,
|
|
|
|
|
this.senderAttachments,
|
|
|
|
|
this.receiverAssignedEmployeeId,
|
|
|
|
|
this.receiverMachineStatusId,
|
|
|
|
|
this.receiverComment,
|
|
|
|
|
this.receiverStartDate,
|
|
|
|
|
this.receiverEndDate,
|
|
|
|
|
this.receiverWorkingHours,
|
|
|
|
|
this.receiverTravelingHours,
|
|
|
|
|
this.receiverEngSignature,
|
|
|
|
|
this.receiverAttachments,
|
|
|
|
|
this.assetNumber,
|
|
|
|
|
this.assetName,
|
|
|
|
|
this.manufacturerName,
|
|
|
|
|
this.modelName,
|
|
|
|
|
this.assetSerialNo,
|
|
|
|
|
this.destDepartmentName,
|
|
|
|
|
this.destBuildingName,
|
|
|
|
|
this.applied,
|
|
|
|
|
this.createdOn,
|
|
|
|
|
this.destFloorName,
|
|
|
|
|
this.destSiteName,
|
|
|
|
|
this.manufacturerId,
|
|
|
|
|
this.modelId,
|
|
|
|
|
this.modifiedOn,
|
|
|
|
|
this.receiverAssignedEmployeeName,
|
|
|
|
|
this.receiverEngSignatureUrl,
|
|
|
|
|
this.receiverMachineStatusName,
|
|
|
|
|
this.senderAssignedEmployeeName,
|
|
|
|
|
this.senderBuildingName,
|
|
|
|
|
this.senderDepartmentName,
|
|
|
|
|
this.senderEngSignatureUrl,
|
|
|
|
|
this.senderFloorName,
|
|
|
|
|
this.senderMachineStatusName,
|
|
|
|
|
this.senderSiteName,
|
|
|
|
|
this.supplierId,
|
|
|
|
|
this.supplierName,
|
|
|
|
|
this.senderVisitTimers,
|
|
|
|
|
this.receiverVisitTimers,
|
|
|
|
|
this.tbsTimer});
|
|
|
|
|
AssetTransfer({
|
|
|
|
|
this.id,
|
|
|
|
|
this.transferNo,
|
|
|
|
|
this.transferCode,
|
|
|
|
|
this.assetId,
|
|
|
|
|
this.destSiteId,
|
|
|
|
|
this.destBuildingId,
|
|
|
|
|
this.destFloorId,
|
|
|
|
|
this.destDepartmentId,
|
|
|
|
|
this.destRoomId,
|
|
|
|
|
this.senderSiteId,
|
|
|
|
|
this.senderBuildingId,
|
|
|
|
|
this.senderFloorId,
|
|
|
|
|
this.senderDepartmentId,
|
|
|
|
|
this.senderRoom,
|
|
|
|
|
this.senderAssignedEmployeeId,
|
|
|
|
|
this.senderMachineStatusId,
|
|
|
|
|
this.senderComment,
|
|
|
|
|
this.comment,
|
|
|
|
|
this.receiverEndUserId,
|
|
|
|
|
this.receiverEndUserName,
|
|
|
|
|
this.senderStartDate,
|
|
|
|
|
this.senderEndDate,
|
|
|
|
|
this.senderWorkingHours,
|
|
|
|
|
this.senderTravelingHours,
|
|
|
|
|
this.senderEngSignature,
|
|
|
|
|
this.senderAttachments,
|
|
|
|
|
this.receiverAssignedEmployeeId,
|
|
|
|
|
this.receiverMachineStatusId,
|
|
|
|
|
this.receiverComment,
|
|
|
|
|
this.receiverStartDate,
|
|
|
|
|
this.receiverEndDate,
|
|
|
|
|
this.receiverWorkingHours,
|
|
|
|
|
this.receiverTravelingHours,
|
|
|
|
|
this.receiverEngSignature,
|
|
|
|
|
this.receiverAttachments,
|
|
|
|
|
this.assetNumber,
|
|
|
|
|
this.assetName,
|
|
|
|
|
this.manufacturerName,
|
|
|
|
|
this.modelName,
|
|
|
|
|
this.assetSerialNo,
|
|
|
|
|
this.destDepartmentName,
|
|
|
|
|
this.destBuildingName,
|
|
|
|
|
this.applied,
|
|
|
|
|
this.createdOn,
|
|
|
|
|
this.destFloorName,
|
|
|
|
|
this.destSiteName,
|
|
|
|
|
this.manufacturerId,
|
|
|
|
|
this.modelId,
|
|
|
|
|
this.modifiedOn,
|
|
|
|
|
this.receiverAssignedEmployeeName,
|
|
|
|
|
this.receiverEngSignatureUrl,
|
|
|
|
|
this.receiverMachineStatusName,
|
|
|
|
|
this.senderAssignedEmployeeName,
|
|
|
|
|
this.senderBuildingName,
|
|
|
|
|
this.senderDepartmentName,
|
|
|
|
|
this.senderEngSignatureUrl,
|
|
|
|
|
this.senderFloorName,
|
|
|
|
|
this.senderMachineStatusName,
|
|
|
|
|
this.senderSiteName,
|
|
|
|
|
this.supplierId,
|
|
|
|
|
this.supplierName,
|
|
|
|
|
this.senderVisitTimers,
|
|
|
|
|
this.receiverVisitTimers,
|
|
|
|
|
this.tbsTimer,
|
|
|
|
|
this.extensionNo,
|
|
|
|
|
this.employeeId,
|
|
|
|
|
this.name,
|
|
|
|
|
this.createdDate,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
AssetTransfer.fromJson(dynamic json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
@ -100,6 +105,10 @@ class AssetTransfer {
|
|
|
|
|
senderWorkingHours = json['senderWorkingHours'];
|
|
|
|
|
senderTravelingHours = json['senderTravelingHours'];
|
|
|
|
|
senderEngSignature = json['senderEngSignature'];
|
|
|
|
|
extensionNo = json['extensionNo'];
|
|
|
|
|
employeeId = json['employeeId'];
|
|
|
|
|
name = json['name'];
|
|
|
|
|
createdDate = json['createdDate'];
|
|
|
|
|
if (json['senderAttachments'] != null) {
|
|
|
|
|
senderAttachments = [];
|
|
|
|
|
json['senderAttachments'].forEach((v) {
|
|
|
|
|
@ -239,6 +248,10 @@ class AssetTransfer {
|
|
|
|
|
List<VisitTimers> senderVisitTimers;
|
|
|
|
|
List<VisitTimers> receiverVisitTimers;
|
|
|
|
|
TimerModel tbsTimer = TimerModel();
|
|
|
|
|
String extensionNo;
|
|
|
|
|
String employeeId;
|
|
|
|
|
String name;
|
|
|
|
|
String createdDate;
|
|
|
|
|
|
|
|
|
|
AssetTransfer copyWith(
|
|
|
|
|
{num id,
|
|
|
|
|
@ -305,6 +318,10 @@ class AssetTransfer {
|
|
|
|
|
String destDepartmentName,
|
|
|
|
|
List<VisitTimers> senderVisitTimers,
|
|
|
|
|
List<VisitTimers> receiverVisitTimers,
|
|
|
|
|
String extensionNo,
|
|
|
|
|
String employeeId,
|
|
|
|
|
String name,
|
|
|
|
|
String createdDate,
|
|
|
|
|
TimerModel tbsTimer}) =>
|
|
|
|
|
AssetTransfer(
|
|
|
|
|
id: id ?? this.id,
|
|
|
|
|
@ -370,7 +387,12 @@ class AssetTransfer {
|
|
|
|
|
senderVisitTimers: senderVisitTimers ?? this.senderVisitTimers,
|
|
|
|
|
receiverVisitTimers: receiverVisitTimers ?? this.receiverVisitTimers,
|
|
|
|
|
tbsTimer: tbsTimer ?? this.tbsTimer,
|
|
|
|
|
manufacturerName: manufacturerName ?? this.manufacturerName);
|
|
|
|
|
manufacturerName: manufacturerName ?? this.manufacturerName,
|
|
|
|
|
extensionNo: extensionNo ?? this.extensionNo,
|
|
|
|
|
employeeId: employeeId ?? this.employeeId,
|
|
|
|
|
name: name ?? this.name,
|
|
|
|
|
createdDate: createdDate ?? this.createdDate,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
|
@ -399,6 +421,10 @@ class AssetTransfer {
|
|
|
|
|
map['senderWorkingHours'] = senderWorkingHours;
|
|
|
|
|
map['senderTravelingHours'] = senderTravelingHours;
|
|
|
|
|
map['senderEngSignature'] = senderEngSignature;
|
|
|
|
|
map['extensionNo'] = extensionNo;
|
|
|
|
|
map['employeeId'] = employeeId;
|
|
|
|
|
map['name'] = name;
|
|
|
|
|
map['createdDate'] = createdDate;
|
|
|
|
|
if (this.senderVisitTimers != null) {
|
|
|
|
|
map['assetTransferSenderTimers'] = this.senderVisitTimers.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
|