This commit is contained in:
2021-08-20 17:03:05 +00:00
parent a3af94e501
commit a164cd92de

View File

@@ -227,6 +227,38 @@ namespace AyaNova.PlugIn.V8
}
//UNKNOWN / MISSING RECORD OBJECT STAND INs
private long XUnknownV7PartId = 0;//used when there is no part id on a workorderitempart record
private string MissingDataNamePrefix = "zV8migrate_substitute";//append guid to ensure uniqueness
private async System.Threading.Tasks.Task CreateSubstitute(Guid id, RootObjectTypes desiredType)
{
//create the simplest possible version of this object desired
switch (desiredType)
{
case RootObjectTypes.Part:
{
}
break;
case RootObjectTypes.PartWarehouse:
{
}
break;
case RootObjectTypes.Client:
{
}
break;
default:
throw new Exception("Error: CreateSubstitute (source id: " + id.ToString() + " for type: " + desiredType.ToString() + ") THIS TYPE NOT CODED YET");
}
}
private long XXSafeGetUserMap(Guid id)
{
if (!V7ToV8IdMap.ContainsKey(id)) return 1;//1=raven administrator account
@@ -262,26 +294,7 @@ namespace AyaNova.PlugIn.V8
private bool V7UseInventory = false;
private List<long> Allv8WarehouseIds = new List<long>();
//UNKNOWN / MISSING RECORD OBJECT STAND INs
private long XUnknownV7PartId = 0;//used when there is no part id on a workorderitempart record
private string MissingDataNamePrefix = "zV8migrate_substitute";//append guid to ensure uniqueness
private async System.Threading.Tasks.Task CreateSubstitute(Guid id, RootObjectTypes desiredType)
{
//create the simplest possible version of this object desired
switch (desiredType)
{
case RootObjectTypes.Client:
{
}
break;
default:
throw new Exception("Error: CreateSubstitute (source id: " + id.ToString() + " for type: " + desiredType.ToString() + ") THIS TYPE NOT CODED YET");
}
}
@@ -3143,14 +3156,9 @@ namespace AyaNova.PlugIn.V8
dwipr.workOrderId = RavenId;
dwipr.workOrderItemId = ravenwoitemid;
dwipr.quantity = wipr.Quantity;
var tryPartId = Getv7v8IdMapNullOk(wipr.PartID);
if (tryPartId == null)
{
dwipr.partId = UnknownV7PartId;
}
else
dwipr.partId = tryPartId;
dwipr.partWarehouseId = Getv7v8IdMap(wipr.PartWarehouseID, "warehouse");
dwipr.partId = await Getv7v8IdMap(wipr.PartID, RootObjectTypes.Part);
dwipr.partWarehouseId = await Getv7v8IdMap(wipr.PartWarehouseID, RootObjectTypes.PartWarehouse);
poitemtowoitempartrequest pto = PoItemPartRequestMap.FirstOrDefault(z => z.v7woitempartrequestid == wipr.ID);
if (pto != null)