Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
G
GS.Terminal.VisitorSelfService
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
终端组
GS.Terminal.VisitorSelfService
Commits
926b7d93
Commit
926b7d93
authored
May 15, 2021
by
姜春辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加人证比对
增加卡芯片号上传
parent
65fba3a4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
5 deletions
+44
-5
自助登记流水.cs
...fService/GS.Terminal.VisitorSelfService.LocalDB/自助登记流水.cs
+8
-0
Config.xml
...ice/Logic/GS.Terminal.VisitorSelfService.Logic/Config.xml
+3
-2
AppointmentDetailPageHandler.cs
...torSelfService.Logic/Core/AppointmentDetailPageHandler.cs
+27
-2
MenuPageHandler.cs
...Terminal.VisitorSelfService.Logic/Core/MenuPageHandler.cs
+5
-1
LocalSetting.cs
...ogic/GS.Terminal.VisitorSelfService.Logic/LocalSetting.cs
+1
-0
No files found.
Src/GS.Terminal.VisitorSelfService/GS.Terminal.VisitorSelfService.LocalDB/自助登记流水.cs
View file @
926b7d93
...
...
@@ -29,6 +29,14 @@ namespace GS.Terminal.VisitorSelfService.LocalDB
set
{
SetPropertyValue
(
"访客证件号"
,
ref
_
访客证件号
,
value
);
}
}
private
string
_
访客证件芯片号
;
public
string
访客证件芯片号
{
get
{
return
_
访客证件芯片号
;
}
set
{
SetPropertyValue
(
"访客证件芯片号"
,
ref
_
访客证件芯片号
,
value
);
}
}
private
string
_
预约访客
Id
;
...
...
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/Config.xml
View file @
926b7d93
...
...
@@ -3,6 +3,7 @@
<Dictionaries>
<Dict
Caption=
"基础配置"
Name=
"defaultconfig"
>
<Key
Caption=
"人脸识别阀值"
Name=
"FaceMinValue"
Value=
"0.85"
/>
<Key
Caption=
"人证比对阀值"
Name=
"FaceCardMatch"
Value=
"0"
/>
<Key
Caption=
"心跳端口"
Name=
"HeartPort"
Value=
"18083"
/>
<Key
Caption=
"远程认证地址"
Name=
"FaceWebSocket"
Value=
"ws://192.168.1.7:15056/face/sdk2?persontype=访客"
/>
</Dict>
...
...
@@ -11,10 +12,10 @@
<Key
Caption=
"二代证识别"
Name=
"EnableIdCard"
Value=
"false"
/>
<Key
Caption=
"二维码识别"
Name=
"EnableQRCode"
Value=
"false"
/>
<!--0是人脸识别 1是二代证识别 2是二维码识别-->
<Key
Caption=
"默认识别方式"
Name=
"DefaultAuthMode"
Value=
"1"
/>
<Key
Caption=
"默认识别方式"
Name=
"DefaultAuthMode"
Value=
"1"
/>
</Dict>
</Dictionaries>
<Structures>
<Structures>
<Structure
Caption=
"服务地址配置"
Name=
"ServiceList"
>
<Declare>
<Property
Caption=
"服务描述"
Name=
"Description"
/>
...
...
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/Core/AppointmentDetailPageHandler.cs
View file @
926b7d93
...
...
@@ -34,6 +34,26 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
photo
.
Save
(
ms
,
ImageFormat
.
Jpeg
);
photoContent
=
Convert
.
ToBase64String
(
ms
.
ToArray
());
}
//人证比对
if
(
_secondcardphoto
!=
null
&&
LocalSetting
.
AddonDefaultConfig
.
FaceCardMatch
>
0
)
{
var
secondcardFeature
=
FaceRecognization
.
ExtractFeatures
(
new
System
.
Drawing
.
Bitmap
(
new
MemoryStream
(
_secondcardphoto
)));
var
liveFeature
=
FaceRecognization
.
ExtractFeatures
(
photo
);
if
(
secondcardFeature
!=
null
&&
liveFeature
!=
null
)
{
var
score
=
FaceRecognization
.
MathFaceData
(
liveFeature
,
secondcardFeature
);
if
(
score
<
LocalSetting
.
AddonDefaultConfig
.
FaceCardMatch
)
{
MainShell
.
ShowPrompt
(
"人证比对失败,请刷脸人证或重新登记"
);
return
;
}
}
else
{
MainShell
.
ShowPrompt
(
"人证比对失败,请重新登记"
);
return
;
}
}
}
MainShell
.
ShowLoading
(
"提交中..."
);
Submit
(
info
.
id
,
photoContent
).
ContinueWith
(
task
=>
...
...
@@ -53,6 +73,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
{
LocalSetting
.
AppConfig
.
tCode
,
appointmentId
,
secondcardid
=
_secondcardid
,
livePhoto
=
photo
});
if
(
result
==
null
)
...
...
@@ -80,9 +101,12 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
VM
.
Reset
();
_ExitView
=
null
;
}
internal
void
ShowDetail
(
List
<
Appointment
>
datas
,
IViewModel
exitView
=
null
)
string
_secondcardid
=
""
;
byte
[]
_secondcardphoto
=
null
;
internal
void
ShowDetail
(
List
<
Appointment
>
datas
,
string
secondcardid
,
byte
[]
idphoto
,
IViewModel
exitView
=
null
)
{
_secondcardid
=
secondcardid
;
_secondcardphoto
=
idphoto
;
Handlers
.
GetHandler
<
HeadHandler
>().
Start
();
if
(
datas
?.
Count
==
0
)
{
...
...
@@ -130,6 +154,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
var
entity
=
new
自助登记流水
(
session
)
{
访客证件号
=
idnum
,
访客证件芯片号
=
_secondcardid
,
预约访客
Id
=
dataid
};
entity
.
Save
();
...
...
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/Core/MenuPageHandler.cs
View file @
926b7d93
...
...
@@ -3,6 +3,7 @@ using GS.Terminal.VisitorSelfService.Logic.ThirdAddon;
using
GS.Unitive.Framework.Data.Xpo
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
...
...
@@ -45,12 +46,15 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
private
async
Task
<
bool
>
AuthSuccess
(
AuthenticationMode
mode
,
object
data
)
{
//((dynamic)data).cardid 身份证芯片号
//((dynamic)data).poto 身份证照片
MainShell
.
ShowLoading
(
"正在查找"
);
var
findResult
=
await
Find
(
mode
==
AuthenticationMode
.
IdCard
?
((
dynamic
)
data
).
number
:
data
.
ToString
(),
mode
);
MainShell
.
HideLoading
();
if
(
findResult
?.
Count
>
0
)
{
Handlers
.
GetHandler
<
AppointmentDetailPageHandler
>()?.
ShowDetail
(
findResult
);
Handlers
.
GetHandler
<
AppointmentDetailPageHandler
>()?.
ShowDetail
(
findResult
,
mode
==
AuthenticationMode
.
IdCard
?
((
dynamic
)
data
).
cardid
:
""
,
mode
==
AuthenticationMode
.
IdCard
?
File
.
ReadAllBytes
(((
dynamic
)
data
).
poto
)
:
""
);
}
else
{
...
...
Src/GS.Terminal.VisitorSelfService/Logic/GS.Terminal.VisitorSelfService.Logic/LocalSetting.cs
View file @
926b7d93
...
...
@@ -34,6 +34,7 @@ namespace GS.Terminal.VisitorSelfService.Logic
public
class
AddonDefaultConfig
:
IDictSetting
{
public
float
FaceMinValue
{
get
;
set
;
}
public
float
FaceCardMatch
{
get
;
set
;
}
public
int
HeartPort
{
get
;
set
;
}
public
bool
DisableVideoDetect
{
get
;
set
;
}
public
string
FaceWebSocket
{
get
;
set
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment