Adjusted mapa and mash rate extraction IO-718
This commit is contained in:
@@ -627,13 +627,13 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
|
||||
"CAL_SECP",
|
||||
"MAT_CALP",
|
||||
"CAL_PRETHR",
|
||||
"CAL_PRETHR", //Mitchell here
|
||||
"CAL_PSTTHR",
|
||||
"CAL_THRAMT",
|
||||
|
||||
"CAL_LBRMIN",
|
||||
|
||||
"CAL_LBRRTE",
|
||||
"CAL_LBRRTE", //Audatex puts it here
|
||||
"CAL_OPCODE",
|
||||
|
||||
"TAX_IND",
|
||||
@@ -657,32 +657,32 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
{
|
||||
//TODO: Import MAXDLR for every type.
|
||||
case "MAPA":
|
||||
j.rate_mapa = readValues[7];
|
||||
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;
|
||||
break;
|
||||
case "MASH":
|
||||
j.rate_mash = readValues[7];
|
||||
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;
|
||||
|
||||
break;
|
||||
case "MAHW": //TODO Should the remainder of these be index 7 or 11?
|
||||
j.rate_mahw = readValues[7];
|
||||
j.rate_mahw = float.Parse(readValues[11].ToString()) != 0 ? readValues[11] : readValues[7]; //Use CAL_LBRRTE if exists, otherwise us the pre threshold amt.?
|
||||
j.tax_levies_rt = float.Parse(readValues[14].ToString()) / 100;
|
||||
break;
|
||||
case "MA2S":
|
||||
j.rate_ma2s = readValues[7];
|
||||
j.rate_ma2s = float.Parse(readValues[11].ToString()) != 0 ? readValues[11] : readValues[7]; //Use CAL_LBRRTE if exists, otherwise us the pre threshold amt.?
|
||||
break;
|
||||
case "MA2T":
|
||||
j.rate_ma2t = readValues[7];
|
||||
j.rate_ma2t = float.Parse(readValues[11].ToString()) != 0 ? readValues[11] : readValues[7]; //Use CAL_LBRRTE if exists, otherwise us the pre threshold amt.?
|
||||
break;
|
||||
case "MA3S":
|
||||
j.rate_ma3s = readValues[7];
|
||||
j.rate_ma3s = float.Parse(readValues[11].ToString()) != 0 ? readValues[11] : readValues[7]; //Use CAL_LBRRTE if exists, otherwise us the pre threshold amt.?
|
||||
break;
|
||||
case "MACS":
|
||||
j.rate_macs = readValues[7];
|
||||
j.rate_macs = float.Parse(readValues[11].ToString()) != 0 ? readValues[11] : readValues[7]; //Use CAL_LBRRTE if exists, otherwise us the pre threshold amt.?
|
||||
break;
|
||||
case "MABL":
|
||||
j.rate_mabl = readValues[7];
|
||||
j.rate_mabl = float.Parse(readValues[11].ToString()) != 0 ? readValues[11] : readValues[7]; //Use CAL_LBRRTE if exists, otherwise us the pre threshold amt.?
|
||||
break;
|
||||
default:
|
||||
logger.Error("Unknown type value present in PFM file. {0}:{1}", readValues[0].ToString(), readValues[2]);
|
||||
@@ -768,7 +768,7 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
"TRIM_COLOR",
|
||||
"V_MLDGCODE",
|
||||
"V_ENGINE",
|
||||
|
||||
"V_MILEAGE",
|
||||
"V_COLOR",
|
||||
"V_TONE",
|
||||
"V_STAGE",
|
||||
@@ -800,15 +800,15 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
v.v_trimcode = readValues[14]?.ToString();
|
||||
v.trim_color = readValues[15]?.ToString();
|
||||
v.v_mldgcode = readValues[16]?.ToString();
|
||||
v.v_engine = readValues[17]?.ToString();
|
||||
v.v_color = readValues[18]?.ToString();
|
||||
v.v_tone = readValues[19]?.ToString();
|
||||
v.v_stage = readValues[20]?.ToString();
|
||||
v.v_engine = readValues[18]?.ToString();
|
||||
v.v_color = readValues[19]?.ToString();
|
||||
v.v_tone = readValues[20]?.ToString();
|
||||
v.v_stage = readValues[21]?.ToString();
|
||||
|
||||
dynamic p = new JObject();
|
||||
p.paint_cd1 = readValues[21]?.ToString();
|
||||
p.paint_cd2 = readValues[22]?.ToString();
|
||||
p.paint_cd3 = readValues[23]?.ToString();
|
||||
p.paint_cd1 = readValues[22]?.ToString();
|
||||
p.paint_cd2 = readValues[23]?.ToString();
|
||||
p.paint_cd3 = readValues[24]?.ToString();
|
||||
v.v_paint_codes = p;
|
||||
|
||||
j.vehicle = new JObject();
|
||||
@@ -821,8 +821,8 @@ namespace BodyshopPartner.Utils.Decoder
|
||||
j.v_model_yr = readValues[8]?.ToString();
|
||||
j.v_make_desc = readValues[10]?.ToString();
|
||||
j.v_model_desc = readValues[11]?.ToString();
|
||||
j.v_color = readValues[18]?.ToString();
|
||||
|
||||
j.v_color = readValues[19]?.ToString();
|
||||
j.kmin = readValues[18];
|
||||
v.shopid = AppMetaData.ActiveShopId;
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user