IO-1777 Add in collection of paint threshold values.
This commit is contained in:
@@ -60,4 +60,6 @@ D441404BE86E0A676462DD367D4355894C2FFDBA ImEXOnlinePartner-1.0.30-delta.nupkg 62
|
||||
8F1739F9B7C202F7E2453E7D5027F7422637D206 ImEXOnlinePartner-1.0.31-delta.nupkg 152092
|
||||
6B3D3A0DD81D6F0C302ACE42DEDDDFC11270DD22 ImEXOnlinePartner-1.0.31-full.nupkg 5609086
|
||||
9DA03F46A6BB7040C98C7DE9F308562031D790FE ImEXOnlinePartner-1.0.32-delta.nupkg 85634
|
||||
3B840B836E8F3F9C15C7F75AE9CE393C42FFB1AA ImEXOnlinePartner-1.0.32-full.nupkg 5607667
|
||||
3B840B836E8F3F9C15C7F75AE9CE393C42FFB1AA ImEXOnlinePartner-1.0.32-full.nupkg 5607667
|
||||
5C61CDF97FA03C44FF74EE4E2EE4514177CE1326 ImEXOnlinePartner-1.0.33-delta.nupkg 43893
|
||||
01123C15D95479FCE91F2C24CCEFEE4F08A6FC8A ImEXOnlinePartner-1.0.33-full.nupkg 5608151
|
||||
@@ -765,20 +765,28 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
"MAT_TX_TY5",
|
||||
"MAT_TX_IN5"
|
||||
});
|
||||
|
||||
dynamic d = new JObject();
|
||||
|
||||
for (int i = 0; i < reader.RecordCount; i++)
|
||||
{
|
||||
var readValues = reader.NextRecord();
|
||||
dynamic o = new JObject();
|
||||
switch (readValues[0].ToString())//Case switch on MATL_TYPE to assign correctly.
|
||||
{
|
||||
//TODO: Import MAXDLR for every type.
|
||||
case "MAPA":
|
||||
|
||||
j.rate_mapa = float.Parse(readValues[11].ToString()) != 0 ? readValues[11] : readValues[7]; //Use CAL_LBRRTE if exists, otherwise us the pre threshold amt.?
|
||||
j.tax_paint_mat_rt = float.Parse(readValues[14].ToString()) / 100;
|
||||
o.cal_maxdlr = float.Parse(readValues[3].ToString()) ;
|
||||
d.mapa = o;
|
||||
break;
|
||||
case "MASH":
|
||||
j.rate_mash = float.Parse(readValues[11].ToString()) != 0 ? readValues[11] : readValues[7]; //Use CAL_LBRRTE if exists, otherwise us the pre threshold amt.?
|
||||
j.tax_shop_mat_rt = float.Parse(readValues[14].ToString()) / 100;
|
||||
|
||||
o.cal_maxdlr = float.Parse(readValues[3].ToString());
|
||||
d.mash = o;
|
||||
break;
|
||||
case "MAHW": //TODO Should the remainder of these be index 7 or 11?
|
||||
j.rate_mahw = float.Parse(readValues[11].ToString()) != 0 ? readValues[11] : readValues[7]; //Use CAL_LBRRTE if exists, otherwise us the pre threshold amt.?
|
||||
@@ -805,6 +813,7 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
}
|
||||
}
|
||||
|
||||
j.materials = d;
|
||||
//TODO: There was additional logic in paradox here around the mxdlr being > 0 which it always appears to be.
|
||||
|
||||
//j.matl_type = readValues[0];//MATL_TYPE
|
||||
@@ -1077,7 +1086,7 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
|
||||
for (int i = 0; i < reader.RecordCount; i++)
|
||||
{
|
||||
logger.Debug($"Reading line {i +1}");
|
||||
logger.Debug($"Reading line {i + 1}");
|
||||
var readValues = reader.NextRecord(false);
|
||||
dynamic lin = new JObject();
|
||||
|
||||
@@ -1168,7 +1177,8 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
logger.Error(ex, "Unable to open LIN file. Retrying. ");
|
||||
retryNumber++;
|
||||
Thread.Sleep(retrySleep);
|
||||
}catch(Exception Ex)
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
logger.Error(Ex, "Unable to open LIN file. Retrying. Unknown Exception ");
|
||||
retryNumber++;
|
||||
|
||||
Reference in New Issue
Block a user