Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
36b3972a
Commit
36b3972a
authored
Nov 25, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目档案批量操作速度优化
parent
c95f3128
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
22 deletions
+44
-22
TStatisticsBonusServiceImpl.java
...yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
+44
-22
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
View file @
36b3972a
...
...
@@ -166,7 +166,6 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
@Override
public
void
importDiy
(
HttpServletResponse
response
,
List
<
TStatisticsBonusImportVo
>
list
,
String
deptId
){
String
fileName
=
"全年一次性奖金测算导出"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
ServletOutputStream
out
=
null
;
//本次纳税额
BigDecimal
res
;
//应发工资合计
...
...
@@ -194,8 +193,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
BigDecimal
twlSalaryTax
;
//12月社保公积金扣费
BigDecimal
socialFundTax
;
try
{
out
=
response
.
getOutputStream
();
try
(
ServletOutputStream
out
=
response
.
getOutputStream
())
{
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
...
...
@@ -362,7 +360,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
maxAnualSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
socialFundTax
);
}
}
else
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
));
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
));
}
else
{
minSalary
=
socialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"36000"
);
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
...
...
@@ -375,7 +377,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
maxAnualSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
socialFundTax
);
}
}
else
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
));
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
));
}
else
{
minSalary
=
socialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"36000"
);
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
...
...
@@ -388,7 +394,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
maxAnualSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
socialFundTax
);
}
}
else
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
));
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
));
}
else
{
minSalary
=
socialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"36000"
);
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
...
...
@@ -401,7 +411,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
maxAnualSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
socialFundTax
);
}
}
else
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"144000"
));
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"144000"
));
}
else
{
minSalary
=
socialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"144000"
);
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
...
...
@@ -414,8 +428,12 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
maxAnualSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
socialFundTax
);
}
}
else
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
));
maxAnualSalary
=
new
BigDecimal
(
"36000"
);
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"144000"
));
}
else
{
minSalary
=
socialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"144000"
);
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
compareTo
(
new
BigDecimal
(
"1277500"
))
<=
0
)
{
...
...
@@ -427,7 +445,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
maxAnualSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
socialFundTax
);
}
}
else
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"300000"
));
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"300000"
));
}
else
{
minSalary
=
socialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"300000"
);
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
...
...
@@ -440,7 +462,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
maxAnualSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
socialFundTax
);
}
}
else
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"420000"
));
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"420000"
));
}
else
{
minSalary
=
socialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"420000"
);
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
...
...
@@ -453,7 +479,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
maxAnualSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
socialFundTax
);
}
}
else
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"660000"
));
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"660000"
));
}
else
{
minSalary
=
socialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"660000"
);
}
}
...
...
@@ -484,16 +514,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
...
...
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