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
d0b25cc8
Commit
d0b25cc8
authored
Apr 30, 2020
by
tangzhaoqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://120.24.24.239:8082/8timerv2/8timerapiv200.git
into tzq
parents
09c63150
cfd79ae6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
205 additions
and
164 deletions
+205
-164
pom.xml
+1
-1
src/main/java/cn/timer/api/bean/qyzx/QyzxEntInfoM.java
+2
-2
src/main/java/cn/timer/api/controller/qyzx/QyzxBusinessController.java
+41
-8
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+139
-114
src/main/java/cn/timer/api/dto/yggl/YgAreaDto.java
+1
-13
src/main/java/cn/timer/api/dto/yggl/YgCityDto.java
+5
-12
src/main/java/cn/timer/api/dto/yggl/YgProDto.java
+13
-14
src/main/java/cn/timer/api/dto/yggl/YgjgDto.java
+3
-0
No files found.
pom.xml
View file @
d0b25cc8
...
...
@@ -236,7 +236,7 @@
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
4.6.1
</version>
<version>
5.3.2
</version>
</dependency>
<!-- lombok -->
...
...
src/main/java/cn/timer/api/bean/qyzx/QyzxEntInfoM.java
View file @
d0b25cc8
...
...
@@ -58,8 +58,8 @@ public class QyzxEntInfoM extends Model<QyzxEntInfoM> {
@ApiModelProperty
(
value
=
"电话号码 "
,
example
=
"18712345678"
)
private
String
phone
;
@ApiModelProperty
(
value
=
"所在地区"
,
example
=
"
440111
"
)
private
Integer
area
;
@ApiModelProperty
(
value
=
"所在地区"
,
example
=
"
广东省广州市白云区
"
)
private
String
area
;
@ApiModelProperty
(
value
=
"办公地址 "
,
example
=
"广从一路5号柏曼酒店3楼"
)
private
String
workAddress
;
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxBusinessController.java
View file @
d0b25cc8
...
...
@@ -32,6 +32,7 @@ import com.github.pagehelper.PageHelper;
import
cn.hutool.core.date.DateUnit
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
...
...
@@ -111,7 +112,7 @@ public class QyzxBusinessController {
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
build
()
.
selectOne
(
new
LambdaQueryWrapper
<
QyzxEntInfoM
>().
eq
(
QyzxEntInfoM:
:
getId
,
userBean
.
getOrgCode
()));
Date
endTime
=
qyzxEntInfoM
.
getEndTime
();
Long
day
=
DateUtil
.
between
(
new
Date
(),
endTime
,
DateUnit
.
DAY
,
false
);
Long
day
=
DateUtil
.
between
(
new
Date
(),
endTime
,
DateUnit
.
DAY
,
false
);
Integer
level
=
qyzxEntInfoM
.
getLevel
();
Map
<
String
,
Object
>
map1
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -151,13 +152,22 @@ public class QyzxBusinessController {
@GetMapping
(
value
=
"/getPayList/System"
)
@ApiOperation
(
value
=
"获取系统续费商品列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxPayContent
>>
getPayListWithSystem
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxPayContent
>
list
=
QyzxPayContent
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
QyzxPayContent
>().
eq
(
QyzxPayContent:
:
getPmid
,
3
).
select
(
QyzxPayContent:
:
getId
,
QyzxPayContent:
:
getContent
,
QyzxPayContent:
:
getNowPrice
,
QyzxPayContent:
:
getOriginalPrice
,
QyzxPayContent:
:
getSpecification
,
QyzxPayContent:
:
getExpiration
));
return
ResultUtil
.
data
(
list
,
"获取成功"
);
public
Result
<
Map
<
String
,
Object
>>
getPayListWithSystem
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxPayContent
>
list1
=
QyzxPayContent
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
QyzxPayContent
>().
eq
(
QyzxPayContent:
:
getPmid
,
3
)
.
eq
(
QyzxPayContent:
:
getSpecification
,
1
).
select
(
QyzxPayContent:
:
getId
,
QyzxPayContent:
:
getNowPrice
,
QyzxPayContent:
:
getOriginalPrice
,
QyzxPayContent:
:
getExpiration
));
List
<
QyzxPayContent
>
list2
=
QyzxPayContent
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
QyzxPayContent
>().
eq
(
QyzxPayContent:
:
getPmid
,
3
)
.
eq
(
QyzxPayContent:
:
getSpecification
,
2
).
select
(
QyzxPayContent:
:
getId
,
QyzxPayContent:
:
getNowPrice
,
QyzxPayContent:
:
getOriginalPrice
,
QyzxPayContent:
:
getExpiration
));
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"simple"
,
list1
);
map
.
put
(
"professional"
,
list2
);
return
ResultUtil
.
data
(
map
,
"获取成功"
);
}
@PostMapping
(
value
=
"/generateOrder"
)
...
...
@@ -211,10 +221,33 @@ public class QyzxBusinessController {
return
ResultUtil
.
pageData
(
list
,
page
.
getTotal
(),
"查询成功"
);
}
public
static
void
main
(
String
[]
args
)
{
QyzxInvoiceData
qyzxInvoiceData
=
new
QyzxInvoiceData
();
qyzxInvoiceData
.
setBankAccount
(
"123"
);
qyzxInvoiceData
.
setBankName
(
"234"
);
if
(!
ObjectUtil
.
isAllNotEmpty
(
qyzxInvoiceData
,
qyzxInvoiceData
.
getBankAccount
(),
qyzxInvoiceData
.
getBankName
()))
{
System
.
out
.
println
(
"请完善发票信息!"
);
}
else
{
System
.
err
.
println
(
"可以,不错"
);
}
}
@PostMapping
(
value
=
"/invoicing"
)
@ApiOperation
(
value
=
"开发票"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
QyzxInvoiceData
>
generateOrder
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QyzxInvoiceData
qyzxInvoiceData
)
{
if
(!
ObjectUtil
.
isAllNotEmpty
(
qyzxInvoiceData
,
qyzxInvoiceData
.
getInvoiceTitle
(),
qyzxInvoiceData
.
getDutyParagraph
(),
qyzxInvoiceData
.
getCompanyAddress
(),
qyzxInvoiceData
.
getCompanyPhone
(),
qyzxInvoiceData
.
getBankName
(),
qyzxInvoiceData
.
getBankAccount
(),
qyzxInvoiceData
.
getInvoiceType
(),
qyzxInvoiceData
.
getInvoiceProject
(),
qyzxInvoiceData
.
getInvoiceValue
(),
qyzxInvoiceData
.
getConsignee
(),
qyzxInvoiceData
.
getConsigneePhone
(),
qyzxInvoiceData
.
getEmail
(),
qyzxInvoiceData
.
getShippingArea
(),
qyzxInvoiceData
.
getShippingAddress
(),
qyzxInvoiceData
.
getZipCode
()))
{
return
ResultUtil
.
error
(
"请完善发票信息!"
);
}
String
orderNo
=
qyzxInvoiceData
.
getOrderNo
();
QyzxBuyRecord
qyzxBuyRecord
=
QyzxBuyRecord
.
builder
().
build
()
.
selectOne
(
new
LambdaQueryWrapper
<
QyzxBuyRecord
>().
eq
(
QyzxBuyRecord:
:
getOrderNo
,
orderNo
));
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
d0b25cc8
...
...
@@ -8,7 +8,6 @@ package cn.timer.api.controller.yggl;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -21,9 +20,7 @@ import java.util.regex.Pattern;
import
java.util.stream.Collectors
;
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.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
...
@@ -42,7 +39,10 @@ import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWra
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.util.StringUtil
;
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.date.BetweenFormater.Level
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
...
...
@@ -74,13 +74,13 @@ import cn.timer.api.dao.yggl.YgMzDtoMapper;
import
cn.timer.api.dao.yggl.YgProDtoMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
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
;
import
cn.timer.api.dto.yggl.YgCartogramDto
;
import
cn.timer.api.dto.yggl.YgCityDto
;
import
cn.timer.api.dto.yggl.YgDrjqbDto
;
import
cn.timer.api.dto.yggl.YgDrsDto
;
...
...
@@ -91,7 +91,6 @@ import cn.timer.api.dto.yggl.YgbintuDto;
import
cn.timer.api.dto.yggl.YgglCartogramDto
;
import
cn.timer.api.dto.yggl.YgjgDto
;
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.utils.Md5
;
import
cn.timer.api.utils.Result
;
...
...
@@ -133,7 +132,7 @@ public class YgglController {
// weng(民族)
@Autowired
private
YgMzDtoMapper
ygMzDtoMapper
;
/**
* 获取登录人的相关信息
*
...
...
@@ -146,14 +145,16 @@ public class YgglController {
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
();
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
();
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和名称
*
...
...
@@ -168,54 +169,56 @@ public class YgglController {
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
gw
=
empNumConfirm
(
orgCode
,
empNum
).
getBmgwId
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
//获取该员工的上级部门id 的数组list
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
// 获取该员工的上级部门id 的数组list
ZzglBmgwM
.
getUpDepts
(
list
,
gw
,
zzglBmgwMs
);
List
<
Integer
>
leaderList
=
new
ArrayList
<
Integer
>();
for
(
Integer
zzglId
:
list
)
{
for
(
ZzglBmgwM
zzglBmgwM
:
zzglBmgwMs
)
{
if
(
zzglId
.
equals
(
zzglBmgwM
.
getId
())
&&
zzglBmgwM
.
getLeader
()
!=
null
)
{
if
(
zzglId
.
equals
(
zzglBmgwM
.
getId
())
&&
zzglBmgwM
.
getLeader
()
!=
null
)
{
leaderList
.
add
(
zzglBmgwM
.
getLeader
());
}
}
}
List
<
YgglMainEmp
>
ygglMainEmps
=
empNumsConfirm
(
orgCode
,
leaderList
);
List
<
LoginerChargeDto
>
loginerChargeDtos
=
new
ArrayList
<
LoginerChargeDto
>();
List
<
LoginerChargeDto
>
loginerChargeDtos
=
new
ArrayList
<
LoginerChargeDto
>();
for
(
YgglMainEmp
m
:
ygglMainEmps
)
{
if
(
m
.
getHeadUrl
()
==
null
)
{
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
);
return
ResultUtil
.
data
(
loginerChargeDtos
,
"获取上级部门的部门id"
);
}
//根据传来的empNum获取该人员信息,没有则传全部
public
List
<
YgglMainEmp
>
empNumsConfirm
(
Integer
orgCode
,
List
<
Integer
>
empNumList
)
{
List
<
YgglMainEmp
>
all
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
list
();
// 根据传来的empNum获取该人员信息,没有则传全部
public
List
<
YgglMainEmp
>
empNumsConfirm
(
Integer
orgCode
,
List
<
Integer
>
empNumList
)
{
List
<
YgglMainEmp
>
all
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
list
();
List
<
YgglMainEmp
>
ygglMainEmps
=
new
ArrayList
<
YgglMainEmp
>();
if
(
empNumList
.
size
()
!=
0
)
{
if
(
empNumList
.
size
()
!=
0
)
{
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
);
});
}
}
else
{
}
else
{
ygglMainEmps
.
addAll
(
all
);
}
return
ygglMainEmps
;
}
//根据传来的empNum获取该人员信息
public
YgglMainEmp
empNumConfirm
(
Integer
orgCode
,
Integer
empNum
)
{
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
// 根据传来的empNum获取该人员信息
public
YgglMainEmp
empNumConfirm
(
Integer
orgCode
,
Integer
empNum
)
{
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
return
one
;
}
/**
* 获取用户头像
*
...
...
@@ -226,11 +229,13 @@ public class YgglController {
@ApiOperation
(
value
=
"获取用户头像"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
70
)
public
Result
<
List
<
YgglMainEmp
>>
headphotos
(
@CurrentUser
UserBean
userBean
,
@RequestBody
List
<
Integer
>
empNumList
)
{
if
(
empNumList
.
size
()
==
0
)
{
if
(
empNumList
.
size
()
==
0
)
{
return
ResultUtil
.
error
(
"请输入empNum数组"
);
}
List
<
YgglMainEmp
>
yglList
=
YgglMainEmp
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
in
(
YgglMainEmp:
:
getEmpNum
,
empNumList
).
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getHeadUrl
));
List
<
YgglMainEmp
>
yglList
=
YgglMainEmp
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
in
(
YgglMainEmp:
:
getEmpNum
,
empNumList
)
.
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getHeadUrl
));
for
(
YgglMainEmp
yg
:
yglList
)
{
if
(
StringUtil
.
isEmpty
(
yg
.
getHeadUrl
()))
{
yg
.
setHeadUrl
(
""
);
...
...
@@ -238,6 +243,7 @@ public class YgglController {
}
return
ResultUtil
.
data
(
yglList
,
"获取用户头像组成功"
);
}
/**
* 获取员工档案
*
...
...
@@ -426,8 +432,9 @@ 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"
,
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
)
.
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
));
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
...
...
@@ -1497,8 +1504,8 @@ 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
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
.
lzyy
(
lzygQueryDto
.
getLzyy
())
.
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
YgglMainLzb
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
.
lz
yy
(
lzygQueryDto
.
getLzyy
()).
lz
bz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
// 删除员工表
// ygglMainEmp.deleteById();
// 删除员工登陆表
...
...
@@ -1523,9 +1530,10 @@ 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
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()).
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()).
sjlzTime
(
new
Date
()).
build
()
.
update
(
updateWrapper1
);
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
>();
queryWrapper1
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
...
...
@@ -1608,9 +1616,92 @@ public class YgglController {
return
ResultUtil
.
data
(
mz
,
"展示该民族"
);
}
/**
* 展示籍贯/展示所有籍贯
*
* @param
* @return
*/
@PostMapping
(
value
=
"/jg"
)
@ApiOperation
(
value
=
"展示籍贯所有省市区"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
60
)
public
Result
<
List
<
YgjgDto
>>
selectjgs
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgjgDto
>
oldfather
=
new
ArrayList
<
YgjgDto
>();
// 老父亲
List
<
YgProDto
>
pro
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
).
list
();
// super继承人
List
<
YgCityDto
>
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
).
list
();
List
<
YgAreaDto
>
area
=
new
LambdaQueryChainWrapper
<
YgAreaDto
>(
ygAreaDtoMapper
).
list
();
for
(
YgProDto
p
:
pro
)
{
Map
<
String
,
Object
>
map
=
BeanUtil
.
beanToMap
(
p
);
// 设置别名对应bean
HashMap
<
String
,
String
>
mapping
=
CollUtil
.
newHashMap
();
mapping
.
put
(
"id"
,
"jgid"
);
mapping
.
put
(
"name"
,
"jgname"
);
YgjgDto
ygproDto
=
BeanUtil
.
mapToBean
(
map
,
YgjgDto
.
class
,
CopyOptions
.
create
().
setFieldMapping
(
mapping
));
// 添加cityList
// 给一个upid
List
<
YgCityDto
>
outcity
=
uptocityList
(
city
,
ygproDto
.
getJgid
());
// 新建一个篮子
List
<
YgjgDto
>
cityDtos
=
new
ArrayList
<
YgjgDto
>();
for
(
YgCityDto
c
:
outcity
)
{
Map
<
String
,
Object
>
map2
=
BeanUtil
.
beanToMap
(
c
);
HashMap
<
String
,
String
>
mapping2
=
CollUtil
.
newHashMap
();
mapping2
.
put
(
"id"
,
"jgid"
);
mapping2
.
put
(
"name"
,
"jgname"
);
mapping2
.
put
(
"province"
,
"upid"
);
YgjgDto
ygcityDto
=
BeanUtil
.
mapToBean
(
map2
,
YgjgDto
.
class
,
CopyOptions
.
create
().
setFieldMapping
(
mapping2
));
// 把果实收起来
cityDtos
.
add
(
ygcityDto
);
List
<
YgAreaDto
>
outarea
=
uptoareaList
(
area
,
ygcityDto
.
getJgid
());
List
<
YgjgDto
>
areaDtos
=
new
ArrayList
<
YgjgDto
>();
for
(
YgAreaDto
a
:
outarea
)
{
Map
<
String
,
Object
>
map3
=
BeanUtil
.
beanToMap
(
a
);
HashMap
<
String
,
String
>
mapping3
=
CollUtil
.
newHashMap
();
mapping3
.
put
(
"id"
,
"jgid"
);
mapping3
.
put
(
"name"
,
"jgname"
);
mapping3
.
put
(
"city"
,
"upid"
);
YgjgDto
ygjgDto3
=
BeanUtil
.
mapToBean
(
map3
,
YgjgDto
.
class
,
CopyOptions
.
create
().
setFieldMapping
(
mapping3
));
areaDtos
.
add
(
ygjgDto3
);
}
ygcityDto
.
setYgjgDtoList
(
areaDtos
);
areaDtos
.
add
(
ygcityDto
);
}
ygproDto
.
setYgjgDtoList
(
cityDtos
);
oldfather
.
add
(
ygproDto
);
}
return
ResultUtil
.
data
(
oldfather
,
"老父亲出来了"
);
}
// 根据上级id抽取出list
public
List
<
YgCityDto
>
uptocityList
(
List
<
YgCityDto
>
city
,
Integer
jgid
)
{
List
<
YgCityDto
>
outcity
=
new
ArrayList
<
YgCityDto
>();
for
(
YgCityDto
c
:
city
)
{
if
(
c
.
getProvince
().
equals
(
jgid
))
{
outcity
.
add
(
c
);
}
}
city
.
removeAll
(
outcity
);
return
outcity
;
}
public
List
<
YgAreaDto
>
uptoareaList
(
List
<
YgAreaDto
>
area
,
Integer
jgid
)
{
List
<
YgAreaDto
>
outarea
=
new
ArrayList
<
YgAreaDto
>();
for
(
YgAreaDto
a
:
area
)
{
if
(
a
.
getCity
().
equals
(
jgid
))
{
outarea
.
add
(
a
);
}
}
area
.
removeAll
(
outarea
);
return
outarea
;
}
/**
* 展示籍贯/展示所有籍贯(威力增强版)
...
...
@@ -1649,75 +1740,6 @@ public class YgglController {
}
/**
* 根据籍贯id显示籍贯名
*
* @param
* @return
*/
@PostMapping
(
value
=
"/jgprint"
)
@ApiOperation
(
value
=
"根据籍贯id显示籍贯城市名"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
61
)
public
Result
<
YgjgDto
>
selectjg
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgjgDto
jgcity
)
{
Integer
jgid
=
jgcity
.
getJgid
();
Integer
cid
=
jgcity
.
getType
();
if
(
jgid
!=
null
)
{
String
top
=
jgid
.
toString
().
substring
(
0
,
2
);
String
isPro
=
jgid
.
toString
().
substring
(
2
,
4
);
String
isCity
=
jgid
.
toString
().
substring
(
4
,
6
);
if
(
"00"
.
equals
(
isPro
))
{
YgProDto
pro
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
)
.
select
(
YgProDto:
:
getId
,
YgProDto:
:
getName
).
eq
(
YgProDto:
:
getId
,
jgid
).
one
();
if
(
pro
!=
null
)
jgcity
.
setJgname
(
pro
.
getName
());
}
else
if
(
"00"
.
equals
(
isCity
))
{
YgProDto
pro
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
)
.
select
(
YgProDto:
:
getId
,
YgProDto:
:
getName
).
eq
(
YgProDto:
:
getProvince
,
top
).
one
();
YgCityDto
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
)
.
select
(
YgCityDto:
:
getId
,
YgCityDto:
:
getName
).
eq
(
YgCityDto:
:
getCity
,
jgid
).
one
();
if
(
city
!=
null
)
jgcity
.
setJgname
(
pro
.
getName
()
+
city
.
getName
());
}
YgProDto
pro
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
)
.
select
(
YgProDto:
:
getId
,
YgProDto:
:
getName
).
eq
(
YgProDto:
:
getProvince
,
top
).
one
();
YgCityDto
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
)
.
select
(
YgCityDto:
:
getId
,
YgCityDto:
:
getName
).
eq
(
YgCityDto:
:
getCity
,
Integer
.
parseInt
(
top
+
isPro
))
.
one
();
YgAreaDto
area
=
new
LambdaQueryChainWrapper
<
YgAreaDto
>(
ygAreaDtoMapper
)
.
select
(
YgAreaDto:
:
getId
,
YgAreaDto:
:
getName
).
eq
(
YgAreaDto:
:
getId
,
jgid
).
one
();
if
(
area
!=
null
)
jgcity
.
setJgname
(
pro
.
getName
()
+
city
.
getName
()
+
area
.
getName
());
}
if
(
cid
!=
null
)
{
String
top
=
cid
.
toString
().
substring
(
0
,
2
);
String
isPro
=
cid
.
toString
().
substring
(
2
,
4
);
String
isCity
=
cid
.
toString
().
substring
(
4
,
6
);
if
(
"00"
.
equals
(
isPro
))
{
YgProDto
pro
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
)
.
select
(
YgProDto:
:
getId
,
YgProDto:
:
getName
).
eq
(
YgProDto:
:
getId
,
cid
).
one
();
if
(
pro
!=
null
)
jgcity
.
setCityname
(
pro
.
getName
());
}
else
if
(
"00"
.
equals
(
isCity
))
{
YgProDto
pro
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
)
.
select
(
YgProDto:
:
getId
,
YgProDto:
:
getName
).
eq
(
YgProDto:
:
getProvince
,
top
).
one
();
YgCityDto
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
)
.
select
(
YgCityDto:
:
getId
,
YgCityDto:
:
getName
).
eq
(
YgCityDto:
:
getCity
,
cid
).
one
();
if
(
city
!=
null
)
jgcity
.
setCityname
(
pro
.
getName
()
+
city
.
getName
());
}
YgProDto
pro
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
)
.
select
(
YgProDto:
:
getId
,
YgProDto:
:
getName
).
eq
(
YgProDto:
:
getProvince
,
top
).
one
();
YgCityDto
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
)
.
select
(
YgCityDto:
:
getId
,
YgCityDto:
:
getName
).
eq
(
YgCityDto:
:
getCity
,
Integer
.
parseInt
(
top
+
isPro
))
.
one
();
YgAreaDto
area
=
new
LambdaQueryChainWrapper
<
YgAreaDto
>(
ygAreaDtoMapper
)
.
select
(
YgAreaDto:
:
getId
,
YgAreaDto:
:
getName
).
eq
(
YgAreaDto:
:
getId
,
cid
).
one
();
if
(
area
!=
null
)
jgcity
.
setCityname
(
pro
.
getName
()
+
city
.
getName
()
+
area
.
getName
());
}
return
ResultUtil
.
data
(
jgcity
);
}
/**
* 查询员工列表
*
* @param
...
...
@@ -1762,7 +1784,9 @@ public class YgglController {
List
<
YgglCartogramDto
>
ygglCartogramDto11
=
ygglMainEmpMapper
.
queryWorkingAge
(
userBean
);
map
.
put
(
"positive"
,
ygglCartogramDto1
.
getPositive
());
map
.
put
(
"avgAge"
,
ygglCartogramDto2
.
getAvgAge
());
if
(
ygglCartogramDto2
!=
null
)
{
map
.
put
(
"avgAge"
,
ygglCartogramDto2
.
getAvgAge
());
}
map
.
put
(
"induction"
,
ygglCartogramDto3
.
getInduction
());
map
.
put
(
"probation"
,
ygglCartogramDto4
.
getProbation
());
map
.
put
(
"regular"
,
ygglCartogramDto4
.
getRegular
());
...
...
@@ -1839,7 +1863,8 @@ public class YgglController {
ageList
.
add
(
new
YgKVDto
(
entry
.
getKey
().
toString
(),
entry
.
getValue
().
toString
()));
}
// 在职
Integer
zaizhi
=
jobStatus
.
get
(
YgEnumInterface
.
jobStatus
.
ZHENSHI
.
getType
()).
intValue
()
+
jobStatus
.
get
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
()).
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/YgAreaDto.java
View file @
d0b25cc8
...
...
@@ -32,7 +32,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@TableName
(
"pro_city_area_class"
)
@ApiModel
(
"籍贯:地区"
)
public
class
YgAreaDto
implements
IYgjgDto
,
InitializingBean
{
public
class
YgAreaDto
{
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
...
...
@@ -48,18 +48,6 @@ public class YgAreaDto implements IYgjgDto,InitializingBean{
@ApiModelProperty
(
value
=
"名字"
,
example
=
"名字"
)
private
String
name
;
@Autowired
private
YgAreaDtoMapper
ygAreaDtoMapper
;
public
List
<
String
>
exePunish
()
{
List
<
YgAreaDto
>
areaList
=
new
LambdaQueryChainWrapper
<
YgAreaDto
>(
ygAreaDtoMapper
).
orderByAsc
(
YgAreaDto:
:
getProvince
).
list
();
List
<
String
>
a
=
new
ArrayList
<
String
>();
for
(
YgAreaDto
area
:
areaList
)
{
a
.
add
(
area
.
getName
());
}
return
a
;
}
public
void
afterPropertiesSet
(){
PunishFactory
.
registerPunish
(
"area"
,
this
);
}
}
src/main/java/cn/timer/api/dto/yggl/YgCityDto.java
View file @
d0b25cc8
...
...
@@ -14,6 +14,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
cn.hutool.core.clone.CloneRuntimeException
;
import
cn.hutool.core.clone.CloneSupport
;
import
cn.timer.api.dao.yggl.YgCityDtoMapper
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -32,7 +34,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@TableName
(
"pro_city_class"
)
@ApiModel
(
"籍贯:城市"
)
public
class
YgCityDto
implements
IYgjgDto
,
InitializingBean
{
public
class
YgCityDto
{
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
...
...
@@ -48,18 +50,9 @@ public class YgCityDto implements IYgjgDto,InitializingBean{
@ApiModelProperty
(
value
=
"名字"
,
example
=
"名字"
)
private
String
name
;
@Autowired
private
YgCityDtoMapper
ygCityDtoMapper
;
public
List
<
String
>
exePunish
()
{
List
<
YgCityDto
>
cityList
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
).
orderByAsc
(
YgCityDto:
:
getProvince
).
list
();
List
<
String
>
c
=
new
ArrayList
<
String
>();
for
(
YgCityDto
city
:
cityList
)
{
c
.
add
(
city
.
getName
());
}
return
c
;
}
public
void
afterPropertiesSet
(){
PunishFactory
.
registerPunish
(
"city"
,
this
);
}
}
src/main/java/cn/timer/api/dto/yggl/YgProDto.java
View file @
d0b25cc8
...
...
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
cn.hutool.core.annotation.Alias
;
import
cn.timer.api.dao.yggl.YgProDtoMapper
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -32,7 +33,16 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@TableName
(
"province_class"
)
@ApiModel
(
"籍贯:省份"
)
public
class
YgProDto
implements
IYgjgDto
,
InitializingBean
{
public
class
YgProDto
{
/**
* @date 2020年4月29日
* @author 翁东州
* @方法中文名称:
*/
private
static
final
long
serialVersionUID
=
-
4557120773275283842L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
...
...
@@ -45,20 +55,9 @@ public class YgProDto implements IYgjgDto,InitializingBean{
@ApiModelProperty
(
value
=
"名字"
,
example
=
"名字"
)
private
String
name
;
@Autowired
private
YgProDtoMapper
ygProDtoMapper
;
public
List
<
String
>
exePunish
()
{
List
<
YgProDto
>
proList
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
).
orderByAsc
(
YgProDto:
:
getProvince
).
list
();
List
<
String
>
pList
=
new
ArrayList
<
String
>();
for
(
YgProDto
pro
:
proList
)
{
pList
.
add
(
pro
.
getName
());
}
return
pList
;
}
public
void
afterPropertiesSet
(){
System
.
out
.
println
(
"初始化注入成功!"
);
PunishFactory
.
registerPunish
(
"pro"
,
this
);
}
}
src/main/java/cn/timer/api/dto/yggl/YgjgDto.java
View file @
d0b25cc8
...
...
@@ -38,6 +38,9 @@ public class YgjgDto implements Serializable{
@ApiModelProperty
(
value
=
"省市区籍贯id"
,
example
=
"110000"
)
private
Integer
jgid
;
@ApiModelProperty
(
value
=
"上级id"
,
example
=
"110000"
)
private
Integer
upid
;
@Transient
@TableField
(
exist
=
false
)
private
String
cityname
;
...
...
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