IO-997 Use ownr_ph2 if ph1 is empty.
This commit is contained in:
@@ -42,7 +42,7 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
bool ttlSuccess = ParseTtlFile(ref ret, _dir);
|
||||
bool linSuccess = ParseLinFile(ref ret, _dir, system);
|
||||
bool pfpSuccess = ParsePfpFile(ref ret, _dir);
|
||||
|
||||
ret.labor_rate_desc = "EST";
|
||||
if (!ad1Success || !ad2Success || !vehSuccess || !pfhSuccess || !pflSuccess || !pfmSuccess || !stlSuccess || !ttlSuccess || !linSuccess || !pfpSuccess) return false;
|
||||
return ret;
|
||||
}
|
||||
@@ -219,6 +219,10 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
j.ownr_zip = readValues[93];
|
||||
j.ownr_ctry = readValues[94];
|
||||
j.ownr_ph1 = readValues[95];
|
||||
if (String.IsNullOrWhiteSpace(j.ownr_ph1.Value))
|
||||
{
|
||||
j.ownr_ph1 = readValues[97];
|
||||
}
|
||||
//j.ownr_ph1x = readValues[96];
|
||||
j.ownr_ph2 = readValues[97];
|
||||
// j.ownr_ph2x = readValues[98];
|
||||
@@ -252,6 +256,10 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
ownerRoot.ownr_zip = readValues[93];
|
||||
ownerRoot.ownr_ctry = readValues[94];
|
||||
ownerRoot.ownr_ph1 = readValues[95];
|
||||
if(String.IsNullOrWhiteSpace(ownerRoot.ownr_ph1.Value))
|
||||
{
|
||||
ownerRoot.ownr_ph1 = readValues[97];
|
||||
}
|
||||
ownerRoot.ownr_ph2 = readValues[97];
|
||||
ownerRoot.ownr_ea = readValues[101];
|
||||
ownerRoot.shopid = AppMetaData.ActiveShopId;
|
||||
@@ -320,6 +328,10 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
j.ownr_zip = readValues[8];
|
||||
j.ownr_ctry = readValues[9];
|
||||
j.ownr_ph1 = readValues[10];
|
||||
if (String.IsNullOrWhiteSpace(j.ownr_ph1.Value))
|
||||
{
|
||||
j.ownr_ph1 = readValues[12];
|
||||
}
|
||||
//j.ownr_ph1x = readValues[11];
|
||||
j.ownr_ph2 = readValues[12];
|
||||
// j.ownr_ph2x = readValues[13];
|
||||
@@ -340,6 +352,10 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
j.owner.data.ownr_zip = readValues[8];
|
||||
j.owner.data.ownr_ctry = readValues[9];
|
||||
j.owner.data.ownr_ph1 = readValues[10];
|
||||
if (String.IsNullOrWhiteSpace(j.owner.data.ownr_ph1.Value))
|
||||
{
|
||||
j.owner.data.ownr_ph1 = readValues[12];
|
||||
}
|
||||
j.owner.data.ownr_ph2 = readValues[12];
|
||||
j.owner.data.ownr_ea = readValues[16];
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace BodyshopPartner.Utils
|
||||
List<ScanResponseItem> EstimatesOnDisk = new List<ScanResponseItem>();
|
||||
List<string> ad1FilePaths = new List<string>();
|
||||
|
||||
Properties.Settings.Default.MonitoringPaths.ForEach(mp => ad1FilePaths.AddRange(Directory.GetFiles(mp, "*.env").ToList()));
|
||||
Properties.Settings.Default.MonitoringPaths?.ForEach(mp => ad1FilePaths.AddRange(Directory.GetFiles(mp, "*.env").ToList()));
|
||||
|
||||
await JobProcessingQueue.GetOpCodes();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user