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

增加心跳

parent 6fb3a46a
......@@ -2,7 +2,7 @@
<Settings xmlns="urn:Chinags-Configuration" AddonName="GS.Terminal.Console">
<Dictionaries>
<Dict Name="baseConfig" Caption="基本配置">
<Key Name="WatchPort" Value="10031" Caption="监听端口" Choice="" />
<Key Name="WatchPort" Value="18083" Caption="监听端口" Choice="" />
<Key Name="HttpPort" Value="10032" Caption="控制页面端口" Choice="" />
</Dict>
</Dictionaries>
......
This diff is collapsed.
......@@ -2,14 +2,20 @@
<Settings xmlns="urn:Chinags-Configuration" AddonName="GS.Terminal.FaceRecognization">
<Dictionaries>
<Dict Name="baseConfig" Caption="基本配置">
<Key Caption="面部识别SDK版本" Choice="" Name="SDKVersion" Value="2" />
<Key Caption="摄像头输出图像尺寸" Choice="" Name="VideoOutPutSize" Value="352,288" />
<Key Caption="面部识别SDK版本" Choice="" Name="SDKVersion" Value="4" />
<Key Caption="摄像头输出图像尺寸" Choice="" Name="VideoOutPutSize" Value="640,480" />
<Key Caption="摄像头通道编号" Choice="" Name="VideoPort" Value="0" />
<Key Caption="摄像头启动模式" Choice="" Name="VideoMode" Value="" />
<Key Caption="识别间隔" Choice="" Name="RecognizationInterval" Value="1000" />
<Key Caption="是否开启活体检测,进针对SDKVersion为2时生效" Choice="" Name="EnableAliveness" Value="true" />
<Key Caption="摄像头图像输出间隔(毫秒)" Choice="" Name="VideoOutputSpan" Value="1" />
<Key Caption="摄像头图像输出间隔(毫秒)" Choice="" Name="VideoOutputSpan" Value="20" />
<Key Caption="摄像头画面旋转" Choice="" Name="VideoOutputRotate" Value="0" />
<Key Caption="面部特征值阀值" Choice="" Name="FaceRecognizationValue" Value="0.8" />
<Key Caption="是否为增值版" Choice="" Name="IsArcFacePro" Value="true" >
<![CDATA[
增值版需将离线激活文件放置到程序根目录下,重命名为ArcFacePro.dat
]]>
</Key>
</Dict>
</Dictionaries>
</Settings>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<Extensibility xmlns="urn:Chinags-Extensibility-1.0"
Name="提供面部识别服务的插件"
SymbolicName="GS.Terminal.FaceRecognization"
Version="1.0.0.0" StartLevel="10">
Version="3.1.0.0" StartLevel="10">
<License>Rr+1HM0Sq4Bpkvdel43Ls95HlVj7GKdkBGSBnHLi0a2yCUJBWU/GxD/w4mqHu8AT85wxxV7I0WtxRe8S45zlBYRtd4wEZb0PpAtdcCPzpfwP7ozPI6pHfUMqiF7Evvc08Ech7xSDIu1WW8xUMJiThe1xq61Y2xoaNZWMQWyrGhc=</License>
<Activator Type="GS.Terminal.FaceRecognization.Program" />
<Runtime>
......
......@@ -4,7 +4,8 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<appSettings>
<add key="WebPath" value="http://192.168.1.112:5000/"/>
<add key="tCode" value="LCFK"/>
<add key="ServerIP" value="192.168.1.7"/>
<add key="WebPath" value="http://192.168.1.7:5017/"/>
<add key="tCode" value="SYL106"/>
</appSettings>
</configuration>
\ No newline at end of file
......@@ -3,8 +3,8 @@
<Dictionaries>
<Dict Caption="基础配置" Name="defaultconfig">
<Key Caption="人脸识别阀值" Name="FaceMinValue" Value="0.85"/>
<Key Caption="心跳端口" Name="HeartPort" Value="16789"/>
<Key Caption="远程认证地址" Name="FaceWebSocket" Value="ws://192.168.1.7:5432/face/sdk2?persontype=访客"/>
<Key Caption="心跳端口" Name="HeartPort" Value="18083"/>
<Key Caption="远程认证地址" Name="FaceWebSocket" Value="ws://192.168.1.7:5012/face/sdk2?persontype=访客"/>
</Dict>
<Dict Caption="识别方式配置" Name="authenticationconfig">
<Key Caption="人脸识别" Name="EnableFace" Value="true"/>
......@@ -22,10 +22,10 @@
<Property Caption="服务地址" Name="ServiceUri"/>
</Declare>
<Datas>
<Data Description="获取人员有效预约单" Key="VisitorAvailableAppointment" ServiceUri="/api/GS.Sub.Vistor/VisitorSelfServiceTerminal/VisitorAvailableAppointment" />
<Data Description="提交预约单到访" Key="SubmitVisitInfo" ServiceUri="/api/GS.Sub.Vistor/VisitorSelfServiceTerminal/SubmitVisitInfo" />
<Data Description="获取历史来访记录" Key="GetHistoryVisitInfo" ServiceUri="/api/GS.Sub.Vistor/VisitorSelfServiceTerminal/GetHistoryVisitInfo/{idnum}" />
<Data Description="获取历史预约单" Key="GetHistoryAppointment" ServiceUri="/api/GS.Sub.Vistor/VisitorSelfServiceTerminal/GetHistoryAppointment/{idnum}" />
<Data Description="获取人员有效预约单" Key="VisitorAvailableAppointment" ServiceUri="/api/GS.WebApi.Vistor/VisitorSelfServiceTerminal/VisitorAvailableAppointment" />
<Data Description="提交预约单到访" Key="SubmitVisitInfo" ServiceUri="/api/GS.WebApi.Vistor/VisitorSelfServiceTerminal/SubmitVisitInfo" />
<Data Description="获取历史来访记录" Key="GetHistoryVisitInfo" ServiceUri="/api/GS.WebApi.Vistor/VisitorSelfServiceTerminal/GetHistoryVisitInfo/{idnum}" />
<Data Description="获取历史预约单" Key="GetHistoryAppointment" ServiceUri="/api/GS.WebApi.Vistor/VisitorSelfServiceTerminal/GetHistoryAppointment/{idnum}" />
</Datas>
</Structure>
</Structures>
......
......@@ -64,6 +64,7 @@
<HintPath>..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
......
using GS.Terminal.VisitorSelfService.Logic.ThirdAddon;
using GS.Unitive.Framework.Core;
using GS.Unitive.Framework.Persistent;
using Microsoft.VisualBasic.ApplicationServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;
using ViewModels;
......@@ -21,16 +23,28 @@ namespace GS.Terminal.VisitorSelfService.Logic
{
_Context = Context;
vmLocator = new Locator();
Context.CreateIntercativeData<string>("TERMINAL_STATUS");
Context.IntercativeData("TERMINAL_STATUS", $"{new ApplicationBase().Info.Version.ToString()}({_logicVersion}) Standby {getmacaddress()}");
AddonRuntime.Instance.onRuntimeCompleted += Instance_onRuntimeCompleted;
}
private string getmacaddress()
{
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
NetworkInterface current = interfaces.FirstOrDefault(ss => ss.OperationalStatus == OperationalStatus.Up);
if (current == null)//如果当前没有可用的就选第一个
current = interfaces.FirstOrDefault();
return BitConverter.ToString(current.GetPhysicalAddress().GetAddressBytes());
}
private void Instance_onRuntimeCompleted(object sender)
{
var manager = new ObjectSpaceManager();
_ObjectSpace = manager.CreateObjectSpace(_Context, "c1");
_ObjectSpace.UpdateDataSchema();
Handlers.Product();
TerminalConsole.StartHeart(LocalSetting.AppConfig.ServerIP, LocalSetting.AddonDefaultConfig.HeartPort, 30 * 1000);
ThirdAddon.LogicShell.ShowView(vmLocator.MenuPage);
}
......
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