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
050a3873
Commit
050a3873
authored
Nov 11, 2024
by
18310373984@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传标准照迁移到app项目
parent
bd05fbe9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
FaceService.java
...n/java/com/hungraim/ltc/facelocation/api/FaceService.java
+17
-0
SrvOrganEmpServiceImpl.java
...com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
+12
-3
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/facelocation/api/FaceService.java
0 → 100644
View file @
050a3873
package
com
.
hungraim
.
ltc
.
facelocation
.
api
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp
;
import
com.hungraim.ltc.util.Result
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
@FeignClient
(
value
=
"CH-SERVICE"
,
url
=
"${feign.client.appurl}"
)
public
interface
FaceService
{
@PostMapping
(
"/face/addFace"
)
Result
addFace
(
@RequestBody
ChSrvOrganEmp
chSrvOrganEmp
,
@RequestParam
(
"filePath"
)
String
filePath
,
@RequestParam
(
"userId"
)
Integer
userId
);
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
View file @
050a3873
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.dao.*
;
import
com.hungraim.ltc.dao.*
;
import
com.hungraim.ltc.facelocation.api.FaceService
;
import
com.hungraim.ltc.facelocation.util.FaceAuthUtil
;
import
com.hungraim.ltc.facelocation.util.FaceAuthUtil
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts
;
...
@@ -73,6 +74,8 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -73,6 +74,8 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
private
final
FaceAuthUtil
faceAuthUtil
;
private
final
FaceAuthUtil
faceAuthUtil
;
private
final
FaceService
faceService
;
@Override
@Override
public
Page
<
SrvOrganEmpListVo
>
getSrvOrganEmpListVo
(
Page
<
SrvOrganEmpListVo
>
page
,
Long
organId
,
Boolean
isInvolveChild
,
String
empName
,
String
srvOrganName
,
String
certifNum
,
Short
isLock
,
Short
empType
,
Long
srvOrganId
)
{
public
Page
<
SrvOrganEmpListVo
>
getSrvOrganEmpListVo
(
Page
<
SrvOrganEmpListVo
>
page
,
Long
organId
,
Boolean
isInvolveChild
,
String
empName
,
String
srvOrganName
,
String
certifNum
,
Short
isLock
,
Short
empType
,
Long
srvOrganId
)
{
...
@@ -198,7 +201,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -198,7 +201,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
public
Result
saveEmpFace
(
SrvOrganEmpVo
srvOrganEmpVo
,
Integer
userId
)
{
//修改护理人员需要将修改基本信息和标准照片保存分开
public
Result
saveEmpFace
(
SrvOrganEmpVo
srvOrganEmpVo
,
Integer
userId
)
{
//修改护理人员需要将修改基本信息和标准照片保存分开
//上传标准照保存到人脸库
//上传标准照保存到人脸库
Result
<
String
>
faceReult
=
updatePhotoAttachs
(
srvOrganEmpVo
,
userId
);
Result
<
String
>
faceReult
=
updatePhotoAttachs
(
srvOrganEmpVo
,
userId
);
if
(!
StrUtil
.
equals
(
faceReult
.
getCode
(),
ResultCode
.
SUCCESS
.
getCode
()))
{
if
(!
StrUtil
.
equals
(
faceReult
.
getCode
(),
"0000"
))
{
//是否成功
throw
new
RuntimeException
(
faceReult
.
getMsg
());
//人脸库上传失败,页面显示错误信息
throw
new
RuntimeException
(
faceReult
.
getMsg
());
//人脸库上传失败,页面显示错误信息
}
else
{
}
else
{
String
faceId
=
faceReult
.
getData
();
//上传标准照
String
faceId
=
faceReult
.
getData
();
//上传标准照
...
@@ -229,7 +232,13 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -229,7 +232,13 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
chFndAttach
=
attachFeignService
.
selectAttachById
(
chFndAttach
.
getAttachId
()).
getData
();
chFndAttach
=
attachFeignService
.
selectAttachById
(
chFndAttach
.
getAttachId
()).
getData
();
}
}
log
.
info
(
"filePath2:"
+
chFndAttach
.
getFilePath
());
log
.
info
(
"filePath2:"
+
chFndAttach
.
getFilePath
());
if
(
StringUtils
.
isNotEmpty
(
srvOrganEmpVo
.
getFaceId
()))
{
Result
addResult
=
faceService
.
addFace
(
srvOrganEmpVo
,
chFndAttach
.
getFilePath
(),
userId
);
log
.
info
(
"调用新增人脸接口返回信息:"
+
addResult
);
if
(
StrUtil
.
equals
(
addResult
.
getCode
(),
"0000"
))
{
//返回成功
attachFeignService
.
updateAttachs
(
attachPhotoUpdateVo
);
}
return
addResult
;
/*if(StringUtils.isNotEmpty(srvOrganEmpVo.getFaceId())) {
//先删除人员信息
//先删除人员信息
Result<String> delresult = faceAuthUtil.deleteFace(srvOrganEmpVo,userId);
Result<String> delresult = faceAuthUtil.deleteFace(srvOrganEmpVo,userId);
log.info("删除人脸信息:" + delresult);
log.info("删除人脸信息:" + delresult);
...
@@ -249,7 +258,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -249,7 +258,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
attachFeignService.updateAttachs(attachPhotoUpdateVo);
attachFeignService.updateAttachs(attachPhotoUpdateVo);
}
}
return addResult;
return addResult;
}
}
*/
}
}
}
}
return
Result
.
success
();
return
Result
.
success
();
...
...
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