From 9cd22def7868830044de5f26edc4342700a2c82a Mon Sep 17 00:00:00 2001 From: DucDangAnh Date: Wed, 8 Jul 2020 15:38:39 +0700 Subject: [PATCH] LaneIn, LaneOut - Remove hardcoded cameraId --- AIParkingApplication/LaneIn.cs | 5 ++++- AIParkingApplication/LaneOut.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/AIParkingApplication/LaneIn.cs b/AIParkingApplication/LaneIn.cs index 7d7e659..3218328 100644 --- a/AIParkingApplication/LaneIn.cs +++ b/AIParkingApplication/LaneIn.cs @@ -14,6 +14,7 @@ namespace AIParkingApplication private Camera plateCamera; private PlateProcessor plateProcessor; private int doorId; + private string cameraId; private bool isSupportSquarePlate; private bool isSupportLongPlate; private bool isAutoOpenDoor; @@ -22,6 +23,7 @@ namespace AIParkingApplication private ApiController apiController; public LaneIn(int doorId, + string cameraId, string plateStream, string overviewStream, IDoorControlAccess doorControlAccess, @@ -34,6 +36,7 @@ namespace AIParkingApplication { InitializeComponent(); this.doorId = doorId; + this.cameraId = cameraId; this.isSupportSquarePlate = isSupportSquarePlate; this.isSupportLongPlate = isSupportLongPlate; this.isAutoOpenDoor = isAutoOpenDoor; @@ -78,7 +81,7 @@ namespace AIParkingApplication var cardInformation = await apiController.GetCardInformation(cardNumber); - var saveLogResult = await apiController.SaveLog(LaneDirection.In, cardInformation.CardRealID.ToString(), "1", result.PlateType, DateTime.Now.GetTimeFormatted(), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame); + var saveLogResult = await apiController.SaveLog(LaneDirection.In, cardInformation.CardRealID.ToString(), cameraId, result.PlateType, DateTime.Now.GetTimeFormatted(), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame); ShowCardInfoOnUI(cardNumber, result.PlateString, cardInformation.CardType, DateTime.Now.GetTimeFormatted()); diff --git a/AIParkingApplication/LaneOut.cs b/AIParkingApplication/LaneOut.cs index 26075e7..c2b2442 100644 --- a/AIParkingApplication/LaneOut.cs +++ b/AIParkingApplication/LaneOut.cs @@ -14,6 +14,7 @@ namespace AIParkingApplication private Camera plateCamera; private PlateProcessor plateProcessor; private int doorId; + private string cameraId; private bool isSupportSquarePlate; private bool isSupportLongPlate; private bool isAutoOpenDoor; @@ -23,6 +24,7 @@ namespace AIParkingApplication private Printer printer; public LaneOut(int doorId, + string cameraId, string plateStream, string overviewStream, IDoorControlAccess doorControlAccess, @@ -35,6 +37,7 @@ namespace AIParkingApplication { InitializeComponent(); this.doorId = doorId; + this.cameraId = cameraId; this.isSupportSquarePlate = isSupportSquarePlate; this.isSupportLongPlate = isSupportLongPlate; this.isAutoOpenDoor = isAutoOpenDoor; @@ -87,7 +90,7 @@ namespace AIParkingApplication var cardInformation = await apiController.GetCardInformation(cardNumber); - var saveLogResult = await apiController.SaveLog(LaneDirection.Out, cardInformation.CardRealID.ToString(), "1", result.PlateType, DateTime.Now.GetTimeFormatted(), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame, cardInformation.LogID.ToString()); + var saveLogResult = await apiController.SaveLog(LaneDirection.Out, cardInformation.CardRealID.ToString(), cameraId, result.PlateType, DateTime.Now.GetTimeFormatted(), result.PlateString, result.PlateImage, result.PlateImage, result.PlateImage, overviewVideoFrame, cardInformation.LogID.ToString()); ShowCardInfoOnUI(cardNumber, result.PlateString, cardInformation.PlateString, cardInformation.CardType, cardInformation.TimeIn, DateTime.Now.GetTimeFormatted(), saveLogResult.Cost);