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
de2e9288
Commit
de2e9288
authored
May 18, 2020
by
dengshichuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tzq' into 'develop'
切换企业、员工角色类型 优化 See merge request 8timerv2/8timerapiv200!99
parents
4052883e
fbda1f39
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
src/main/java/cn/timer/api/config/enums/CommonEnum.java
+6
-6
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+7
-3
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+3
-3
No files found.
src/main/java/cn/timer/api/config/enums/CommonEnum.java
View file @
de2e9288
...
@@ -12,19 +12,19 @@ import lombok.Getter;
...
@@ -12,19 +12,19 @@ import lombok.Getter;
public
enum
CommonEnum
{
public
enum
CommonEnum
{
/**
/**
*
0
超管理员
*
1
超管理员
*/
*/
U_TYPE_ADMIN
(
0
,
"超管理员"
),
U_TYPE_ADMIN
(
1
,
"超管理员"
),
/**
/**
*
1
子管理
*
2
子管理
*/
*/
U_TYPE_C_ADMIN
(
1
,
"子管理"
),
U_TYPE_C_ADMIN
(
2
,
"子管理"
),
/**
/**
*
2
普通员工
*
3
普通员工
*/
*/
U_TYPE_EMP
(
2
,
"普通员工"
),
U_TYPE_EMP
(
3
,
"普通员工"
),
/**
/**
* 0 关闭
* 0 关闭
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
de2e9288
...
@@ -283,7 +283,7 @@ public class QyzxController {
...
@@ -283,7 +283,7 @@ public class QyzxController {
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/entlist"
)
@GetMapping
(
value
=
"/entlist"
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
,
position
=
98
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
empNum
=
userBean
.
getEmpNum
();
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper
=
new
QueryWrapper
<>();
...
@@ -301,7 +301,7 @@ public class QyzxController {
...
@@ -301,7 +301,7 @@ public class QyzxController {
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/changeent/{orgCode}"
)
@GetMapping
(
value
=
"/changeent/{orgCode}"
)
@ApiOperation
(
value
=
"切换企业"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
,
position
=
97
)
@ApiOperation
(
value
=
"切换企业"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
String
>>
changeent
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
orgCode
)
{
public
Result
<
List
<
String
>>
changeent
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
orgCode
)
{
// 查询该员工加入的企业id列表
// 查询该员工加入的企业id列表
QyzxEmpLogin
emp
=
userBean
.
getQyzxEmpLogin
();
QyzxEmpLogin
emp
=
userBean
.
getQyzxEmpLogin
();
...
@@ -309,7 +309,11 @@ public class QyzxController {
...
@@ -309,7 +309,11 @@ public class QyzxController {
// 判断 切换目标企业id 是否包含在 企业id列表 内
// 判断 切换目标企业id 是否包含在 企业id列表 内
if
(
s
!=
null
)
{
if
(
s
!=
null
)
{
List
<
String
>
menus
=
new
ArrayList
<>();
List
<
String
>
menus
=
new
ArrayList
<>();
QysDto
ctrl
=
s
.
findFirst
().
get
();
QysDto
ctrl
=
s
.
findFirst
().
orElse
(
null
);
if
(
ctrl
==
null
)
{
return
ResultUtil
.
data
(
menus
,
"你不是该企业的用户!"
);
}
if
(
CommonEnum
.
U_TYPE_ADMIN
.
getType
().
equals
(
ctrl
.
getUserType
())
if
(
CommonEnum
.
U_TYPE_ADMIN
.
getType
().
equals
(
ctrl
.
getUserType
())
||
CommonEnum
.
U_TYPE_C_ADMIN
.
getType
().
equals
(
ctrl
.
getUserType
()))
{
||
CommonEnum
.
U_TYPE_C_ADMIN
.
getType
().
equals
(
ctrl
.
getUserType
()))
{
}
else
{
}
else
{
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
de2e9288
...
@@ -425,7 +425,7 @@ public class YgglController {
...
@@ -425,7 +425,7 @@ public class YgglController {
QyzxEmpEntAsso
.
builder
()
QyzxEmpEntAsso
.
builder
()
.
empNum
(
login
.
getId
())
.
empNum
(
login
.
getId
())
.
orgCode
(
orgCode
)
.
orgCode
(
orgCode
)
.
userType
(
2
)
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()
)
.
status
(
1
)
.
status
(
1
)
.
build
()
.
build
()
.
insert
();
// usertype2普通员工
.
insert
();
// usertype2普通员工
...
@@ -611,7 +611,7 @@ public class YgglController {
...
@@ -611,7 +611,7 @@ public class YgglController {
}
}
// 员工权限表(未定)
// 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
QyzxEmpEntAsso
.
builder
().
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
userBean
.
getOrgCode
()).
userType
(
2
)
QyzxEmpEntAsso
.
builder
().
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
userBean
.
getOrgCode
()).
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()
)
.
status
(
1
).
build
().
insert
();
// userType2普通员工,status1正常
.
status
(
1
).
build
().
insert
();
// userType2普通员工,status1正常
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
).
zjNum
(
e
.
getZj
())
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
).
zjNum
(
e
.
getZj
())
.
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
()).
updateMan
(
userBean
.
getEmpNum
()).
syq
(
syq
)
.
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
()).
updateMan
(
userBean
.
getEmpNum
()).
syq
(
syq
)
...
@@ -630,7 +630,7 @@ public class YgglController {
...
@@ -630,7 +630,7 @@ public class YgglController {
.
eq
(
"phone"
,
e
.
getPhone
()).
eq
(
"org_code"
,
userBean
.
getOrgCode
()));
.
eq
(
"phone"
,
e
.
getPhone
()).
eq
(
"org_code"
,
userBean
.
getOrgCode
()));
if
(
ishad
==
null
)
{
if
(
ishad
==
null
)
{
// 员工权限表(未定)
// 员工权限表(未定)
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
userBean
.
getOrgCode
()).
userType
(
2
).
status
(
1
)
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
userBean
.
getOrgCode
()).
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()
).
status
(
1
)
.
build
().
insert
();
// userType2普通员工,status1正常
.
build
().
insert
();
// userType2普通员工,status1正常
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
)
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
)
.
zjNum
(
e
.
getZj
()).
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
())
.
zjNum
(
e
.
getZj
()).
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
())
...
...
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