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
9c343d1a
Commit
9c343d1a
authored
May 06, 2020
by
东州 翁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加方法根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组,更正发票资料表的对应表名,工作性质从0开始
parent
605be779
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
11 deletions
+72
-11
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
+9
-6
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 @
9c343d1a
...
...
@@ -40,8 +40,8 @@ import lombok.NoArgsConstructor;
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table
(
name
=
"qyzx_invoice_
data
"
)
@ApiModel
(
"发票资料表"
)
@Table
(
name
=
"qyzx_invoice_
usual
"
)
@ApiModel
(
"
常用
发票资料表"
)
public
class
QyzxInvoiceUsual
extends
Model
<
QyzxInvoiceUsual
>{
private
static
final
long
serialVersionUID
=
2890357568571822258L
;
...
...
@@ -82,6 +82,9 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
@ApiModelProperty
(
value
=
"邮箱"
,
example
=
"13144400255@163.com"
)
private
String
email
;
@ApiModelProperty
(
value
=
"收货地区"
,
example
=
"广东省广州市白云区"
)
private
String
shippingArea
;
@ApiModelProperty
(
value
=
"收货地址"
,
example
=
"白云东平伯曼酒店"
)
private
String
shippingAddress
;
...
...
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
View file @
9c343d1a
...
...
@@ -127,7 +127,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty
(
value
=
"转正备注 "
,
example
=
"转正备注"
)
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
;
@ApiModelProperty
(
value
=
"员工状态 0试用、1正式、2离职中、3已离职"
,
example
=
"101"
)
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
9c343d1a
...
...
@@ -232,6 +232,12 @@ public class QyzxController {
public
Result
<
QyzxInvoiceUsual
>
invoiceusual
(
@CurrentUser
UserBean
userBean
)
{
QyzxInvoiceUsual
one
=
new
LambdaQueryChainWrapper
<
QyzxInvoiceUsual
>(
qyzxInvoiceUsualMapper
)
.
eq
(
QyzxInvoiceUsual:
:
getOrgCode
,
userBean
.
getOrgCode
()).
one
();
if
(
one
.
getShippingArea
()
==
null
)
{
one
.
setShippingArea
(
""
);
}
if
(
one
.
getShippingAddress
()
==
null
)
{
one
.
setShippingAddress
(
""
);
}
return
ResultUtil
.
data
(
one
,
"显示常用的企业开票资料"
);
}
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
9c343d1a
...
...
@@ -12,10 +12,12 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Set
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
...
...
@@ -45,6 +47,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
...
...
@@ -214,9 +217,7 @@ public class YgglController {
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
return
one
;
}
/**
* 获取用户头像
...
...
@@ -419,7 +420,8 @@ public class YgglController {
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
ZzglBmgwM
.
getDepts
(
bList
,
b
,
zzglBmgwMs
);
Integer
j
=
ygQueryDto
.
getJobStatus
();
Integer
t
=
ygQueryDto
.
getJobType
();
String
q
=
ygQueryDto
.
getQuery
();
...
...
@@ -430,7 +432,7 @@ public class YgglController {
queryWrapper
.
select
(
"name"
,
"emp_num"
,
"bmgw_id"
,
"rz_time"
,
"job_type"
,
"phone"
,
"job_status"
)
.
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
));
.
and
(!
StrUtil
.
hasBlank
(
q
),
wq
->
wq
.
like
(
"name"
,
q
).
or
().
like
(
"phone"
,
q
))
.
orderByDesc
(
"rz_time"
)
;
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
IPage
<
YgglMainEmp
>
ygglMainEmpPage
=
YgglMainEmp
.
builder
().
build
().
selectPage
(
page
,
queryWrapper
);
...
...
@@ -761,9 +763,10 @@ public class YgglController {
// 浴池,洗去选填项字节大于100的选项
public
boolean
takeshower
(
String
[]
bathroom
)
{
for
(
String
b
:
bathroom
)
{
if
(
b
.
length
()
>
100
)
{
if
(
b
!=
null
&&
b
.
length
()
>
100
)
{
return
false
;
}
}
return
true
;
}
...
...
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
9c343d1a
package
cn
.
timer
.
api
.
controller
.
zzgl
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
javax.transaction.Transactional
;
...
...
@@ -21,12 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
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.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.config.annotation.CurrentUser
;
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.ZzglLogDgjlMapper
;
import
cn.timer.api.dto.zzgl.LogDgjlsDto
;
...
...
@@ -48,6 +51,9 @@ public class ZzglController {
@Autowired
ZzglLogDgjlMapper
zzglLogDgjlMapper
;
@Autowired
YgglMainEmpMapper
ygglMainEmpMapper
;
/**
* 架构树/架构图/导出
...
...
@@ -63,6 +69,15 @@ public class ZzglController {
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
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 {
@PostMapping
(
value
=
"/dept"
)
@ApiOperation
(
value
=
"添加/修改部门"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
ZzglBmgwM
>
adddept
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ZzglBmgwM
zzglBmgwM
)
{
if
(
zzglBmgwM
.
getName
().
trim
().
length
()==
0
)
return
ResultUtil
.
error
(
"部门岗位名称不能为空"
);
Boolean
a
=
zzglBmgwM
.
getId
()
==
null
;
if
(
a
&&
zzglBmgwM
.
getType
()
==
null
)
zzglBmgwM
.
setType
((
Integer
)
0
);
...
...
@@ -170,7 +187,39 @@ public class ZzglController {
return
ResultUtil
.
data
(
zzglBmgwM
);
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