Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hubin
long-tern-care-service
Commits
1f3fd75a
Commit
1f3fd75a
authored
Oct 15, 2024
by
18310373984@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
护理人员照片信息
parent
3b7a76b9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
SrvOrganController.java
.../java/com/hungraim/ltc/controller/SrvOrganController.java
+1
-0
FaceAuthUtil.java
...java/com/hungraim/ltc/facelocation/util/FaceAuthUtil.java
+5
-0
SrvOrganEmpServiceImpl.java
...com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
+1
-0
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/controller/SrvOrganController.java
View file @
1f3fd75a
...
...
@@ -288,6 +288,7 @@ public class SrvOrganController {
srvOrganEmpVoR
.
setEmpName
(
srvOrganEmpVo
.
getEmpName
());
srvOrganEmpVoR
.
setGender
(
srvOrganEmpVo
.
getGender
());
srvOrganEmpVoR
.
setCertifNum
(
srvOrganEmpVo
.
getCertifNum
());
srvOrganEmpVoR
.
setFaceId
(
srvOrganEmpVo
.
getFaceId
());
srvOrganEmpVoR
.
setPhotoList
(
srvOrganEmpVo
.
getPhotoList
());
Integer
userId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"userId"
);
return
srvOrganEmpService
.
saveEmpFace
(
srvOrganEmpVoR
,
userId
);
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/facelocation/util/FaceAuthUtil.java
View file @
1f3fd75a
...
...
@@ -40,6 +40,8 @@ public class FaceAuthUtil {
public
Result
<
String
>
addFace
(
ChSrvOrganEmp
faceAuthParam
,
String
filePath
,
Integer
userId
){
try
{
log
.
info
(
"filePath4:"
+
filePath
);
//设置文件路径
// 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey
Credential
cred
=
new
Credential
(
faceAuthProperties
.
getSecretId
(),
faceAuthProperties
.
getSecretKey
());
...
...
@@ -106,9 +108,12 @@ public class FaceAuthUtil {
//同时将FileUtils类uploadFile方法注释打开
// File filePath=new File("D:/");
// File file = new File(filePath,imagePath);
log
.
info
(
"imagePath:"
+
imagePath
);
File
file
=
new
File
(
imagePath
);
log
.
info
(
"imageToBase64:"
+
file
.
getPath
());
try
(
FileInputStream
fileInputStream
=
new
FileInputStream
(
file
))
{
byte
[]
bytes
=
new
byte
[(
int
)
file
.
length
()];
log
.
info
(
"bytes:"
+
bytes
.
length
);
fileInputStream
.
read
(
bytes
);
base64String
=
Base64
.
getEncoder
().
encodeToString
(
bytes
);
}
catch
(
IOException
e
)
{
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
View file @
1f3fd75a
...
...
@@ -238,6 +238,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
return
addResult
;
}
else
{
log
.
info
(
"filePath3:"
+
chFndAttach
.
getFilePath
());
//在新增人员信息
Result
addResult
=
faceAuthUtil
.
addFace
(
srvOrganEmpVo
,
chFndAttach
.
getFilePath
(),
userId
);
log
.
info
(
"新增人脸信息:"
+
addResult
);
...
...
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