Added vehicle changes & updates.
This commit is contained in:
@@ -30,7 +30,7 @@ namespace BodyshopUploader.Utils.Decoder
|
||||
string _dir = Path.GetDirectoryName(FilePath) + @"\";
|
||||
|
||||
ParseAd1File(ref ret, _dir);
|
||||
//ParseVehFile(ref ret, _dir);
|
||||
ParseVehFile(ref ret, _dir);
|
||||
//ParseStlFile(ref ret, _dir);
|
||||
//ParseTtlFile(ref ret, _dir);
|
||||
//ParseLinFile(ref ret, _dir);
|
||||
@@ -212,16 +212,73 @@ namespace BodyshopUploader.Utils.Decoder
|
||||
{
|
||||
using (Stream fis = File.Open(RootFilePath + j.ciecaid.Value + "v.veh", FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
{
|
||||
var reader = new DBFReader(fis);
|
||||
reader.SetSelectFields(new string[] { "V_MODEL_YR", "V_MAKEDESC", "V_MODEL", "V_COLOR", "PLATE_NO", "V_VIN" });
|
||||
var readValues = reader.NextRecord();
|
||||
j.V_Model_Yr = readValues[0].ToString();
|
||||
j.V_Make_Desc = readValues[1].ToString();
|
||||
j.V_Model = readValues[2].ToString();
|
||||
j.V_Color = readValues[3].ToString();
|
||||
j.Lic_Plate = readValues[4].ToString();
|
||||
j.V_Vin = readValues[5].ToString();
|
||||
dynamic v = new JObject();
|
||||
|
||||
var reader = new DBFReader(fis);
|
||||
reader.SetSelectFields(new string[] { "IMPACT_1",
|
||||
"IMPACT_2",
|
||||
"DB_V_CODE",
|
||||
"PLATE_NO",
|
||||
"PLATE_ST",
|
||||
"V_VIN",
|
||||
"V_COND",
|
||||
"V_PROD_DT",
|
||||
"V_MODEL_YR",
|
||||
"V_MAKECODE",
|
||||
"V_MAKEDESC",
|
||||
"V_MODEL",
|
||||
"V_TYPE", //
|
||||
"V_BSTYLE",
|
||||
"V_TRIMCODE",
|
||||
"TRIM_COLOR",
|
||||
"V_MLDGCODE",
|
||||
"V_ENGINE",
|
||||
|
||||
"V_COLOR",
|
||||
"V_TONE",
|
||||
"V_STAGE",
|
||||
"PAINT_CD1",
|
||||
"PAINT_CD2",
|
||||
"PAINT_CD3"
|
||||
});
|
||||
|
||||
var readValues = reader.NextRecord();
|
||||
|
||||
dynamic d = new JObject();
|
||||
d.impact1 = readValues[0]?.ToString();
|
||||
d.impact2 = readValues[1]?.ToString();
|
||||
|
||||
j.area_of_damage = d;
|
||||
|
||||
v.db_v_code = readValues[2]?.ToString();
|
||||
v.plate_no = readValues[3]?.ToString();
|
||||
v.plate_st = readValues[4]?.ToString();
|
||||
v.v_vin = readValues[5]?.ToString();
|
||||
v.v_cond = readValues[6]?.ToString();
|
||||
v.v_prod_dt = readValues[7]?.ToString();
|
||||
v.v_model_yr = readValues[8]?.ToString();
|
||||
v.v_makecode = readValues[9]?.ToString();
|
||||
v.v_make_desc = readValues[10]?.ToString();
|
||||
v.v_model_desc = readValues[11]?.ToString();
|
||||
v.v_type = readValues[12]?.ToString();
|
||||
v.v_bstyle = readValues[13]?.ToString();
|
||||
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_options = readValues[18]?.ToString();
|
||||
v.v_color = readValues[18]?.ToString();
|
||||
v.v_tone = readValues[19]?.ToString();
|
||||
v.v_stage = readValues[20]?.ToString();
|
||||
|
||||
dynamic p = new JObject();
|
||||
p.paint_cd1 = readValues[21]?.ToString();
|
||||
p.paint_cd2 = readValues[22]?.ToString();
|
||||
p.paint_cd3 = readValues[23]?.ToString();
|
||||
v.v_paint_codes = p;
|
||||
|
||||
j.vehicle = new JObject();
|
||||
j.vehicle.data = v;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user