Commit 0f0adc19 authored by huyuchen's avatar huyuchen

劳务费稿酬生成修改

parent 2a31909c
...@@ -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;
} }
...@@ -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;
/** /**
* 证件类型 * 证件类型
......
...@@ -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;
} }
......
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