EvalGroupRewardRankLogVO.java
2.39 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
package cn.fw.morax.domain.vo.eval;
import cn.fw.morax.common.constant.Constant;
import cn.fw.morax.common.utils.PublicUtil;
import cn.fw.morax.domain.enums.DataTypeEnum;
import cn.fw.morax.domain.enums.EvalScopeEnum;
import cn.fw.morax.domain.enums.RankIndicatorTypeEnum;
import cn.fw.morax.domain.enums.TargetTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* <p>
* 奖惩排名日志
* </p>
*
* @author jiangchao
* @since 2022-12-13
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class EvalGroupRewardRankLogVO {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 名称
*/
private String name;
/**
* 员工id
*/
private Long poolId;
/**
* 考评范围; 1:门店考评 2:人员考评
*/
private EvalScopeEnum scopeType;
/**
* 考评奖惩 前置条件 配置id
*/
private Long referId;
/**
* 指标类型 1.奖惩提成 2.前置条件指标
*/
private RankIndicatorTypeEnum targetType;
/**
* 原始值
*/
private BigDecimal value;
/**
* 达成目标
*/
private BigDecimal reachValue;
/**
* 排名
*/
private Integer rank;
/**
* 命中
*/
private Boolean hit;
/**
* 数据日期
*/
private LocalDate dataDate;
/**
* 集团
*/
private Long groupId;
/**
* 转换为百分数展示(条件使用)
*/
public void convertPercentForCond(DataTypeEnum dataType, TargetTypeEnum targetType){
if (DataTypeEnum.RATIO.equals(dataType)) {
this.setValue(this.getValue().multiply(Constant.ONE_HUNDRED));
}
//有目标
if (! TargetTypeEnum.NO.equals(targetType)) {
this.setReachValue(this.getReachValue().multiply(Constant.ONE_HUNDRED));
}
}
/**
* 转换为百分数展示(条件使用)
*/
public void convertPercentForCommission(DataTypeEnum dataType, TargetTypeEnum targetType){
if (DataTypeEnum.RATIO.equals(dataType)) {
this.setValue(this.getValue().multiply(Constant.ONE_HUNDRED));
}
//有目标
if (! TargetTypeEnum.NO.equals(targetType)) {
this.setReachValue(this.getReachValue().multiply(Constant.ONE_HUNDRED));
}
}
}