Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
b71568c2
Commit
b71568c2
authored
Jun 29, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员档案相关-调用服务优化吧。。
parent
2fd7a1aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
9 deletions
+23
-9
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+4
-2
TCheckIdCardController.java
...loud/plus/v1/check/controller/TCheckIdCardController.java
+1
-1
TCheckIdCardService.java
...yifu/cloud/plus/v1/check/service/TCheckIdCardService.java
+1
-1
TCheckIdCardServiceImpl.java
...d/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
+17
-5
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
b71568c2
...
...
@@ -112,7 +112,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
,
"/tcheckidcard/inner/checkIdCardSingle"
,
checkIdCard
,
TCheckIdCard
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
TCheckIdCard
check
=
checkListR
.
getData
();
if
(
check
==
null
||
Common
.
isEmpty
(
check
.
getI
d
()))
{
if
(
check
==
null
||
Common
.
isEmpty
(
check
.
getI
sTrue
()))
{
return
R
.
failed
(
"校验服务器未返回,请联系管理员!!"
);
}
else
if
(
check
.
getIsTrue
()
==
CommonConstants
.
ZERO_INT
)
{
return
R
.
failed
(
check
.
getReason
());
...
...
@@ -741,7 +741,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
,
"/tcheckidcard/inner/checkIdCardSingle"
,
checkIdCard
,
TCheckIdCard
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
TCheckIdCard
check
=
checkListR
.
getData
();
if
(
check
.
getIsTrue
()
==
CommonConstants
.
ZERO_INT
)
{
if
(
check
==
null
||
Common
.
isEmpty
(
check
.
getIsTrue
()))
{
errorMsg
.
add
(
"校验服务器未返回,请联系管理员!!"
);
}
else
if
(
check
.
getIsTrue
()
==
CommonConstants
.
ZERO_INT
)
{
errorMsg
.
add
(
check
.
getReason
());
}
}
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/controller/TCheckIdCardController.java
View file @
b71568c2
...
...
@@ -159,7 +159,7 @@ public class TCheckIdCardController {
@SysLog
(
"校验姓名身份证 --- 单个"
)
@Inner
@PostMapping
(
"/inner/checkIdCardSingle"
)
public
R
<
TCheckIdCard
>
checkIdCardSingle
(
@RequestBody
TCheckIdCard
tCheckIdCard
)
{
public
TCheckIdCard
checkIdCardSingle
(
@RequestBody
TCheckIdCard
tCheckIdCard
)
{
return
tCheckIdCardService
.
checkIdCardSingle
(
tCheckIdCard
);
}
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/TCheckIdCardService.java
View file @
b71568c2
...
...
@@ -45,5 +45,5 @@ public interface TCheckIdCardService extends IService<TCheckIdCard> {
**/
R
<
List
<
TCheckIdCard
>>
checkIdCard
(
List
<
TCheckIdCard
>
checkList
);
R
<
TCheckIdCard
>
checkIdCardSingle
(
TCheckIdCard
tCheckIdCard
);
TCheckIdCard
checkIdCardSingle
(
TCheckIdCard
tCheckIdCard
);
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
View file @
b71568c2
...
...
@@ -226,11 +226,23 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
}
@Override
public
R
<
TCheckIdCard
>
checkIdCardSingle
(
TCheckIdCard
tCheckIdCard
)
{
public
TCheckIdCard
checkIdCardSingle
(
TCheckIdCard
tCheckIdCard
)
{
String
idCard
=
tCheckIdCard
.
getIdCard
();
String
name
=
tCheckIdCard
.
getName
();
if
(
Common
.
isEmpty
(
idCard
)
||
Common
.
isEmpty
(
name
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
tCheckIdCard
.
setIsTrue
(
CommonConstants
.
ZERO_INT
);
tCheckIdCard
.
setReason
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
return
tCheckIdCard
;
}
// 校验姓名身份证规则
if
(!
regIdCard
(
idCard
))
{
tCheckIdCard
.
setIsTrue
(
0
);
tCheckIdCard
.
setReason
(
"身份证格式有误"
);
return
tCheckIdCard
;
}
else
if
(
regEmpName
(
name
))
{
tCheckIdCard
.
setIsTrue
(
0
);
tCheckIdCard
.
setReason
(
"姓名含数字或空格,无法校验"
);
return
tCheckIdCard
;
}
synchronized
(
this
){
TCheckIdCard
checkIdCard
=
baseMapper
.
selectOne
(
Wrappers
.<
TCheckIdCard
>
query
().
lambda
()
...
...
@@ -238,7 +250,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
.
eq
(
TCheckIdCard:
:
getIsTrue
,
CommonConstants
.
ONE_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
checkIdCard
)){
return
R
.
ok
(
checkIdCard
)
;
return
checkIdCard
;
}
else
{
// 没找到正确的,再去找有没有错误的,如果还没有,再查
List
<
TCheckIdCard
>
checkList
=
baseMapper
.
selectList
(
Wrappers
.<
TCheckIdCard
>
query
().
lambda
()
...
...
@@ -246,7 +258,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
if
(
checkList
!=
null
&&
!
checkList
.
isEmpty
())
{
for
(
TCheckIdCard
c
:
checkList
)
{
if
(
idCard
.
equals
(
c
.
getIdCard
())
&&
name
.
equals
(
c
.
getName
()))
{
return
R
.
ok
(
c
)
;
return
c
;
}
}
}
...
...
@@ -255,7 +267,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
c
.
setName
(
name
);
ChecksUtil
.
checkIdCard
(
c
,
canCheckService
.
getCanCheck
());
baseMapper
.
insert
(
c
);
return
R
.
ok
(
c
)
;
return
c
;
}
}
}
...
...
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