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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
5 deletions
+63
-5
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
+0
-0
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;
@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 @
5737ff20
...
...
@@ -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 @
5737ff20
...
...
@@ -231,6 +231,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 @
5737ff20
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
5737ff20
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