Blame view

fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalIndicatorBizService.java 17.8 KB
df2e90b8   姜超   feature(indicator...
1
2
  package cn.fw.morax.service.biz.eval;
  
df2e90b8   姜超   feature(indicator...
3
4
5
6
7
  import cn.fw.common.data.mybatis.pagination.PageData;
  import cn.fw.common.exception.BusinessException;
  import cn.fw.common.page.AppPage;
  import cn.fw.common.web.annotation.DisLock;
  import cn.fw.common.web.auth.LoginAuthBean;
0a90b3d7   姜超   feature(*): 考评组审批修改
8
  import cn.fw.ehr.sdk.api.result.PostRoleVo;
df2e90b8   姜超   feature(indicator...
9
  import cn.fw.morax.common.config.FlowVal;
c029d47e   姜超   feature(*): 考评导入修改
10
  import cn.fw.morax.common.utils.MessageFormatUtil;
df2e90b8   姜超   feature(indicator...
11
  import cn.fw.morax.common.utils.PublicUtil;
a3d13c97   姜超   feature(*): 考评组保存
12
  import cn.fw.morax.domain.db.eval.*;
c029d47e   姜超   feature(*): 考评导入修改
13
  import cn.fw.morax.domain.db.kpi.Indicators;
df2e90b8   姜超   feature(indicator...
14
  import cn.fw.morax.domain.dto.EvalIndicatorDTO;
74153fda   姜超   feature(*): 修改门店指标展示
15
  import cn.fw.morax.domain.dto.query.EvalIndicatorImportQueryDTO;
df2e90b8   姜超   feature(indicator...
16
  import cn.fw.morax.domain.dto.query.EvalIndicatorQueryDTO;
0a90b3d7   姜超   feature(*): 考评组审批修改
17
18
  import cn.fw.morax.domain.dto.query.IndicatorPostQueryDTO;
  import cn.fw.morax.domain.enums.ApplicableTypeEnum;
c029d47e   姜超   feature(*): 考评导入修改
19
  import cn.fw.morax.domain.enums.DataScopeTypeEnum;
0a90b3d7   姜超   feature(*): 考评组审批修改
20
21
  import cn.fw.morax.domain.enums.IndicatorCodeTypeEnum;
  import cn.fw.morax.domain.vo.eval.CompositeIndicatorVO;
df2e90b8   姜超   feature(indicator...
22
  import cn.fw.morax.domain.vo.eval.EvalIndicatorVO;
0a90b3d7   姜超   feature(*): 考评组审批修改
23
  import cn.fw.morax.domain.vo.kpi.IndicatorsVO;
df2e90b8   姜超   feature(indicator...
24
  import cn.fw.morax.rpc.approval.FlowApproveRpc;
0a90b3d7   姜超   feature(*): 考评组审批修改
25
26
27
  import cn.fw.morax.rpc.ehr.EhrRpcService;
  import cn.fw.morax.rpc.ehr.dto.PostInfoDTO;
  import cn.fw.morax.service.biz.CommonService;
df2e90b8   姜超   feature(indicator...
28
29
  import cn.fw.morax.service.biz.kpi.KpiGroupUserBizService;
  import cn.fw.morax.service.data.ApprovalRecordService;
028bb253   姜超   feature(*): 考评组相关文件
30
  import cn.fw.morax.service.data.eval.*;
0a90b3d7   姜超   feature(*): 考评组审批修改
31
  import cn.fw.morax.service.data.kpi.IndicatorsService;
df2e90b8   姜超   feature(indicator...
32
  import com.baomidou.mybatisplus.core.toolkit.Wrappers;
0a90b3d7   姜超   feature(*): 考评组审批修改
33
  import com.google.common.collect.Lists;
df2e90b8   姜超   feature(indicator...
34
35
36
37
38
39
40
  import lombok.Getter;
  import lombok.RequiredArgsConstructor;
  import lombok.extern.slf4j.Slf4j;
  import org.springframework.beans.factory.annotation.Value;
  import org.springframework.stereotype.Service;
  import org.springframework.transaction.annotation.Transactional;
  
df2e90b8   姜超   feature(indicator...
41
  import java.util.*;
0a90b3d7   姜超   feature(*): 考评组审批修改
42
  import java.util.stream.Collectors;
df2e90b8   姜超   feature(indicator...
43
44
45
46
47
48
49
50
51
  
  import static cn.fw.common.businessvalidator.Validator.BV;
  
  @Service
  @Slf4j
  @RequiredArgsConstructor
  public class EvalIndicatorBizService {
  
      private final EvalIndicatorService evalIndicatorService;
2188d9d0   姜超   feature(*): 修改代码格式
52
      private final IndicatorsService indicatorsService;
0a90b3d7   姜超   feature(*): 考评组审批修改
53
      private final CommonService commonService;
0a90b3d7   姜超   feature(*): 考评组审批修改
54
      private final EhrRpcService ehrRpcService;
df2e90b8   姜超   feature(indicator...
55
56
57
58
59
60
61
  
      @Value("${spring.cache.custom.global-prefix}:eval:indicator:save:")
      @Getter
      private String savePrefix;
      @Value("${spring.cache.custom.global-prefix}:eval:indicator:enable:")
      @Getter
      private String enablePrefix;
028bb253   姜超   feature(*): 考评组相关文件
62
63
64
      @Value("${spring.cache.custom.global-prefix}:eval:group:save:")
      @Getter
      private String saveGroupPrefix;
df2e90b8   姜超   feature(indicator...
65
66
67
  
      /**
       * 分页查询
d7af1907   姜超   feature(*): 考评草稿
68
       *
df2e90b8   姜超   feature(indicator...
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
       * @param dto
       * @return
       */
      public AppPage<EvalIndicatorVO> evalIndicatorPage(EvalIndicatorQueryDTO dto) {
          PageData<EvalIndicator> pageData = evalIndicatorService.page(new PageData<>(dto.getCurrent(), dto.getPageSize()),
                  Wrappers.<EvalIndicator>lambdaQuery()
                          .eq(PublicUtil.isNotEmpty(dto.getSysId()), EvalIndicator::getSysId, dto.getSysId())
                          .eq(PublicUtil.isNotEmpty(dto.getRoleCode()), EvalIndicator::getRoleCode, dto.getRoleCode())
                          .eq(PublicUtil.isNotEmpty(dto.getEnable()), EvalIndicator::getEnable, dto.getEnable())
                          .and(PublicUtil.isNotEmpty(dto.getKeyword()), w ->
                                  w.like(EvalIndicator::getCode, dto.getKeyword()).or().like(EvalIndicator::getName, dto.getKeyword())
                          )
                          .eq(EvalIndicator::getYn, Boolean.TRUE)
          );
          return PublicUtil.toPage(pageData, evalIndicator -> {
              EvalIndicatorVO evalIndicatorVO = PublicUtil.copy(evalIndicator, EvalIndicatorVO.class);
              return evalIndicatorVO;
          });
      }
  
      /**
       * 考评指标详情
       *
       * @param id
       * @return
       */
      public EvalIndicatorVO evalIndicatorDetail(Long id) {
          EvalIndicator evalIndicator = evalIndicatorService.getById(id);
          return PublicUtil.copy(evalIndicator, EvalIndicatorVO.class);
      }
  
      /**
       * 启用禁用指标
       *
       * @param indicatorId
       * @param enable
       */
      @Transactional(rollbackFor = Exception.class)
      @DisLock(prefix = "#this.getEnablePrefix()", key = "#indicatorId", message = "修改中,请勿重复操作")
      public void enableIndicator(Long indicatorId, Boolean enable) {
          EvalIndicator evalIndicator = evalIndicatorService.getById(indicatorId);
          BV.notNull(evalIndicator, "指标不存在,请重试");
d7af1907   姜超   feature(*): 考评草稿
111
          BV.isFalse(enable.equals(evalIndicator.getEnable()), "指标已经是" + ((enable) ? "启用" : "禁用") + "状态,请重试");
df2e90b8   姜超   feature(indicator...
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
          //禁用情况:正在使用的指标不能禁用,并提示哪些地方在用
  //        if (! enable) {
  //            List<KpiGroup> kpiGroups = evalIndicatorService.getEvalGroupByIndicatorId(indicatorId);
  //            Set<String> postNames = kpiGroups.stream().map(KpiGroup::getPostName).collect(Collectors.toSet());
  //            if (PublicUtil.isNotEmpty(postNames)) {
  //                throw new BusinessException(String.join(",", postNames) + "岗位正在使用此绩效指标,不能禁用");
  //            }
  //        }
          evalIndicatorService.update(Wrappers.<EvalIndicator>lambdaUpdate()
                  .set(EvalIndicator::getEnable, enable)
                  .set(EvalIndicator::getUpdateTime, new Date())
                  .eq(EvalIndicator::getId, indicatorId)
          );
      }
  
      /**
       * 保存
       *
       * @param dto
       * @param user
       * @return
       */
      @Transactional(rollbackFor = Exception.class)
ac84063e   姜超   feature(*): 考评人员
135
      @DisLock(prefix = "#this.getSavePrefix()", key = "#dto.getName()", message = "保存中,请勿重复操作")
df2e90b8   姜超   feature(indicator...
136
      public void saveEvalIndicator(EvalIndicatorDTO dto, LoginAuthBean user) {
95baa938   姜超   feature(domain): ...
137
          checkDto(dto);
df2e90b8   姜超   feature(indicator...
138
          checkIndicatorName(dto.getId(), dto.getName());
c25b7c15   姜超   feature(*): 考评指标保存修改
139
          EvalIndicator evalIndicator = this.convertToDB(dto);
df2e90b8   姜超   feature(indicator...
140
141
142
143
144
145
146
147
148
149
  
          if (PublicUtil.isEmpty(dto.getId())) {
              String indicatorCode = PublicUtil.getUUID();
              this.checkIndicatorCode(indicatorCode);
              evalIndicator.setCode(indicatorCode);
          } else {
              EvalIndicator originEvalIndicator = evalIndicatorService.getById(dto.getId());
              BV.notNull(evalIndicator, "指标不存在,请重试");
              evalIndicator.setCode(originEvalIndicator.getCode());
              evalIndicator.setId(originEvalIndicator.getId());
e3e8a6ac   姜超   feature(*): 考评详情
150
              evalIndicator.setEnable(originEvalIndicator.getEnable());
df2e90b8   姜超   feature(indicator...
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
          }
          evalIndicatorService.saveOrUpdate(evalIndicator);
  
      }
  
      /**
       * 检查指标编码
       *
       * @param code
       */
      private void checkIndicatorCode(String code) {
          long taskCount = evalIndicatorService.count(Wrappers.<EvalIndicator>lambdaQuery()
                  .eq(EvalIndicator::getCode, code)
          );
          if (taskCount > 0) {
              log.error("指标编码生成重复:{}", code);
              throw new BusinessException("指标编码已存在,请重试");
          }
      }
  
      /**
       * 检查指标名称
       *
       * @param indicatorName
       */
      private void checkIndicatorName(Long id, String indicatorName) {
          long taskCount = evalIndicatorService.count(Wrappers.<EvalIndicator>lambdaQuery()
                  .eq(EvalIndicator::getName, indicatorName)
                  .eq(EvalIndicator::getYn, Boolean.TRUE)
                  .ne(PublicUtil.isNotEmpty(id), EvalIndicator::getId, id)
          );
          BV.isFalse(taskCount > 0, "指标名称已存在,请重新输入");
      }
  
95baa938   姜超   feature(domain): ...
185
186
      /**
       * 检查指标参数
4138a206   姜超   feature(*): 考评组保存修改
187
188
189
190
       * 1. 滚动天数		滚动天数,开始日期
       * 2. 按星期		    频率值
       * 3. 按月指定日期	频率值
       * 4. 按滚动月		滚动月数、滚动天数、开始日期、按滚动月计算顺序
95baa938   姜超   feature(domain): ...
191
192
193
194
195
196
197
198
       *
       * @param dto
       */
      private void checkDto(EvalIndicatorDTO dto) {
  
          Boolean paramError;
          switch (dto.getRuleType()) {
              case DAY:
c25b7c15   姜超   feature(*): 考评指标保存修改
199
                  //rule_values(滚动天数),start_time(开始日期)
95baa938   姜超   feature(domain): ...
200
201
202
203
204
                  if (PublicUtil.isEmpty(dto.getStartTime()) || PublicUtil.isEmpty(dto.getRollValue())) {
                      throw new BusinessException("开始日期、滚动值不能为空");
                  }
                  break;
              case WEEK_DAY:
4138a206   姜超   feature(*): 考评组保存修改
205
                  //rule_values(频率值)
95baa938   姜超   feature(domain): ...
206
207
208
209
210
211
212
                  if (PublicUtil.isEmpty(dto.getRuleValues())) {
                      throw new BusinessException("指定星期不能为空");
                  }
                  paramError = dto.getRuleValues().stream().filter(value -> (value > 7 || value < 1)).findFirst().isPresent();
                  BV.isFalse(paramError, "指定星期参数异常");
                  break;
              case MONTH_FIX_DAY:
4138a206   姜超   feature(*): 考评组保存修改
213
214
                  //rule_values(频率值)
                  if (PublicUtil.isEmpty(dto.getRuleValues())) {
95baa938   姜超   feature(domain): ...
215
216
                      throw new BusinessException("指定日期不能为空");
                  }
c25b7c15   姜超   feature(*): 考评指标保存修改
217
                  paramError = dto.getRuleValues().stream().filter(value -> (value > 31 || value < 1)).findFirst().isPresent();
95baa938   姜超   feature(domain): ...
218
219
220
                  BV.isFalse(paramError, "按月指定日期参数异常");
                  break;
              case MONTH:
4138a206   姜超   feature(*): 考评组保存修改
221
                  //滚动月数、滚动天数、开始日期、按滚动月计算顺序
c25b7c15   姜超   feature(*): 考评指标保存修改
222
                  //rule_values(滚动月数、滚动开始日),start_time(开始日期),order_type(按滚动月计算顺序)
56739290   姜超   feature(*): 考评组修改
223
                  if (PublicUtil.isEmpty(dto.getOrderType()) || PublicUtil.isEmpty(dto.getRuleValues()) ||
95baa938   姜超   feature(domain): ...
224
225
226
                          PublicUtil.isEmpty(dto.getRollValue()) || PublicUtil.isEmpty(dto.getStartTime())) {
                      throw new BusinessException("开始日期、滚动值不能为空");
                  }
c25b7c15   姜超   feature(*): 考评指标保存修改
227
                  if (dto.getRollValue() > 31 || dto.getRollValue() < 1) {
56739290   姜超   feature(*): 考评组修改
228
                      throw new BusinessException("滚动天不能大于31或小于1");
95baa938   姜超   feature(domain): ...
229
                  }
56739290   姜超   feature(*): 考评组修改
230
231
                  paramError = dto.getRuleValues().stream().filter(value -> (value > 31 || value < 1)).findFirst().isPresent();
                  BV.isFalse(paramError, "滚动月开始日错误");
95baa938   姜超   feature(domain): ...
232
233
                  break;
          }
c25b7c15   姜超   feature(*): 考评指标保存修改
234
      }
95baa938   姜超   feature(domain): ...
235
  
c25b7c15   姜超   feature(*): 考评指标保存修改
236
237
238
      /**
       * 转换为db对象
       *
56739290   姜超   feature(*): 考评组修改
239
240
241
242
243
       * 1. 滚动天数		rollValue(滚动天),startTime(开始日期)
       * 2. 按星期		    ruleValues(星期)
       * 3. 按月指定日期	ruleValues(滚动月数、滚动开始日)
       * 4. 按滚动月		ruleValues(滚动月数),startTime(开始日期),
       * 				    orderType(按滚动月计算顺序), rollValue(滚动天)
c25b7c15   姜超   feature(*): 考评指标保存修改
244
245
246
247
248
       * @return
       */
      public EvalIndicator convertToDB(EvalIndicatorDTO dto){
          EvalIndicator indicators = EvalIndicator.builder()
                  .name(dto.getName())
3a93dfe7   姜超   feature(*): 考评指标修...
249
                  .enable(Boolean.TRUE)
f946d0a5   姜超   feature(*): 考评定时任务
250
                  .ruleType(dto.getRuleType())
c25b7c15   姜超   feature(*): 考评指标保存修改
251
                  .dataType(dto.getDataType())
f946d0a5   姜超   feature(*): 考评定时任务
252
                  .targetType(dto.getTargetType())
3a93dfe7   姜超   feature(*): 考评指标修...
253
254
  //                .sysId(dto.getSysId())
  //                .sysName(dto.getSysName())
c25b7c15   姜超   feature(*): 考评指标保存修改
255
256
257
258
259
260
                  .roleCode(dto.getRoleCode())
                  .roleName(dto.getRoleName())
                  .build();
          if (PublicUtil.isEmpty(dto.getId())) {
              indicators.setId(dto.getId());
          }
c25b7c15   姜超   feature(*): 考评指标保存修改
261
262
263
264
          //频率类型; 1:按滚动天 2:按星期 3:按月指定日期 4:按滚动月
          switch (dto.getRuleType()) {
              case DAY: {
                  indicators.setStartTime(dto.getStartTime());
56739290   姜超   feature(*): 考评组修改
265
266
  //                indicators.setRuleValues(new ArrayList<Integer>(){{add(dto.getRollValue());}});
                  indicators.setRollValue(dto.getRollValue());
c25b7c15   姜超   feature(*): 考评指标保存修改
267
268
269
                  break;
              }
              case WEEK_DAY:
f946d0a5   姜超   feature(*): 考评定时任务
270
              case MONTH_FIX_DAY:
c25b7c15   姜超   feature(*): 考评指标保存修改
271
272
273
274
275
276
277
              {
                  indicators.setRuleValues(dto.getRuleValues());
                  break;
              }
              case MONTH: {
                  indicators.setOrderType(dto.getOrderType());
                  indicators.setStartTime(dto.getStartTime());
56739290   姜超   feature(*): 考评组修改
278
279
280
                  indicators.setRuleValues(dto.getRuleValues());
                  indicators.setRollValue(dto.getRollValue());
  //                indicators.setRuleValues(new ArrayList<Integer>(){{add(dto.getRollValue());}});
c25b7c15   姜超   feature(*): 考评指标保存修改
281
282
283
284
                  break;
              }
          }
          return indicators;
95baa938   姜超   feature(domain): ...
285
      }
c25b7c15   姜超   feature(*): 考评指标保存修改
286
  
0a90b3d7   姜超   feature(*): 考评组审批修改
287
288
289
290
      /**
       * 查询岗位指标
       *
       * @param postId
0a90b3d7   姜超   feature(*): 考评组审批修改
291
292
293
       * @param applicableType
       * @return
       */
c029d47e   姜超   feature(*): 考评导入修改
294
      public List<CompositeIndicatorVO> getPostIndicators(Long postId, ApplicableTypeEnum applicableType) {
0a90b3d7   姜超   feature(*): 考评组审批修改
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
          List<EvalIndicator> evalIndicators = evalIndicatorService.list(Wrappers.<EvalIndicator>lambdaQuery()
                  .eq(EvalIndicator::getYn, Boolean.TRUE)
                  .eq(EvalIndicator::getEnable, Boolean.TRUE)
          );
  
          List<Long> postIds = new ArrayList<Long>(){{add(postId);}};
          List<PostInfoDTO> postInfoDTOS = ehrRpcService.getPostInfoList(postIds);
          List<String> roleCodes = postInfoDTOS.stream()
                  .map(PostInfoDTO::getRoleList)
                  .filter(Objects::nonNull)
                  .flatMap(Collection::stream)
                  .map(PostRoleVo::getRoleCode)
                  .distinct().collect(Collectors.toList());
          Boolean queryManagerRole = commonService.hasManagerRole(roleCodes);
          IndicatorPostQueryDTO dto = new IndicatorPostQueryDTO(roleCodes, queryManagerRole);
          dto.setApplicableType(applicableType);
          List<IndicatorsVO> indicatorsVOS = indicatorsService.getPostIndicators(dto);
  
          List<CompositeIndicatorVO> compositeIndicators = Lists.newArrayListWithCapacity(evalIndicators.size() + indicatorsVOS.size());
  
          for (EvalIndicator evalIndicator : evalIndicators) {
              compositeIndicators.add(convertVO(evalIndicator));
          }
          for (IndicatorsVO indicators : indicatorsVOS) {
              compositeIndicators.add(convertVO(indicators));
          }
          return compositeIndicators;
      }
c029d47e   姜超   feature(*): 考评导入修改
323
324
325
326
327
328
329
330
331
332
333
334
335
  
      /**
       * 查询岗位指标
       *
       * @param applicableType
       * @return
       */
      public List<CompositeIndicatorVO> getShopIndicators(ApplicableTypeEnum applicableType) {
          List<EvalIndicator> evalIndicators = evalIndicatorService.list(Wrappers.<EvalIndicator>lambdaQuery()
                  .eq(EvalIndicator::getYn, Boolean.TRUE)
                  .eq(EvalIndicator::getEnable, Boolean.TRUE)
          );
  
08c31209   姜超   feature(*): 考评详情
336
          List<Indicators> kpiIndicators = indicatorsService.list(Wrappers.<Indicators>lambdaQuery()
c029d47e   姜超   feature(*): 考评导入修改
337
338
339
340
341
342
                  .eq(Indicators::getYn, Boolean.TRUE)
                  .eq(Indicators::getEnable, Boolean.TRUE)
                  .apply(MessageFormatUtil.transferWithQuotationMarks("FIND_IN_SET({0}, apply_types)", applicableType.getValue()))
                  .apply(MessageFormatUtil.transferWithQuotationMarks("FIND_IN_SET({0}, data_scope_types)", DataScopeTypeEnum.SHOP.getValue()))
          );
  
08c31209   姜超   feature(*): 考评详情
343
          List<CompositeIndicatorVO> compositeIndicators = Lists.newArrayListWithCapacity(evalIndicators.size() + kpiIndicators.size());
c029d47e   姜超   feature(*): 考评导入修改
344
345
346
347
  
          for (EvalIndicator evalIndicator : evalIndicators) {
              compositeIndicators.add(convertVO(evalIndicator));
          }
08c31209   姜超   feature(*): 考评详情
348
          for (Indicators indicators : kpiIndicators) {
c029d47e   姜超   feature(*): 考评导入修改
349
350
351
352
353
              IndicatorsVO indicatorsVO = PublicUtil.copy(indicators, IndicatorsVO.class);
              compositeIndicators.add(convertVO(indicatorsVO));
          }
          return compositeIndicators;
      }
0a90b3d7   姜超   feature(*): 考评组审批修改
354
  
0a90b3d7   姜超   feature(*): 考评组审批修改
355
356
357
358
359
360
361
      public CompositeIndicatorVO convertVO(EvalIndicator evalIndicator) {
          CompositeIndicatorVO compositeIndicator = new CompositeIndicatorVO();
          compositeIndicator.setSId(IndicatorCodeTypeEnum.EVAL_INDICATOR.getValue() + "_" + evalIndicator.getId());
          compositeIndicator.setId(evalIndicator.getId());
          compositeIndicator.setCodeType(IndicatorCodeTypeEnum.EVAL_INDICATOR);
          compositeIndicator.setCode(evalIndicator.getCode());
          compositeIndicator.setName(evalIndicator.getName());
3a93dfe7   姜超   feature(*): 考评指标修...
362
363
364
365
366
          if (PublicUtil.isNotEmpty(evalIndicator.getSysId())) {
              compositeIndicator.setSysId(evalIndicator.getSysId());
              compositeIndicator.setSysPrefix(evalIndicator.getSysPrefix());
              compositeIndicator.setSysName(evalIndicator.getSysName());
          }
0a90b3d7   姜超   feature(*): 考评组审批修改
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
          compositeIndicator.setRoleCode(evalIndicator.getRoleCode());
          compositeIndicator.setRoleName(evalIndicator.getRoleName());
          compositeIndicator.setDataType(evalIndicator.getDataType());
          compositeIndicator.setRuleType(evalIndicator.getRuleType());
          compositeIndicator.setRollValue(evalIndicator.getRollValue());
          compositeIndicator.setRuleValues(evalIndicator.getRuleValues());
          compositeIndicator.setOrderType(evalIndicator.getOrderType());
          compositeIndicator.setStartTime(evalIndicator.getStartTime());
          compositeIndicator.setTargetType(evalIndicator.getTargetType());
          compositeIndicator.setEnable(evalIndicator.getEnable());
          return compositeIndicator;
      }
  
      public CompositeIndicatorVO convertVO(IndicatorsVO indicators) {
          CompositeIndicatorVO compositeIndicator = new CompositeIndicatorVO();
          compositeIndicator.setSId(IndicatorCodeTypeEnum.INDICATOR.getValue() + "_" + indicators.getId());
          compositeIndicator.setId(indicators.getId());
          compositeIndicator.setCodeType(IndicatorCodeTypeEnum.INDICATOR);
  
          compositeIndicator.setCode(indicators.getIndicatorCode());
          compositeIndicator.setName(indicators.getIndicatorName());
          compositeIndicator.setSysId(indicators.getSysId());
          compositeIndicator.setSysPrefix(indicators.getSysPrefix());
          compositeIndicator.setSysName(indicators.getSysName());
          compositeIndicator.setDataType(indicators.getDataType());
          compositeIndicator.setTargetType(indicators.getTargetType());
          compositeIndicator.setEnable(indicators.getEnable());
          return compositeIndicator;
      }
  
74153fda   姜超   feature(*): 修改门店指标展示
397
398
399
400
401
402
403
      public List<EvalIndicatorVO> getEvalIndicators() {
          List<EvalIndicator> evalIndicators = evalIndicatorService.list(Wrappers.<EvalIndicator>lambdaQuery()
                  .eq(EvalIndicator::getYn, Boolean.TRUE)
                  .eq(EvalIndicator::getEnable, Boolean.TRUE)
          );
          return PublicUtil.copyList(evalIndicators, EvalIndicatorVO.class);
      }
d7af1907   姜超   feature(*): 考评草稿
404
  }