Commit c1d9e687 authored by 姜春辉's avatar 姜春辉

修正同步人脸库BUG

parent 3a509674
...@@ -39,11 +39,11 @@ namespace GS.Terminal.Identification.Enterprise.Logic ...@@ -39,11 +39,11 @@ namespace GS.Terminal.Identification.Enterprise.Logic
internal static void OnRecognized(string key, float score) internal static void OnRecognized(string key, float score)
{ {
try try
{ {
ViewModel.IsStandby = false; ViewModel.IsStandby = false;
MainHandler.CleanViewTimer.Stop(); MainHandler.CleanViewTimer.Stop();
if (score < Program.config.LogicConfig.FaceCompareValue) return; if (score < Program.config.LogicConfig.FaceCompareValue) return;
LogicHandler.CheckQuery(); LogicHandler.CheckQuery();
var visitor = LocalDataCenter.GetVisitInfoByFaceData(key); var visitor = LocalDataCenter.GetVisitInfoByFaceData(key);
......
...@@ -167,15 +167,16 @@ namespace GS.Terminal.Identification.Enterprise.Logic ...@@ -167,15 +167,16 @@ namespace GS.Terminal.Identification.Enterprise.Logic
/// <returns></returns> /// <returns></returns>
internal static Human GenHuman(Employee employee, bool isCard, bool isVisitor = false) internal static Human GenHuman(Employee employee, bool isCard, bool isVisitor = false)
{ {
return new Human var human = new Human
{ {
Depart = employee.DepartName, Depart = employee.DepartName,
Name = employee.Name, Name = employee.Name,
IsCard = isCard, IsCard = isCard,
IsVisitor = isVisitor, IsVisitor = isVisitor,
Time = DateTime.Now.ToString("HH:mm:ss"), Time = DateTime.Now.ToString("HH:mm:ss"),
HumanPhoto = string.IsNullOrWhiteSpace(employee.PhotoPath) ? null : Path.Combine(Program.config.GlobalConfig.ResourcePath, employee.PhotoPath), HumanPhoto = string.IsNullOrWhiteSpace(employee.PhotoPath) ? null : Path.Combine(Program.config.GlobalConfig.ResourcePath, employee.PhotoPath.TrimStart('/')),
}; };
return human;
} }
...@@ -195,7 +196,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic ...@@ -195,7 +196,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
IsCard = isCard, IsCard = isCard,
IsVisitor = isVisitor, IsVisitor = isVisitor,
Time = DateTime.Now.ToString("HH:mm:ss"), Time = DateTime.Now.ToString("HH:mm:ss"),
HumanPhoto = string.IsNullOrWhiteSpace(visit.CertPhoto) ? null : Path.Combine(Program.webPath, visit.CertPhoto), HumanPhoto = string.IsNullOrWhiteSpace(visit.CertPhoto) ? null : Path.Combine(Program.config.GlobalConfig.ResourcePath, visit.CertPhoto),
}; };
} }
......
...@@ -130,7 +130,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic.Core ...@@ -130,7 +130,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic.Core
result.AddRange(responseData.records); result.AddRange(responseData.records);
if (responseData.paging.totalPage > pageIndex) if (responseData.paging.totalPage > pageIndex)
{ {
result.AddRange(downLoad(version, pageIndex++).datas); result.AddRange(downLoad(version, pageIndex + 1).datas);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment