Blame view

fw-morax-domain/src/main/java/cn/fw/morax/domain/vo/eval/EvalGroupRewardLaddersVO.java 2.06 KB
b1409572   姜超   feature(*): 考评组保存
1
2
3
  package cn.fw.morax.domain.vo.eval;
  
  import cn.fw.common.data.entity.BaseAuditableTimeEntity;
4138a206   姜超   feature(*): 考评组保存修改
4
  import cn.fw.morax.common.constant.Constant;
ae86c608   姜超   feature(*): 新增台阶类型
5
  import cn.fw.morax.common.utils.PublicUtil;
308b252c   姜超   feature(*): 台阶正数负...
6
  import cn.fw.morax.domain.enums.*;
b1409572   姜超   feature(*): 考评组保存
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
  import com.baomidou.mybatisplus.annotation.TableLogic;
  import com.baomidou.mybatisplus.annotation.TableName;
  import lombok.Data;
  import lombok.EqualsAndHashCode;
  
  import java.math.BigDecimal;
  
  /**
   * <p>
   * 考评奖惩阶梯
   * </p>
   *
   * @author jiangchao
   * @since 2022-12-09
   */
  @Data
  @EqualsAndHashCode(callSuper = false)
  public class EvalGroupRewardLaddersVO {
  
      /**
       * id
       */
      private Long id;
      /**
       * 考评组指标条件id
       */
      private Long evalGroupId;
  
      /**
       * 考评组奖励id
       */
      private Long evalGroupRewardId;
  
      /**
       * 阶梯下限;大于等于
       */
      private BigDecimal lower;
  
      /**
       * 阶梯上限;小于; 无上限的情况值为 2<<15
       */
      private BigDecimal upper;
  
      /**
       * 金额
       */
      private BigDecimal money;
  
      /**
       * 封顶金额/
       */
      private BigDecimal capMoney;
bdcc7a51   姜超   feature(*): 查询指标排名
59
60
61
62
      /**
       * 命中
       */
      private Boolean hit;
b1409572   姜超   feature(*): 考评组保存
63
64
  
      /**
308b252c   姜超   feature(*): 台阶正数负...
65
66
67
68
69
       * 排名顺序类型 1:正  2:负
       */
      private RankOrderTypeEnum rankOrderType;
  
      /**
4138a206   姜超   feature(*): 考评组保存修改
70
       * 转换为百分数展示
b1409572   姜超   feature(*): 考评组保存
71
       */
ae86c608   姜超   feature(*): 新增台阶类型
72
      public void processPercent(EvalRewardCalMethodEnum calMethod, RankTypeEnum rankType, DataTypeEnum laddersType){
4138a206   姜超   feature(*): 考评组保存修改
73
74
75
76
          if (EvalRewardCalMethodEnum.RANK.equals(calMethod) && RankTypeEnum.PERCENT.equals(rankType)) {
              this.setUpper(this.getUpper().multiply(Constant.ONE_HUNDRED));
              this.setLower(this.getLower().multiply(Constant.ONE_HUNDRED));
          }
ae86c608   姜超   feature(*): 新增台阶类型
77
78
79
80
81
82
          if (EvalRewardCalMethodEnum.LADDER.equals(calMethod) || EvalRewardCalMethodEnum.LADDER_DOUBLE.equals(calMethod) ) {
              if (PublicUtil.isNotEmpty(laddersType) && DataTypeEnum.RATIO.equals(laddersType)) {
                  this.setUpper(this.getUpper().multiply(Constant.ONE_HUNDRED));
                  this.setLower(this.getLower().multiply(Constant.ONE_HUNDRED));
              }
          }
4138a206   姜超   feature(*): 考评组保存修改
83
      }
b1409572   姜超   feature(*): 考评组保存
84
85
  
  }