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
ee5205d9
Commit
ee5205d9
authored
May 18, 2020
by
tangzhaoqian
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
切换企业、员工角色类型 优化
parent
17ce7625
Hide 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 @
ee5205d9
...
...
@@ -12,19 +12,19 @@ import lombok.Getter;
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 关闭
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
ee5205d9
...
...
@@ -265,7 +265,7 @@ public class QyzxController {
* @return
*/
@GetMapping
(
value
=
"/entlist"
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
,
position
=
98
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -283,7 +283,7 @@ public class QyzxController {
* @return
*/
@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
)
{
// 查询该员工加入的企业id列表
QyzxEmpLogin
emp
=
userBean
.
getQyzxEmpLogin
();
...
...
@@ -291,7 +291,11 @@ public class QyzxController {
// 判断 切换目标企业id 是否包含在 企业id列表 内
if
(
s
!=
null
)
{
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
())
||
CommonEnum
.
U_TYPE_C_ADMIN
.
getType
().
equals
(
ctrl
.
getUserType
()))
{
}
else
{
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
ee5205d9
...
...
@@ -425,7 +425,7 @@ public class YgglController {
QyzxEmpEntAsso
.
builder
()
.
empNum
(
login
.
getId
())
.
orgCode
(
orgCode
)
.
userType
(
2
)
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()
)
.
status
(
1
)
.
build
()
.
insert
();
// usertype2普通员工
...
...
@@ -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正常
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
)
...
...
@@ -630,7 +630,7 @@ public class YgglController {
.
eq
(
"phone"
,
e
.
getPhone
()).
eq
(
"org_code"
,
userBean
.
getOrgCode
()));
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正常
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
)
.
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