EvalGroupIndicatorParam.java
3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package cn.fw.morax.domain.db.eval;
import cn.fw.common.data.entity.BaseAuditableTimeEntity;
import cn.fw.morax.common.constant.Constant;
import cn.fw.morax.common.utils.PublicUtil;
import cn.fw.morax.domain.enums.*;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* <p>
* 考评组指标参数
* </p>
*
* @author jiangchao
* @since 2022-12-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(autoResultMap = true)
public class EvalGroupIndicatorParam extends BaseAuditableTimeEntity<EvalGroupIndicatorParam, Long> {
private static final long serialVersionUID = 1L;
/**
* 考评组配置id
*/
private Long evalGroupId;
/**
* 考评组指标id
*/
private Long evalGroupIndicatorId;
/**
* 条件类型(1.台阶条件,2,提成条件)
*/
private ParamTypeEnum paramType;
/**
* 指标类型(1.指标,2,考评指标)
*/
private IndicatorCodeTypeEnum codeType;
/**
* 数据类型;1:台数 2:百分比 3:金额
*/
private DataTypeEnum dataType;
/**
* 指标编码
*/
private String code;
/**
* 指标库名称
*/
private String name;
/**
* 占比
*/
private BigDecimal proportion;
/**
* 是否封顶
*/
private Boolean cap;
/**
* 目标计算类型;1: 目标值计算 2:最低要求计算
*/
private TargetCalcTypeEnum targetCalcType;
/**
* 绩效目标值类型; 1:无 2:百分比 3:金额 4:台数
*/
private TargetTypeEnum targetType;
/**
* 目标值
*/
private BigDecimal targetValue;
/**
* 目标计算类型;1: 目标值计算 2:最低要求计算 3:阶段目标 4:时间进度
*/
private TargetCalcTypeEnum extraTargetCalcType;
/**
* 绩效目标值类型; 1:无 2:百分比 3:金额 4:台数
*/
private TargetTypeEnum extraTargetType;
/**
* 目标值
*/
private BigDecimal extraTargetValue;
/**
* 逻辑删除
*/
@TableLogic
private Boolean yn;
/**
* 转换为小数
*/
public void dividePercent() {
this.setProportion(this.getProportion().divide(Constant.ONE_HUNDRED, 4, RoundingMode.HALF_UP));
if (PublicUtil.isNotEmpty(this.getTargetValue()) &&
PublicUtil.isNotEmpty(this.getTargetType()) &&
TargetTypeEnum.RATIO.equals(this.getTargetType())) {
this.setTargetValue(this.getTargetValue().divide(Constant.ONE_HUNDRED, 4, RoundingMode.HALF_UP));
}
if (PublicUtil.isNotEmpty(this.getExtraTargetValue()) &&
PublicUtil.isNotEmpty(this.getExtraTargetType()) &&
TargetTypeEnum.RATIO.equals(this.getExtraTargetType())) {
this.setExtraTargetValue(this.getExtraTargetValue().divide(Constant.ONE_HUNDRED, 4, RoundingMode.HALF_UP));
}
}
}