Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
政
政企识别终端
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
终端组
政企识别终端
Commits
08b752ad
Commit
08b752ad
authored
Sep 06, 2021
by
姜春辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成识别记录上传服务迁移
parent
fb343727
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
61 deletions
+45
-61
CardHandler.cs
...ification.Enterprise.Logic/CallbackHandler/CardHandler.cs
+0
-1
LogicHandler.cs
...fication.Enterprise.Logic/CallbackHandler/LogicHandler.cs
+2
-2
Config.xml
src/GS.Terminal.Identification.Enterprise.Logic/Config.xml
+2
-2
ServiceListing.cs
....Identification.Enterprise.Logic/Config/ServiceListing.cs
+8
-12
TerminalSetting.cs
...Identification.Enterprise.Logic/Config/TerminalSetting.cs
+1
-1
LocalDataCenter.cs
...l.Identification.Enterprise.Logic/Core/LocalDataCenter.cs
+0
-1
Uploader.cs
...Terminal.Identification.Enterprise.Logic/Core/Uploader.cs
+23
-33
GS.Terminal.Identification.Enterprise.Logic.csproj
....Logic/GS.Terminal.Identification.Enterprise.Logic.csproj
+0
-3
Program.cs
src/GS.Terminal.Identification.Enterprise.Logic/Program.cs
+7
-2
GS.Terminal.Identification.EnterpriseHost.csproj
...riseHost/GS.Terminal.Identification.EnterpriseHost.csproj
+0
-4
识别历史.cs
src/GS.Terminal.Identification.LocalDbModel/识别历史.cs
+2
-0
No files found.
src/GS.Terminal.Identification.Enterprise.Logic/CallbackHandler/CardHandler.cs
View file @
08b752ad
...
...
@@ -19,7 +19,6 @@
#endregion
using
GS.EnterpriseIdentification.ServiceModel
;
using
GS.Terminal.Common.LocalSetting
;
using
GS.Terminal.Identification.Enterprise.Logic.Core
;
using
GS.Unitive.Framework.Core
;
using
IdentificationViewModels
;
...
...
src/GS.Terminal.Identification.Enterprise.Logic/CallbackHandler/LogicHandler.cs
View file @
08b752ad
...
...
@@ -112,7 +112,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
}
}).
ContinueWith
((
task
)
=>
{
Program
.
uploader
.
Do
(
id
);
Program
.
uploader
?
.
Do
(
id
);
});
}
...
...
@@ -154,7 +154,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
}
}).
ContinueWith
((
task
)
=>
{
Program
.
uploader
.
Do
(
id
);
Program
.
uploader
?
.
Do
(
id
);
});
}
...
...
src/GS.Terminal.Identification.Enterprise.Logic/Config.xml
View file @
08b752ad
...
...
@@ -34,8 +34,8 @@
</Declare>
<Datas>
<Data
ServiceKey=
"SaveIdentityBatch"
ServiceName=
"批量上传员工识别记录"
ServiceUrl=
"/
Services/EnterpriseIdentification/SaveIdentityInfoBatch/json
"
/>
<Data
ServiceKey=
"SaveVisitorIdentifyBatch"
ServiceName=
"批量上传访客识别记录"
ServiceUrl=
"/
Services/EnterpriseIdentification/SaveVisitorIdentifyBatch/json
"
/>
<Data
ServiceKey=
"SaveIdentityBatch"
ServiceName=
"批量上传员工识别记录"
ServiceUrl=
"/
api/GS.WebApi.Terminal.Identification.Enterprise/Record/EmployeeUpload
"
/>
<Data
ServiceKey=
"SaveVisitorIdentifyBatch"
ServiceName=
"批量上传访客识别记录"
ServiceUrl=
"/
api/GS.WebApi.Terminal.Visitor/Identification/UploadRecord
"
/>
</Datas>
</Structure>
</Structures>
...
...
src/GS.Terminal.Identification.Enterprise.Logic/Config/ServiceListing.cs
View file @
08b752ad
using
GS.Terminal.
Common.LocalSetting
;
using
GS.Terminal.
Frame.Configuration
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -18,12 +18,12 @@ namespace GS.Terminal.Identification.Enterprise.Logic.Config
_webpath
=
webpath
;
}
private
Uri
_SaveIdentityBatch
;
private
string
_SaveIdentityBatch
;
/// <summary>
/// 批量上传识别记录
/// </summary>
public
Uri
SaveIdentityBatch
public
string
SaveIdentityBatch
{
get
{
...
...
@@ -35,9 +35,9 @@ namespace GS.Terminal.Identification.Enterprise.Logic.Config
}
}
private
Uri
_SaveVisitorIdentifyBatch
;
private
string
_SaveVisitorIdentifyBatch
;
public
Uri
SaveVisitorIdentifyBatch
public
string
SaveVisitorIdentifyBatch
{
get
{
...
...
@@ -50,21 +50,17 @@ namespace GS.Terminal.Identification.Enterprise.Logic.Config
}
private
Uri
getConfigUrlByKey
(
string
key
,
string
defaultUrl
)
private
string
getConfigUrlByKey
(
string
key
,
string
defaultUrl
)
{
if
(
_ServiceListingConfig
!=
null
&&
_ServiceListingConfig
.
Datas
!=
null
)
{
var
config
=
_ServiceListingConfig
.
Datas
.
FirstOrDefault
(
ss
=>
ss
.
ServiceKey
==
key
);
if
(
config
!=
null
&&
!
string
.
IsNullOrEmpty
(
config
.
ServiceUrl
))
{
var
url
=
$"
{
_webpath
}
/
{
config
.
ServiceUrl
}
"
;
if
(
Uri
.
IsWellFormedUriString
(
url
,
UriKind
.
Absolute
))
{
return
new
Uri
(
url
,
UriKind
.
Absolute
);
}
return
config
.
ServiceUrl
;
}
}
return
new
Uri
(
$"
{
_webpath
}
/
{
defaultUrl
}
"
,
UriKind
.
Absolute
)
;
return
defaultUrl
;
}
}
...
...
src/GS.Terminal.Identification.Enterprise.Logic/Config/TerminalSetting.cs
View file @
08b752ad
...
...
@@ -18,7 +18,7 @@
//----------------------------------------------------------------*/
#endregion
using
GS.Terminal.
Common.LocalSetting
;
using
GS.Terminal.
Frame.Configuration
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
src/GS.Terminal.Identification.Enterprise.Logic/Core/LocalDataCenter.cs
View file @
08b752ad
using
GS.EnterpriseIdentification.ServiceModel
;
using
GS.Terminal.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
...
...
src/GS.Terminal.Identification.Enterprise.Logic/Core/Uploader.cs
View file @
08b752ad
...
...
@@ -4,7 +4,6 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Timers
;
using
GS.Terminal.Common.WebService
;
using
GS.Unitive.Framework.Core
;
using
System.IO
;
using
GS.Terminal.Identification.DbHandler
;
...
...
@@ -68,25 +67,16 @@ namespace GS.Terminal.Identification.Enterprise.Logic
IdentifyMethod
=
ss
.
是否刷卡识别
?
0
:
1
,
FaceResult
=
ss
.
面部识别对比结果
,
Tag
=
ss
.
进出标识
,
});
})
.
ToList
()
;
if
(
visitData
!=
null
)
if
(
visitData
.
Count
>
0
)
{
var
visitBody
=
new
{
tCode
=
tCode
,
datas
=
visitData
};
var
visitResult
=
new
WebServiceCenter
(
AddonRuntime
.
Instance
.
LogWriter
,
""
,
""
)
.
Post
<
WebServiceResult
<
List
<
ResultPost
>>>(
Program
.
serviceListing
.
SaveVisitorIdentifyBatch
,
visitBody
);
var
visitResult
=
Program
.
WebApiClient
.
Post
<
List
<
ResultPostVisitor
>>(
Program
.
serviceListing
.
SaveVisitorIdentifyBatch
,
visitData
);
if
(
!
visitResult
.
HasError
()
)
if
(
visitResult
!=
null
)
{
List
<
识别历史
>
updateList
=
new
List
<
识别历史
>(
visitResult
.
result
.
Count
);
foreach
(
var
res
in
visitResult
.
result
)
List
<
识别历史
>
updateList
=
new
List
<
识别历史
>(
visitResult
.
Count
);
foreach
(
var
res
in
visitResult
)
{
var
data
=
new
DbContext
<
识别历史
>().
Db
.
Queryable
<
识别历史
>().
Single
(
ss
=>
ss
.
识别
ID
==
res
.
localid
);
if
(
data
!=
null
)
...
...
@@ -109,37 +99,31 @@ namespace GS.Terminal.Identification.Enterprise.Logic
{
localid
=
ss
.
识别
ID
,
EmplyId
=
ss
.
人员
ID
,
EmplyName
=
ss
.
人员姓名
,
DptId
=
ss
.
部门
ID
,
DptName
=
ss
.
部门名称
,
CardNum
=
ss
.
卡号
,
CardTime
=
ss
.
识别时间
,
SitePhoto
=
Tools
.
ReadFile
(
ss
.
现场照片
),
Tag
=
ss
.
进出标识
,
IdentifyMethod
=
ss
.
是否刷卡识别
?
0
:
1
,
FaceResult
=
ss
.
面部识别对比结果
});
})
.
ToList
()
;
if
(
emplyData
!=
null
)
if
(
emplyData
.
Count
>
0
)
{
var
emplyBody
=
new
{
tCode
=
tCode
,
datas
=
emplyData
};
var
emplyResult
=
new
WebServiceCenter
(
AddonRuntime
.
Instance
.
LogWriter
,
""
,
""
)
.
Post
<
WebServiceResult
<
List
<
ResultPost
>>>(
Program
.
serviceListing
.
SaveIdentityBatch
,
emplyBody
);
var
emplyResult
=
Program
.
WebApiClient
.
Post
<
List
<
ResultPostEmployee
>>(
Program
.
serviceListing
.
SaveIdentityBatch
,
emplyData
);
if
(
!
emplyResult
.
HasError
()
)
if
(
emplyResult
!=
null
)
{
List
<
识别历史
>
updateList
=
new
List
<
识别历史
>(
emplyResult
.
result
.
Count
);
foreach
(
var
res
in
emplyResult
.
result
)
List
<
识别历史
>
updateList
=
new
List
<
识别历史
>(
emplyResult
.
Count
);
foreach
(
var
res
in
emplyResult
)
{
var
data
=
new
DbContext
<
识别历史
>().
Db
.
Queryable
<
识别历史
>().
Single
(
ss
=>
ss
.
识别
ID
==
res
.
localid
);
if
(
data
!=
null
)
{
data
.
是否已上传
=
true
;
data
.
远程
ID
=
res
.
remoteid
;
data
.
员工
远程
ID
=
res
.
remoteid
;
updateList
.
Add
(
data
);
}
}
...
...
@@ -203,9 +187,15 @@ namespace GS.Terminal.Identification.Enterprise.Logic
}
}
public
class
ResultPost
public
class
ResultPost
Visitor
{
public
Guid
localid
{
get
;
set
;
}
public
int
remoteid
{
get
;
set
;
}
}
public
class
ResultPostEmployee
{
public
Guid
localid
{
get
;
set
;
}
public
Guid
remoteid
{
get
;
set
;
}
}
}
src/GS.Terminal.Identification.Enterprise.Logic/GS.Terminal.Identification.Enterprise.Logic.csproj
View file @
08b752ad
...
...
@@ -75,9 +75,6 @@
<Reference
Include=
"GS.Remote.Synchronize.EasyTask"
>
<HintPath>
..\..\release\Addons\GS.Remote.Synchronize\GS.Remote.Synchronize.EasyTask.dll
</HintPath>
</Reference>
<Reference
Include=
"GS.Terminal.Common"
>
<HintPath>
..\..\release\Tools\GS.Terminal.Common.dll
</HintPath>
</Reference>
<Reference
Include=
"GS.Terminal.Frame, Version=1.0.0.21, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\packages\GS.Terminal.Frame.1.0.0.21\lib\net452\GS.Terminal.Frame.dll
</HintPath>
</Reference>
...
...
src/GS.Terminal.Identification.Enterprise.Logic/Program.cs
View file @
08b752ad
using
GalaSoft.MvvmLight.Ioc
;
using
GS.EnterpriseIdentification.ServiceModel
;
using
GS.Remote.Synchronize.EasyTask
;
using
GS.Terminal.Common
;
using
GS.Terminal.Frame.AddonServices
;
using
GS.Terminal.Frame.Logic
;
using
GS.Terminal.Frame.Network
;
...
...
@@ -65,7 +64,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
InitSqliteDb
();
uploader
=
new
Uploader
(
config
.
GlobalConfig
.
tCode
);
}
/// <summary>
...
...
@@ -169,6 +168,7 @@ namespace GS.Terminal.Identification.Enterprise.Logic
addonContext
.
IntercativeData
(
"TERMINAL_STATUS"
,
terminal_status
);
TerminalConsole
.
StartHeart
(
config
.
GlobalConfig
.
ServerIP
,
0
,
10
*
1000
);
WebApiClient
=
new
Frame
.
Network
.
WebApiClient
(
config
.
GlobalConfig
.
WebPath
,
config
.
GlobalConfig
.
tCode
);
WebApiClient
.
OnSignatured
+=
WebApiClient_OnSignatured
;
RefreshToken
();
AutoRefreshTokenTask
();
UpdateLocalTime
();
...
...
@@ -184,6 +184,11 @@ namespace GS.Terminal.Identification.Enterprise.Logic
});
}
private
void
WebApiClient_OnSignatured
()
{
uploader
=
new
Uploader
(
config
.
GlobalConfig
.
tCode
);
}
/// <summary>
/// 注册ViewModel
/// </summary>
...
...
src/GS.Terminal.Identification.EnterpriseHost/GS.Terminal.Identification.EnterpriseHost.csproj
View file @
08b752ad
...
...
@@ -415,10 +415,6 @@
<Link>
Addons\GS.Terminal.Identification.Enterprise.Logic\GS.EnterpriseIdentification.ServiceModel.dll
</Link>
<CopyToOutputDirectory>
Always
</CopyToOutputDirectory>
</Content>
<Content
Include=
"..\GS.Terminal.Identification.Enterprise.Logic\bin\Debug\GS.Terminal.Common.dll"
>
<Link>
Addons\GS.Terminal.Identification.Enterprise.Logic\GS.Terminal.Common.dll
</Link>
<CopyToOutputDirectory>
Always
</CopyToOutputDirectory>
</Content>
<Content
Include=
"..\GS.Terminal.Identification.Enterprise.Logic\bin\Debug\GS.Terminal.Identification.DbHandler.dll"
>
<Link>
Addons\GS.Terminal.Identification.Enterprise.Logic\GS.Terminal.Identification.DbHandler.dll
</Link>
<CopyToOutputDirectory>
Always
</CopyToOutputDirectory>
...
...
src/GS.Terminal.Identification.LocalDbModel/识别历史.cs
View file @
08b752ad
...
...
@@ -22,6 +22,8 @@ namespace GS.Terminal.Identification.LocalDbModel
[
SugarColumn
(
IsNullable
=
true
)]
public
int
远程
ID
{
get
;
set
;
}
[
SugarColumn
(
IsNullable
=
true
)]
public
Guid
员工远程
ID
{
get
;
set
;
}
[
SugarColumn
(
IsNullable
=
true
)]
public
Guid
人员
ID
{
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