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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 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
;
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.RequestVo
;
import
com.viontech.match.entity.vo.ResponseVo
;
import
com.viontech.match.entity.vo.ResponseVo
;
import
com.viontech.match.service.PersonService
;
import
com.viontech.match.service.PersonService
;
import
com.viontech.match.service.PoolService
;
import
com.viontech.match.service.PoolService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
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 {
...
@@ -31,7 +35,7 @@ public class MainController {
@PostMapping
@PostMapping
public
ResponseVo
all
(
@RequestBody
RequestVo
requestVo
)
throws
Exception
{
public
ResponseVo
all
(
@RequestBody
RequestVo
requestVo
)
throws
Exception
{
String
rid
=
requestVo
.
getRid
();
String
rid
=
requestVo
.
getRid
();
try
{
try
{
switch
(
requestVo
.
getCommand
())
{
switch
(
requestVo
.
getCommand
())
{
case
AddPersonPool:
case
AddPersonPool:
return
poolService
.
createPool
(
requestVo
);
return
poolService
.
createPool
(
requestVo
);
...
@@ -48,9 +52,18 @@ public class MainController {
...
@@ -48,9 +52,18 @@ public class MainController {
default
:
default
:
return
ResponseVo
.
commandNotFound
(
rid
);
return
ResponseVo
.
commandNotFound
(
rid
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
""
,
e
);
log
.
error
(
""
,
e
);
return
ResponseVo
.
error
(
rid
,
e
.
getMessage
());
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 {
...
@@ -85,7 +85,9 @@ public class PersonService {
poolStatus
.
add
(
pool
);
poolStatus
.
add
(
pool
);
}
}
ResponseVo
success
=
ResponseVo
.
success
(
rid
,
"success"
);
ResponseVo
success
=
ResponseVo
.
success
(
rid
,
"success"
);
success
.
setMatchPersons
(
result
);
if
(
result
.
size
()
>
0
)
{
success
.
setMatchPersons
(
result
);
}
success
.
setMatch
(
1
);
success
.
setMatch
(
1
);
success
.
setPersonPoolStatus
(
poolStatus
);
success
.
setPersonPoolStatus
(
poolStatus
);
log
.
info
(
"人员匹配操作完成,PoolIds:[{}},结果:[{}]"
,
poolIds
.
toString
(),
objectMapper
.
writeValueAsString
(
success
));
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