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
d3514219
Commit
d3514219
authored
Nov 21, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
caf5d867
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
81 deletions
+91
-81
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+91
-81
No files found.
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
d3514219
...
@@ -1519,95 +1519,105 @@ public class SalaryManagementController {
...
@@ -1519,95 +1519,105 @@ public class SalaryManagementController {
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
file
.
getEmpname
()).
eq
(
YgglMainEmp:
:
getPhone
,
file
.
getPhone
())
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
file
.
getEmpname
()).
eq
(
YgglMainEmp:
:
getPhone
,
file
.
getPhone
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
emp
!=
null
)
{
if
(
emp
!=
null
)
{
//0:定薪 1:调薪
if
(
file
.
getSfdx
()
==
0
)
{
if
(
file
.
getSxrq
().
length
()
==
10
)
{
XcglAssoXzdadx
xzdadx
=
XcglAssoXzdadx
.
builder
().
build
();
xzdadx
.
setUserid
(
emp
.
getEmpNum
());
//用户id
xzdadx
.
setSxrq
(
file
.
getSxrq
());
//生效日期
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
xzdadx
.
setRemarks
(
""
);
xzdadx
.
setQyid
(
userBean
.
getOrgCode
());
xzdadx
.
setTxzt
(
0
);
//0:使用中;1:历史, 2: 未生效
xcglassoxzdadxmapper
.
xzdadxinsert
(
xzdadx
);
int
zdyid
=
xzdadx
.
getId
();
List
<
XcglAssoXzdaz
>
xzdazlist
=
new
ArrayList
<
XcglAssoXzdaz
>();
CustomDto
[]
cus
=
file
.
getCus
();
List
<
XcglAssoXzdazdy
>
xzs
=
XcglAssoXzdazdy
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoXzdazdy
>().
lambda
().
eq
(
XcglAssoXzdazdy:
:
getQyid
,
userBean
.
getOrgCode
()));
for
(
XcglAssoXzdazdy
xz
:
xzs
)
{
XcglAssoXzdaz
xzdaz
=
XcglAssoXzdaz
.
builder
().
build
();
xzdaz
.
setXzdazdyid
(
xz
.
getId
());
//薪资档案自定义id
xzdaz
.
setRsz
(
"0"
);
//输入值
xzdaz
.
setXzdadxid
(
zdyid
);
//薪资档案-定薪id
xzdaz
.
insert
();
}
if
(
cus
.
length
>
0
){
//0:定薪 1:调薪
for
(
int
p
=
0
;
p
<
cus
.
length
;
p
++){
if
(
file
.
getSfdx
()
==
0
)
{
XcglAssoXzdaz
.
builder
().
build
().
delete
(
new
QueryWrapper
<
XcglAssoXzdaz
>().
lambda
().
eq
(
XcglAssoXzdaz:
:
getXzdazdyid
,
cus
[
p
].
getId
()).
eq
(
XcglAssoXzdaz:
:
getXzdadxid
,
zdyid
));
XcglAssoXzdadx
xzdadx
=
XcglAssoXzdadx
.
builder
().
build
();
XcglAssoXzdaz
xzdaz
=
new
XcglAssoXzdaz
();
xzdadx
.
setUserid
(
emp
.
getEmpNum
());
//用户id
xzdaz
.
setXzdazdyid
(
cus
[
p
].
getId
());
//薪资档案自定义id
xzdadx
.
setSxrq
(
file
.
getSxrq
().
replace
(
"/"
,
"-"
));
//生效日期
xzdaz
.
setRsz
(
cus
[
p
].
getVal
());
//输入值
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
xzdadx
.
setRemarks
(
""
);
xzdadx
.
setQyid
(
userBean
.
getOrgCode
());
xzdadx
.
setTxzt
(
0
);
//0:使用中;1:历史, 2: 未生效
xcglassoxzdadxmapper
.
xzdadxinsert
(
xzdadx
);
int
zdyid
=
xzdadx
.
getId
();
List
<
XcglAssoXzdaz
>
xzdazlist
=
new
ArrayList
<
XcglAssoXzdaz
>();
CustomDto
[]
cus
=
file
.
getCus
();
List
<
XcglAssoXzdazdy
>
xzs
=
XcglAssoXzdazdy
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoXzdazdy
>().
lambda
().
eq
(
XcglAssoXzdazdy:
:
getQyid
,
userBean
.
getOrgCode
()));
for
(
XcglAssoXzdazdy
xz
:
xzs
)
{
XcglAssoXzdaz
xzdaz
=
XcglAssoXzdaz
.
builder
().
build
();
xzdaz
.
setXzdazdyid
(
xz
.
getId
());
//薪资档案自定义id
xzdaz
.
setRsz
(
"0"
);
//输入值
xzdaz
.
setXzdadxid
(
zdyid
);
//薪资档案-定薪id
xzdaz
.
setXzdadxid
(
zdyid
);
//薪资档案-定薪id
xzdaz
list
.
add
(
xzdaz
);
xzdaz
.
insert
(
);
}
}
}
if
(
xzdazlist
.
size
()>
0
){
if
(
cus
.
length
>
0
){
xcglassoxzdazmapper
.
insertxcglassoxzdazList
(
xzdazlist
);
for
(
int
p
=
0
;
p
<
cus
.
length
;
p
++){
}
XcglAssoXzdaz
.
builder
().
build
().
delete
(
new
QueryWrapper
<
XcglAssoXzdaz
>().
lambda
().
eq
(
XcglAssoXzdaz:
:
getXzdazdyid
,
cus
[
p
].
getId
()).
eq
(
XcglAssoXzdaz:
:
getXzdadxid
,
zdyid
));
toinsert
++;
XcglAssoXzdaz
xzdaz
=
new
XcglAssoXzdaz
();
}
else
{
xzdaz
.
setXzdazdyid
(
cus
[
p
].
getId
());
//薪资档案自定义id
// 当前日期
xzdaz
.
setRsz
(
cus
[
p
].
getVal
());
//输入值
String
curDate
=
DateUtil
.
getStringFormat
(
new
Date
().
getTime
());
xzdaz
.
setXzdadxid
(
zdyid
);
//薪资档案-定薪id
// 未生效的调薪记录同一天只能有一条
xzdazlist
.
add
(
xzdaz
);
XcglAssoXzdadx
tmp
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
}
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
emp
.
getEmpNum
())
}
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
2
)
if
(
xzdazlist
.
size
()>
0
){
.
eq
(
XcglAssoXzdadx:
:
getSxrq
,
file
.
getSxrq
())
xcglassoxzdazmapper
.
insertxcglassoxzdazList
(
xzdazlist
);
.
one
();
}
if
(!
Objects
.
isNull
(
tmp
))
{
toinsert
++;
return
ResultUtil
.
error
(
"调薪成功失败, 已存在生效日期"
+
file
.
getSxrq
()
+
"的待生效记录, 请到调薪记录页面查看!"
);
}
else
{
}
// 当前日期
int
txzt
=
2
;
String
curDate
=
DateUtil
.
getStringFormat
(
new
Date
().
getTime
());
if
(
DateUtil
.
getFormat
(
file
.
getSxrq
())
<=
DateUtil
.
getFormat
(
curDate
))
{
// 未生效的调薪记录同一天只能有一条
// 生效日期在当天或之前的, 立即生效, 原使用中的记录变成历史记录
XcglAssoXzdadx
tmp
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
XcglAssoXzdadx
xzds
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
emp
.
getEmpNum
())
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
emp
.
getEmpNum
())
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
0
)
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
2
)
.
eq
(
XcglAssoXzdadx:
:
getSxrq
,
file
.
getSxrq
())
.
one
();
.
one
();
if
(
xzds
!=
null
)
{
if
(!
Objects
.
isNull
(
tmp
))
{
XcglAssoXzdadx
txrz
=
XcglAssoXzdadx
.
builder
().
build
();
return
ResultUtil
.
error
(
"调薪成功失败, 已存在生效日期"
+
file
.
getSxrq
()
+
"的待生效记录, 请到调薪记录页面查看!"
);
txrz
.
setTxzt
(
1
);
//0:使用中;1:历史, 2: 未生效
txrz
.
setId
(
xzds
.
getId
());
txrz
.
updateById
();
}
}
txzt
=
0
;
int
txzt
=
2
;
}
if
(
DateUtil
.
getFormat
(
file
.
getSxrq
())
<=
DateUtil
.
getFormat
(
curDate
))
{
XcglAssoXzdadx
xzdadx
=
XcglAssoXzdadx
.
builder
().
build
();
// 生效日期在当天或之前的, 立即生效, 原使用中的记录变成历史记录
xzdadx
.
setUserid
(
emp
.
getEmpNum
());
//用户id
XcglAssoXzdadx
xzds
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
xzdadx
.
setSxrq
(
file
.
getSxrq
());
//生效日期
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
emp
.
getEmpNum
())
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
0
)
xzdadx
.
setXgyhid
(
userBean
.
getEmpNum
());
//修改用户id
.
one
();
xzdadx
.
setRemarks
(
""
);
if
(
xzds
!=
null
)
{
xzdadx
.
setQyid
(
userBean
.
getOrgCode
());
XcglAssoXzdadx
txrz
=
XcglAssoXzdadx
.
builder
().
build
();
xzdadx
.
setTxzt
(
txzt
);
txrz
.
setTxzt
(
1
);
//0:使用中;1:历史, 2: 未生效
xcglassoxzdadxmapper
.
xzdadxinsert
(
xzdadx
);
txrz
.
setId
(
xzds
.
getId
());
int
zdyid
=
xzdadx
.
getId
();
txrz
.
updateById
();
List
<
XcglAssoXzdaz
>
xzdazlist
=
new
ArrayList
<
XcglAssoXzdaz
>();
}
CustomDto
[]
cus
=
file
.
getCus
();
txzt
=
0
;
if
(
cus
.
length
>
0
){
for
(
int
p
=
0
;
p
<
cus
.
length
;
p
++){
XcglAssoXzdaz
xzdaz
=
new
XcglAssoXzdaz
();
xzdaz
.
setXzdazdyid
(
cus
[
p
].
getId
());
//薪资档案自定义id
xzdaz
.
setRsz
(
cus
[
p
].
getVal
());
//输入值
xzdaz
.
setXzdadxid
(
zdyid
);
//薪资档案-定薪id
xzdazlist
.
add
(
xzdaz
);
}
}
XcglAssoXzdadx
xzdadx
=
XcglAssoXzdadx
.
builder
().
build
();
xzdadx
.
setUserid
(
emp
.
getEmpNum
());
//用户id
xzdadx
.
setSxrq
(
file
.
getSxrq
());
//生效日期
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
xzdadx
.
setXgyhid
(
userBean
.
getEmpNum
());
//修改用户id
xzdadx
.
setRemarks
(
""
);
xzdadx
.
setQyid
(
userBean
.
getOrgCode
());
xzdadx
.
setTxzt
(
txzt
);
xcglassoxzdadxmapper
.
xzdadxinsert
(
xzdadx
);
int
zdyid
=
xzdadx
.
getId
();
List
<
XcglAssoXzdaz
>
xzdazlist
=
new
ArrayList
<
XcglAssoXzdaz
>();
CustomDto
[]
cus
=
file
.
getCus
();
if
(
cus
.
length
>
0
){
for
(
int
p
=
0
;
p
<
cus
.
length
;
p
++){
XcglAssoXzdaz
xzdaz
=
new
XcglAssoXzdaz
();
xzdaz
.
setXzdazdyid
(
cus
[
p
].
getId
());
//薪资档案自定义id
xzdaz
.
setRsz
(
cus
[
p
].
getVal
());
//输入值
xzdaz
.
setXzdadxid
(
zdyid
);
//薪资档案-定薪id
xzdazlist
.
add
(
xzdaz
);
}
}
if
(
xzdazlist
.
size
()>
0
){
xcglassoxzdazmapper
.
insertxcglassoxzdazList
(
xzdazlist
);
}
toinsert
++;
}
}
if
(
xzdazlist
.
size
()>
0
){
xcglassoxzdazmapper
.
insertxcglassoxzdazList
(
xzdazlist
);
}
else
{
}
failure
++;
toinsert
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
"日期格式不对(Excel中输入时间处设置为“短日期”即可)"
);
reasons
.
add
(
map
);
}
}
}
else
{
}
else
{
failure
++;
failure
++;
...
...
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