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
1a8391d0
Commit
1a8391d0
authored
Nov 25, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目档案批量操作速度优化
parent
36b3972a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
120 deletions
+91
-120
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+46
-87
TStatisticsBonusServiceImpl.java
...yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
+45
-33
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
1a8391d0
This diff is collapsed.
Click to expand it.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
View file @
1a8391d0
...
...
@@ -350,9 +350,15 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
sumDeductSalary
=
BigDecimalUtils
.
safeAdd
(
isTax
,
infoVo
.
getDeductTaxSalary
());
}
//最优解计算区间
BigDecimal
oneBecimal
=
new
BigDecimal
(
"36000"
);
BigDecimal
twoBecimal
=
new
BigDecimal
(
"144000"
);
BigDecimal
subOneBecimal
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
oneBecimal
);
BigDecimal
subTwoBecimal1
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
twoBecimal
);
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
compareTo
(
new
BigDecimal
(
"36000"
)
)
<=
0
)
{
if
(
wSalary
.
compareTo
(
new
BigDecimal
(
"36000"
)
)
<=
0
)
{
compareTo
(
oneBecimal
)
<=
0
)
{
if
(
wSalary
.
compareTo
(
oneBecimal
)
<=
0
)
{
if
(
isSend
)
{
maxAnualSalary
=
wSalary
;
}
else
{
...
...
@@ -361,15 +367,15 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
else
{
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
))
;
minSalary
=
subOneBecimal
;
}
else
{
minSalary
=
socialFundTax
;
minSalary
=
s
ubOneBecimal
.
compareTo
(
socialFundTax
)
>
0
?
subOneBecimal
:
s
ocialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"36000"
)
;
maxAnualSalary
=
oneBecimal
;
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
compareTo
(
new
BigDecimal
(
"72000"
))
<=
0
)
{
if
(
wSalary
.
compareTo
(
new
BigDecimal
(
"36000"
)
)
<=
0
)
{
if
(
wSalary
.
compareTo
(
oneBecimal
)
<=
0
)
{
if
(
isSend
)
{
maxAnualSalary
=
wSalary
;
}
else
{
...
...
@@ -378,15 +384,15 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
else
{
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
))
;
minSalary
=
subOneBecimal
;
}
else
{
minSalary
=
socialFundTax
;
minSalary
=
s
ubOneBecimal
.
compareTo
(
socialFundTax
)
>
0
?
subOneBecimal
:
s
ocialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"36000"
)
;
maxAnualSalary
=
oneBecimal
;
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
compareTo
(
new
BigDecimal
(
"203100"
))
<=
0
)
{
if
(
wSalary
.
compareTo
(
new
BigDecimal
(
"36000"
)
)
<=
0
)
{
if
(
wSalary
.
compareTo
(
oneBecimal
)
<=
0
)
{
if
(
isSend
)
{
maxAnualSalary
=
wSalary
;
}
else
{
...
...
@@ -395,15 +401,15 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
else
{
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"36000"
))
;
minSalary
=
subOneBecimal
;
}
else
{
minSalary
=
socialFundTax
;
minSalary
=
s
ubOneBecimal
.
compareTo
(
socialFundTax
)
>
0
?
subOneBecimal
:
s
ocialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"36000"
)
;
maxAnualSalary
=
oneBecimal
;
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
compareTo
(
new
BigDecimal
(
"288000"
))
<=
0
)
{
if
(
wSalary
.
compareTo
(
new
BigDecimal
(
"144000"
)
)
<=
0
)
{
if
(
wSalary
.
compareTo
(
twoBecimal
)
<=
0
)
{
if
(
isSend
)
{
maxAnualSalary
=
wSalary
;
}
else
{
...
...
@@ -412,15 +418,15 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
else
{
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"144000"
))
;
minSalary
=
subTwoBecimal1
;
}
else
{
minSalary
=
socialFundTax
;
minSalary
=
s
ubTwoBecimal1
.
compareTo
(
socialFundTax
)
>
0
?
subTwoBecimal1
:
s
ocialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"144000"
)
;
maxAnualSalary
=
twoBecimal
;
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
compareTo
(
new
BigDecimal
(
"672000"
))
<=
0
)
{
if
(
wSalary
.
compareTo
(
new
BigDecimal
(
"144000"
)
)
<=
0
)
{
if
(
wSalary
.
compareTo
(
twoBecimal
)
<=
0
)
{
if
(
isSend
)
{
maxAnualSalary
=
wSalary
;
}
else
{
...
...
@@ -429,15 +435,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
else
{
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"144000"
))
;
minSalary
=
subTwoBecimal1
;
}
else
{
minSalary
=
socialFundTax
;
minSalary
=
s
ubTwoBecimal1
.
compareTo
(
socialFundTax
)
>
0
?
subTwoBecimal1
:
s
ocialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"144000"
)
;
maxAnualSalary
=
twoBecimal
;
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
compareTo
(
new
BigDecimal
(
"1277500"
))
<=
0
)
{
if
(
wSalary
.
compareTo
(
new
BigDecimal
(
"300000"
))
<=
0
)
{
BigDecimal
threeBecimal
=
new
BigDecimal
(
"300000"
);
BigDecimal
subThreeBecimal
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
threeBecimal
);
if
(
wSalary
.
compareTo
(
threeBecimal
)
<=
0
)
{
if
(
isSend
)
{
maxAnualSalary
=
wSalary
;
}
else
{
...
...
@@ -446,15 +454,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
else
{
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"300000"
))
;
minSalary
=
subThreeBecimal
;
}
else
{
minSalary
=
socialFundTax
;
minSalary
=
s
ubThreeBecimal
.
compareTo
(
socialFundTax
)
>
0
?
subThreeBecimal
:
s
ocialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"300000"
)
;
maxAnualSalary
=
threeBecimal
;
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
compareTo
(
new
BigDecimal
(
"1452500"
))
<=
0
)
{
if
(
wSalary
.
compareTo
(
new
BigDecimal
(
"420000"
))
<=
0
)
{
BigDecimal
fourBecimal
=
new
BigDecimal
(
"420000"
);
BigDecimal
subFourBecimal
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
fourBecimal
);
if
(
wSalary
.
compareTo
(
fourBecimal
)
<=
0
)
{
if
(
isSend
)
{
maxAnualSalary
=
wSalary
;
}
else
{
...
...
@@ -463,15 +473,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
else
{
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"420000"
))
;
minSalary
=
subFourBecimal
;
}
else
{
minSalary
=
socialFundTax
;
minSalary
=
s
ubFourBecimal
.
compareTo
(
socialFundTax
)
>
0
?
subFourBecimal
:
s
ocialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"420000"
)
;
maxAnualSalary
=
fourBecimal
;
}
}
else
if
(
BigDecimalUtils
.
safeSubtract
(
BigDecimalUtils
.
safeAdd
(
ySalary
,
wSalary
),
sumDeductSalary
).
compareTo
(
new
BigDecimal
(
"1452500"
))
>
0
)
{
if
(
wSalary
.
compareTo
(
new
BigDecimal
(
"660000"
))
<=
0
)
{
BigDecimal
fiveBecimal
=
new
BigDecimal
(
"660000"
);
BigDecimal
subFiveBecimal
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
fiveBecimal
);
if
(
wSalary
.
compareTo
(
fiveBecimal
)
<=
0
)
{
if
(
isSend
)
{
maxAnualSalary
=
wSalary
;
}
else
{
...
...
@@ -480,11 +492,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
else
{
if
(
isSend
)
{
minSalary
=
BigDecimalUtils
.
safeSubtract
(
wSalary
,
new
BigDecimal
(
"660000"
))
;
minSalary
=
subFiveBecimal
;
}
else
{
minSalary
=
socialFundTax
;
minSalary
=
s
ubFiveBecimal
.
compareTo
(
socialFundTax
)
>
0
?
subFiveBecimal
:
s
ocialFundTax
;
}
maxAnualSalary
=
new
BigDecimal
(
"660000"
)
;
maxAnualSalary
=
fiveBecimal
;
}
}
...
...
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