日志整理

zw
lxw 6 months ago
parent b5ff5a4a75
commit ea9fa252b5

@ -45,7 +45,7 @@ public abstract class CloudApi
Log.Info(
$" CloudApi VehicleCheck SendVehicleCertification resp={JsonConvert.SerializeObject(sendVehicleCertification)}");
return sendVehicleCertification;
}
@ -137,7 +137,7 @@ public abstract class CloudApi
$" CloudApi CarCanStart ");
var cloudClientCarCanStart = CloudClientMgr.CloudClient.CarCanStart;
Log.Info(
$" CloudApi CarCanStart resp={cloudClientCarCanStart}");
$" CloudApi CarCanStart resp= {JsonConvert.SerializeObject(cloudClientCarCanStart)}");
return cloudClientCarCanStart;
}

@ -96,18 +96,18 @@ public class RfidApi
}
}
public static async Task<RfidReadModel?> ReadRifd()
public static async Task<RfidReadModel?> ReadRfid()
{
Log.Info("RfidApi ReadRifd");
Log.Info("RfidApi ReadRfid");
string readUrl = BASE_URL + "/Api/BeginRead";
string url = BASE_URL + "/Api/ReadRfidData";
try
{
var vBeginRead = await _httpClient.GetStringAsync(readUrl);
string s = await _httpClient.GetStringAsync(url);
Log.Info($"ReadRifd resp={s}");
Log.Info($"ReadRfid resp={s}");
if (s != String.Empty)
{
RfidReadModel? model = JsonConvert.DeserializeObject<RfidReadModel>(s);
@ -119,7 +119,7 @@ public class RfidApi
}
catch (Exception e)
{
Log.Error($"RfidApi ReadRifd err e={e}");
Log.Error($"RfidApi ReadRfid err e={e}");
return null;
}

@ -32,7 +32,7 @@ public class TBoxApi
tboxCarInfoModel = JsonConvert.DeserializeObject<TboxCarInfoModel>(s);
}
Log.Info($"TBoxApi GetCarInfo resp = {tboxCarInfoModel}");
Log.Info($"TBoxApi GetCarInfo resp = {JsonConvert.SerializeObject(tboxCarInfoModel)}");
return tboxCarInfoModel;
}
catch (Exception e)
@ -71,10 +71,10 @@ public class TBoxApi
if (!String.IsNullOrWhiteSpace(s))
{
tboxCarInfoModel = JsonConvert.DeserializeObject<TboxCarInfoModel>(s);
Log.Info($"IsConnected resp={tboxCarInfoModel}");
Log.Info($"IsConnected resp={JsonConvert.SerializeObject(tboxCarInfoModel)}");
}
Log.Info($"GetCarInfo resp = {tboxCarInfoModel}");
Log.Info($"GetCarInfo resp = {JsonConvert.SerializeObject(tboxCarInfoModel)}");
return tboxCarInfoModel.Connected;
}
catch (Exception e)
@ -99,7 +99,7 @@ public class TBoxApi
bools.Add(unLockCar);
}
}
Log.Info($" TBoxApi end UnLockCarManyTimes carNo={carNo} time={_times} resp={JsonConvert.SerializeObject(bools)}");
Log.Info($" TBoxApi end UnLockCarManyTimes carNo={carNo} times={_times} resp={JsonConvert.SerializeObject(bools)}");
return bools.Select(i => i).Count() > _successTimes;
}
@ -117,7 +117,7 @@ public class TBoxApi
bools.Add(unLockCar);
}
}
Log.Info($" TBoxApi end LockCarManyTimes carNo={carNo} time={_times} resp={JsonConvert.SerializeObject(bools)}");
Log.Info($" TBoxApi end LockCarManyTimes carNo={carNo} times={_times} resp={JsonConvert.SerializeObject(bools)}");
return bools.Select(i => i).Count() > _successTimes;
}
@ -158,7 +158,7 @@ public class TBoxApi
tboxCarInfoModels = JsonConvert.DeserializeObject<List<TboxCarInfoModel>>(s);
}
Log.Info($"TBoxApi GetCarInfoList resp = {tboxCarInfoModels}");
Log.Info($"TBoxApi GetCarInfoList resp = {JsonConvert.SerializeObject(tboxCarInfoModels)}");
return tboxCarInfoModels;
}
catch (Exception e)

@ -208,7 +208,7 @@ public class StationReadyState : IState
return Invoker.Invoke("read rfid", 3000, 20, machine.IsCanceled,
() => machine.RfidReadFlag, () =>
{
Task<RfidReadModel?> rfidReadModel = RfidApi.ReadRifd();
Task<RfidReadModel?> rfidReadModel = RfidApi.ReadRfid();
rfidReadModel.Wait();
var machineRfidReadModel = rfidReadModel.Result;

Loading…
Cancel
Save