LaneIn, LaneOut - Check doorId then do job

This commit is contained in:
DucDangAnh 2020-06-30 17:40:47 +07:00
parent c93f57592f
commit 5f4fa31c35
2 changed files with 9 additions and 1 deletions

View File

@ -55,6 +55,10 @@ namespace AIParkingApplication
private async void C3Device_OnNewCardReceived(int doorId, string cardNumber)
{
if (this.doorId != doorId)
{
return;
}
ClearPlateAndOverviewImage();
var cardInfoResult = await apiController.GetCardInformation(cardNumber);
if (!cardInfoResult.IsValid)

View File

@ -55,6 +55,10 @@ namespace AIParkingApplication
private async void C3Device_OnNewCardReceived(int doorId, string cardNumber)
{
if (this.doorId != doorId)
{
return;
}
ClearPlateAndOverviewImage();
var cardInfoResult = await apiController.GetCardInformation(cardNumber);
if (!cardInfoResult.IsValid)
@ -86,7 +90,7 @@ namespace AIParkingApplication
var saveLogResult = await apiController.SaveLog(LaneDirection.In, cardInformation.CardRealID.ToString(), "1", result.PlateType, DateTime.Now.ToString(AppConstant.DATETIME_FORMAT), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame);
if (saveLogResult.Status)
{
if (isAutoOpenDoor && this.doorId == doorId)
if (isAutoOpenDoor)
{
OpenDoor(doorId);
}