205 lines
5.5 KiB
Java
205 lines
5.5 KiB
Java
package com.engine.salary.entity.datacollection.po;
|
||
|
||
import com.engine.hrmelog.annotation.ElogTransform;
|
||
import com.engine.salary.annotation.Auth;
|
||
import cn.hutool.core.util.NumberUtil;
|
||
import com.engine.hrmelog.annotation.ElogTransform;
|
||
import com.engine.salary.annotation.Encrypt;
|
||
import com.engine.salary.annotation.SalaryFormulaVar;
|
||
import lombok.AllArgsConstructor;
|
||
import lombok.Builder;
|
||
import lombok.Data;
|
||
import lombok.NoArgsConstructor;
|
||
|
||
import java.util.Collection;
|
||
import java.util.Date;
|
||
import java.util.List;
|
||
|
||
/**
|
||
* 数据采集-其他免税扣除表
|
||
*/
|
||
@Data
|
||
@Builder
|
||
@NoArgsConstructor
|
||
@AllArgsConstructor
|
||
@ElogTransform( name = "其他免税扣除")
|
||
@Auth(page = "otherDeduction")
|
||
public class OtherDeductionPO {
|
||
|
||
/**
|
||
* 主键
|
||
*/
|
||
@ElogTransform(name = "主键id")
|
||
private Long id;
|
||
|
||
/**
|
||
* 人员信息表的主键id
|
||
*/
|
||
@ElogTransform(name = "人员id")
|
||
private Long employeeId;
|
||
|
||
/**
|
||
* 个税扣缴义务人的主键id
|
||
*/
|
||
@ElogTransform(name = "个税扣缴义务人id")
|
||
private Long taxAgentId;
|
||
|
||
/**
|
||
* 申报月份
|
||
*/
|
||
@ElogTransform(name = "税款所属期")
|
||
private Date declareMonth;
|
||
|
||
/**
|
||
* 免税收入
|
||
*/
|
||
@ElogTransform(name = "免税收入")
|
||
@SalaryFormulaVar(defaultLabel = "免税收入", labelId = 91238, dataType = "number")
|
||
@Encrypt
|
||
private String freeIncome;
|
||
|
||
/**
|
||
* 减免税额
|
||
*/
|
||
@ElogTransform(name = "减免税额")
|
||
@SalaryFormulaVar(defaultLabel = "减免税额", labelId = 102810, dataType = "number")
|
||
@Encrypt
|
||
private String derateDeduction;
|
||
|
||
/**
|
||
* 商业健康保险
|
||
*/
|
||
@ElogTransform(name = "商业健康保险")
|
||
@SalaryFormulaVar(defaultLabel = "商业健康保险", labelId = 91238, dataType = "number")
|
||
@Encrypt
|
||
private String businessHealthyInsurance;
|
||
|
||
/**
|
||
* 税延养老保险
|
||
*/
|
||
@ElogTransform(name = "税延养老保险")
|
||
@SalaryFormulaVar(defaultLabel = "税延养老保险", labelId = 91239, dataType = "number")
|
||
@Encrypt
|
||
private String taxDelayEndowmentInsurance;
|
||
|
||
|
||
/**
|
||
* 其他
|
||
*/
|
||
@ElogTransform(name = "其他")
|
||
@SalaryFormulaVar(defaultLabel = "其他", labelId = 84500, dataType = "number")
|
||
@Encrypt
|
||
private String otherDeduction;
|
||
|
||
/**
|
||
* 准予扣除的捐赠额
|
||
*/
|
||
@ElogTransform(name = "准予扣除的捐赠额")
|
||
@SalaryFormulaVar(defaultLabel = "准予扣除的捐赠额", labelId = 91240, dataType = "number")
|
||
@Encrypt
|
||
private String deductionAllowedDonation;
|
||
|
||
/**
|
||
* 个人养老金
|
||
*/
|
||
@ElogTransform(name = "个人养老金")
|
||
@SalaryFormulaVar(defaultLabel = "个人养老金", labelId = 91240, dataType = "number")
|
||
@Encrypt
|
||
private String privatePension;
|
||
|
||
/**
|
||
* 创建时间
|
||
*/
|
||
@ElogTransform(name = "创建时间")
|
||
private Date createTime;
|
||
|
||
/**
|
||
* 更新时间
|
||
*/
|
||
@ElogTransform(name = "更新时间")
|
||
private Date updateTime;
|
||
|
||
/**
|
||
* 创建人
|
||
*/
|
||
@ElogTransform(name = "创建人id")
|
||
private Long creator;
|
||
|
||
/**
|
||
* 是否已删除。0:未删除、1:已删除
|
||
*/
|
||
private Integer deleteType;
|
||
|
||
/**
|
||
* 租户ID
|
||
*/
|
||
@ElogTransform(name = "租户")
|
||
private String tenantKey;
|
||
|
||
private List<Long> employeeIds;
|
||
private Collection<Long> taxAgentIds;
|
||
private Integer incomeCategory;
|
||
|
||
|
||
private List<FreeIncomePO> freeIncomeList;
|
||
private List<HealthInsurancePO> healthInsuranceList;
|
||
private List<EndowmentInsurancePO> endowmentInsuranceList;
|
||
private List<GrantDonationPO> grantDonationList;
|
||
private List<DerateDeductionPO> derateDeductionList;
|
||
private List<OtherDerateDeductionPO> otherDerateDeductionList;
|
||
private List<PersonalPensionPO> personalPensionList;
|
||
|
||
|
||
public void handleList() {
|
||
freeIncome = freeIncomeList
|
||
.stream()
|
||
.map(FreeIncomePO::getFreeAmount)
|
||
.filter(NumberUtil::isNumber)
|
||
.mapToDouble(Double::valueOf)
|
||
.sum() + "";
|
||
|
||
derateDeduction = derateDeductionList
|
||
.stream()
|
||
.map(DerateDeductionPO::getDerateAmount)
|
||
.filter(NumberUtil::isNumber)
|
||
.mapToDouble(Double::valueOf)
|
||
.sum() + "";
|
||
|
||
taxDelayEndowmentInsurance = endowmentInsuranceList
|
||
.stream()
|
||
.map(EndowmentInsurancePO::getCurrentDeduction)
|
||
.filter(NumberUtil::isNumber)
|
||
.mapToDouble(Double::valueOf)
|
||
.sum() + "";
|
||
|
||
deductionAllowedDonation = grantDonationList
|
||
.stream()
|
||
.map(GrantDonationPO::getActualDeduction)
|
||
.filter(NumberUtil::isNumber)
|
||
.mapToDouble(Double::valueOf)
|
||
.sum() + "";
|
||
|
||
businessHealthyInsurance = healthInsuranceList
|
||
.stream()
|
||
.map(HealthInsurancePO::getCurrentDeduction)
|
||
.filter(NumberUtil::isNumber)
|
||
.mapToDouble(Double::valueOf)
|
||
.sum() + "";
|
||
|
||
otherDeduction = otherDerateDeductionList
|
||
.stream()
|
||
.map(OtherDerateDeductionPO::getOtherDeduction)
|
||
.filter(NumberUtil::isNumber)
|
||
.mapToDouble(Double::valueOf)
|
||
.sum() + "";
|
||
|
||
privatePension = personalPensionList
|
||
.stream()
|
||
.map(PersonalPensionPO::getPayAmount)
|
||
.filter(NumberUtil::isNumber)
|
||
.mapToDouble(Double::valueOf)
|
||
.sum() + "";
|
||
|
||
}
|
||
|
||
} |