e79c21f9
姜超
feature(*): 计算计算修改
|
1
2
|
package cn.fw.morax.service.biz.calculator.eval.kpi;
|
e1778851
姜超
feature(*): 计算考评调整
|
3
|
import cn.fw.morax.common.utils.PublicUtil;
|
e2386ce2
姜超
feature(*): 考评计算得分修改
|
4
|
import cn.fw.morax.domain.bo.eval.EvalGroupUserShop;
|
e79c21f9
姜超
feature(*): 计算计算修改
|
5
6
7
8
9
10
11
|
import cn.fw.morax.domain.db.eval.*;
import cn.fw.morax.domain.db.kpi.*;
import cn.fw.morax.domain.enums.*;
import cn.fw.morax.service.biz.calculator.Calculator;
import cn.fw.morax.service.data.eval.*;
import cn.fw.morax.service.data.kpi.*;
import com.alibaba.fastjson.JSONObject;
|
aaab7f45
姜超
feature(*): 考评指标计算
|
12
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
e79c21f9
姜超
feature(*): 计算计算修改
|
13
14
15
16
17
18
19
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.math.BigDecimal;
import java.math.RoundingMode;
|
e79c21f9
姜超
feature(*): 计算计算修改
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
/**
* 考评基础计算器
*
* @author : kurisu
* @version : 2.0
* @className : BaseCalculator
* @description : 考评基础计算器
* @date : 2022-12-26 14:17
*/
@Slf4j
|
e2386ce2
姜超
feature(*): 考评计算得分修改
|
36
|
public abstract class EvalKpiBaseCalculator implements Calculator<EvalGroupUserShop, EvalGroupIndicator, BigDecimal> {
|
e79c21f9
姜超
feature(*): 计算计算修改
|
37
38
39
40
41
42
|
@Autowired
protected EvalGroupIndicatorHitLogService evalGroupIndicatorHitLogService;
@Autowired
protected IndicatorUserValueService indicatorUserValueService;
@Autowired
|
80e64f6f
姜超
feature(*): 考评排名组...
|
43
44
|
protected IndicatorUserStageValueService indicatorUserStageValueService;
@Autowired
|
aaab7f45
姜超
feature(*): 考评指标计算
|
45
46
|
protected EvalIndicatorValueService evalIndicatorValueService;
@Autowired
|
e79c21f9
姜超
feature(*): 计算计算修改
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
protected EvalGroupIndicatorParamService evalGroupIndicatorParamService;
@Autowired
protected EvalGroupIndicatorPreconditionService evalGroupIndicatorPreconditionService;
@Autowired
protected EvalGroupIndicatorPreconditionHitLogService preconditionHitLogService;
@Autowired
protected EvalGroupIndicatorPreconditionLaddersService preconditionLaddersService;
@Autowired
protected EvalGroupIndicatorTargetHitLogService evalGroupIndicatorTargetHitLogService;
/**
* 获取设置类型
*
* @return
*/
public abstract ScoreWayEnum getCalMethod();
/**
* 通过前置条件计算绩效得分系数
*
|
aaab7f45
姜超
feature(*): 考评指标计算
|
67
|
* @param preconditions
|
e79c21f9
姜超
feature(*): 计算计算修改
|
68
69
|
* @return
*/
|
e2386ce2
姜超
feature(*): 考评计算得分修改
|
70
|
protected BigDecimal calcCoefficient(EvalGroupUserShop obj, List<EvalGroupIndicatorPrecondition> preconditions) {
|
e79c21f9
姜超
feature(*): 计算计算修改
|
71
|
BigDecimal coefficient = BigDecimal.ONE;
|
aaab7f45
姜超
feature(*): 考评指标计算
|
72
|
if (CollectionUtils.isEmpty(preconditions)) {
|
e79c21f9
姜超
feature(*): 计算计算修改
|
73
74
|
return coefficient;
}
|
aaab7f45
姜超
feature(*): 考评指标计算
|
75
76
|
for (int i = 0; i < preconditions.size(); i++) {
EvalGroupIndicatorPrecondition precondition = preconditions.get(i);
|
80e64f6f
姜超
feature(*): 考评排名组...
|
77
|
TargetCalcTypeEnum targetCalcType = precondition.getTargetCalcType();
|
e79c21f9
姜超
feature(*): 计算计算修改
|
78
|
TargetTypeEnum targetType = precondition.getTargetType();
|
e1778851
姜超
feature(*): 计算考评调整
|
79
|
Optional<BigDecimal> valueOptional = queryValue(obj, precondition.getCodeType(), precondition.getCode());
|
aaab7f45
姜超
feature(*): 考评指标计算
|
80
|
if (! valueOptional.isPresent()) {
|
e79c21f9
姜超
feature(*): 计算计算修改
|
81
82
|
return BigDecimal.ZERO;
}
|
e1778851
姜超
feature(*): 计算考评调整
|
83
|
final BigDecimal originValue = valueOptional.get();//queryIndicatorValue(precondition.getCode(), valueOptional.get());
|
e79c21f9
姜超
feature(*): 计算计算修改
|
84
85
86
|
BigDecimal indicatorValue = originValue;
if (!TargetTypeEnum.NO.equals(targetType)) {
BigDecimal targetValue = precondition.getTargetValue();
|
80e64f6f
姜超
feature(*): 考评排名组...
|
87
|
if (TargetCalcTypeEnum.TARGET_VALUE.equals(targetCalcType) || TargetCalcTypeEnum.STAGE_TARGET.equals(targetCalcType)) {
|
e79c21f9
姜超
feature(*): 计算计算修改
|
88
|
indicatorValue = indicatorValue.divide(targetValue, 4, RoundingMode.HALF_UP);
|
80e64f6f
姜超
feature(*): 考评排名组...
|
89
|
} else if (TargetCalcTypeEnum.MINIMUM.equals(targetCalcType)){
|
e79c21f9
姜超
feature(*): 计算计算修改
|
90
91
92
93
|
BigDecimal difference = BigDecimal.ONE.subtract(targetValue);
if (BigDecimal.ZERO.compareTo(difference) == 0) {
difference = BigDecimal.ONE;
}
|
7e8fb0fe
姜超
feature(*): 考评计算修改
|
94
95
96
97
98
99
|
BigDecimal userDiffValue = indicatorValue.subtract(targetValue);
if (userDiffValue.compareTo(BigDecimal.ZERO) <= 0) {
indicatorValue = BigDecimal.ZERO;
} else {
indicatorValue = userDiffValue.divide(difference, 4, RoundingMode.HALF_UP);
}
|
e79c21f9
姜超
feature(*): 计算计算修改
|
100
101
102
103
104
105
106
107
108
|
}
saveTargetHitLog(obj, precondition.getId(), IndicatorTypeEnum.PRE, originValue, indicatorValue);
}
coefficient = coefficient(obj, precondition.getId(), indicatorValue);
}
return coefficient;
}
|
e2386ce2
姜超
feature(*): 考评计算得分修改
|
109
|
protected BigDecimal coefficient(EvalGroupUserShop obj, Long preconditionId, BigDecimal value) {
|
e79c21f9
姜超
feature(*): 计算计算修改
|
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
EvalGroupIndicatorPreconditionLadders ladder = preconditionLaddersService.getOne(Wrappers.<EvalGroupIndicatorPreconditionLadders>lambdaQuery()
.eq(EvalGroupIndicatorPreconditionLadders::getPreconditionId, preconditionId)
.gt(EvalGroupIndicatorPreconditionLadders::getUpper, value)
.le(EvalGroupIndicatorPreconditionLadders::getLower, value)
.eq(EvalGroupIndicatorPreconditionLadders::getYn, Boolean.TRUE),
Boolean.FALSE
);
if (Objects.isNull(ladder)) {
savePreconditionHitLog(obj, preconditionId, hitLog -> {
hitLog.setPreconditionLaddersId(-1L);
hitLog.setValue(value);
});
return BigDecimal.ZERO;
}
savePreconditionHitLog(obj, preconditionId, hitLog -> {
hitLog.setPreconditionLaddersId(ladder.getId());
hitLog.setValue(value);
});
return ladder.getScorePercent();
}
/**
* 计算最终的指标值
*
* @param params
|
7e8fb0fe
姜超
feature(*): 考评计算修改
|
136
|
* @param userShop
|
e79c21f9
姜超
feature(*): 计算计算修改
|
137
138
139
|
* @param evalGroupIndicatorId
* @return
*/
|
e2386ce2
姜超
feature(*): 考评计算得分修改
|
140
|
protected BigDecimal calculateFinalIndValue(List<EvalGroupIndicatorParam> params, EvalGroupUserShop userShop, Long evalGroupIndicatorId) {
|
e79c21f9
姜超
feature(*): 计算计算修改
|
141
142
143
144
145
146
|
BigDecimal rate = BigDecimal.ZERO;
if (CollectionUtils.isEmpty(params)) {
log.info("指标[{}]配置不存在", evalGroupIndicatorId);
return rate;
}
for (EvalGroupIndicatorParam param : params) {
|
e1778851
姜超
feature(*): 计算考评调整
|
147
|
Optional<BigDecimal> valueOptional = queryValue(userShop, param.getCodeType(), param.getCode());
|
aaab7f45
姜超
feature(*): 考评指标计算
|
148
|
if (! valueOptional.isPresent()) {
|
7e7c92a1
姜超
feature(*): 考评排名组...
|
149
|
log.info("[{}] [{}]指标[{}]值不存在", userShop.getScopeType().getName(), userShop.getReferId(), param.getCode());
|
e79c21f9
姜超
feature(*): 计算计算修改
|
150
151
152
|
continue;
}
TargetTypeEnum targetType = param.getTargetType();
|
7e7c92a1
姜超
feature(*): 考评排名组...
|
153
|
TargetTypeEnum extraTargetType = param.getExtraTargetType();
|
e1778851
姜超
feature(*): 计算考评调整
|
154
|
final BigDecimal originValue = valueOptional.get();
|
29de1560
姜超
feature(*): 考评排名组...
|
155
156
|
BigDecimal indicatorValue = null;
BigDecimal extraIndicatorValue = null;
|
e79c21f9
姜超
feature(*): 计算计算修改
|
157
|
if (!TargetTypeEnum.NO.equals(targetType)) {
|
29de1560
姜超
feature(*): 考评排名组...
|
158
159
160
161
|
indicatorValue = calcTarget(param.getTargetCalcType(), originValue, param.getTargetValue());
}
if (PublicUtil.isNotEmpty(extraTargetType) && (!TargetTypeEnum.NO.equals(extraTargetType))) {
extraIndicatorValue = calcTarget(param.getExtraTargetCalcType(), originValue, param.getExtraTargetValue());
|
08df0045
姜超
feature(*): 考评排名组...
|
162
|
//额外计算类型值 原始计算类型值 用大的那个值
|
29de1560
姜超
feature(*): 考评排名组...
|
163
164
|
if (PublicUtil.isEmpty(indicatorValue) || (extraIndicatorValue.compareTo(indicatorValue) > 0)) {
indicatorValue = extraIndicatorValue;
|
e79c21f9
姜超
feature(*): 计算计算修改
|
165
|
}
|
e79c21f9
姜超
feature(*): 计算计算修改
|
166
|
}
|
29de1560
姜超
feature(*): 考评排名组...
|
167
168
169
|
saveTargetHitLog(userShop, param.getId(), IndicatorTypeEnum.EXAMINE, originValue, indicatorValue);
|
e79c21f9
姜超
feature(*): 计算计算修改
|
170
171
172
173
174
175
176
177
178
179
180
|
boolean isCap = Boolean.TRUE.equals(param.getCap());
BigDecimal proportion = param.getProportion();
if (isCap) {
indicatorValue = BigDecimal.ONE.compareTo(indicatorValue) > 0 ? indicatorValue : BigDecimal.ONE;
}
rate = rate.add(proportion.multiply(indicatorValue));
}
return rate;
}
/**
|
7e7c92a1
姜超
feature(*): 考评排名组...
|
181
182
183
|
* 计算目标
*/
public BigDecimal calcTarget(TargetCalcTypeEnum targetCalcType, BigDecimal indicatorValue, BigDecimal targetValue) {
|
bc484bc4
姜超
feature(*): 定时任务发送修改
|
184
185
186
|
if (PublicUtil.isEmpty(targetValue) || BigDecimal.ZERO.compareTo(targetValue) == 0) {
return BigDecimal.ZERO;
}
|
7e7c92a1
姜超
feature(*): 考评排名组...
|
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
if (TargetCalcTypeEnum.MINIMUM.equals(targetCalcType)) {
BigDecimal difference = BigDecimal.ONE.subtract(targetValue);
if (BigDecimal.ZERO.compareTo(difference) == 0) {
difference = BigDecimal.ONE;
}
BigDecimal userDiffValue = indicatorValue.subtract(targetValue);
if (userDiffValue.compareTo(BigDecimal.ZERO) <= 0) {
return BigDecimal.ZERO;
} else {
return userDiffValue.divide(difference, 4, RoundingMode.HALF_UP);
}
}
return indicatorValue.divide(targetValue, 4, RoundingMode.HALF_UP);
}
/**
|
e79c21f9
姜超
feature(*): 计算计算修改
|
204
205
|
* 查询指标值
*
|
e79c21f9
姜超
feature(*): 计算计算修改
|
206
207
|
* @return
*/
|
e1778851
姜超
feature(*): 计算考评调整
|
208
|
protected Optional<BigDecimal> queryValue(EvalGroupUserShop obj, IndicatorCodeTypeEnum codeType, String indicatorCode) {
|
aaab7f45
姜超
feature(*): 考评指标计算
|
209
210
|
DimensionTypeEnum dimensionType = EvalScopeEnum.STAFF.equals(obj.getScopeType()) ? DimensionTypeEnum.STAFF : DimensionTypeEnum.SHOP;
if (IndicatorCodeTypeEnum.INDICATOR.equals(codeType)) {
|
80e64f6f
姜超
feature(*): 考评排名组...
|
211
212
213
214
215
216
217
|
LambdaQueryWrapper<IndicatorUserStageValue> queryWrapper = Wrappers.<IndicatorUserStageValue>lambdaQuery()
.eq(IndicatorUserStageValue::getIndicatorCode, indicatorCode)
.eq(IndicatorUserStageValue::getBeginDate, obj.getBeginDate())
.eq(IndicatorUserStageValue::getEndDate, obj.getDataDate())
.eq(IndicatorUserStageValue::getDimensionType, dimensionType)
.eq(IndicatorUserStageValue::getYn, Boolean.TRUE)
.eq(IndicatorUserStageValue::getGroupId, obj.getGroupId());
|
aaab7f45
姜超
feature(*): 考评指标计算
|
218
|
if (EvalScopeEnum.STAFF.equals(obj.getScopeType())) {
|
80e64f6f
姜超
feature(*): 考评排名组...
|
219
|
queryWrapper.eq(IndicatorUserStageValue::getUserId, obj.getReferId());
|
aaab7f45
姜超
feature(*): 考评指标计算
|
220
|
} else {
|
80e64f6f
姜超
feature(*): 考评排名组...
|
221
|
queryWrapper.eq(IndicatorUserStageValue::getShopId, obj.getReferId());
|
aaab7f45
姜超
feature(*): 考评指标计算
|
222
|
}
|
80e64f6f
姜超
feature(*): 考评排名组...
|
223
224
|
IndicatorUserStageValue indicatorUserStageValue = indicatorUserStageValueService.getOne(queryWrapper, Boolean.FALSE);
return queryKpiIndicatorValue(indicatorUserStageValue);
|
aaab7f45
姜超
feature(*): 考评指标计算
|
225
226
|
}
|
c06a04fb
姜超
feature(*): 考评指标详情
|
227
|
EvalIndicatorValue evalIndicatorValue = evalIndicatorValueService.queryLastValue(obj.getReferId(),
|
f692be3a
姜超
feature(*): 查询修改
|
228
|
dimensionType, indicatorCode, obj.getDataDate());
|
aaab7f45
姜超
feature(*): 考评指标计算
|
229
|
return Optional.ofNullable(evalIndicatorValue).map(EvalIndicatorValue::getIndicatorValue);
|
e79c21f9
姜超
feature(*): 计算计算修改
|
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
}
/**
* 查询前置条件
*
* @param evalGroupIndicatorId
* @return
*/
protected List<EvalGroupIndicatorPrecondition> queryPrecondition(Long evalGroupIndicatorId) {
List<EvalGroupIndicatorPrecondition> preList = evalGroupIndicatorPreconditionService.list(Wrappers.<EvalGroupIndicatorPrecondition>lambdaQuery()
.eq(EvalGroupIndicatorPrecondition::getEvalGroupIndicatorId, evalGroupIndicatorId)
.eq(EvalGroupIndicatorPrecondition::getYn, Boolean.TRUE)
.orderByAsc(EvalGroupIndicatorPrecondition::getSort)
);
return Optional.ofNullable(preList).orElse(new ArrayList<>());
}
/**
* 查询指标配置
*
* @param evalGroupIndicatorId
* @return
*/
protected List<EvalGroupIndicatorParam> queryParam(Long evalGroupIndicatorId) {
List<EvalGroupIndicatorParam> list = evalGroupIndicatorParamService.list(Wrappers.<EvalGroupIndicatorParam>lambdaQuery()
.eq(EvalGroupIndicatorParam::getEvalGroupIndicatorId, evalGroupIndicatorId)
.eq(EvalGroupIndicatorParam::getYn, Boolean.TRUE)
);
return Optional.ofNullable(list).orElse(new ArrayList<>());
}
/**
|
e79c21f9
姜超
feature(*): 计算计算修改
|
262
263
|
* 查询具体指标值
*
|
80e64f6f
姜超
feature(*): 考评排名组...
|
264
|
* @param indicatorUserStageValue
|
e1778851
姜超
feature(*): 计算考评调整
|
265
266
|
* @return
*/
|
80e64f6f
姜超
feature(*): 考评排名组...
|
267
268
|
protected Optional<BigDecimal> queryKpiIndicatorValue(IndicatorUserStageValue indicatorUserStageValue) {
if (PublicUtil.isEmpty(indicatorUserStageValue) || PublicUtil.isEmpty(indicatorUserStageValue.getIndicatorValue())) {
|
e1778851
姜超
feature(*): 计算考评调整
|
269
270
271
272
|
return Optional.empty();
}
BigDecimal value = BigDecimal.ZERO;
try {
|
80e64f6f
姜超
feature(*): 考评排名组...
|
273
274
|
JSONObject jsonObject = JSONObject.parseObject(indicatorUserStageValue.getIndicatorValue());
value = Optional.ofNullable(jsonObject.getBigDecimal(indicatorUserStageValue.getIndicatorCode())).orElse(BigDecimal.ZERO);
|
e1778851
姜超
feature(*): 计算考评调整
|
275
|
} catch (Exception e) {
|
80e64f6f
姜超
feature(*): 考评排名组...
|
276
|
log.error("[{}]指标值转化失败", indicatorUserStageValue, e);
|
e1778851
姜超
feature(*): 计算考评调整
|
277
278
279
280
281
282
283
|
}
return Optional.of(value);
}
/**
* 查询具体指标值
*
|
e79c21f9
姜超
feature(*): 计算计算修改
|
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
|
* @param indicatorCode
* @param originalValue
* @return
*/
protected BigDecimal queryIndicatorValue(String indicatorCode, String originalValue) {
BigDecimal value = BigDecimal.ZERO;
try {
JSONObject jsonObject = JSONObject.parseObject(originalValue);
value = Optional.ofNullable(jsonObject.getBigDecimal(indicatorCode)).orElse(BigDecimal.ZERO);
} catch (Exception e) {
log.error("[{}]指标值转化失败", indicatorCode, e);
}
return value;
}
|
08c31209
姜超
feature(*): 考评详情
|
299
300
301
|
protected void savePreconditionHitLog(EvalGroupUserShop userShop, Long preconditionId, Consumer<EvalGroupIndicatorPreconditionHitLog> consumer) {
Long poolId = userShop.getPoolId();
EvalScopeEnum evalScope = userShop.getScopeType();
|
e79c21f9
姜超
feature(*): 计算计算修改
|
302
303
|
preconditionHitLogService.remove(Wrappers.<EvalGroupIndicatorPreconditionHitLog>lambdaQuery()
|
08c31209
姜超
feature(*): 考评详情
|
304
|
.eq(EvalGroupIndicatorPreconditionHitLog::getPoolId, poolId)
|
e79c21f9
姜超
feature(*): 计算计算修改
|
305
|
.eq(EvalGroupIndicatorPreconditionHitLog::getPreconditionId, preconditionId)
|
08c31209
姜超
feature(*): 考评详情
|
306
307
|
.eq(EvalGroupIndicatorPreconditionHitLog::getDataDate, userShop.getDataDate())
.eq(EvalGroupIndicatorPreconditionHitLog::getGroupId, userShop.getGroupId())
|
e79c21f9
姜超
feature(*): 计算计算修改
|
308
309
310
|
);
EvalGroupIndicatorPreconditionHitLog hitLog = new EvalGroupIndicatorPreconditionHitLog();
hitLog.setPreconditionId(preconditionId);
|
08c31209
姜超
feature(*): 考评详情
|
311
|
hitLog.setPoolId(poolId);
|
e79c21f9
姜超
feature(*): 计算计算修改
|
312
|
hitLog.setScopeType(evalScope);
|
08c31209
姜超
feature(*): 考评详情
|
313
314
|
hitLog.setDataDate(userShop.getDataDate());
hitLog.setGroupId(userShop.getGroupId());
|
e79c21f9
姜超
feature(*): 计算计算修改
|
315
316
317
318
319
320
|
if (consumer != null) {
consumer.accept(hitLog);
}
preconditionHitLogService.save(hitLog);
}
|
08c31209
姜超
feature(*): 考评详情
|
321
|
protected void saveTargetHitLog(EvalGroupUserShop userShop, Long referId, IndicatorTypeEnum targetType, BigDecimal value, BigDecimal reachValue) {
|
e79c21f9
姜超
feature(*): 计算计算修改
|
322
|
evalGroupIndicatorTargetHitLogService.remove(Wrappers.<EvalGroupIndicatorTargetHitLog>lambdaQuery()
|
08c31209
姜超
feature(*): 考评详情
|
323
324
|
.eq(EvalGroupIndicatorTargetHitLog::getPoolId, userShop.getPoolId())
.eq(EvalGroupIndicatorTargetHitLog::getScopeType, userShop.getScopeType())
|
e79c21f9
姜超
feature(*): 计算计算修改
|
325
|
.eq(EvalGroupIndicatorTargetHitLog::getTargetType, targetType)
|
08c31209
姜超
feature(*): 考评详情
|
326
327
|
.eq(EvalGroupIndicatorTargetHitLog::getDataDate, userShop.getDataDate())
.eq(EvalGroupIndicatorTargetHitLog::getReferId, referId)
|
e79c21f9
姜超
feature(*): 计算计算修改
|
328
329
|
);
EvalGroupIndicatorTargetHitLog log = new EvalGroupIndicatorTargetHitLog();
|
08c31209
姜超
feature(*): 考评详情
|
330
331
332
|
log.setPoolId(userShop.getPoolId());
log.setScopeType(userShop.getScopeType());
log.setReferId(referId);
|
e79c21f9
姜超
feature(*): 计算计算修改
|
333
334
335
|
log.setTargetType(targetType);
log.setValue(value);
log.setReachValue(reachValue);
|
08c31209
姜超
feature(*): 考评详情
|
336
337
|
log.setDataDate(userShop.getDataDate());
log.setGroupId(userShop.getGroupId());
|
e79c21f9
姜超
feature(*): 计算计算修改
|
338
339
340
341
342
343
344
345
|
log.setYn(Boolean.TRUE);
evalGroupIndicatorTargetHitLogService.save(log);
}
/**
* 储存命中记录
*
* @param evalGroupIndicatorId
|
c06a04fb
姜超
feature(*): 考评指标详情
|
346
|
* @param userShop
|
e79c21f9
姜超
feature(*): 计算计算修改
|
347
|
*/
|
c06a04fb
姜超
feature(*): 考评指标详情
|
348
349
|
protected void saveParamHitLog(Long evalGroupIndicatorId, EvalGroupUserShop userShop,
Consumer<EvalGroupIndicatorHitLog> consumer) {
|
e79c21f9
姜超
feature(*): 计算计算修改
|
350
351
|
EvalGroupIndicatorHitLog hitLog = new EvalGroupIndicatorHitLog();
hitLog.setEvalGroupIndicatorId(evalGroupIndicatorId);
|
08c31209
姜超
feature(*): 考评详情
|
352
|
hitLog.setPoolId(userShop.getPoolId());
|
c06a04fb
姜超
feature(*): 考评指标详情
|
353
354
355
|
hitLog.setScopeType(userShop.getScopeType());
hitLog.setDataDate(userShop.getDataDate());
hitLog.setGroupId(userShop.getGroupId());
|
e79c21f9
姜超
feature(*): 计算计算修改
|
356
|
hitLog.setYn(Boolean.TRUE);
|
c06a04fb
姜超
feature(*): 考评指标详情
|
357
358
359
|
if (consumer != null) {
consumer.accept(hitLog);
}
|
e79c21f9
姜超
feature(*): 计算计算修改
|
360
361
362
363
|
evalGroupIndicatorHitLogService.saveUnique(hitLog);
}
}
|