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
593f6a11
Commit
593f6a11
authored
Jun 28, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员档案相关-校验
parent
53fdcda1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
28 deletions
+35
-28
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+12
-18
TCheckIdCardController.java
...loud/plus/v1/check/controller/TCheckIdCardController.java
+2
-2
TCheckIdCardService.java
...yifu/cloud/plus/v1/check/service/TCheckIdCardService.java
+1
-1
TCheckIdCardServiceImpl.java
...d/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
+20
-7
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
593f6a11
...
...
@@ -108,15 +108,12 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
TCheckIdCard
checkIdCard
=
new
TCheckIdCard
();
checkIdCard
.
setName
(
employeeInfo
.
getEmpName
());
checkIdCard
.
setIdCard
(
employeeInfo
.
getEmpIdcard
());
List
<
TCheckIdCard
>
checkList
=
new
ArrayList
<>();
checkList
.
add
(
checkIdCard
);
R
<
List
<
TCheckIdCard
>>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckidcard/inner/checkIdCard"
,
checkList
,
TCheckIdCard
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
TCheckIdCard
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckidcard/inner/checkIdCardSingle"
,
checkIdCard
,
TCheckIdCard
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
for
(
TCheckIdCard
check
:
checkListR
.
getData
())
{
if
(
check
.
getIsTrue
()
==
CommonConstants
.
ZERO_INT
)
{
return
R
.
failed
(
check
.
getReason
());
}
TCheckIdCard
check
=
checkListR
.
getData
();
if
(
check
.
getIsTrue
()
==
CommonConstants
.
ZERO_INT
)
{
return
R
.
failed
(
check
.
getReason
());
}
}
return
R
.
ok
();
...
...
@@ -616,6 +613,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
Map
<
Long
,
ErrorMessage
>
errorMsgMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
errorMessageList
))
{
errorMessageList
.
stream
().
forEach
(
errorMessage
->
errorMsgMap
.
put
(
errorMessage
.
getLineNum
(),
errorMessage
));
}
else
{
errorMessageList
=
new
ArrayList
<>();
}
// 获取身份证、手机号列表,批量查询档案
...
...
@@ -734,19 +733,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
TCheckIdCard
checkIdCard
=
new
TCheckIdCard
();
checkIdCard
.
setName
(
excel
.
getEmpName
());
checkIdCard
.
setIdCard
(
excel
.
getEmpIdcard
());
List
<
TCheckIdCard
>
checkList
=
new
ArrayList
<>();
checkList
.
add
(
checkIdCard
);
R
<
List
<
TCheckIdCard
>>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckidcard/inner/checkIdCard"
,
checkList
,
TCheckIdCard
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
TCheckIdCard
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckidcard/inner/checkIdCardSingle"
,
checkIdCard
,
TCheckIdCard
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
for
(
TCheckIdCard
check
:
checkListR
.
getData
())
{
if
(
check
.
getIsTrue
()
==
CommonConstants
.
ZERO_INT
)
{
errorMsg
.
add
(
check
.
getReason
());
break
;
}
TCheckIdCard
check
=
checkListR
.
getData
();
if
(
check
.
getIsTrue
()
==
CommonConstants
.
ZERO_INT
)
{
errorMsg
.
add
(
check
.
getReason
());
}
}
saveEmp
.
setEmpName
(
excel
.
getEmpName
());
saveEmp
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/controller/TCheckIdCardController.java
View file @
593f6a11
...
...
@@ -159,7 +159,7 @@ public class TCheckIdCardController {
@SysLog
(
"校验姓名身份证 --- 单个"
)
@Inner
@PostMapping
(
"/inner/checkIdCardSingle"
)
public
R
<
TCheckIdCard
>
checkIdCardSingle
(
String
idCard
,
String
name
)
{
return
tCheckIdCardService
.
checkIdCardSingle
(
idCard
,
name
);
public
R
<
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 @
593f6a11
...
...
@@ -45,5 +45,5 @@ public interface TCheckIdCardService extends IService<TCheckIdCard> {
**/
R
<
List
<
TCheckIdCard
>>
checkIdCard
(
List
<
TCheckIdCard
>
checkList
);
R
<
TCheckIdCard
>
checkIdCardSingle
(
String
idCard
,
String
name
);
R
<
TCheckIdCard
>
checkIdCardSingle
(
TCheckIdCard
tCheckIdCard
);
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
View file @
593f6a11
...
...
@@ -226,7 +226,9 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
}
@Override
public
R
<
TCheckIdCard
>
checkIdCardSingle
(
String
idCard
,
String
name
)
{
public
R
<
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
);
}
...
...
@@ -237,13 +239,24 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
checkIdCard
)){
return
R
.
ok
(
checkIdCard
);
}
else
{
// 没找到正确的,再去找有没有错误的,如果还没有,再查
List
<
TCheckIdCard
>
checkList
=
baseMapper
.
selectList
(
Wrappers
.<
TCheckIdCard
>
query
().
lambda
()
.
eq
(
TCheckIdCard:
:
getIdCard
,
idCard
));
if
(
checkList
!=
null
&&
!
checkList
.
isEmpty
())
{
for
(
TCheckIdCard
c
:
checkList
)
{
if
(
idCard
.
equals
(
c
.
getIdCard
())
&&
name
.
equals
(
c
.
getName
()))
{
return
R
.
ok
(
c
);
}
}
}
TCheckIdCard
c
=
new
TCheckIdCard
();
c
.
setIdCard
(
idCard
);
c
.
setName
(
name
);
ChecksUtil
.
checkIdCard
(
c
,
canCheckService
.
getCanCheck
());
baseMapper
.
insert
(
c
);
return
R
.
ok
(
c
);
}
TCheckIdCard
c
=
new
TCheckIdCard
();
c
.
setIdCard
(
idCard
);
c
.
setName
(
name
);
ChecksUtil
.
checkIdCard
(
c
,
canCheckService
.
getCanCheck
());
baseMapper
.
insert
(
c
);
return
R
.
ok
(
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