Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
378c7d10
Commit
378c7d10
authored
Nov 17, 2021
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加功能 修改登陆账号
parent
0be4903f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
+5
-0
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+17
-0
No files found.
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
View file @
378c7d10
...
@@ -218,6 +218,11 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
...
@@ -218,6 +218,11 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@Transient
@Transient
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
error
;
//错误信息提示
private
String
error
;
//错误信息提示
@Transient
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"员工登陆账号(手机号)"
,
example
=
"员工登陆账号(手机号)"
)
private
String
empLoginPhone
;
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
378c7d10
...
@@ -208,9 +208,13 @@ public class YgglController {
...
@@ -208,9 +208,13 @@ public class YgglController {
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
));
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
));
Date
rz
=
ygglMainEmp
.
getRzTime
();
Date
rz
=
ygglMainEmp
.
getRzTime
();
QyzxEmpLogin
login
=
QyzxEmpLogin
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxEmpLogin
>().
select
(
"phone"
).
eq
(
"id"
,
empNum
));
if
(
rz
!=
null
)
{
if
(
rz
!=
null
)
{
ygglMainEmp
.
setWorkTime
(
DateUtil
.
formatBetween
(
ygglMainEmp
.
getRzTime
(),
new
Date
(),
Level
.
DAY
));
ygglMainEmp
.
setWorkTime
(
DateUtil
.
formatBetween
(
ygglMainEmp
.
getRzTime
(),
new
Date
(),
Level
.
DAY
));
}
}
if
(!
StringUtils
.
isEmpty
(
login
)
&&
!
StringUtils
.
isEmpty
(
login
.
getPhone
()))
{
ygglMainEmp
.
setEmpLoginPhone
(
login
.
getPhone
());
}
return
ResultUtil
.
data
(
ygglMainEmp
);
return
ResultUtil
.
data
(
ygglMainEmp
);
}
}
...
@@ -424,6 +428,19 @@ public class YgglController {
...
@@ -424,6 +428,19 @@ public class YgglController {
&&
!
DateFormatUtils
.
getCompareDate
(
ygglMainEmp
.
getRzTime
(),
ygglMainEmp
.
getZzTime
()))
{
&&
!
DateFormatUtils
.
getCompareDate
(
ygglMainEmp
.
getRzTime
(),
ygglMainEmp
.
getZzTime
()))
{
return
ResultUtil
.
error
(
"入职日期 不可以大于 转正日期"
);
return
ResultUtil
.
error
(
"入职日期 不可以大于 转正日期"
);
}
}
//修改 员工登陆账号 检测账号是否重复
if
(!
StringUtils
.
isEmpty
(
ygglMainEmp
.
getEmpLoginPhone
())){
QyzxEmpLogin
login
=
new
LambdaQueryChainWrapper
<
QyzxEmpLogin
>(
qyzxEmpLoginMapper
)
.
eq
(!
StrUtil
.
hasBlank
(
ygglMainEmp
.
getEmpLoginPhone
()),
QyzxEmpLogin:
:
getPhone
,
ygglMainEmp
.
getEmpLoginPhone
()).
one
();
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getPhone
,
ygglMainEmp
.
getEmpLoginPhone
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
StringUtils
.
isEmpty
(
login
)
&&
StringUtils
.
isEmpty
(
emp
)){
YgglMainEmp
.
builder
().
phone
(
ygglMainEmp
.
getEmpLoginPhone
()).
build
().
update
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getId
,
emp
.
getId
()));
QyzxEmpLogin
.
builder
().
phone
(
ygglMainEmp
.
getEmpLoginPhone
()).
build
().
update
(
new
QueryWrapper
<
QyzxEmpLogin
>().
lambda
().
eq
(
QyzxEmpLogin:
:
getId
,
ygglMainEmp
.
getEmpNum
()));
}
else
{
return
ResultUtil
.
error
(
"该号码已存在,请更换员工登陆账号"
);
}
}
if
(
ygglMainEmp
.
getEmpNum
()
!=
null
)
{
if
(
ygglMainEmp
.
getEmpNum
()
!=
null
)
{
ygglMainEmp
.
update
(
new
UpdateWrapper
<
YgglMainEmp
>().
lambda
()
ygglMainEmp
.
update
(
new
UpdateWrapper
<
YgglMainEmp
>().
lambda
()
...
...
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