Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
VVAS-Match
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b641d4d3
authored
Jan 20, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
e4494cd1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
src/main/java/com/viontech/match/controller/MainController.java
src/main/java/com/viontech/match/service/PersonService.java
src/main/java/com/viontech/match/controller/MainController.java
View file @
b641d4d
package
com
.
viontech
.
match
.
controller
;
import
com.viontech.keliu.model.FaceFeature
;
import
com.viontech.keliu.model.Person
;
import
com.viontech.match.entity.vo.RequestVo
;
import
com.viontech.match.entity.vo.ResponseVo
;
import
com.viontech.match.service.PersonService
;
import
com.viontech.match.service.PoolService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.concurrent.TimeUnit
;
/**
* .
...
...
@@ -31,7 +35,7 @@ public class MainController {
@PostMapping
public
ResponseVo
all
(
@RequestBody
RequestVo
requestVo
)
throws
Exception
{
String
rid
=
requestVo
.
getRid
();
try
{
try
{
switch
(
requestVo
.
getCommand
())
{
case
AddPersonPool:
return
poolService
.
createPool
(
requestVo
);
...
...
@@ -48,9 +52,18 @@ public class MainController {
default
:
return
ResponseVo
.
commandNotFound
(
rid
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
""
,
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
""
,
e
);
return
ResponseVo
.
error
(
rid
,
e
.
getMessage
());
}
}
@GetMapping
(
"/pools"
)
public
Object
getPools
()
{
try
{
return
poolService
.
queryPoolInfo
(
null
);
}
catch
(
IOException
e
)
{
return
ResponseVo
.
error
(
"error"
,
e
.
getMessage
());
}
}
}
src/main/java/com/viontech/match/service/PersonService.java
View file @
b641d4d
...
...
@@ -85,7 +85,9 @@ public class PersonService {
poolStatus
.
add
(
pool
);
}
ResponseVo
success
=
ResponseVo
.
success
(
rid
,
"success"
);
if
(
result
.
size
()
>
0
)
{
success
.
setMatchPersons
(
result
);
}
success
.
setMatch
(
1
);
success
.
setPersonPoolStatus
(
poolStatus
);
log
.
info
(
"人员匹配操作完成,PoolIds:[{}},结果:[{}]"
,
poolIds
.
toString
(),
objectMapper
.
writeValueAsString
(
success
));
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment