Commit 6e8ca719 authored by 姜春辉's avatar 姜春辉

本地库增加进出标识,更新语音文件

parent 3a63a7b5
......@@ -61,6 +61,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
{
ViewModel.ShowError = true;
ViewModel.ErrorText = $"无卡{(cardMsg.OperaDeviceData.Tag == "I" ? "进入" : "离开")}";
Program.speakService.VoiceBySoundPlayer(ViewModel.ErrorText);
return;
}
else
......@@ -84,7 +85,8 @@ namespace GS.Terminal.Identification.Enterprise.Logic
//访客打卡
if (visitor != null)
{
LogicHandler.HandlerIdentify(visitor, true);
Program.speakService.VoiceBySoundPlayer(cardMsg.OperaDeviceData.Tag == "I" ? "进入" : "离开");
LogicHandler.HandlerIdentify(visitor, true, cardMsg.OperaDeviceData.Tag == "I" ? 1 : 0);
return;
}
......@@ -92,12 +94,13 @@ namespace GS.Terminal.Identification.Enterprise.Logic
//员工打卡
if (employee != null)
{
LogicHandler.HandlerIdentify(employee, true);
Program.speakService.VoiceBySoundPlayer(cardMsg.OperaDeviceData.Tag == "I" ? "进入" : "离开");
LogicHandler.HandlerIdentify(employee, true, cardMsg.OperaDeviceData.Tag == "I" ? 1 : 0);
return;
}
//无效卡
Program.speakService.VoiceBySoundPlayer("无效卡");
}
catch (AggregateException exs)
{
......
......@@ -102,6 +102,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
卡号 = employee.CardNum,
是否访客 = false,
面部识别对比结果 = faceResult,
进出标识 = human.Tag,
现场照片 = Program.config.LogicConfig.IsTakePhoto ? Tools.SaveFile(ViewModel.ActiveVideo) : null,
});
}
......@@ -143,7 +144,8 @@ namespace GS.Terminal.Identification.Enterprise.Logic
面部识别对比结果 = faceResult,
现场照片 = Program.config.LogicConfig.IsTakePhoto ? Tools.SaveFile(ViewModel.ActiveVideo) : null,
被访人员姓名 = visitInfo.VisitEmplyName,
被访部门名称 = visitInfo.VisitDepartName
被访部门名称 = visitInfo.VisitDepartName,
进出标识 = human.Tag
});
}
catch (Exception ex)
......@@ -202,7 +204,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
/// </summary>
/// <param name="identifyVisit"></param>
/// <param name="isCard"></param>
internal static void HandlerIdentify(VisitInfo identifyVisit, bool isCard, double faceResult = 0)
internal static void HandlerIdentify(VisitInfo identifyVisit, bool isCard, double faceResult = 0, int identityTag = 2)
{
Guid activateVisit = IdentifyQueue.FirstOrDefault(ss => ss.Value == identifyVisit.Id).Value;
......@@ -219,10 +221,11 @@ namespace GS.Terminal.Identification.Enterprise.Logic
//处理本次识别
var human = GenHuman(identifyVisit, isCard);
human.Tag = identityTag;
#if DEBUG
///测试人脸阈值
human.Name += faceResult.ToString("f2");
//human.Name += faceResult.ToString("f2");
///测试人脸阈值
#endif
......@@ -238,7 +241,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
/// </summary>
/// <param name="identifyEmployee"></param>
/// <param name="isCard"></param>
internal static void HandlerIdentify(Employee identifyEmployee, bool isCard, double faceResult = 0)
internal static void HandlerIdentify(Employee identifyEmployee, bool isCard, double faceResult = 0, int identityTag = 2)
{
var activateEmply = IdentifyQueue.FirstOrDefault(ss => ss.Value == identifyEmployee.Id).Value;
......@@ -255,7 +258,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
//处理本次识别
var human = GenHuman(identifyEmployee, isCard);
human.Tag = identityTag;
#if DEBUG
//测试人脸阈值
human.Name += faceResult.ToString("f2");
......
......@@ -67,7 +67,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
SitePhoto = Tools.ReadFile(ss.现场照片),
IdentifyMethod = ss.是否刷卡识别 ? 0 : 1,
FaceResult = ss.面部识别对比结果,
Tag = 2,
Tag = ss.进出标识,
});
if (visitData != null)
......@@ -112,7 +112,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
CardNum = ss.卡号,
CardTime = ss.识别时间,
SitePhoto = Tools.ReadFile(ss.现场照片),
Tag = 2,
Tag = ss.进出标识,
IdentifyMethod = ss.是否刷卡识别 ? 0 : 1,
FaceResult = ss.面部识别对比结果
});
......
......@@ -405,15 +405,36 @@
<Content Include="Addons\GS.Terminal.Speak\Wav\已识别.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\已请假.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\无卡离开.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\无卡进入.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\无效卡.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\未识别.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\未请假.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\离开.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\识别失败.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\识别成功.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Addons\GS.Terminal.Speak\Wav\进入.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="License.lic">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
......
......@@ -57,5 +57,9 @@ namespace GS.Terminal.Identification.LocalDbModel
public double 面部识别对比结果 { get; set; }
public bool 是否已上传 { get; set; }
/// <summary>
/// 进 = 1,出 = 0,已识别 = 2,
/// </summary>
public int 进出标识 { get; set; }
}
}
......@@ -192,6 +192,8 @@ namespace IdentificationViewModels
get { return _IsCard; }
set { _IsCard = value; RaisePropertyChanged(nameof(IsCard)); }
}
public int Tag { get; set; }
}
#endregion
}
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