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

修正同步人脸库BUG

parent 3a509674
......@@ -39,11 +39,11 @@ namespace GS.Terminal.Identification.Enterprise.Logic
internal static void OnRecognized(string key, float score)
{
try
{
ViewModel.IsStandby = false;
MainHandler.CleanViewTimer.Stop();
if (score < Program.config.LogicConfig.FaceCompareValue) return;
LogicHandler.CheckQuery();
var visitor = LocalDataCenter.GetVisitInfoByFaceData(key);
......
......@@ -167,15 +167,16 @@ namespace GS.Terminal.Identification.Enterprise.Logic
/// <returns></returns>
internal static Human GenHuman(Employee employee, bool isCard, bool isVisitor = false)
{
return new Human
var human = new Human
{
Depart = employee.DepartName,
Name = employee.Name,
IsCard = isCard,
IsVisitor = isVisitor,
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
IsCard = isCard,
IsVisitor = isVisitor,
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
result.AddRange(responseData.records);
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