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
89abc956
You need to sign in or sign up before continuing.
Commit
89abc956
authored
Jul 12, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单个编辑,手机号校验
parent
c5dc81e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+32
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
89abc956
...
...
@@ -162,6 +162,38 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return
R
.
failed
(
"根据id未找到档案!"
+
employeeInfo
.
getId
());
}
// 校验手机号:
if
(
Common
.
isEmpty
(
employeeInfo
.
getEmpPhone
()))
{
return
R
.
failed
(
"手机号必填!"
);
}
else
{
TEmployeeInfo
check
=
new
TEmployeeInfo
();
check
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
check
.
setEmpPhone
(
employeeInfo
.
getEmpPhone
());
List
<
TEmployeeInfo
>
list
=
baseMapper
.
getList
(
check
);
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
for
(
TEmployeeInfo
e
:
list
)
{
if
(!
e
.
getEmpIdcard
().
equals
(
employeeInfo
.
getEmpIdcard
()))
{
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_IMPORT_EMP_PHONE_EXIST_ERROR
,
employeeInfo
.
getEmpIdcard
()));
}
}
}
// 调用校验服务-校验手机号
TCheckMobile
checkMobile
=
new
TCheckMobile
();
checkMobile
.
setMobile
(
employeeInfo
.
getEmpPhone
());
R
<
TCheckMobile
>
a
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckmobile/inner/checkOneMobile"
,
checkMobile
,
TCheckMobile
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
a
!=
null
&&
a
.
getData
()
!=
null
)
{
checkMobile
=
a
.
getData
();
if
(
checkMobile
!=
null
&&
Common
.
isNotNull
(
checkMobile
.
getStatus
()))
{
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
checkMobile
.
getStatus
()))
{
return
R
.
failed
(
checkMobile
.
getMessage
());
}
}
else
{
return
R
.
failed
(
"校验服务错误,请联系管理员!"
);
}
}
}
employeeInfo
.
setUpdateBy
(
user
.
getId
());
employeeInfo
.
setUpdateTime
(
LocalDateTime
.
now
());
...
...
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