This commit is contained in:
@@ -91,8 +91,7 @@ namespace AyaNova.Biz
|
||||
// - Unit service type
|
||||
// - Workorder Item Type
|
||||
// - Client group
|
||||
// - Workorder category
|
||||
// - REGIONS
|
||||
// - Workorder category
|
||||
// - PartCategory
|
||||
// - Dispatch zones
|
||||
// - ScheduleableUserGroups
|
||||
@@ -103,6 +102,30 @@ namespace AyaNova.Biz
|
||||
//IMPORT UNIT MODEL CATEGORIES AS TAGS
|
||||
await DoImport("GZTW.AyaNova.BLL.UnitModelCategory", AyaType.Tag, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
//IMPORT Unit service type AS TAGS
|
||||
await DoImport("GZTW.AyaNova.BLL.UnitServiceType", AyaType.Tag, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
//IMPORT Workorder Item Type AS TAGS
|
||||
await DoImport("GZTW.AyaNova.BLL.WorkorderItemType", AyaType.Tag, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
//IMPORT Client group AS TAGS
|
||||
await DoImport("GZTW.AyaNova.BLL.ClientGroup", AyaType.Tag, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
//IMPORT Workorder category AS TAGS
|
||||
await DoImport("GZTW.AyaNova.BLL.WorkorderCategory", AyaType.Tag, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
//IMPORT Part Category AS TAGS
|
||||
await DoImport("GZTW.AyaNova.BLL.PartCategory", AyaType.Tag, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
//IMPORT Dispatch zones AS TAGS
|
||||
await DoImport("GZTW.AyaNova.BLL.DispatchZone", AyaType.Tag, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
//IMPORT XXXX AS TAGS
|
||||
await DoImport("XXXX", AyaType.Tag, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
|
||||
|
||||
|
||||
//IMPORT REGIONS AS TAGS
|
||||
await DoImport("GZTW.AyaNova.BLL.Region", AyaType.Tag, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
|
||||
@@ -238,6 +238,15 @@ namespace AyaNova.Biz
|
||||
{
|
||||
case "GZTW.AyaNova.BLL.Region":
|
||||
case "GZTW.AyaNova.BLL.UnitModelCategory":
|
||||
case "GZTW.AyaNova.BLL.UnitServiceType":
|
||||
case "GZTW.AyaNova.BLL.WorkorderItemType":
|
||||
case "GZTW.AyaNova.BLL.ClientGroup":
|
||||
case "GZTW.AyaNova.BLL.WorkorderCategory":
|
||||
case "GZTW.AyaNova.BLL.PartCategory":
|
||||
case "GZTW.AyaNova.BLL.DispatchZone":
|
||||
case "XXXXXXXXXXX":
|
||||
case "XXXXXXXXXXX":
|
||||
case "XXXXXXXXXXX":
|
||||
{
|
||||
var NewTagName = j["Name"].Value<string>();
|
||||
var OldV7Id = new Guid(j["ID"].Value<string>());
|
||||
@@ -248,15 +257,15 @@ namespace AyaNova.Biz
|
||||
//There might already be a tag of the same name since so many different types of V7 objects are becoming tags
|
||||
//Weighed the pros and cons of uniquifying by object type versus just using the same name for different object types:
|
||||
//it seems to me at this point that people might desire the same exact name because if they used it that way they probably
|
||||
//intended it that way, so this bit of code will check if it already exists and then use that ID in the importMap instead
|
||||
//intended it that way, so decision is to check if it already exists and then use that ID in the importMap instead
|
||||
//for matching other objects imported to tags
|
||||
|
||||
//Already present?
|
||||
var AlreadyTag = ct.Tag.Where(m => m.Name == NewTagName).FirstOrDefault();
|
||||
if (AlreadyTag != null)
|
||||
var ExistingTag = ct.Tag.Where(m => m.Name == NewTagName).FirstOrDefault();
|
||||
if (ExistingTag != null)
|
||||
{
|
||||
//map it to the existing tag of same name
|
||||
var mapItem = new ImportAyaNova7MapItem(OldV7Id, AyaType.Tag, AlreadyTag.Id);
|
||||
var mapItem = new ImportAyaNova7MapItem(OldV7Id, AyaType.Tag, ExistingTag.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user