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
d3b62534
Commit
d3b62534
authored
Nov 28, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
薪资年终奖计算修改
parent
c4e8fb63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+7
-15
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
d3b62534
...
@@ -1502,7 +1502,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1502,7 +1502,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @return: com.yifu.cloud.v1.common.core.util.R
* @return: com.yifu.cloud.v1.common.core.util.R
**/
**/
public
R
doLaborCoreSalary
(
List
<
TSalaryAccountVo
>
savList
,
List
<
TSalaryAccountItem
>
saiList
,
public
R
doLaborCoreSalary
(
List
<
TSalaryAccountVo
>
savList
,
List
<
TSalaryAccountItem
>
saiList
,
TSettleDomainSelectVo
dept
,
String
invoiceTitle
,
TSalaryStandard
salary
,
YifuUser
user
)
{
TSettleDomainSelectVo
dept
,
TSalaryStandard
salary
,
YifuUser
user
)
{
List
<
TSalaryAccount
>
aList
=
new
ArrayList
<>();
List
<
TSalaryAccount
>
aList
=
new
ArrayList
<>();
TSalaryAccount
a
;
//定库:
TSalaryAccount
a
;
//定库:
BigDecimal
relaySalarySum
=
BigDecimal
.
ZERO
;
//工资应发
BigDecimal
relaySalarySum
=
BigDecimal
.
ZERO
;
//工资应发
...
@@ -1518,21 +1518,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1518,21 +1518,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 是否重复金额false:否;true:是
// 是否重复金额false:否;true:是
boolean
repeatFlag
=
false
;
boolean
repeatFlag
=
false
;
List
<
String
>
idCardList
=
new
ArrayList
<>();
for
(
TSalaryAccountVo
vo
:
savList
)
{
if
(
Common
.
isNotNull
(
vo
.
getEmpIdcard
()))
{
idCardList
.
add
(
vo
.
getEmpIdcard
());
}
}
// 工资查询所需的全部list,组装Map来使用
Map
<
String
,
List
<
TSalaryAccountItem
>>
itemMap
=
tSalaryAccountItemService
.
getAllItemVoList
(
idCardList
,
invoiceTitle
);
TSalaryAccountItem
sai
;
TSalaryAccountItem
sai
;
for
(
int
i
=
CommonConstants
.
ZERO_INT
;
i
<
size
;
i
++)
{
for
(
int
i
=
CommonConstants
.
ZERO_INT
;
i
<
size
;
i
++)
{
a
=
new
TSalaryAccount
();
a
=
new
TSalaryAccount
();
try
{
try
{
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
),
a
);
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
),
a
);
a
.
setSalaryMonth
(
DateUtil
.
getThisMonth
());
if
(!
haveSalaryFlag
&&
a
.
getHaveSalaryFlag
()
!=
null
&&
a
.
getHaveSalaryFlag
()
==
CommonConstants
.
ONE_INT
)
{
if
(!
haveSalaryFlag
&&
a
.
getHaveSalaryFlag
()
!=
null
&&
a
.
getHaveSalaryFlag
()
==
CommonConstants
.
ONE_INT
)
{
haveSalaryFlag
=
true
;
haveSalaryFlag
=
true
;
}
}
...
@@ -1555,8 +1546,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1555,8 +1546,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 实发劳务费,按月累计扣税
// 实发劳务费,按月累计扣税
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
SALARY_TAX
,
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculationLabor
(
saiList
,
asList
calculationLabor
(
saiList
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
// 自有员工以及自有员工应发金额
// 自有员工以及自有员工应发金额
if
(
Common
.
isNotNull
(
a
.
getOwnFlag
())
&&
a
.
getOwnFlag
()
==
1
)
{
if
(
Common
.
isNotNull
(
a
.
getOwnFlag
())
&&
a
.
getOwnFlag
()
==
1
)
{
...
@@ -1584,6 +1574,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1584,6 +1574,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
salary
.
setSalaryMonth
(
DateUtil
.
getThisMonth
());
if
(
haveSalaryFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
)
{
if
(
haveSalaryFlag
)
{
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
...
@@ -1636,8 +1627,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1636,8 +1627,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2022/3/3 11:30
* @Date: 2022/3/3 11:30
* @return: java.math.BigDecimal
* @return: java.math.BigDecimal
**/
**/
private
BigDecimal
calculationLabor
(
List
<
TSalaryAccountItem
>
itemList
,
List
<
TSalaryAccountItem
>
itemHistoryList
,
private
BigDecimal
calculationLabor
(
List
<
TSalaryAccountItem
>
itemList
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccount
a
)
{
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccount
a
)
{
// B7 = 当月实发合计
// B7 = 当月实发合计
// 税=ROUND(IF(B7<=800,0,IF(B7<=3360,(B7-800)/4,IF(B7<=21000,0.16*B7/0.84,IF(B7<=49500,(0.24*B7-2000)/0.76,(0.32*B7-7000)/0.68)))),2)
// 税=ROUND(IF(B7<=800,0,IF(B7<=3360,(B7-800)/4,IF(B7<=21000,0.16*B7/0.84,IF(B7<=49500,(0.24*B7-2000)/0.76,(0.32*B7-7000)/0.68)))),2)
// 本次实发
// 本次实发
...
@@ -1813,6 +1803,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1813,6 +1803,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal
actualSalarySum
=
BigDecimal
.
ZERO
;
BigDecimal
actualSalarySum
=
BigDecimal
.
ZERO
;
try
{
try
{
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
),
a
);
SalaryAccountUtil
.
reflectionAttr
(
savList
.
get
(
i
),
a
);
a
.
setSalaryMonth
(
DateUtil
.
getThisMonth
());
if
(!
haveSalaryFlag
&&
a
.
getHaveSalaryFlag
()
!=
null
&&
a
.
getHaveSalaryFlag
()
==
CommonConstants
.
ONE_INT
)
{
if
(!
haveSalaryFlag
&&
a
.
getHaveSalaryFlag
()
!=
null
&&
a
.
getHaveSalaryFlag
()
==
CommonConstants
.
ONE_INT
)
{
haveSalaryFlag
=
true
;
haveSalaryFlag
=
true
;
}
}
...
@@ -1862,6 +1853,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1862,6 +1853,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary
.
setSettlementAmount
(
relaySalarySum
);
salary
.
setSettlementAmount
(
relaySalarySum
);
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setSalaryMonth
(
DateUtil
.
getThisMonth
());
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
if
(
haveSalaryFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
||
ownNum
>
0
||
repeatFlag
)
{
...
...
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