|
|
|
@ -9,7 +9,7 @@ public class TBoxApi
|
|
|
|
|
{
|
|
|
|
|
private static readonly ILog Log = LogManager.GetLogger("TboxApi");
|
|
|
|
|
|
|
|
|
|
private static readonly string BASE_URL = "http://localhost:5036";
|
|
|
|
|
private static readonly string BASE_URL = "http://localhost:5036/Car";
|
|
|
|
|
|
|
|
|
|
private static int _times = 5;
|
|
|
|
|
private static int _successTimes = 3;
|
|
|
|
@ -88,7 +88,7 @@ public class TBoxApi
|
|
|
|
|
public static async Task<bool> UnLockCarManyTimes(string carNo)
|
|
|
|
|
{
|
|
|
|
|
Log.Info($" TBoxApi start UnLockCarManyTimes carNo={carNo} ");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<bool> bools = new List<bool>();
|
|
|
|
|
for (int i = 0; i < _times; i++)
|
|
|
|
|
{
|
|
|
|
@ -100,7 +100,7 @@ public class TBoxApi
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Log.Info($" TBoxApi end UnLockCarManyTimes carNo={carNo} times={_times} resp={JsonConvert.SerializeObject(bools)}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return bools.Select(i => i).Count() > _successTimes;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -190,4 +190,4 @@ public class TBoxApi
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|