Merge branch 'master' of http://gitea.beetai.com/ducda/AIParkingApplication
This commit is contained in:
commit
c01b0dac8a
|
@ -120,6 +120,26 @@ namespace AIParkingApplication
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<CardValidation> CheckCard(string cardNumber)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var request = new CardInfo()
|
||||||
|
{
|
||||||
|
CardNumber = cardNumber
|
||||||
|
};
|
||||||
|
HttpResponseMessage response = await httpClient.PostAsJsonAsync("/api/check-card", request);
|
||||||
|
response.EnsureSuccessStatusCode();
|
||||||
|
var cardValication = await response.Content.ReadAsAsync<CardValidation>();
|
||||||
|
return cardValication;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"SendCheckCardRequest : {ex.Message}");
|
||||||
|
return new CardValidation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Neu Dicrection la Out thi logID la logID lay ve khi check the
|
//Neu Dicrection la Out thi logID la logID lay ve khi check the
|
||||||
public async Task<SaveLogRespone> SaveLog(int direction, string cardID, string cameraID, int squareOrLong, string timeInOrOut, string textPlate, Mat plateImage, Mat plateImageResult, Mat PlateFrameImage, Mat FrameImage, string logID = "")
|
public async Task<SaveLogRespone> SaveLog(int direction, string cardID, string cameraID, int squareOrLong, string timeInOrOut, string textPlate, Mat plateImage, Mat plateImageResult, Mat PlateFrameImage, Mat FrameImage, string logID = "")
|
||||||
{
|
{
|
||||||
|
@ -166,6 +186,57 @@ namespace AIParkingApplication
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class CardInfo
|
||||||
|
{
|
||||||
|
[JsonProperty("card")]
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CardValidation
|
||||||
|
{
|
||||||
|
[JsonProperty("status")]
|
||||||
|
public string IsValid { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("type")]
|
||||||
|
public string Direction { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("cardID")]
|
||||||
|
public string CardIP { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("cardRealID")]
|
||||||
|
public int CardRealID { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("log_id")]
|
||||||
|
public int LogID { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("cardType")]
|
||||||
|
public string CardType { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("vehicleType")]
|
||||||
|
public string VehicleType { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("autoOpen")]
|
||||||
|
public bool AutoOpenDoor { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("plate")]
|
||||||
|
public string Plate { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("time")]
|
||||||
|
public string TimeIn { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("plateImage")]
|
||||||
|
public string PlateImageBase64 { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("frameImage")]
|
||||||
|
public string FrameImageBase64 { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("faceImage")]
|
||||||
|
public string FaceImageBase64 { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string CustomerName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class SaveLogRespone
|
public class SaveLogRespone
|
||||||
{
|
{
|
||||||
[JsonProperty("status")]
|
[JsonProperty("status")]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user