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
d753b309
Commit
d753b309
authored
Apr 26, 2020
by
东州 翁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加获取登录人的相关信息接口
parent
396b202f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
10 deletions
+93
-10
src/main/java/cn/timer/api/config/enuminterface/YgEnumInterface.java
+3
-3
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+1
-1
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+43
-6
src/main/java/cn/timer/api/dto/yggl/LoginerChargeDto.java
+46
-0
No files found.
src/main/java/cn/timer/api/config/enuminterface/YgEnumInterface.java
View file @
d753b309
...
...
@@ -49,8 +49,8 @@ public interface YgEnumInterface {
*/
@Getter
enum
YgJobType
implements
YgEnumInterface
{
QUANZHI
(
1
,
"全"
),
SHIXI
(
2
,
"实习"
),
JIANZHI
(
3
,
"兼"
),
LWPQ
(
4
,
"劳务派遣"
),
LAOWU
(
5
,
"劳务"
),
PAIQIAN
(
6
,
"派遣"
),
WAIBAO
(
7
,
"外包"
),
TUIXIU
(
8
,
"退休"
);
QUANZHI
(
0
,
"全"
),
SHIXI
(
1
,
"实习"
),
JIANZHI
(
2
,
"兼"
),
LWPQ
(
3
,
"劳务派遣"
),
LAOWU
(
4
,
"劳务"
),
PAIQIAN
(
5
,
"派遣"
),
WAIBAO
(
6
,
"外包"
),
TUIXIU
(
7
,
"退休"
);
private
Integer
type
;
...
...
@@ -76,7 +76,7 @@ public interface YgEnumInterface {
*/
@Getter
enum
jobStatus
implements
YgEnumInterface
{
SHIYONG
(
1
,
"试用"
),
ZHENSHI
(
2
,
"正式"
),
LIZHIZHONG
(
3
,
"离职中"
),
YILIZHI
(
4
,
"已离职"
);
SHIYONG
(
0
,
"试用"
),
ZHENSHI
(
1
,
"正式"
),
LIZHIZHONG
(
2
,
"离职中"
),
YILIZHI
(
3
,
"已离职"
);
private
Integer
type
;
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
d753b309
...
...
@@ -230,7 +230,7 @@ public class QyzxController {
@ApiOperation
(
value
=
"显示常用的企业开票资料"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
QyzxInvoiceUsual
>
invoiceusual
(
@CurrentUser
UserBean
userBean
)
{
QyzxInvoiceUsual
one
=
new
LambdaQueryChainWrapper
<
QyzxInvoiceUsual
>(
qyzxInvoiceUsualMapper
).
eq
(
QyzxInvoiceUsual:
:
getOrgCode
,
userBean
.
getOrgCode
()).
one
();
return
ResultUtil
.
data
(
one
,
"
企业超管头像和电话号码
"
);
return
ResultUtil
.
data
(
one
,
"
显示常用的企业开票资料
"
);
}
/**
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
d753b309
...
...
@@ -77,6 +77,7 @@ import cn.timer.api.dao.yggl.YgglMainLzbMapper;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.yggl.AddygdaDto
;
import
cn.timer.api.dto.yggl.LoginerChargeDto
;
import
cn.timer.api.dto.yggl.LzbQueryDto
;
import
cn.timer.api.dto.yggl.LzygQueryDto
;
import
cn.timer.api.dto.yggl.YgAreaDto
;
...
...
@@ -132,6 +133,42 @@ public class YgglController {
// weng(民族)
@Autowired
private
YgMzDtoMapper
ygMzDtoMapper
;
/**
* 获取登录人的相关信息
*
* @param
* @return
*/
@GetMapping
(
value
=
"/loginmessage"
)
@ApiOperation
(
value
=
" 获取登录人的相关信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
68
)
public
Result
<
YgglMainEmp
>
loginmessage
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
orgCode
=
userBean
.
getOrgCode
();
YgglMainEmp
ygglMainEmp
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getRzTime
,
YgglMainEmp:
:
getEmpNum
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
one
();
Integer
gw
=
ygglMainEmp
.
getBmgwId
();
ZzglBmgwM
bmid
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getUpId
).
eq
(
ZzglBmgwM:
:
getId
,
gw
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
ygglMainEmp
.
setUnionid
(
bmid
.
toString
());
return
ResultUtil
.
data
(
ygglMainEmp
,
"部门id返回字段为unionid"
);
}
/**
* 获取登录人和上级主管的empNum和名称
*
* @param
* @return
*/
@GetMapping
(
value
=
"/loginerChargers"
)
@ApiOperation
(
value
=
" 获取登录人和上级主管的empNum和名称"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
68
)
public
Result
<
LoginerChargeDto
>
loginerChargers
(
@CurrentUser
UserBean
userBean
)
{
return
ResultUtil
.
error
(
"获取登录人和上级主管的empNum和名称失败"
);
}
/**
* 获取员工档案
...
...
@@ -321,7 +358,7 @@ public class YgglController {
ygQueryDto
.
getTotalPage
()
==
null
?
10
:
ygQueryDto
.
getTotalPage
());
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"name"
,
"emp_num"
,
"bmgw_id"
,
"rz_time"
,
"job_type"
,
"phone"
,
"job_status"
)
.
ne
(
"job_status"
,
4
).
eq
(
"org_code"
,
orgCode
).
eq
(
t
!=
null
&&
t
>
-
1
,
"job_type"
,
t
)
.
ne
(
"job_status"
,
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()
).
eq
(
"org_code"
,
orgCode
).
eq
(
t
!=
null
&&
t
>
-
1
,
"job_type"
,
t
)
.
eq
(
j
!=
null
&&
j
>
-
1
,
"job_status"
,
j
).
in
(!
bList
.
isEmpty
(),
"bmgw_id"
,
bList
)
.
and
(!
StrUtil
.
hasBlank
(
q
),
wq
->
wq
.
like
(
"name"
,
q
).
or
().
like
(
"phone"
,
q
));
...
...
@@ -1392,7 +1429,7 @@ public class YgglController {
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
updateWrapper1
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
3
).
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
jobStatus
(
3
).
lzTime
(
lzygQueryDto
.
getLzTime
()).
lzyy
(
lzygQueryDto
.
getLzyy
())
YgglMainLzb
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()
).
lzTime
(
lzygQueryDto
.
getLzTime
()).
lzyy
(
lzygQueryDto
.
getLzyy
())
.
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
// 删除员工表
// ygglMainEmp.deleteById();
...
...
@@ -1418,8 +1455,8 @@ public class YgglController {
updateWrapper
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
updateWrapper1
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
4
).
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
4
).
sjlzTime
(
new
Date
()).
build
()
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()
).
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()
).
sjlzTime
(
new
Date
()).
build
()
.
update
(
updateWrapper1
);
// 查询该员工的关联表
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper1
=
new
QueryWrapper
<
QyzxEmpEntAsso
>();
...
...
@@ -1442,7 +1479,7 @@ public class YgglController {
public
Result
<
Void
>
fqlz
(
@CurrentUser
UserBean
userBean
,
@RequestBody
LzygQueryDto
lzygQueryDto
)
{
UpdateWrapper
<
YgglMainEmp
>
updateWrapper
=
new
UpdateWrapper
<
YgglMainEmp
>();
updateWrapper
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
YgglMainEmp
.
builder
().
jobStatus
(
2
).
build
().
update
(
updateWrapper
);
YgglMainEmp
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
ZHENSHI
.
getType
()
).
build
().
update
(
updateWrapper
);
QueryWrapper
<
YgglMainLzb
>
queryWrapper
=
new
QueryWrapper
<
YgglMainLzb
>();
queryWrapper
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
// 删除离职表
...
...
@@ -1760,7 +1797,7 @@ public class YgglController {
ageList
.
add
(
new
YgKVDto
(
entry
.
getKey
().
toString
(),
entry
.
getValue
().
toString
()));
}
// 在职
Integer
zaizhi
=
jobStatus
.
get
(
1
).
intValue
()
+
jobStatus
.
get
(
2
).
intValue
();
Integer
zaizhi
=
jobStatus
.
get
(
YgEnumInterface
.
jobStatus
.
ZHENSHI
.
getType
()).
intValue
()
+
jobStatus
.
get
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
()
).
intValue
();
// 本月新入职
Integer
xinruzhi
=
workage
.
get
(
"本月新入职"
).
intValue
();
// 本月离职
...
...
src/main/java/cn/timer/api/dto/yggl/LoginerChargeDto.java
0 → 100644
View file @
d753b309
/**
* @date 2020年4月26日
* @author 翁东州
* @方法中文名称:
*/
package
cn
.
timer
.
api
.
dto
.
yggl
;
import
java.io.Serializable
;
import
java.util.Date
;
import
cn.timer.api.dto.yggl.LzbDto.LzbDtoBuilder
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @date 2020年4月26日
* @author 翁东州
* @方法中文名称:
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
LoginerChargeDto
implements
Serializable
{
/**
* @date 2020年4月26日
* @author 翁东州
* @方法中文名称:
*/
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"员工empNum"
,
example
=
"9688"
)
private
Integer
empNum
;
@ApiModelProperty
(
value
=
"上级主管empNum"
,
example
=
"000"
)
private
Integer
upEmpNum
;
@ApiModelProperty
(
value
=
"主管名称"
,
example
=
"李大力"
)
private
String
charge
;
@ApiModelProperty
(
value
=
"上级主管"
,
example
=
""
)
private
LoginerChargeDto
loginerChargeDto
;
}
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