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
0f0adc19
Commit
0f0adc19
authored
Sep 01, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
劳务费稿酬生成修改
parent
2a31909c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
16 deletions
+51
-16
TStatisticsBonus.java
...fu/cloud/plus/v1/yifu/salary/entity/TStatisticsBonus.java
+13
-8
TStatisticsRemuneration.java
...d/plus/v1/yifu/salary/entity/TStatisticsRemuneration.java
+2
-2
TStatisticsBonusServiceImpl.java
...yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
+36
-6
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TStatisticsBonus.java
View file @
0f0adc19
...
@@ -71,57 +71,62 @@ public class TStatisticsBonus {
...
@@ -71,57 +71,62 @@ public class TStatisticsBonus {
/**
/**
* 员工姓名
* 员工姓名
*/
*/
@ExcelAttribute
(
name
=
"
员工
姓名"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"姓名"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"员工姓名不能超过32个字符"
)
@Length
(
max
=
32
,
message
=
"员工姓名不能超过32个字符"
)
@ExcelProperty
(
"
员工
姓名"
)
@ExcelProperty
(
"姓名"
)
@Schema
(
description
=
"员工姓名"
)
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
private
String
empName
;
/**
/**
* 身份证号
* 身份证号
*/
*/
@ExcelAttribute
(
name
=
"
证件
号码"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"
身份证
号码"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@ExcelProperty
(
"
证件
号码"
)
@ExcelProperty
(
"
身份证
号码"
)
@Schema
(
description
=
"身份证号"
)
@Schema
(
description
=
"身份证号"
)
private
String
empIdcard
;
private
String
empIdcard
;
/**
/**
* 年终奖
* 年终奖
*/
*/
@ExcelAttribute
(
name
=
"年终奖"
)
@ExcelAttribute
(
name
=
"年终奖
(元)
"
)
@ExcelProperty
(
"年终奖"
)
@ExcelProperty
(
"年终奖
(元)
"
)
@Schema
(
description
=
"年终奖(元)"
)
@Schema
(
description
=
"年终奖(元)"
)
private
BigDecimal
annualBonus
;
private
BigDecimal
annualBonus
;
/**
/**
* 年终奖单独扣税应缴税额
* 年终奖单独扣税应缴税额
*/
*/
@ExcelAttribute
(
name
=
"年终奖单独扣税
应缴税额
"
)
@ExcelAttribute
(
name
=
"年终奖单独扣税"
)
@ExcelProperty
(
"年终奖单独扣税
应缴税额
"
)
@ExcelProperty
(
"年终奖单独扣税"
)
@Schema
(
description
=
"年终奖单独扣税应缴税额"
)
@Schema
(
description
=
"年终奖单独扣税应缴税额"
)
private
BigDecimal
bonusTax
;
private
BigDecimal
bonusTax
;
/**
/**
* 项目id
* 项目id
*/
*/
@Schema
(
description
=
"项目id"
)
@Schema
(
description
=
"项目id"
)
@ExcelIgnore
private
String
deptId
;
private
String
deptId
;
/**
/**
* 项目编码
* 项目编码
*/
*/
@Schema
(
description
=
"项目编码"
)
@Schema
(
description
=
"项目编码"
)
@ExcelIgnore
private
String
deptNo
;
private
String
deptNo
;
/**
/**
* 项目名称
* 项目名称
*/
*/
@Schema
(
description
=
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
@ExcelIgnore
private
String
deptName
;
private
String
deptName
;
/**
/**
* 单位id
* 单位id
*/
*/
@Schema
(
description
=
"单位id"
)
@Schema
(
description
=
"单位id"
)
@ExcelIgnore
private
String
unitId
;
private
String
unitId
;
/**
/**
* 单位编码
* 单位编码
*/
*/
@Schema
(
description
=
"单位编码"
)
@Schema
(
description
=
"单位编码"
)
@ExcelIgnore
private
String
unitNo
;
private
String
unitNo
;
}
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TStatisticsRemuneration.java
View file @
0f0adc19
...
@@ -72,9 +72,9 @@ public class TStatisticsRemuneration {
...
@@ -72,9 +72,9 @@ public class TStatisticsRemuneration {
/**
/**
* 身份证号
* 身份证号
*/
*/
@ExcelAttribute
(
name
=
"
身份证号
"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"
证件号码
"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@ExcelProperty
(
"
身份证号
"
)
@ExcelProperty
(
"
证件号码
"
)
private
String
empIdcard
;
private
String
empIdcard
;
/**
/**
* 证件类型
* 证件类型
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
View file @
0f0adc19
...
@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
...
@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsBonusMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsBonusMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryTaxConfigService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryTaxConfigService
;
...
@@ -74,6 +75,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
...
@@ -74,6 +75,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
private
final
TSalaryAccountItemService
tSalaryAccountItemService
;
private
final
TSalaryAccountItemService
tSalaryAccountItemService
;
private
final
TSalaryAccountMapper
accountMapper
;
/**
/**
* 全年一次性奖金申报表简单分页查询
* 全年一次性奖金申报表简单分页查询
* @param tStatisticsBonus 全年一次性奖金申报表
* @param tStatisticsBonus 全年一次性奖金申报表
...
@@ -91,7 +94,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
...
@@ -91,7 +94,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
*/
*/
@Override
@Override
public
void
listExport
(
HttpServletResponse
response
,
TStatisticsBonusSearchVo
searchVo
){
public
void
listExport
(
HttpServletResponse
response
,
TStatisticsBonusSearchVo
searchVo
){
String
fileName
=
"全年一次性奖金
申报表
批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"全年一次性奖金批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
//获取要导出的列表
List
<
TStatisticsBonus
>
list
=
new
ArrayList
<>();
List
<
TStatisticsBonus
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
long
count
=
noPageCountDiy
(
searchVo
);
...
@@ -180,13 +183,15 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
...
@@ -180,13 +183,15 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
BigDecimal
finalSalaryNoSalary
;
BigDecimal
finalSalaryNoSalary
;
//年终奖合并扣税12月税费
//年终奖合并扣税12月税费
BigDecimal
finalSalaryWithSalary
;
BigDecimal
finalSalaryWithSalary
;
//12月已发工资税费
BigDecimal
twlSalaryTax
;
try
{
try
{
out
=
response
.
getOutputStream
();
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsBonusImportVo
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TStatisticsBonusImportVo
.
class
).
build
();
int
index
=
0
;
int
index
=
0
;
//个税配置
//个税配置
List
<
TSalaryTaxConfig
>
personTax
=
tSalaryTaxConfigService
.
getTaxConfigByPersonList
(
new
TSalaryTaxConfig
());
List
<
TSalaryTaxConfig
>
personTax
=
tSalaryTaxConfigService
.
getTaxConfigByPersonList
(
new
TSalaryTaxConfig
());
...
@@ -230,6 +235,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
...
@@ -230,6 +235,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
maxAnualSalary
=
BigDecimal
.
ZERO
;
maxAnualSalary
=
BigDecimal
.
ZERO
;
costReduction
=
BigDecimal
.
ZERO
;
costReduction
=
BigDecimal
.
ZERO
;
isTax
=
BigDecimal
.
ZERO
;
isTax
=
BigDecimal
.
ZERO
;
twlSalaryTax
=
BigDecimal
.
ZERO
;
//12月是否发薪
//12月是否发薪
Boolean
isSend
=
false
;
Boolean
isSend
=
false
;
//年终奖单独扣税12月税费
//年终奖单独扣税12月税费
...
@@ -256,9 +262,32 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
...
@@ -256,9 +262,32 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if
(
SalaryConstants
.
COST_REDUCTION_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
COST_REDUCTION_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
costReduction
=
costReduction
.
add
(
item
.
getSalaryMoney
());
costReduction
=
costReduction
.
add
(
item
.
getSalaryMoney
());
}
}
if
(
CommonConstants
.
ONE_INT
==
item
.
getIsTax
())
{
if
(
SalaryConstants
.
PERSONAL_SOCIAL_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
isTax
=
isTax
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
PERSONAL_FUND_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
isTax
=
isTax
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
EXEMPTION_PERSION_TAX_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
isTax
=
isTax
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
WITHHOLIDING_PERSON_SOCIAL
.
equals
(
item
.
getJavaFiedName
()))
{
isTax
=
isTax
.
add
(
item
.
getSalaryMoney
());
isTax
=
isTax
.
add
(
item
.
getSalaryMoney
());
}
}
if
(
SalaryConstants
.
WITHHOLIDING_PERSON_FUND
.
equals
(
item
.
getJavaFiedName
()))
{
isTax
=
isTax
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
ENTERPRISE_ANNUITY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
isTax
=
isTax
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
ONLY_CHILD_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
isTax
=
isTax
.
add
(
item
.
getSalaryMoney
());
}
if
(
item
.
getSettlementMonth
().
contains
(
CommonConstants
.
TWELVE_STRING
))
{
if
(
SalaryConstants
.
SALARY_TAX
.
equals
(
item
.
getJavaFiedName
()))
{
twlSalaryTax
.
add
(
item
.
getSalaryMoney
());
}
}
}
}
}
}
if
(
CommonConstants
.
IS_TRUE
.
equals
(
infoVo
.
getIsTSend
()))
{
if
(
CommonConstants
.
IS_TRUE
.
equals
(
infoVo
.
getIsTSend
()))
{
...
@@ -272,14 +301,13 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
...
@@ -272,14 +301,13 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
//年终奖合并扣税
//年终奖合并扣税
if
(
isSend
)
{
if
(
isSend
)
{
//年终奖单独扣税
//年终奖单独扣税
finalSalaryNoSalary
=
calculationSalary
(
annousTax
,
infoVo
.
getAnnualBonus
()
);
finalSalaryNoSalary
=
BigDecimalUtils
.
safeAdd
(
calculationSalary
(
annousTax
,
infoVo
.
getAnnualBonus
()),
twlSalaryTax
);
wSalary
=
infoVo
.
getAnnualBonus
();
wSalary
=
infoVo
.
getAnnualBonus
();
finalSalaryWithSalary
=
finalSalaryNoSalary
;
finalSalaryWithSalary
=
finalSalaryNoSalary
;
}
else
{
}
else
{
//年终奖单独扣税
//年终奖单独扣税
finalSalaryNoSalary
=
calculationSalary
(
annousTax
,
infoVo
.
getAnnualBonus
());
BigDecimal
annualTSalary
=
calculationSalaryT
(
personTax
,
infoVo
.
getAnnualTSalary
());
BigDecimal
annualTSalary
=
calculationSalaryT
(
personTax
,
infoVo
.
getAnnualTSalary
());
finalSalaryNoSalary
=
BigDecimalUtils
.
safeAdd
(
finalSalaryNoSalary
,
annualTSalary
);
finalSalaryNoSalary
=
BigDecimalUtils
.
safeAdd
(
calculationSalary
(
annousTax
,
infoVo
.
getAnnualBonus
())
,
annualTSalary
);
wSalary
=
BigDecimalUtils
.
safeAdd
(
infoVo
.
getAnnualBonus
(),
infoVo
.
getAnnualTSalary
());
wSalary
=
BigDecimalUtils
.
safeAdd
(
infoVo
.
getAnnualBonus
(),
infoVo
.
getAnnualTSalary
());
finalSalaryWithSalary
=
calculationSalary
(
annousTax
,
wSalary
);
finalSalaryWithSalary
=
calculationSalary
(
annousTax
,
wSalary
);
}
}
...
@@ -487,6 +515,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
...
@@ -487,6 +515,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
jsonObject
.
put
(
"anRes"
,
map
);
jsonObject
.
put
(
"anRes"
,
map
);
jsonObject
.
put
(
"zySalary"
,
salary
);
jsonObject
.
put
(
"zySalary"
,
salary
);
map
.
clear
();
zySalary
.
clear
();
return
jsonObject
;
return
jsonObject
;
}
}
...
...
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