Commit 2be721da authored by huyuchen's avatar huyuchen

年终奖问题处理

parent faefe72f
......@@ -18,6 +18,8 @@ package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -43,6 +45,7 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "员工姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private String empName;
/**
* 身份证号
......@@ -52,6 +55,7 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "身份证号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private String empIdcard;
/**
* 待发年终奖
......@@ -60,6 +64,7 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "待发年终奖")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("待发年终奖")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal annualBonus;
/**
* 待发12月工资
......@@ -68,6 +73,7 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "待发12月工资")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("待发12月工资")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal annualTSalary;
/**
* 12月工资是否已经发放
......@@ -76,55 +82,86 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "12月工资是否已经发放")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("12月工资是否已经发放")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private String isTSend;
/**
* 年终奖单独扣税12月税费
* 12月份应纳税所得额扣除费用
*/
@ExcelAttribute(name = "12月份应纳税所得额扣除费用")
@Schema(description = "12月份应纳税所得额扣除费用")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("12月份应纳税所得额扣除费用")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal deductTaxSalary;
/**
* 年终奖单独扣税额
*/
@ExcelAttribute(name = "年终奖单独扣税额")
@Schema(description = "年终奖单独扣税额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("年终奖单独扣税额")
private BigDecimal annualSingleTax;
/**
* 工资单独计税额
*/
@ExcelAttribute(name = "工资单独计税额")
@Schema(description = "工资单独计税额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工资单独计税额")
private BigDecimal salarySingleTax;
/**
* 合计
*/
@ExcelAttribute(name = "合计")
@Schema(description = "合计")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合计")
private BigDecimal sumTax;
/**
* 待发工资按年终奖扣税12月税费
*/
@ExcelAttribute(name = "年终奖单独扣税12月税费")
@Schema(description = "年终奖单独扣税12月税费")
@ExcelAttribute(name = "待发工资按年终奖扣税12月税费")
@Schema(description = "待发工资按年终奖扣税12月税费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("年终奖单独扣税12月税费")
@ExcelProperty("待发工资按年终奖扣税12月税费")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal annualATax;
/**
* 年终奖合并扣税12月税费
* 年终奖按工资扣税12月税费
*/
@ExcelAttribute(name = "年终奖合并扣税12月税费")
@Schema(description = "年终奖合并扣税12月税费")
@ExcelAttribute(name = "年终奖按工资扣税12月税费")
@Schema(description = "年终奖按工资扣税12月税费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("年终奖合并扣税12月税费")
@ExcelProperty("年终奖按工资扣税12月税费")
private BigDecimal annualSTax;
/**
* 最优方案-12月工资
* 最优方案-12月工资(建议值)
*/
@ExcelAttribute(name = "最优方案-12月工资")
@Schema(description = "最优方案-12月工资")
@ExcelAttribute(name = "最优方案-12月工资(建议值)")
@Schema(description = "最优方案-12月工资(建议值)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("最优方案-12月工资")
@ExcelProperty("最优方案-12月工资(建议值)")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal bestPlanTSalary;
/**
* 最优方案-年终奖
* 最优方案-年终奖(建议值)
*/
@ExcelAttribute(name = "最优方案-年终奖")
@Schema(description = "最优方案-年终奖")
@ExcelAttribute(name = "最优方案-年终奖(建议值)")
@Schema(description = "最优方案-年终奖(建议值)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("最优方案-年终奖")
@ExcelProperty("最优方案-年终奖(建议值)")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal bestPlanBonus;
/**
* 最优方案-12月扣税
* 最优方案-12月扣税(建议值)
*/
@ExcelAttribute(name = "最优方案-12月扣税")
@Schema(description = "最优方案-12月扣税")
@ExcelAttribute(name = "最优方案-12月扣税(建议值)")
@Schema(description = "最优方案-12月扣税(建议值)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("最优方案-12月扣税")
@ExcelProperty("最优方案-12月扣税(建议值)")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal bestPlanTax;
/**
* 12月份应纳税所得额扣除费用
*/
@ExcelAttribute(name = "12月份应纳税所得额扣除费用")
@Schema(description = "12月份应纳税所得额扣除费用")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("12月份应纳税所得额扣除费用")
private BigDecimal deductTaxSalary;
}
......@@ -191,6 +191,10 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
BigDecimal twlSalaryTax;
//12月社保公积金扣费
BigDecimal socialFundTax;
//年终奖单独扣税
BigDecimal singleAnualTax;
//工资单独扣税
BigDecimal singleSalaryTax;
try(ServletOutputStream out = response.getOutputStream()) {
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
......@@ -248,6 +252,10 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
//12月份应纳税所得额扣除费用
//12月社保公积金扣费
socialFundTax = BigDecimal.ZERO;
//年终奖单独扣税
singleAnualTax = BigDecimal.ZERO;
//工资单独扣税
singleSalaryTax = BigDecimal.ZERO;
//专项扣除列表
List<BigDecimal> sdSumList = new ArrayList<>();
//减除费用列表
......@@ -327,7 +335,9 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
infoVo.getDeductTaxSalary(),isTax))),sumTax);
//12月薪资扣除额合计
sumDeductSalary = BigDecimalUtils.safeAdd(isTax,infoVo.getDeductTaxSalary());
singleSalaryTax = calculationSalaryT(personTax, infoVo.getAnnualTSalary());
}
singleAnualTax = calculationSalary(annousTax,infoVo.getAnnualBonus());
//最优解计算区间
BigDecimal oneBecimal = new BigDecimal("36000");
......@@ -459,6 +469,9 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
infoVo.setAnnualSTax(finalSalaryWithSalary);
infoVo.setBestPlanTSalary(anRes);
infoVo.setBestPlanBonus(BigDecimalUtils.safeSubtract(wSalary,anRes));
infoVo.setAnnualSingleTax(singleAnualTax);
infoVo.setSalarySingleTax(singleSalaryTax);
infoVo.setSumTax(BigDecimalUtils.safeAdd(singleAnualTax,singleSalaryTax));
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("全年一次性奖金测算").build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment