zxl
3 天以前 3b0516a2959e25576e4f3fda697a3b025d06c8c9
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/CalculateRule.java
@@ -1,110 +1,86 @@
package com.ycl.platform.domain.entity;
import annotation.Excel;
import com.ycl.system.domain.TreeEntity;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import enumeration.converter.RuleDeductCategoryConverter;
import enumeration.general.RuleDeductCategoryEnum;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 核算规则对象 t_calculate_rule
 *
 * 分数核算规则对象 t_default_rule
 *
 * @author ruoyi
 * @date 2024-04-03
 * @date 2024-04-01
 */
public class CalculateRule extends TreeEntity
{
    private static final long serialVersionUID = 1L;
@Data
@ExcelIgnoreUnannotated
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
@TableName("t_calculate_rule")
public class CalculateRule {
    /**  */
    private Long id;
    /**
     * id
     */
    private Integer id;
    /**  */
    @Excel(name = "")
    private String name;
    /**
     * 合同id
     */
    private Integer contractId;
    /**  */
    @Excel(name = "")
    private Long templateId;
    /**
     * 规则名称
     */
    @ExcelProperty("考核内容")
    private String ruleName;
    /** 单位id */
    @Excel(name = "单位id")
    private Long unitId;
    /**
     * 规则条件
     */
    @ExcelProperty("考核要求")
    private String ruleCondition;
    /** 每少1%扣当月总服务费的多少 */
    @Excel(name = "每少1%扣当月总服务费的多少")
    private BigDecimal value;
    /**
     * 违规最小值
     */
    @ExcelProperty("违规最小值")
    private Double min;
    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String description;
    /**
     * 违规最大值
     */
    @ExcelProperty("违规最大值")
    private Double max;
    public void setId(Long id)
    {
        this.id = id;
    }
    /**
     * 扣减方式 扣指定分数/分数乘以数量/除以数量后乘以分数
     */
    @ExcelProperty(value = "扣分方式", converter = RuleDeductCategoryConverter.class)
    private RuleDeductCategoryEnum deductCategory;
    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }
    /**
     * 扣除分数
     */
    @ExcelProperty("扣分数值")
    private Double calcFraction;
    public String getName()
    {
        return name;
    }
    public void setTemplateId(Long templateId)
    {
        this.templateId = templateId;
    }
    /**
     * 当方式为除以时,除以当前字段数量
     */
    @ExcelProperty("除以数量")
    private Integer calcUnit;
    public Long getTemplateId()
    {
        return templateId;
    }
    public void setUnitId(Long unitId)
    {
        this.unitId = unitId;
    }
    private Date createTime;
    private Date updateTime;
    public Long getUnitId()
    {
        return unitId;
    }
    public void setValue(BigDecimal value)
    {
        this.value = value;
    }
    @TableLogic
    private Integer deleted;
    public BigDecimal getValue()
    {
        return value;
    }
    public void setDescription(String description)
    {
        this.description = description;
    }
    public String getDescription()
    {
        return description;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("templateId", getTemplateId())
            .append("parentId", getParentId())
            .append("unitId", getUnitId())
            .append("value", getValue())
            .append("description", getDescription())
            .toString();
    }
}