工资比例计算

This commit is contained in:
xiezhijun
2021-03-15 18:01:59 +08:00
parent 2e11a4a0ee
commit 0f03406d4c
10 changed files with 757 additions and 0 deletions

View File

@ -0,0 +1,101 @@
package com.stdiet.custom.domain;
import java.math.BigDecimal;
import com.stdiet.common.annotation.Excel;
import com.stdiet.common.core.domain.BaseEntity;
import lombok.Data;
/**
* 工资比例配置对象 sys_salary_compose_config
*
* @author xiezhijun
* @date 2021-03-13
*/
@Data
public class SysSalaryComposeConfig extends BaseEntity
{
private static final long serialVersionUID = 1L;
//继续教育补贴界限,超过该值才有继续教育补贴
public static final Double educationAllowanceLimit = 15000.00;
//工资低于该值时,基本薪资+岗位津贴+绩效等于{baseSalarySum}
public static final Double baseSalarySumLimit = 6000.00;
//工资低于{baseSalarySumLimit}时,基本薪资+岗位津贴+绩效之和
public static final Double lowerBaseSalarySum = 3000.00;
//工资高于{baseSalarySumLimit}时,基本薪资+岗位津贴+绩效之和
public static final Double higherBaseSalarySum = 5000.00 * 0.99;
/** $column.columnComment */
private Long id;
/** 岗位名称 */
@Excel(name = "岗位名称")
private String salaryPostName;
/** 基本薪资 */
@Excel(name = "基本薪资")
private BigDecimal baseSalary;
/** 岗位津贴比例(非全额比例)百分制与绩效比例加起来为100% */
@Excel(name = "岗位津贴比例(非全额比例)百分制与绩效比例加起来为100%")
private Integer postAllowanceRate;
/** 加班补贴占全额比例,百分制 */
@Excel(name = "加班补贴占全额比例,百分制")
private Integer overtimeAllowanceRate;
/** 绩效补贴比例(非全额比例)百分制与岗位津贴加起来100% */
@Excel(name = "绩效补贴比例(非全额比例)百分制与岗位津贴加起来100%")
private Integer meritsAllowanceRate;
/** 车补贴占全额比例,百分制 */
@Excel(name = "车补贴占全额比例,百分制")
private Integer carAllowanceRate;
/** 餐补占全额比例,百分制 */
@Excel(name = "餐补占全额比例,百分制")
private Integer mealAllowanceRate;
/** 全勤奖 */
@Excel(name = "全勤奖")
private BigDecimal fullAttendanceSalary;
/** 房补贴占全额比例,百分制 */
@Excel(name = "房补贴占全额比例,百分制")
private Integer houseAllowanceRate;
/** 差旅补贴占全额比例,百分制 */
@Excel(name = "差旅补贴占全额比例,百分制")
private Integer travelAllowanceRate;
/** 技能补贴占全额比例,百分制 */
@Excel(name = "技能补贴占全额比例,百分制")
private Integer skillAllowanceRate;
/** 培训补贴占全额比例,百分制 */
@Excel(name = "培训补贴占全额比例,百分制")
private Integer trainAllowanceRate;
/** 部门补贴占全额比例,百分制 */
@Excel(name = "部门补贴占全额比例,百分制")
private Integer departmentAllowanceRate;
/** 继续教育补贴占全额比例,百分制 */
@Excel(name = "继续教育补贴占全额比例,百分制")
private Integer educationAllowanceRate;
/** 删除标识 0未删除 1已删除 */
private Integer delFlag;
/**
* 获取固定比例之和不能超过100%
* @return
*/
public int getBaseRateSum(){
return overtimeAllowanceRate + carAllowanceRate + mealAllowanceRate + houseAllowanceRate + travelAllowanceRate + skillAllowanceRate + trainAllowanceRate
+ departmentAllowanceRate + educationAllowanceRate;
}
}

View File

@ -0,0 +1,104 @@
package com.stdiet.custom.domain;
import com.stdiet.common.annotation.Excel;
import com.stdiet.common.core.domain.BaseEntity;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class SysSalaryRate extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 构造函数初始化全部设为0
*/
public SysSalaryRate(){
this.baseSalary = BigDecimal.valueOf(0.0);
this.postAllowance = BigDecimal.valueOf(0.0);
this.overtimeAllowance = BigDecimal.valueOf(0.0);
this.meritsAllowance = BigDecimal.valueOf(0.0);
this.carAllowance = BigDecimal.valueOf(0.0);
this.mealAllowance = BigDecimal.valueOf(0.0);
this.fullAttendanceSalary = BigDecimal.valueOf(0.0);
this.houseAllowance = BigDecimal.valueOf(0.0);
this.travelAllowance = BigDecimal.valueOf(0.0);
this.skillAllowance = BigDecimal.valueOf(0.0);
this.trainAllowance = BigDecimal.valueOf(0.0);
this.departmentAllowance = BigDecimal.valueOf(0.0);
this.educationAllowance = BigDecimal.valueOf(0.0);
}
/** $column.columnComment */
private Long id;
/** 员工姓名 */
@Excel(name = "姓名")
private String name;
/** 岗位名称ID对应工资岗位字典表的键值 */
private String salaryPostId;
@Excel(name = "岗位")
private String salaryPostName;
/** 基本薪资 */
@Excel(name = "基本薪资")
private BigDecimal baseSalary;
/** 岗位津贴 */
@Excel(name = "岗位津贴")
private BigDecimal postAllowance;
/** 加班补贴 */
@Excel(name = "加班补贴")
private BigDecimal overtimeAllowance;
@Excel(name = "绩效")
private BigDecimal meritsAllowance;
@Excel(name = "车补")
private BigDecimal carAllowance;
/** 餐补*/
@Excel(name = "餐补")
private BigDecimal mealAllowance;
/** 全勤奖 */
@Excel(name = "全勤奖")
private BigDecimal fullAttendanceSalary;
/** 房补 */
@Excel(name = "房补")
private BigDecimal houseAllowance;
/** 差旅费 */
@Excel(name = "差旅费")
private BigDecimal travelAllowance;
/** 技能补贴 */
@Excel(name = "技能补贴")
private BigDecimal skillAllowance;
/** 培训补贴 */
@Excel(name = "培训补贴")
private BigDecimal trainAllowance;
/** 部门补贴 */
@Excel(name = "部门补贴")
private BigDecimal departmentAllowance;
/** 继续教育补贴*/
@Excel(name = "继续教育补贴")
private BigDecimal educationAllowance;
/**
* 获取固定比例的薪资总和
* @return
*/
public BigDecimal getTotalRateSalary(){
return overtimeAllowance.add(carAllowance).add(mealAllowance).add(houseAllowance).add(travelAllowance)
.add(skillAllowance).add(trainAllowance).add(departmentAllowance).add(educationAllowance);
}
}