/* * Copyright 2019-2020 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package me.zhengjie.modules.salary.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import me.zhengjie.base.BaseEntity; import javax.persistence.*; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.math.BigDecimal; import java.sql.Timestamp; /** * @author ZLH * @date 2023-08-23 **/ @Entity @Data @Table(name="new_salary") public class NewSalary extends BaseEntity implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "`id`") @ApiModelProperty(value = "ID") private Long id; @Column(name = "`user_id`",nullable = false) @NotNull @ApiModelProperty(value = "员工ID") private Long userId; @Column(name = "`salary_year_month`",nullable = false) @NotBlank @ApiModelProperty(value = "工资年月") private Timestamp salaryYearMonth; @Column(name = "`basic_wage`",nullable = false) @NotNull @ApiModelProperty(value = "基本工资") private BigDecimal basicWage = BigDecimal.ZERO; @Column(name = "`full_days`",nullable = false) @NotNull @ApiModelProperty(value = "全勤小时数") private Double fullDays = 0.0D; @Column(name = "`absence_days`",nullable = false) @NotNull @ApiModelProperty(value = "缺勤小时数") private Double absenceDays = 0.0D; @Column(name = "`actual_basic_wage`",nullable = false) @NotNull @ApiModelProperty(value = "实际基础工资") private BigDecimal actualBasicWage = BigDecimal.ZERO; @Column(name = "`achievements_wage`",nullable = false) @NotNull @ApiModelProperty(value = "绩效工资") private BigDecimal achievementsWage = BigDecimal.ZERO; @Column(name = "`need_completed_achievements_hours`",nullable = false) @NotNull @ApiModelProperty(value = "应完成绩效工时") private Double needCompletedAchievementsHours = 0.0D; @Column(name = "`already_completed_achievements_hours`",nullable = false) @NotNull @ApiModelProperty(value = "已完成绩效工时") private Double alreadyCompletedAchievementsHours = 0.0D; @Column(name = "`actual_achievements_wage`",nullable = false) @NotNull @ApiModelProperty(value = "实际绩效工资") private BigDecimal actualAchievementsWage = BigDecimal.ZERO; @Column(name = "`performance_wage`",nullable = false) @NotNull @ApiModelProperty(value = "业绩工资") private BigDecimal performanceWage = BigDecimal.ZERO; @Column(name = "`need_completed_performance_hours`",nullable = false) @NotNull @ApiModelProperty(value = "应完成业绩工时") private Double needCompletedPerformanceHours = 0.0D; @Column(name = "`already_completed_performance_hours`",nullable = false) @NotNull @ApiModelProperty(value = "已完成业绩工时") private Double alreadyCompletedPerformanceHours = 0.0D; @Column(name = "`actual_performance_wage`",nullable = false) @NotNull @ApiModelProperty(value = "实际业绩工资") private BigDecimal actualPerformanceWage = BigDecimal.ZERO; @Column(name = "`team_wage`",nullable = false) @NotNull @ApiModelProperty(value = "团队工资") private BigDecimal teamWage = BigDecimal.ZERO; @Column(name = "`actual_compliance_team_hours`",nullable = false) @NotNull @ApiModelProperty(value = "实达标团队工时") private Double actualComplianceTeamHours = 0.0D; @Column(name = "`already_completed_team_hours`",nullable = false) @NotNull @ApiModelProperty(value = "已完成团队工时") private Double alreadyCompletedTeamHours = 0.0D; @Column(name = "`actual_team_wage`",nullable = false) @NotNull @ApiModelProperty(value = "实际团队工资") private BigDecimal actualTeamWage = BigDecimal.ZERO; @Column(name = "`piece_rate`",nullable = false) @NotNull @ApiModelProperty(value = "计件工资") private BigDecimal pieceRate = BigDecimal.ZERO; @Column(name = "`travel_allowance`") @ApiModelProperty(value = "出差补助工资") private BigDecimal travelAllowance = BigDecimal.ZERO; @Column(name = "`overtime_allowance`") @ApiModelProperty(value = "加班工资") private BigDecimal overtimeAllowance = BigDecimal.ZERO; @Column(name = "`comptime_allowance`") @ApiModelProperty(value = "调休结算工资") private BigDecimal comptimeAllowance = BigDecimal.ZERO; @Column(name = "`accumulation_fund`",nullable = false) @NotNull @ApiModelProperty(value = "公积金基数") private BigDecimal accumulationFund = BigDecimal.ZERO; @Column(name = "`accumulation_fund_personal`",nullable = false) @NotNull @ApiModelProperty(value = "公积金个人比例") private Double accumulationFundPersonal = 0.0D; @Column(name = "`accumulation_fund_personal_amount`",nullable = false) @NotNull @ApiModelProperty(value = "公积金个人缴纳金额") private BigDecimal accumulationFundPersonalAmount = BigDecimal.ZERO; @Column(name = "`accumulation_fund_company`",nullable = false) @NotNull @ApiModelProperty(value = "公积金公司比例") private Double accumulationFundCompany = 0.0D; @Column(name = "`accumulation_fund_company_amount`",nullable = false) @NotNull @ApiModelProperty(value = "公积金公司缴纳金额") private BigDecimal accumulationFundCompanyAmount = BigDecimal.ZERO; @Column(name = "`retirement_insurance`",nullable = false) @NotNull @ApiModelProperty(value = "养老险基数") private BigDecimal retirementInsurance = BigDecimal.ZERO; @Column(name = "`retirement_insurance_personal`",nullable = false) @NotNull @ApiModelProperty(value = "养老险个人比例") private Double retirementInsurancePersonal = 0.0D; @Column(name = "`retirement_insurance_personal_amount`",nullable = false) @NotNull @ApiModelProperty(value = "养老险个人缴纳金额") private BigDecimal retirementInsurancePersonalAmount = BigDecimal.ZERO; @Column(name = "`retirement_insurance_company`",nullable = false) @NotNull @ApiModelProperty(value = "养老险公司比例") private Double retirementInsuranceCompany = 0.0D; @Column(name = "`retirement_insurance_company_amount`",nullable = false) @NotNull @ApiModelProperty(value = "养老险公司缴纳金额") private BigDecimal retirementInsuranceCompanyAmount = BigDecimal.ZERO; @Column(name = "`medical_insurance`",nullable = false) @NotNull @ApiModelProperty(value = "医疗险基数") private BigDecimal medicalInsurance = BigDecimal.ZERO; @Column(name = "`medical_insurance_personal`",nullable = false) @NotNull @ApiModelProperty(value = "医疗险个人比例") private Double medicalInsurancePersonal = 0.0D; @Column(name = "`medical_insurance_personal_amount`",nullable = false) @NotNull @ApiModelProperty(value = "医疗险个人缴纳金额") private BigDecimal medicalInsurancePersonalAmount = BigDecimal.ZERO; @Column(name = "`medical_insurance_company`",nullable = false) @NotNull @ApiModelProperty(value = "医疗险公司比例") private Double medicalInsuranceCompany = 0.0D; @Column(name = "`medical_insurance_company_amount`",nullable = false) @NotNull @ApiModelProperty(value = "医疗险公司缴纳金额") private BigDecimal medicalInsuranceCompanyAmount = BigDecimal.ZERO; @Column(name = "`unemployment_insurance`",nullable = false) @NotNull @ApiModelProperty(value = "失业险基数") private BigDecimal unemploymentInsurance = BigDecimal.ZERO; @Column(name = "`unemployment_insurance_personal`",nullable = false) @NotNull @ApiModelProperty(value = "失业险个人比例") private Double unemploymentInsurancePersonal = 0.0D; @Column(name = "`unemployment_insurance_personal_amount`",nullable = false) @NotNull @ApiModelProperty(value = "失业险个人缴纳金额") private BigDecimal unemploymentInsurancePersonalAmount = BigDecimal.ZERO; @Column(name = "`unemployment_insurance_company`",nullable = false) @NotNull @ApiModelProperty(value = "失业险公司比例") private Double unemploymentInsuranceCompany = 0.0D; @Column(name = "`unemployment_insurance_company_amount`",nullable = false) @NotNull @ApiModelProperty(value = "失业险公司缴纳金额") private BigDecimal unemploymentInsuranceCompanyAmount = BigDecimal.ZERO; @Column(name = "`birth_insurance`",nullable = false) @NotNull @ApiModelProperty(value = "生育险基数") private BigDecimal birthInsurance = BigDecimal.ZERO; @Column(name = "`birth_insurance_personal`",nullable = false) @NotNull @ApiModelProperty(value = "生育险个人比例") private Double birthInsurancePersonal = 0.0D; @Column(name = "`birth_insurance_personal_amount`",nullable = false) @NotNull @ApiModelProperty(value = "生育险个人缴纳金额") private BigDecimal birthInsurancePersonalAmount = BigDecimal.ZERO; @Column(name = "`birth_insurance_company`",nullable = false) @NotNull @ApiModelProperty(value = "生育险公司比例") private Double birthInsuranceCompany = 0.0D; @Column(name = "`birth_insurance_company_amount`",nullable = false) @NotNull @ApiModelProperty(value = "生育险公司缴纳金额") private BigDecimal birthInsuranceCompanyAmount = BigDecimal.ZERO; @Column(name = "`employment_insurance`",nullable = false) @NotNull @ApiModelProperty(value = "工伤险基数") private BigDecimal employmentInsurance = BigDecimal.ZERO; @Column(name = "`employment_insurance_personal`",nullable = false) @NotNull @ApiModelProperty(value = "工伤险个人比例") private Double employmentInsurancePersonal = 0.0D; @Column(name = "`employment_insurance_personal_amount`",nullable = false) @NotNull @ApiModelProperty(value = "工伤险个人缴纳金额") private BigDecimal employmentInsurancePersonalAmount = BigDecimal.ZERO; @Column(name = "`employment_insurance_company`",nullable = false) @NotNull @ApiModelProperty(value = "工伤险公司比例") private Double employmentInsuranceCompany = 0.0D; @Column(name = "`employment_insurance_company_amount`",nullable = false) @NotNull @ApiModelProperty(value = "工伤险公司缴纳金额") private BigDecimal employmentInsuranceCompanyAmount = BigDecimal.ZERO; @Column(name = "`pre_tax_amount`",nullable = false) @NotNull @ApiModelProperty(value = "税前金额") private BigDecimal preTaxAmount = BigDecimal.ZERO; @Column(name = "`individual_income_tax`",nullable = false) @NotNull @ApiModelProperty(value = "个人所得税") private BigDecimal individualIncomeTax = BigDecimal.ZERO; @Column(name = "`after_tax_amount`",nullable = false) @NotNull @ApiModelProperty(value = "税后金额") private BigDecimal afterTaxAmount = BigDecimal.ZERO; @Column(name = "`remarks`") @ApiModelProperty(value = "备注") private String remarks; @Column(name = "`publicity_status`",nullable = false) @NotNull @ApiModelProperty(value = "公示状态") private String publicityStatus; @Column(name = "`approve_status`",nullable = false) @NotNull @ApiModelProperty(value = "承认状态") private String approveStatus; @Column(name = "`calc_formula`") @ApiModelProperty(value = "计算公式(JSON)") private String calcFormula; public void copy(NewSalary source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } }