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
5737ff20
Commit
5737ff20
authored
May 06, 2020
by
东州 翁
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加方法根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组,更正发票资料表的对应表名,工作性质从0开始
parent
7f2be3d9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
163 additions
and
117 deletions
+163
-117
src/main/java/cn/timer/api/bean/qyzx/QyzxInvoiceUsual.java
+5
-2
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
+1
-1
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+6
-0
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+100
-112
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+51
-2
No files found.
src/main/java/cn/timer/api/bean/qyzx/QyzxInvoiceUsual.java
View file @
5737ff20
...
@@ -40,8 +40,8 @@ import lombok.NoArgsConstructor;
...
@@ -40,8 +40,8 @@ import lombok.NoArgsConstructor;
@Builder
@Builder
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@Table
(
name
=
"qyzx_invoice_
data
"
)
@Table
(
name
=
"qyzx_invoice_
usual
"
)
@ApiModel
(
"发票资料表"
)
@ApiModel
(
"
常用
发票资料表"
)
public
class
QyzxInvoiceUsual
extends
Model
<
QyzxInvoiceUsual
>{
public
class
QyzxInvoiceUsual
extends
Model
<
QyzxInvoiceUsual
>{
private
static
final
long
serialVersionUID
=
2890357568571822258L
;
private
static
final
long
serialVersionUID
=
2890357568571822258L
;
...
@@ -82,6 +82,9 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
...
@@ -82,6 +82,9 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
@ApiModelProperty
(
value
=
"邮箱"
,
example
=
"13144400255@163.com"
)
@ApiModelProperty
(
value
=
"邮箱"
,
example
=
"13144400255@163.com"
)
private
String
email
;
private
String
email
;
@ApiModelProperty
(
value
=
"收货地区"
,
example
=
"广东省广州市白云区"
)
private
String
shippingArea
;
@ApiModelProperty
(
value
=
"收货地址"
,
example
=
"白云东平伯曼酒店"
)
@ApiModelProperty
(
value
=
"收货地址"
,
example
=
"白云东平伯曼酒店"
)
private
String
shippingAddress
;
private
String
shippingAddress
;
...
...
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
View file @
5737ff20
...
@@ -127,7 +127,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
...
@@ -127,7 +127,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty
(
value
=
"转正备注 "
,
example
=
"转正备注"
)
@ApiModelProperty
(
value
=
"转正备注 "
,
example
=
"转正备注"
)
private
String
zzRemark
;
private
String
zzRemark
;
@ApiModelProperty
(
value
=
"工作性质
1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8
退休返聘"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"工作性质
0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7
退休返聘"
,
example
=
"101"
)
private
Integer
jobType
;
private
Integer
jobType
;
@ApiModelProperty
(
value
=
"员工状态 0试用、1正式、2离职中、3已离职"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"员工状态 0试用、1正式、2离职中、3已离职"
,
example
=
"101"
)
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
5737ff20
...
@@ -231,6 +231,12 @@ public class QyzxController {
...
@@ -231,6 +231,12 @@ public class QyzxController {
public
Result
<
QyzxInvoiceUsual
>
invoiceusual
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
QyzxInvoiceUsual
>
invoiceusual
(
@CurrentUser
UserBean
userBean
)
{
QyzxInvoiceUsual
one
=
new
LambdaQueryChainWrapper
<
QyzxInvoiceUsual
>(
qyzxInvoiceUsualMapper
)
QyzxInvoiceUsual
one
=
new
LambdaQueryChainWrapper
<
QyzxInvoiceUsual
>(
qyzxInvoiceUsualMapper
)
.
eq
(
QyzxInvoiceUsual:
:
getOrgCode
,
userBean
.
getOrgCode
()).
one
();
.
eq
(
QyzxInvoiceUsual:
:
getOrgCode
,
userBean
.
getOrgCode
()).
one
();
if
(
one
.
getShippingArea
()
==
null
)
{
one
.
setShippingArea
(
""
);
}
if
(
one
.
getShippingAddress
()
==
null
)
{
one
.
setShippingAddress
(
""
);
}
return
ResultUtil
.
data
(
one
,
"显示常用的企业开票资料"
);
return
ResultUtil
.
data
(
one
,
"显示常用的企业开票资料"
);
}
}
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
5737ff20
...
@@ -8,19 +8,24 @@ package cn.timer.api.controller.yggl;
...
@@ -8,19 +8,24 @@ package cn.timer.api.controller.yggl;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Map.Entry
;
import
java.util.Set
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
javax.transaction.Transactional
;
import
javax.transaction.Transactional
;
import
javax.websocket.server.PathParam
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
@@ -39,10 +44,10 @@ import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWra
...
@@ -39,10 +44,10 @@ import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWra
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.util.StringUtil
;
import
com.github.pagehelper.util.StringUtil
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
...
@@ -74,13 +79,13 @@ import cn.timer.api.dao.yggl.YgMzDtoMapper;
...
@@ -74,13 +79,13 @@ import cn.timer.api.dao.yggl.YgMzDtoMapper;
import
cn.timer.api.dao.yggl.YgProDtoMapper
;
import
cn.timer.api.dao.yggl.YgProDtoMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.yggl.YgglMainLzbMapper
;
import
cn.timer.api.dao.yggl.YgglMainLzbMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.yggl.AddygdaDto
;
import
cn.timer.api.dto.yggl.AddygdaDto
;
import
cn.timer.api.dto.yggl.LoginerChargeDto
;
import
cn.timer.api.dto.yggl.LoginerChargeDto
;
import
cn.timer.api.dto.yggl.LzbQueryDto
;
import
cn.timer.api.dto.yggl.LzbQueryDto
;
import
cn.timer.api.dto.yggl.LzygQueryDto
;
import
cn.timer.api.dto.yggl.LzygQueryDto
;
import
cn.timer.api.dto.yggl.YgAreaDto
;
import
cn.timer.api.dto.yggl.YgAreaDto
;
import
cn.timer.api.dto.yggl.YgCartogramDto
;
import
cn.timer.api.dto.yggl.YgCityDto
;
import
cn.timer.api.dto.yggl.YgCityDto
;
import
cn.timer.api.dto.yggl.YgDrjqbDto
;
import
cn.timer.api.dto.yggl.YgDrjqbDto
;
import
cn.timer.api.dto.yggl.YgDrsDto
;
import
cn.timer.api.dto.yggl.YgDrsDto
;
...
@@ -91,6 +96,7 @@ import cn.timer.api.dto.yggl.YgbintuDto;
...
@@ -91,6 +96,7 @@ import cn.timer.api.dto.yggl.YgbintuDto;
import
cn.timer.api.dto.yggl.YgglCartogramDto
;
import
cn.timer.api.dto.yggl.YgglCartogramDto
;
import
cn.timer.api.dto.yggl.YgjgDto
;
import
cn.timer.api.dto.yggl.YgjgDto
;
import
cn.timer.api.dto.yggl.YgmzDto
;
import
cn.timer.api.dto.yggl.YgmzDto
;
import
cn.timer.api.dto.yggl.YgCartogramDto
;
import
cn.timer.api.dto.yggl.YgzzDto
;
import
cn.timer.api.dto.yggl.YgzzDto
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
...
@@ -132,7 +138,7 @@ public class YgglController {
...
@@ -132,7 +138,7 @@ public class YgglController {
// weng(民族)
// weng(民族)
@Autowired
@Autowired
private
YgMzDtoMapper
ygMzDtoMapper
;
private
YgMzDtoMapper
ygMzDtoMapper
;
/**
/**
* 获取登录人的相关信息
* 获取登录人的相关信息
*
*
...
@@ -145,16 +151,14 @@ public class YgglController {
...
@@ -145,16 +151,14 @@ public class YgglController {
public
Result
<
YgglMainEmp
>
loginmessage
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
YgglMainEmp
>
loginmessage
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
orgCode
=
userBean
.
getOrgCode
();
YgglMainEmp
ygglMainEmp
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
YgglMainEmp
ygglMainEmp
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getRzTime
,
YgglMainEmp:
:
getEmpNum
)
.
select
(
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getRzTime
,
YgglMainEmp:
:
getEmpNum
).
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
one
();
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
one
();
Integer
gw
=
ygglMainEmp
.
getBmgwId
();
Integer
gw
=
ygglMainEmp
.
getBmgwId
();
ZzglBmgwM
bmid
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getUpId
)
ZzglBmgwM
bmid
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getUpId
).
eq
(
ZzglBmgwM:
:
getId
,
gw
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
.
eq
(
ZzglBmgwM:
:
getId
,
gw
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
ygglMainEmp
.
setUnionid
(
bmid
.
toString
());
ygglMainEmp
.
setUnionid
(
bmid
.
toString
());
return
ResultUtil
.
data
(
ygglMainEmp
,
"部门id返回字段为unionid"
);
return
ResultUtil
.
data
(
ygglMainEmp
,
"部门id返回字段为unionid"
);
}
}
/**
/**
* 获取登录人和上级主管的empNum和名称
* 获取登录人和上级主管的empNum和名称
*
*
...
@@ -169,56 +173,52 @@ public class YgglController {
...
@@ -169,56 +173,52 @@ public class YgglController {
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
gw
=
empNumConfirm
(
orgCode
,
empNum
).
getBmgwId
();
Integer
gw
=
empNumConfirm
(
orgCode
,
empNum
).
getBmgwId
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
//获取该员工的上级部门id 的数组list
// 获取该员工的上级部门id 的数组list
ZzglBmgwM
.
getUpDepts
(
list
,
gw
,
zzglBmgwMs
);
ZzglBmgwM
.
getUpDepts
(
list
,
gw
,
zzglBmgwMs
);
List
<
Integer
>
leaderList
=
new
ArrayList
<
Integer
>();
List
<
Integer
>
leaderList
=
new
ArrayList
<
Integer
>();
for
(
Integer
zzglId
:
list
)
{
for
(
Integer
zzglId
:
list
)
{
for
(
ZzglBmgwM
zzglBmgwM
:
zzglBmgwMs
)
{
for
(
ZzglBmgwM
zzglBmgwM
:
zzglBmgwMs
)
{
if
(
zzglId
.
equals
(
zzglBmgwM
.
getId
())
&&
zzglBmgwM
.
getLeader
()
!=
null
)
{
if
(
zzglId
.
equals
(
zzglBmgwM
.
getId
())
&&
zzglBmgwM
.
getLeader
()
!=
null
)
{
leaderList
.
add
(
zzglBmgwM
.
getLeader
());
leaderList
.
add
(
zzglBmgwM
.
getLeader
());
}
}
}
}
}
}
List
<
YgglMainEmp
>
ygglMainEmps
=
empNumsConfirm
(
orgCode
,
leaderList
);
List
<
YgglMainEmp
>
ygglMainEmps
=
empNumsConfirm
(
orgCode
,
leaderList
);
List
<
LoginerChargeDto
>
loginerChargeDtos
=
new
ArrayList
<
LoginerChargeDto
>();
List
<
LoginerChargeDto
>
loginerChargeDtos
=
new
ArrayList
<
LoginerChargeDto
>();
for
(
YgglMainEmp
m
:
ygglMainEmps
)
{
for
(
YgglMainEmp
m
:
ygglMainEmps
)
{
if
(
m
.
getHeadUrl
()
==
null
)
{
if
(
m
.
getHeadUrl
()
==
null
)
{
m
.
setHeadUrl
(
""
);
m
.
setHeadUrl
(
""
);
}
}
loginerChargeDtos
.
add
(
new
LoginerChargeDto
(
m
.
getEmpNum
(),
m
.
getName
(),
m
.
getHeadUrl
()));
loginerChargeDtos
.
add
(
new
LoginerChargeDto
(
m
.
getEmpNum
(),
m
.
getName
(),
m
.
getHeadUrl
()));
}
}
Collections
.
reverse
(
loginerChargeDtos
);
Collections
.
reverse
(
loginerChargeDtos
);
return
ResultUtil
.
data
(
loginerChargeDtos
,
"获取上级部门的部门id"
);
return
ResultUtil
.
data
(
loginerChargeDtos
,
"获取上级部门的部门id"
);
}
}
//根据传来的empNum获取该人员信息,没有则传全部
// 根据传来的empNum获取该人员信息,没有则传全部
public
List
<
YgglMainEmp
>
empNumsConfirm
(
Integer
orgCode
,
List
<
Integer
>
empNumList
)
{
public
List
<
YgglMainEmp
>
empNumsConfirm
(
Integer
orgCode
,
List
<
Integer
>
empNumList
)
{
List
<
YgglMainEmp
>
all
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
list
();
List
<
YgglMainEmp
>
all
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
list
();
List
<
YgglMainEmp
>
ygglMainEmps
=
new
ArrayList
<
YgglMainEmp
>();
List
<
YgglMainEmp
>
ygglMainEmps
=
new
ArrayList
<
YgglMainEmp
>();
if
(
empNumList
.
size
()
!=
0
)
{
if
(
empNumList
.
size
()
!=
0
)
{
for
(
Integer
empNum
:
empNumList
)
{
for
(
Integer
empNum
:
empNumList
)
{
all
.
stream
().
filter
(
item
->
empNum
.
equals
(
item
.
getEmpNum
())).
forEach
(
action
->
{
all
.
stream
().
filter
(
item
->
empNum
.
equals
(
item
.
getEmpNum
())).
forEach
(
action
->{
ygglMainEmps
.
add
(
action
);
ygglMainEmps
.
add
(
action
);
});
});
}
}
}
else
{
}
else
{
ygglMainEmps
.
addAll
(
all
);
ygglMainEmps
.
addAll
(
all
);
}
}
return
ygglMainEmps
;
return
ygglMainEmps
;
}
}
//根据传来的empNum获取该人员信息
// 根据传来的empNum获取该人员信息
public
YgglMainEmp
empNumConfirm
(
Integer
orgCode
,
Integer
empNum
)
{
public
YgglMainEmp
empNumConfirm
(
Integer
orgCode
,
Integer
empNum
)
{
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
return
one
;
return
one
;
}
}
/**
/**
* 获取用户头像
* 获取用户头像
*
*
...
@@ -229,13 +229,11 @@ public class YgglController {
...
@@ -229,13 +229,11 @@ public class YgglController {
@ApiOperation
(
value
=
"获取用户头像"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"获取用户头像"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
70
)
@ApiOperationSupport
(
order
=
70
)
public
Result
<
List
<
YgglMainEmp
>>
headphotos
(
@CurrentUser
UserBean
userBean
,
@RequestBody
List
<
Integer
>
empNumList
)
{
public
Result
<
List
<
YgglMainEmp
>>
headphotos
(
@CurrentUser
UserBean
userBean
,
@RequestBody
List
<
Integer
>
empNumList
)
{
if
(
empNumList
.
size
()
==
0
)
{
if
(
empNumList
.
size
()
==
0
)
{
return
ResultUtil
.
error
(
"请输入empNum数组"
);
return
ResultUtil
.
error
(
"请输入empNum数组"
);
}
}
List
<
YgglMainEmp
>
yglList
=
YgglMainEmp
.
builder
().
build
()
List
<
YgglMainEmp
>
yglList
=
YgglMainEmp
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
in
(
YgglMainEmp:
:
getEmpNum
,
empNumList
).
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getHeadUrl
));
.
in
(
YgglMainEmp:
:
getEmpNum
,
empNumList
)
.
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getHeadUrl
));
for
(
YgglMainEmp
yg
:
yglList
)
{
for
(
YgglMainEmp
yg
:
yglList
)
{
if
(
StringUtil
.
isEmpty
(
yg
.
getHeadUrl
()))
{
if
(
StringUtil
.
isEmpty
(
yg
.
getHeadUrl
()))
{
yg
.
setHeadUrl
(
""
);
yg
.
setHeadUrl
(
""
);
...
@@ -243,7 +241,6 @@ public class YgglController {
...
@@ -243,7 +241,6 @@ public class YgglController {
}
}
return
ResultUtil
.
data
(
yglList
,
"获取用户头像组成功"
);
return
ResultUtil
.
data
(
yglList
,
"获取用户头像组成功"
);
}
}
/**
/**
* 获取员工档案
* 获取员工档案
*
*
...
@@ -359,13 +356,9 @@ public class YgglController {
...
@@ -359,13 +356,9 @@ public class YgglController {
.
build
();
.
build
();
ygglMainEmp
.
insert
();
ygglMainEmp
.
insert
();
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
set
(
addygdaDto
.
getBmgwId
()
!=
null
,
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
set
(
addygdaDto
.
getBmgwId
()
!=
null
,
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"新添加员工档案成功!"
);
return
ResultUtil
.
data
(
ygglMainEmp
,
"新添加员工档案成功!"
);
}
else
{
}
else
{
...
@@ -427,7 +420,8 @@ public class YgglController {
...
@@ -427,7 +420,8 @@ public class YgglController {
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
ZzglBmgwM
.
getDepts
(
bList
,
b
,
zzglBmgwMs
);
ZzglBmgwM
.
getDepts
(
bList
,
b
,
zzglBmgwMs
);
Integer
j
=
ygQueryDto
.
getJobStatus
();
Integer
j
=
ygQueryDto
.
getJobStatus
();
Integer
t
=
ygQueryDto
.
getJobType
();
Integer
t
=
ygQueryDto
.
getJobType
();
String
q
=
ygQueryDto
.
getQuery
();
String
q
=
ygQueryDto
.
getQuery
();
...
@@ -436,11 +430,9 @@ public class YgglController {
...
@@ -436,11 +430,9 @@ public class YgglController {
ygQueryDto
.
getTotalPage
()
==
null
?
10
:
ygQueryDto
.
getTotalPage
());
ygQueryDto
.
getTotalPage
()
==
null
?
10
:
ygQueryDto
.
getTotalPage
());
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"name"
,
"emp_num"
,
"bmgw_id"
,
"rz_time"
,
"job_type"
,
"phone"
,
"job_status"
)
queryWrapper
.
select
(
"name"
,
"emp_num"
,
"bmgw_id"
,
"rz_time"
,
"job_type"
,
"phone"
,
"job_status"
)
.
ne
(
"job_status"
,
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
())
.
ne
(
"job_status"
,
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()).
eq
(
"org_code"
,
orgCode
).
eq
(
t
!=
null
&&
t
>
-
1
,
"job_type"
,
t
)
.
eq
(
"org_code"
,
orgCode
)
.
eq
(
j
!=
null
&&
j
>
-
1
,
"job_status"
,
j
).
in
(!
bList
.
isEmpty
(),
"bmgw_id"
,
bList
)
.
eq
(
t
!=
null
&&
t
>
-
1
,
"job_type"
,
t
).
eq
(
j
!=
null
&&
j
>
-
1
,
"job_status"
,
j
)
.
and
(!
StrUtil
.
hasBlank
(
q
),
wq
->
wq
.
like
(
"name"
,
q
).
or
().
like
(
"phone"
,
q
)).
orderByDesc
(
"rz_time"
);
.
in
(!
bList
.
isEmpty
(),
"bmgw_id"
,
bList
)
.
and
(!
StrUtil
.
hasBlank
(
q
),
wq
->
wq
.
like
(
"name"
,
q
).
or
().
like
(
"phone"
,
q
));
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
IPage
<
YgglMainEmp
>
ygglMainEmpPage
=
YgglMainEmp
.
builder
().
build
().
selectPage
(
page
,
queryWrapper
);
IPage
<
YgglMainEmp
>
ygglMainEmpPage
=
YgglMainEmp
.
builder
().
build
().
selectPage
(
page
,
queryWrapper
);
...
@@ -771,9 +763,10 @@ public class YgglController {
...
@@ -771,9 +763,10 @@ public class YgglController {
// 浴池,洗去选填项字节大于100的选项
// 浴池,洗去选填项字节大于100的选项
public
boolean
takeshower
(
String
[]
bathroom
)
{
public
boolean
takeshower
(
String
[]
bathroom
)
{
for
(
String
b
:
bathroom
)
{
for
(
String
b
:
bathroom
)
{
if
(
b
.
length
()
>
100
)
{
if
(
b
!=
null
&&
b
.
length
()
>
100
)
{
return
false
;
return
false
;
}
}
}
}
return
true
;
return
true
;
}
}
...
@@ -1509,8 +1502,8 @@ public class YgglController {
...
@@ -1509,8 +1502,8 @@ public class YgglController {
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
updateWrapper1
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
updateWrapper1
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
3
).
build
().
update
(
updateWrapper
);
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
3
).
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
YgglMainLzb
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
.
lzyy
(
lzygQueryDto
.
getLzyy
())
.
lz
yy
(
lzygQueryDto
.
getLzyy
()).
lz
bz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
.
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
// 删除员工表
// 删除员工表
// ygglMainEmp.deleteById();
// ygglMainEmp.deleteById();
// 删除员工登陆表
// 删除员工登陆表
...
@@ -1535,10 +1528,9 @@ public class YgglController {
...
@@ -1535,10 +1528,9 @@ public class YgglController {
updateWrapper
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
updateWrapper
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
updateWrapper1
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
updateWrapper1
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
())
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()).
build
().
update
(
updateWrapper
);
.
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()).
sjlzTime
(
new
Date
()).
build
()
YgglMainLzb
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
())
.
update
(
updateWrapper1
);
.
sjlzTime
(
new
Date
()).
build
().
update
(
updateWrapper1
);
// 查询该员工的关联表
// 查询该员工的关联表
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper1
=
new
QueryWrapper
<
QyzxEmpEntAsso
>();
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper1
=
new
QueryWrapper
<
QyzxEmpEntAsso
>();
queryWrapper1
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
queryWrapper1
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
...
@@ -1627,28 +1619,29 @@ public class YgglController {
...
@@ -1627,28 +1619,29 @@ public class YgglController {
* @param
* @param
* @return
* @return
*/
*/
@PostMapping
(
value
=
"/jg"
)
@PostMapping
(
value
=
"/jg"
)
@ApiOperation
(
value
=
"展示籍贯所有省市区"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"展示籍贯所有省市区"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
60
)
@ApiOperationSupport
(
order
=
60
)
public
Result
<
List
<
YgjgDto
>>
selectjgs
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
List
<
YgjgDto
>>
selectjgs
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgjgDto
>
oldfather
=
new
ArrayList
<
YgjgDto
>();
// 老父亲
List
<
YgjgDto
>
oldfather
=
new
ArrayList
<
YgjgDto
>();
//老父亲
List
<
YgProDto
>
pro
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
).
list
();
// super继承人
List
<
YgCityDto
>
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
).
list
();
List
<
YgProDto
>
pro
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
).
list
();
//super继承人
List
<
YgAreaDto
>
area
=
new
LambdaQueryChainWrapper
<
YgAreaDto
>(
ygAreaDtoMapper
).
list
();
List
<
YgCityDto
>
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
).
list
();
List
<
YgAreaDto
>
area
=
new
LambdaQueryChainWrapper
<
YgAreaDto
>(
ygAreaDtoMapper
).
list
();
for
(
YgProDto
p
:
pro
)
{
for
(
YgProDto
p
:
pro
)
{
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
p
);
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
p
);
//
设置别名对应bean
//设置别名对应bean
HashMap
<
String
,
String
>
mapping
=
CollUtil
.
newHashMap
();
HashMap
<
String
,
String
>
mapping
=
CollUtil
.
newHashMap
();
mapping
.
put
(
"id"
,
"jgid"
);
mapping
.
put
(
"id"
,
"jgid"
);
mapping
.
put
(
"name"
,
"jgname"
);
mapping
.
put
(
"name"
,
"jgname"
);
YgjgDto
ygproDto
=
BeanUtil
.
mapToBean
(
map
,
YgjgDto
.
class
,
CopyOptions
.
create
().
setFieldMapping
(
mapping
));
YgjgDto
ygproDto
=
BeanUtil
.
mapToBean
(
map
,
YgjgDto
.
class
,
CopyOptions
.
create
().
setFieldMapping
(
mapping
));
//
添加cityList
//添加cityList
//
给一个upid
//
给一个upid
List
<
YgCityDto
>
outcity
=
uptocityList
(
city
,
ygproDto
.
getJgid
());
List
<
YgCityDto
>
outcity
=
uptocityList
(
city
,
ygproDto
.
getJgid
());
//
新建一个篮子
//新建一个篮子
List
<
YgjgDto
>
cityDtos
=
new
ArrayList
<
YgjgDto
>();
List
<
YgjgDto
>
cityDtos
=
new
ArrayList
<
YgjgDto
>();
for
(
YgCityDto
c
:
outcity
)
{
for
(
YgCityDto
c
:
outcity
)
{
Map
<
String
,
Object
>
map2
=
BeanUtil
.
beanToMap
(
c
);
Map
<
String
,
Object
>
map2
=
BeanUtil
.
beanToMap
(
c
);
...
@@ -1656,12 +1649,11 @@ public class YgglController {
...
@@ -1656,12 +1649,11 @@ public class YgglController {
mapping2
.
put
(
"id"
,
"jgid"
);
mapping2
.
put
(
"id"
,
"jgid"
);
mapping2
.
put
(
"name"
,
"jgname"
);
mapping2
.
put
(
"name"
,
"jgname"
);
mapping2
.
put
(
"province"
,
"upid"
);
mapping2
.
put
(
"province"
,
"upid"
);
YgjgDto
ygcityDto
=
BeanUtil
.
mapToBean
(
map2
,
YgjgDto
.
class
,
YgjgDto
ygcityDto
=
BeanUtil
.
mapToBean
(
map2
,
YgjgDto
.
class
,
CopyOptions
.
create
().
setFieldMapping
(
mapping2
));
CopyOptions
.
create
().
setFieldMapping
(
mapping2
));
//把果实收起来
// 把果实收起来
cityDtos
.
add
(
ygcityDto
);
cityDtos
.
add
(
ygcityDto
);
List
<
YgAreaDto
>
outarea
=
uptoareaList
(
area
,
ygcityDto
.
getJgid
());
List
<
YgAreaDto
>
outarea
=
uptoareaList
(
area
,
ygcityDto
.
getJgid
());
List
<
YgjgDto
>
areaDtos
=
new
ArrayList
<
YgjgDto
>();
List
<
YgjgDto
>
areaDtos
=
new
ArrayList
<
YgjgDto
>();
for
(
YgAreaDto
a
:
outarea
)
{
for
(
YgAreaDto
a
:
outarea
)
{
Map
<
String
,
Object
>
map3
=
BeanUtil
.
beanToMap
(
a
);
Map
<
String
,
Object
>
map3
=
BeanUtil
.
beanToMap
(
a
);
...
@@ -1669,44 +1661,42 @@ public class YgglController {
...
@@ -1669,44 +1661,42 @@ public class YgglController {
mapping3
.
put
(
"id"
,
"jgid"
);
mapping3
.
put
(
"id"
,
"jgid"
);
mapping3
.
put
(
"name"
,
"jgname"
);
mapping3
.
put
(
"name"
,
"jgname"
);
mapping3
.
put
(
"city"
,
"upid"
);
mapping3
.
put
(
"city"
,
"upid"
);
YgjgDto
ygjgDto3
=
BeanUtil
.
mapToBean
(
map3
,
YgjgDto
.
class
,
YgjgDto
ygjgDto3
=
BeanUtil
.
mapToBean
(
map3
,
YgjgDto
.
class
,
CopyOptions
.
create
().
setFieldMapping
(
mapping3
));
CopyOptions
.
create
().
setFieldMapping
(
mapping3
));
areaDtos
.
add
(
ygjgDto3
);
areaDtos
.
add
(
ygjgDto3
);
}
}
ygcityDto
.
setYgjgDtoList
(
areaDtos
);
ygcityDto
.
setYgjgDtoList
(
areaDtos
);
areaDtos
.
add
(
ygcityDto
);
areaDtos
.
add
(
ygcityDto
);
}
}
ygproDto
.
setYgjgDtoList
(
cityDtos
);
ygproDto
.
setYgjgDtoList
(
cityDtos
);
oldfather
.
add
(
ygproDto
);
oldfather
.
add
(
ygproDto
);
}
}
return
ResultUtil
.
data
(
oldfather
,
"老父亲出来了"
);
return
ResultUtil
.
data
(
oldfather
,
"老父亲出来了"
);
}
}
//根据上级id抽取出list
// 根据上级id抽取出list
public
List
<
YgCityDto
>
uptocityList
(
List
<
YgCityDto
>
city
,
Integer
jgid
)
{
public
List
<
YgCityDto
>
uptocityList
(
List
<
YgCityDto
>
city
,
Integer
jgid
)
{
List
<
YgCityDto
>
outcity
=
new
ArrayList
<
YgCityDto
>();
List
<
YgCityDto
>
outcity
=
new
ArrayList
<
YgCityDto
>();
for
(
YgCityDto
c
:
city
)
{
for
(
YgCityDto
c
:
city
)
{
if
(
c
.
getProvince
().
equals
(
jgid
)
)
{
if
(
c
.
getProvince
().
equals
(
jgid
))
{
outcity
.
add
(
c
);
outcity
.
add
(
c
);
}
}
}
}
city
.
removeAll
(
outcity
);
city
.
removeAll
(
outcity
);
return
outcity
;
return
outcity
;
}
}
public
List
<
YgAreaDto
>
uptoareaList
(
List
<
YgAreaDto
>
area
,
Integer
jgid
)
{
List
<
YgAreaDto
>
outarea
=
new
ArrayList
<
YgAreaDto
>();
public
List
<
YgAreaDto
>
uptoareaList
(
List
<
YgAreaDto
>
area
,
Integer
jgid
)
{
for
(
YgAreaDto
a
:
area
)
{
List
<
YgAreaDto
>
outarea
=
new
ArrayList
<
YgAreaDto
>();
if
(
a
.
getCity
().
equals
(
jgid
))
{
for
(
YgAreaDto
a
:
area
)
{
outarea
.
add
(
a
);
if
(
a
.
getCity
().
equals
(
jgid
))
{
}
outarea
.
add
(
a
);
}
}
}
area
.
removeAll
(
outarea
);
area
.
removeAll
(
outarea
)
;
return
outarea
;
return
outarea
;
}
}
/**
/**
* 展示籍贯/展示所有籍贯(威力增强版)
* 展示籍贯/展示所有籍贯(威力增强版)
...
@@ -1714,10 +1704,10 @@ public class YgglController {
...
@@ -1714,10 +1704,10 @@ public class YgglController {
* @param
* @param
* @return
* @return
*/
*/
@PostMapping
(
value
=
"/jgshow"
)
@PostMapping
(
value
=
"/jgshow
/{jgid}
"
)
@ApiOperation
(
value
=
"展示籍贯所有省市区威力增强版"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"展示籍贯所有省市区威力增强版"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
388
)
@ApiOperationSupport
(
order
=
388
)
public
Result
<
Map
<
String
,
String
>>
selectjgs1
(
@CurrentUser
UserBean
userBean
,
@
RequestBody
String
jgid
)
{
public
Result
<
Map
<
String
,
String
>>
selectjgs1
(
@CurrentUser
UserBean
userBean
,
@
PathVariable
String
jgid
)
{
// public Result<List<YgjgDto>> selectjgs1(@CurrentUser UserBean userBean,
// public Result<List<YgjgDto>> selectjgs1(@CurrentUser UserBean userBean,
// @RequestBody YgjgDto ygjgDto) {
// @RequestBody YgjgDto ygjgDto) {
Integer
upId
=
Integer
.
valueOf
(
jgid
);
Integer
upId
=
Integer
.
valueOf
(
jgid
);
...
@@ -1744,6 +1734,7 @@ public class YgglController {
...
@@ -1744,6 +1734,7 @@ public class YgglController {
return
ResultUtil
.
data
(
maps
,
"展示籍贯成功"
);
return
ResultUtil
.
data
(
maps
,
"展示籍贯成功"
);
}
}
/**
/**
* 查询员工列表
* 查询员工列表
*
*
...
@@ -1789,9 +1780,7 @@ public class YgglController {
...
@@ -1789,9 +1780,7 @@ public class YgglController {
List
<
YgglCartogramDto
>
ygglCartogramDto11
=
ygglMainEmpMapper
.
queryWorkingAge
(
userBean
);
List
<
YgglCartogramDto
>
ygglCartogramDto11
=
ygglMainEmpMapper
.
queryWorkingAge
(
userBean
);
map
.
put
(
"positive"
,
ygglCartogramDto1
.
getPositive
());
map
.
put
(
"positive"
,
ygglCartogramDto1
.
getPositive
());
if
(
ygglCartogramDto2
!=
null
)
{
map
.
put
(
"avgAge"
,
ygglCartogramDto2
.
getAvgAge
());
map
.
put
(
"avgAge"
,
ygglCartogramDto2
.
getAvgAge
());
}
map
.
put
(
"induction"
,
ygglCartogramDto3
.
getInduction
());
map
.
put
(
"induction"
,
ygglCartogramDto3
.
getInduction
());
map
.
put
(
"probation"
,
ygglCartogramDto4
.
getProbation
());
map
.
put
(
"probation"
,
ygglCartogramDto4
.
getProbation
());
map
.
put
(
"regular"
,
ygglCartogramDto4
.
getRegular
());
map
.
put
(
"regular"
,
ygglCartogramDto4
.
getRegular
());
...
@@ -1868,8 +1857,7 @@ public class YgglController {
...
@@ -1868,8 +1857,7 @@ public class YgglController {
ageList
.
add
(
new
YgKVDto
(
entry
.
getKey
().
toString
(),
entry
.
getValue
().
toString
()));
ageList
.
add
(
new
YgKVDto
(
entry
.
getKey
().
toString
(),
entry
.
getValue
().
toString
()));
}
}
// 在职
// 在职
Integer
zaizhi
=
jobStatus
.
get
(
YgEnumInterface
.
jobStatus
.
ZHENSHI
.
getType
()).
intValue
()
Integer
zaizhi
=
jobStatus
.
get
(
YgEnumInterface
.
jobStatus
.
ZHENSHI
.
getType
()).
intValue
()
+
jobStatus
.
get
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
()).
intValue
();
+
jobStatus
.
get
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
()).
intValue
();
// 本月新入职
// 本月新入职
Integer
xinruzhi
=
workage
.
get
(
"本月新入职"
).
intValue
();
Integer
xinruzhi
=
workage
.
get
(
"本月新入职"
).
intValue
();
// 本月离职
// 本月离职
...
...
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
5737ff20
package
cn
.
timer
.
api
.
controller
.
zzgl
;
package
cn
.
timer
.
api
.
controller
.
zzgl
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
javax.transaction.Transactional
;
import
javax.transaction.Transactional
;
...
@@ -21,12 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -21,12 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglLogDgjlMapper
;
import
cn.timer.api.dao.zzgl.ZzglLogDgjlMapper
;
import
cn.timer.api.dto.zzgl.LogDgjlsDto
;
import
cn.timer.api.dto.zzgl.LogDgjlsDto
;
...
@@ -48,6 +51,9 @@ public class ZzglController {
...
@@ -48,6 +51,9 @@ public class ZzglController {
@Autowired
@Autowired
ZzglLogDgjlMapper
zzglLogDgjlMapper
;
ZzglLogDgjlMapper
zzglLogDgjlMapper
;
@Autowired
YgglMainEmpMapper
ygglMainEmpMapper
;
/**
/**
* 架构树/架构图/导出
* 架构树/架构图/导出
...
@@ -63,6 +69,15 @@ public class ZzglController {
...
@@ -63,6 +69,15 @@ public class ZzglController {
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
return
ResultUtil
.
data
(
zzglBmgwMs
);
return
ResultUtil
.
data
(
zzglBmgwMs
);
}
}
@GetMapping
(
value
=
"/depts"
)
@ApiOperation
(
value
=
"只获取部门"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
ZzglBmgwM
>>
selectdepts
(
@CurrentUser
UserBean
userBean
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
eq
(
ZzglBmgwM:
:
getType
,
0
).
list
();
//0:部门;1:岗位
return
ResultUtil
.
data
(
zzglBmgwMs
);
}
/**
/**
* 岗位成员
* 岗位成员
...
@@ -161,6 +176,8 @@ public class ZzglController {
...
@@ -161,6 +176,8 @@ public class ZzglController {
@PostMapping
(
value
=
"/dept"
)
@PostMapping
(
value
=
"/dept"
)
@ApiOperation
(
value
=
"添加/修改部门"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"添加/修改部门"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
ZzglBmgwM
>
adddept
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZzglBmgwM
zzglBmgwM
)
{
public
Result
<
ZzglBmgwM
>
adddept
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZzglBmgwM
zzglBmgwM
)
{
if
(
zzglBmgwM
.
getName
().
trim
().
length
()==
0
)
return
ResultUtil
.
error
(
"部门岗位名称不能为空"
);
Boolean
a
=
zzglBmgwM
.
getId
()
==
null
;
Boolean
a
=
zzglBmgwM
.
getId
()
==
null
;
if
(
a
&&
zzglBmgwM
.
getType
()
==
null
)
if
(
a
&&
zzglBmgwM
.
getType
()
==
null
)
zzglBmgwM
.
setType
((
Integer
)
0
);
zzglBmgwM
.
setType
((
Integer
)
0
);
...
@@ -170,7 +187,39 @@ public class ZzglController {
...
@@ -170,7 +187,39 @@ public class ZzglController {
return
ResultUtil
.
data
(
zzglBmgwM
);
return
ResultUtil
.
data
(
zzglBmgwM
);
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
}
//根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组
public
List
<
Integer
>
empNumupdept
(
Integer
orgCode
,
Integer
empNum
)
{
Set
<
Integer
>
lanzi
=
new
HashSet
<
Integer
>();
//所有部门岗位
List
<
ZzglBmgwM
>
bmgws
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
//个人岗位
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
Integer
getId
=
one
.
getBmgwId
();
Set
<
Integer
>
all
=
empNumupdept2
(
lanzi
,
bmgws
,
getId
);
return
ListUtil
.
toList
(
all
);
}
//遍历
public
Set
<
Integer
>
empNumupdept2
(
Set
<
Integer
>
lanzi
,
List
<
ZzglBmgwM
>
bmgws
,
Integer
getId
)
{
for
(
ZzglBmgwM
z
:
bmgws
)
{
if
(
getId
.
equals
(
z
.
getId
()))
{
lanzi
.
add
(
getId
);
if
(
z
.
getUpId
()==
null
||
z
.
getUpId
()
==
0
)
{
return
lanzi
;
}
getId
=
z
.
getUpId
();
empNumupdept2
(
lanzi
,
bmgws
,
getId
);
}
}
return
lanzi
;
}
/**
/**
* 删除部门岗位
* 删除部门岗位
*
*
...
...
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