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
4d342b14
Commit
4d342b14
authored
Mar 31, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://120.24.24.239:8082/8timerv2/8timerapiv200.git
into dsc
parents
6f223a7b
8518de97
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
15 deletions
+57
-15
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
+5
-0
src/main/java/cn/timer/api/bean/yggl/YgglMainLzb.java
+4
-0
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+34
-9
src/main/java/cn/timer/api/dto/yggl/LzbDto.java
+5
-0
src/main/java/cn/timer/api/dto/yggl/YgQueryDto.java
+3
-2
src/main/resources/application-pro.yml
+1
-1
src/main/resources/mapping/yggl/YgglMainLzbMapper.xml
+5
-3
No files found.
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
View file @
4d342b14
...
...
@@ -189,5 +189,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@Transient
@TableField
(
exist
=
false
)
private
String
workTime
;
//工龄
@Transient
@TableField
(
exist
=
false
)
private
String
error
;
//错误信息提示
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/yggl/YgglMainLzb.java
View file @
4d342b14
...
...
@@ -188,6 +188,10 @@ public class YgglMainLzb extends Model<YgglMainLzb> {
@ApiModelProperty
(
value
=
"离职备注"
,
example
=
"离职原因"
)
private
String
lzbz
;
//@Transient
//@TableField(exist = false)
//private String workTime;//工龄
@Tolerate
public
YgglMainLzb
()
{
}
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
4d342b14
...
...
@@ -37,6 +37,8 @@ import com.baomidou.mybatisplus.extension.service.additional.update.impl.LambdaU
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
...
...
@@ -74,11 +76,11 @@ import cn.timer.api.dto.yggl.YgAreaDto;
import
cn.timer.api.dto.yggl.YgCityDto
;
import
cn.timer.api.dto.yggl.YgDrjqbDto
;
import
cn.timer.api.dto.yggl.YgDrsDto
;
import
cn.timer.api.dto.yggl.YgProDto
;
import
cn.timer.api.dto.yggl.YgQueryDto
;
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.YgProDto
;
import
cn.timer.api.dto.yggl.YgzzDto
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Result
;
...
...
@@ -134,6 +136,7 @@ public class YgglController {
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"org_code"
,
orgCode
).
eq
(
"emp_num"
,
empNum
);
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
queryWrapper
);
ygglMainEmp
.
setWorkTime
(
DateUtil
.
formatBetween
(
ygglMainEmp
.
getRzTime
(),
new
Date
(),
Level
.
DAY
));
return
ResultUtil
.
data
(
ygglMainEmp
,
"获取员工档案成功"
);
}
...
...
@@ -146,6 +149,9 @@ public class YgglController {
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"org_code"
,
orgCode
).
eq
(
"emp_num"
,
empNum
);
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
queryWrapper
);
if
(
ygglMainEmp
!=
null
)
{
ygglMainEmp
.
setWorkTime
(
DateUtil
.
formatBetween
(
ygglMainEmp
.
getRzTime
(),
new
Date
(),
Level
.
DAY
));
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"获取员工档案成功"
);
}
...
...
@@ -189,7 +195,8 @@ public class YgglController {
Integer
zjType
=
addygdaDto
.
getZjType
();
String
zjNum
=
addygdaDto
.
getZjNum
();
Integer
jobType
=
addygdaDto
.
getJobType
();
Date
rzTime
=
addygdaDto
.
getRzTime
();
// Date rzTime = addygdaDto.getRzTime();// ?????????????为什么新添加员工不给默认入职日期?????????????????????????
Date
rzTime
=
new
Date
();
Integer
syq
=
addygdaDto
.
getSyq
();
Integer
sex
=
addygdaDto
.
getSex
();
if
(
StrUtil
.
hasBlank
(
phone
)
||
StrUtil
.
hasBlank
(
name
)
||
StrUtil
.
hasBlank
(
zjNum
))
{
...
...
@@ -211,6 +218,7 @@ public class YgglController {
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
name
(
name
).
phone
(
phone
).
zjType
(
zjType
).
zjNum
(
zjNum
)
.
jobType
(
jobType
).
rzTime
(
rzTime
).
syq
(
syq
).
sex
(
sex
).
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
orgCode
)
.
build
();
ygglMainEmp
.
insert
();
return
ResultUtil
.
data
(
ygglMainEmp
,
"新添加员工档案成功!"
);
}
else
{
...
...
@@ -274,7 +282,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"
)
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
)
.
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
));
...
...
@@ -394,6 +402,7 @@ public class YgglController {
Integer
orgCode
=
ygDrsDto
.
getOrgCode
();
Iterator
<
YgDrjqbDto
>
itDr
=
drList
.
iterator
();
@SuppressWarnings
(
"unused"
)
YgDrjqbDto
a
=
drList
.
get
(
0
);
//一个员工导入
Integer
size
=
drList
.
size
();
for
(
Integer
i
=
0
;
i
<
size
;
i
++)
{
//
...
...
@@ -520,6 +529,7 @@ public class YgglController {
Integer
orgCode
=
ygDrsDto
.
getOrgCode
();
Iterator
<
YgDrjqbDto
>
itDr
=
drList
.
iterator
();
@SuppressWarnings
(
"unused"
)
YgDrjqbDto
a
=
drList
.
get
(
0
);
//一个员工导入
Integer
size
=
drList
.
size
();
for
(
Integer
i
=
0
;
i
<
size
;
i
++)
{
//
...
...
@@ -1272,6 +1282,22 @@ public class YgglController {
return
ResultUtil
.
success
(
"放弃成功"
);
}
@PostMapping
(
value
=
"/tzlzyy"
)
@ApiOperation
(
value
=
"调整离职"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
56
)
public
Result
<
YgglMainLzb
>
tzlzyy
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglMainLzb
ygglMainLzb
)
{
if
(
ygglMainLzb
.
getEmpNum
()
!=
null
)
{
UpdateWrapper
<
YgglMainLzb
>
updateWrapper
=
new
UpdateWrapper
<
YgglMainLzb
>();
updateWrapper
.
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
ygglMainLzb
.
getEmpNum
());
ygglMainLzb
.
update
(
updateWrapper
);
return
ResultUtil
.
data
(
ygglMainLzb
,
"修改成功"
);
}
return
ResultUtil
.
error
(
"请确认该员工是否存在!"
);
}
/**
* 查询离职员工列表
* @param
...
...
@@ -1318,7 +1344,6 @@ public class YgglController {
Integer
upId
=
ygjgDto
.
getJgid
();
List
<
YgjgDto
>
maps
=
new
ArrayList
<
YgjgDto
>();
Map
<
Integer
,
String
>
map
=
new
HashMap
<
Integer
,
String
>();
if
(
type
==
1
)
{
//省份
List
<
YgProDto
>
list
=
new
LambdaQueryChainWrapper
<
YgProDto
>(
ygProDtoMapper
).
select
(
YgProDto:
:
getId
,
YgProDto:
:
getProvince
,
YgProDto:
:
getName
).
orderByAsc
(
YgProDto:
:
getProvince
).
list
();
for
(
YgProDto
pro
:
list
)
{
...
...
@@ -1345,7 +1370,7 @@ public class YgglController {
* @param
* @return
*/
@PostMapping
(
value
=
"/jgp
/{id}
"
)
@PostMapping
(
value
=
"/jgp"
)
@ApiOperation
(
value
=
"根据籍贯id显示籍贯城市名"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
61
)
public
Result
<
YgjgDto
>
selectjg
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgjgDto
jgcity
)
{
...
...
@@ -1360,11 +1385,11 @@ public class YgglController {
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:
:
get
Id
,
jgid
).
one
();
YgCityDto
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
).
select
(
YgCityDto:
:
getId
,
YgCityDto:
:
getName
).
eq
(
YgCityDto:
:
get
City
,
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:
:
get
Id
,
Integer
.
parseInt
(
top
+
isPro
)).
one
();
YgCityDto
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
).
select
(
YgCityDto:
:
getId
,
YgCityDto:
:
getName
).
eq
(
YgCityDto:
:
get
City
,
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
());
}
...
...
@@ -1377,11 +1402,11 @@ public class YgglController {
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:
:
get
Id
,
cid
).
one
();
YgCityDto
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
).
select
(
YgCityDto:
:
getId
,
YgCityDto:
:
getName
).
eq
(
YgCityDto:
:
get
City
,
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:
:
get
Id
,
Integer
.
parseInt
(
top
+
isPro
)).
one
();
YgCityDto
city
=
new
LambdaQueryChainWrapper
<
YgCityDto
>(
ygCityDtoMapper
).
select
(
YgCityDto:
:
getId
,
YgCityDto:
:
getName
).
eq
(
YgCityDto:
:
get
City
,
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
());
}
...
...
src/main/java/cn/timer/api/dto/yggl/LzbDto.java
View file @
4d342b14
...
...
@@ -54,4 +54,9 @@ public class LzbDto extends Page implements Serializable{
@ApiModelProperty
(
value
=
"离职备注"
,
example
=
"离职备注"
)
private
String
bz
;
@ApiModelProperty
(
value
=
"离职原因"
,
example
=
"离职备注"
)
private
String
lzyy
;
@ApiModelProperty
(
value
=
"实际离职时间"
,
example
=
"离职备注"
)
private
Date
sjlz
;
}
src/main/java/cn/timer/api/dto/yggl/YgQueryDto.java
View file @
4d342b14
...
...
@@ -8,8 +8,6 @@ package cn.timer.api.dto.yggl;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -65,4 +63,7 @@ public class YgQueryDto extends Page implements Serializable{
@ApiModelProperty
(
value
=
"备注"
,
example
=
"123"
)
private
String
bz
;
@ApiModelProperty
(
value
=
"离职原因"
,
example
=
"123"
)
private
String
lzyy
;
}
src/main/resources/application-pro.yml
View file @
4d342b14
...
...
@@ -116,7 +116,7 @@ pagehelper:
#showSql
logging
:
level
:
root
:
info
root
:
DEBUG
cn.timer.api.dao
:
error
pattern
:
console
:
'
--%p--%m%n'
...
...
src/main/resources/mapping/yggl/YgglMainLzbMapper.xml
View file @
4d342b14
...
...
@@ -184,17 +184,19 @@
a.job_type `type`,
a.job_status `jobStatus`,
a.rz_time `rz`,
timestampdiff(
month
,a.rz_time,a.lz_time) `workage`,
timestampdiff(
day
,a.rz_time,a.lz_time) `workage`,
a.lz_time `ylz`,
a.phone `phone`,
a.lzbz `bz`
a.lzbz `bz`,
a.lzyy lzyy,
a.sjlz_time sjlz
FROM
yggl_main_lzb a
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
LEFT JOIN zzgl_bmgw_m c ON b.up_id = c.id
WHERE
a.org_code = #{q.orgCode}
<if
test =
"null != q.jobStatus and q.
query
!=''"
>
<if
test =
"null != q.jobStatus and q.
jobStatus
!=''"
>
AND
a.job_status = #{q.jobStatus}
</if>
...
...
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