Blame view

fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalRewardService.java 16.2 KB
ea6b2fd6   姜超   feature(*): 门店奖惩分配
1
2
3
4
  package cn.fw.morax.service.biz.eval;
  
  import cn.fw.backlog.sdk.api.result.FailBacklogItem;
  import cn.fw.common.cache.locker.DistributedLocker;
edc57409   姜超   feature(*): 考评奖惩分配
5
  import cn.fw.common.exception.BusinessException;
347b9a76   姜超   feature(*): 考评审批
6
  import cn.fw.common.web.auth.LoginAuthBean;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
7
  import cn.fw.morax.common.config.TodoVal;
347b9a76   姜超   feature(*): 考评审批
8
  import cn.fw.morax.common.pojo.event.ApprovalResultEvent;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
9
10
11
12
  import cn.fw.morax.common.utils.DateUtil;
  import cn.fw.morax.common.utils.PublicUtil;
  import cn.fw.morax.common.utils.ThreadPoolUtil;
  import cn.fw.morax.domain.bo.eval.EvalGroupRewardDistributionBO;
347b9a76   姜超   feature(*): 考评审批
13
  import cn.fw.morax.domain.db.ApprovalRecord;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
14
  import cn.fw.morax.domain.db.eval.*;
edc57409   姜超   feature(*): 考评奖惩分配
15
16
  import cn.fw.morax.domain.dto.eval.EvalRewardDistDTO;
  import cn.fw.morax.domain.dto.eval.EvalRewardDistDetailDTO;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
17
  import cn.fw.morax.domain.enums.*;
9ecc8f2d   姜超   feature(*): 数据录入修改
18
  import cn.fw.morax.domain.vo.eval.EvalRewardDistDetailVO;
edc57409   姜超   feature(*): 考评奖惩分配
19
20
  import cn.fw.morax.domain.vo.eval.EvalRewardDistVO;
  import cn.fw.morax.domain.vo.eval.EvalShopPoolVO;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
21
  import cn.fw.morax.rpc.backlog.TodoRpcService;
edc57409   姜超   feature(*): 考评奖惩分配
22
  import cn.fw.morax.rpc.backlog.dto.BackLogItemDTO;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
23
24
25
26
  import cn.fw.morax.rpc.backlog.dto.BacklogBatchPlanItemReqDTO;
  import cn.fw.morax.rpc.backlog.dto.BacklogBatchPlanReqDTO;
  import cn.fw.morax.rpc.erp.ErpRpcService;
  import cn.fw.morax.rpc.erp.dto.RpcUserRoleInfoDTO;
edc57409   姜超   feature(*): 考评奖惩分配
27
  import cn.fw.morax.rpc.erp.dto.RpcUserRoleShopDTO;
347b9a76   姜超   feature(*): 考评审批
28
  import cn.fw.morax.service.biz.ApprovalBizService;
dc3c54cf   姜超   feature(*): 修改上传
29
  import cn.fw.morax.service.data.ApprovalRecordService;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
30
31
32
33
34
  import cn.fw.morax.service.data.eval.*;
  import com.alibaba.fastjson.JSON;
  import com.alibaba.fastjson.JSONObject;
  import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
  import com.baomidou.mybatisplus.core.toolkit.Wrappers;
edc57409   姜超   feature(*): 考评奖惩分配
35
  import com.google.common.collect.Lists;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
36
37
38
39
40
41
42
43
44
45
  import lombok.Getter;
  import lombok.RequiredArgsConstructor;
  import lombok.extern.slf4j.Slf4j;
  import org.redisson.api.RLock;
  import org.springframework.beans.factory.annotation.Value;
  import org.springframework.data.redis.core.BoundSetOperations;
  import org.springframework.data.redis.core.StringRedisTemplate;
  import org.springframework.stereotype.Service;
  import org.springframework.transaction.annotation.Transactional;
  
edc57409   姜超   feature(*): 考评奖惩分配
46
  import java.math.BigDecimal;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
47
  import java.text.DecimalFormat;
eccb0d64   姜超   feature(*): 考评详情查询
48
  import java.time.LocalDate;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
49
50
51
52
53
  import java.time.LocalDateTime;
  import java.util.*;
  import java.util.concurrent.RejectedExecutionException;
  import java.util.concurrent.ThreadPoolExecutor;
  import java.util.concurrent.locks.Lock;
edc57409   姜超   feature(*): 考评奖惩分配
54
  import java.util.stream.Collectors;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  
  import static cn.fw.common.businessvalidator.Validator.BV;
  
  /**
   * @author jiangchao
   * @des: 考评计算
   * @date 2023/1/12 17:39
   */
  @Slf4j
  @Service
  @RequiredArgsConstructor
  public class EvalRewardService {
  
      private final TodoVal todoVal;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
69
      private final EvalService evalService;
2188d9d0   姜超   feature(*): 修改代码格式
70
71
      private final ErpRpcService erpRpcService;
      private final TodoRpcService todoRpcService;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
72
      private final EvalGroupService evalGroupService;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
73
      private final DistributedLocker distributedLocker;
2188d9d0   姜超   feature(*): 修改代码格式
74
75
76
      private final ApprovalBizService approvalBizService;
      private final StringRedisTemplate stringRedisTemplate;
      private final EvalShopPoolService evalShopPoolService;
dc3c54cf   姜超   feature(*): 修改上传
77
      private final ApprovalRecordService approvalRecordService;
2188d9d0   姜超   feature(*): 修改代码格式
78
79
      private final EvalRewardDistService evalRewardDistService;
      private final EvalRewardDistDetailService evalRewardDistDetailService;
ea6b2fd6   姜超   feature(*): 门店奖惩分配
80
81
82
83
84
85
86
87
88
89
  
      @Value("${spring.cache.custom.global-prefix}:dist:eval-reward")
      @Getter
      private String distributionKey;
      private final static String REWARD_LOCK_KEY = "eval:group:reward";
  
      /**
       * 缓存分配奖惩的考评池
       *
       */
bdcc7a51   姜超   feature(*): 查询指标排名
90
      public void cacheDistEvalShopPoolIds(LocalDate localDate) {
ea6b2fd6   姜超   feature(*): 门店奖惩分配
91
92
93
94
95
96
97
          Lock lock = distributedLocker.lock(REWARD_LOCK_KEY);
          if (! ((RLock) lock).isLocked()) {
              return;
          }
          try {
              log.info("定时任务【考评奖惩待办】开始执行");
  
bdcc7a51   姜超   feature(*): 查询指标排名
98
              Set<Long> evalGroupIds = evalGroupService.queryDistributionShopReward(localDate);
eccb0d64   姜超   feature(*): 考评详情查询
99
              if (PublicUtil.isEmpty(evalGroupIds)) {
ea6b2fd6   姜超   feature(*): 门店奖惩分配
100
101
                  return;
              }
eccb0d64   姜超   feature(*): 考评详情查询
102
103
              String[] array = evalGroupIds.stream()
                      .map(evalGroupId -> new EvalGroupRewardDistributionBO(evalGroupId))
ea6b2fd6   姜超   feature(*): 门店奖惩分配
104
105
106
107
108
109
110
111
112
113
114
115
                      .map(JSONObject::toJSONString)
                      .toArray(String[]::new);
              stringRedisTemplate.opsForSet().add(getDistributionKey(), array);
  
          } catch (Exception e){
              log.error(e.getMessage(), e);
          } finally {
              lock.unlock();
          }
      }
  
  
edc57409   姜超   feature(*): 考评奖惩分配
116
117
118
      /**
       * 分配奖惩
       */
ea6b2fd6   姜超   feature(*): 门店奖惩分配
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
      public void distributionEvalReward() {
          BoundSetOperations<String, String> setOps = stringRedisTemplate.boundSetOps(getDistributionKey());
          ThreadPoolExecutor threadPool = ThreadPoolUtil.getInstance().getThreadPool();
          List<String> overflowsList = new ArrayList<>();
          String str;
          while ((str = setOps.pop()) != null) {
              final EvalGroupRewardDistributionBO bo = JSONObject.parseObject(str, EvalGroupRewardDistributionBO.class);
              if (Objects.isNull(bo)) {
                  continue;
              }
              try {
                  String finalStr = str;
                  threadPool.execute(() -> {
                      try {
                          distributionEvalGroupReward(bo);
                      } catch (Exception ex) {
e1206478   姜超   feature(*): 修改考评审批
135
                          log.error("计算考评数据失败:{}", bo, ex);
ea6b2fd6   姜超   feature(*): 门店奖惩分配
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
                          setOps.add(finalStr);
                      }
                  });
              } catch (RejectedExecutionException re) {
                  overflowsList.add(str);
              }
          }
          if (!CollectionUtils.isEmpty(overflowsList)) {
              for (String s : overflowsList) {
                  setOps.add(s);
              }
          }
      }
  
  
      private void distributionEvalGroupReward(EvalGroupRewardDistributionBO bo) {
eccb0d64   姜超   feature(*): 考评详情查询
152
153
          final Long evalGroupId = bo.getEvalGroupId();
          log.info("分配奖惩的考评组:{}", evalGroupId);
ea6b2fd6   姜超   feature(*): 门店奖惩分配
154
          EvalGroup evalGroup = evalGroupService.getById(evalGroupId);
eccb0d64   姜超   feature(*): 考评详情查询
155
156
157
158
159
160
161
          BV.notNull(evalGroup, "考评组不存在,终止计算!");
  
          List<EvalShopPool> pools = evalShopPoolService.list(Wrappers.<EvalShopPool>lambdaQuery()
                  .eq(EvalShopPool::getEvalGroupId, evalGroupId)
                  .eq(EvalShopPool::getYn, Boolean.TRUE)
          );
          BV.isNotEmpty(pools, "考评池不存在,终止计算!");
ea6b2fd6   姜超   feature(*): 门店奖惩分配
162
  
eccb0d64   姜超   feature(*): 考评详情查询
163
          sendDistRewardTodo(pools, evalGroup );
ea6b2fd6   姜超   feature(*): 门店奖惩分配
164
165
166
167
168
169
170
171
      }
  
      /**
       * 发送绩效组变动通知
       *
       * @param
       */
      @Transactional(rollbackFor = Exception.class)
eccb0d64   姜超   feature(*): 考评详情查询
172
      public void sendDistRewardTodo(List<EvalShopPool> pools, EvalGroup evalGroup) {
edc57409   姜超   feature(*): 考评奖惩分配
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
          Eval eval = evalService.getById(evalGroup.getEvalId());
          BV.notNull(eval, "考评配置不存在,请重试");
  
          DecimalFormat decimalFormat = new DecimalFormat("##########.##");
          final String roleCode = evalGroup.getRoleCodes().stream().findFirst().get();
          final String evalGroupName = evalGroup.getName();
          final String evalName = eval.getName();
          final EvalTypeEnum evalType = eval.getType();
          List<Long> shopIds = evalGroup.getShopIds();
  
          Date expireTime = DateUtil.localDateTime2Date(LocalDateTime.now().plusDays(2L));
  
          List<BacklogBatchPlanItemReqDTO> itemList = new ArrayList<>();
          List<RpcUserRoleInfoDTO> users = this.getUserEnableRoleInfos(roleCode, shopIds);
          for (RpcUserRoleInfoDTO user : users) {
              List<Long> manageShopIds = user.getRangeList().stream()
                      .filter(range -> shopIds.contains(range.getShopId()))
                      .map(RpcUserRoleShopDTO::getShopId).distinct().collect(Collectors.toList());
              if (PublicUtil.isEmpty(manageShopIds)) {
                  continue;
              }
  
              List<Long> poolIds = new ArrayList<>();
              BigDecimal reward = BigDecimal.ZERO;
              for (EvalShopPool pool : pools) {
                  if (manageShopIds.contains(pool.getShopId())) {
                      poolIds.add(pool.getId());
                      reward = reward.add(pool.getReward());
                  }
              }
  
f53a1f59   姜超   feature(*): 百分率处理
204
              EvalRewardDist rewardDist = transferPo(evalGroup);
edc57409   姜超   feature(*): 考评奖惩分配
205
              rewardDist.setUserId(user.getUserId());
edc57409   姜超   feature(*): 考评奖惩分配
206
207
              rewardDist.setEvalShopPoolIds(poolIds);
              rewardDist.setShopIds(manageShopIds);
347b9a76   姜超   feature(*): 考评审批
208
209
              rewardDist.setEvalName(evalName);
              rewardDist.setEvalType(evalType);
edc57409   姜超   feature(*): 考评奖惩分配
210
              rewardDist.setReward(reward);
edc57409   姜超   feature(*): 考评奖惩分配
211
212
213
214
215
216
217
218
219
220
221
              evalRewardDistService.save(rewardDist);
  
              BacklogBatchPlanItemReqDTO planItemReq = new BacklogBatchPlanItemReqDTO();
              planItemReq.setDataId(rewardDist.getId().toString());
              planItemReq.setUserId(user.getUserId());
              planItemReq.setPlanTime(new Date());
              planItemReq.setExpireTime(expireTime);
  
              Map<String, String> dynamicMap = new HashMap<>(8);
              dynamicMap.put("evalGroupName", evalGroupName);
              dynamicMap.put("evalName", evalName);
b5babc65   姜超   feature(*): 参数修改
222
              dynamicMap.put("evalType", evalType.getName());
edc57409   姜超   feature(*): 考评奖惩分配
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
              dynamicMap.put("amount", decimalFormat.format(rewardDist.getReward()));
              planItemReq.setDynamicMap(dynamicMap);
  
              Map<String, Object> extraData = new HashMap<>();
              planItemReq.setExtraData(extraData);
              itemList.add(planItemReq);
          }
  
  
          //推送待办
          BacklogBatchPlanReqDTO batchPlanReq = new BacklogBatchPlanReqDTO(todoVal.getDistEvalReward(), itemList);
          List<FailBacklogItem> failItems = Optional.ofNullable(todoRpcService.batchPush(batchPlanReq)).orElse(new ArrayList<>());
          if (PublicUtil.isNotEmpty(failItems)) {
              log.error("发送分配考评奖励待办失败,失败人员信息:{}", JSON.toJSONString(failItems));
          }
  
eccb0d64   姜超   feature(*): 考评详情查询
239
240
241
242
  //        if (PublicUtil.isEmpty(failItems) || itemList.size() > failItems.size()) {
  //            pool.setStatus(EvalShopPoolStatusEnum.WAIT_DIST_REWARD);
  //            evalShopPoolService.updateById(pool);
  //        }
ea6b2fd6   姜超   feature(*): 门店奖惩分配
243
244
      }
  
f53a1f59   姜超   feature(*): 百分率处理
245
246
247
248
249
250
251
252
253
254
255
      public EvalRewardDist transferPo(EvalGroup evalGroup) {
          EvalRewardDist rewardDist = new EvalRewardDist();
          rewardDist.setEvalId(evalGroup.getEvalId());
          rewardDist.setEvalGroupId(evalGroup.getId());
          rewardDist.setEvalGroupName(evalGroup.getName());
          rewardDist.setStatus(EvalRewardDistStatusEnum.NO_DIST);
          rewardDist.setGroupId(evalGroup.getGroupId());
          rewardDist.setYn(Boolean.TRUE);
          return rewardDist;
      }
  
edc57409   姜超   feature(*): 考评奖惩分配
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
      /**
       * 对查询的人员去重
       *
       * @param roleCode
       * @param shopIds
       * @return
       */
      public List<RpcUserRoleInfoDTO> getUserEnableRoleInfos(String roleCode, List<Long> shopIds) {
          List<RpcUserRoleInfoDTO> userRoleInfos = erpRpcService.getUserEnableRoleInfos(roleCode, shopIds);
          if (PublicUtil.isEmpty(userRoleInfos)) {
              return new ArrayList<>();
          }
          Set<Long> staffIds = new HashSet<>();
          List<RpcUserRoleInfoDTO> repeatUserRoleInfos = Lists.newArrayListWithCapacity(userRoleInfos.size());
          for (RpcUserRoleInfoDTO rpcUserRoleInfoDTO : userRoleInfos) {
              if (staffIds.add(rpcUserRoleInfoDTO.getUserId())) {
                  repeatUserRoleInfos.add(rpcUserRoleInfoDTO);
              }
          }
          return repeatUserRoleInfos;
      }
ea6b2fd6   姜超   feature(*): 门店奖惩分配
277
278
  
  
edc57409   姜超   feature(*): 考评奖惩分配
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
      /**
       * 奖惩分配详情
       * @param id
       * @return
       */
      public EvalRewardDistVO rewardDistDetail(Long id) {
          EvalRewardDist rewardDist = evalRewardDistService.getById(id);
          BV.notNull(rewardDist, "奖惩分配不存在,请重试");
          EvalRewardDistVO rewardDistVO = PublicUtil.copy(rewardDist, EvalRewardDistVO.class);
  
          List<EvalShopPool> pools = evalShopPoolService.list(Wrappers.<EvalShopPool>lambdaQuery()
                  .in(EvalShopPool::getId, rewardDistVO.getEvalShopPoolIds())
                  .eq(EvalShopPool::getYn, Boolean.TRUE)
          );
          BV.isNotEmpty(pools, "奖惩分配不存在,请重试");
          List<EvalShopPoolVO> shopPools = PublicUtil.copyList(pools, EvalShopPoolVO.class);
          rewardDistVO.setShopPools(shopPools);
9ecc8f2d   姜超   feature(*): 数据录入修改
296
  
beac6c98   姜超   feature(*): 分配查询
297
298
          if (EvalRewardDistStatusEnum.APPROVAL.equals(rewardDist.getStatus()) ||
                  EvalRewardDistStatusEnum.APPROVAL_REJECT.equals(rewardDist.getStatus())) {
9ecc8f2d   姜超   feature(*): 数据录入修改
299
              List<EvalRewardDistDetail> details = evalRewardDistDetailService.list(Wrappers.<EvalRewardDistDetail>lambdaQuery()
beac6c98   姜超   feature(*): 分配查询
300
                      .eq(EvalRewardDistDetail::getDistId, rewardDistVO.getId())
9ecc8f2d   姜超   feature(*): 数据录入修改
301
302
303
304
                      .eq(EvalRewardDistDetail::getYn, Boolean.TRUE)
              );
              List<EvalRewardDistDetailVO> detailVOS = PublicUtil.copyList(details, EvalRewardDistDetailVO.class);
              rewardDistVO.setRewardDetails(detailVOS);
dc3c54cf   姜超   feature(*): 修改上传
305
306
307
308
309
310
311
312
  
              ApprovalRecord approvalRecord = approvalRecordService.getOne(Wrappers.<ApprovalRecord>lambdaQuery()
                      .eq(ApprovalRecord::getDataId, id)
                      .eq(ApprovalRecord::getApprovalType, ApprovalTypeEnum.EVAL_REWARD_DIST)
                      .eq(ApprovalRecord::getYn, Boolean.TRUE)
                      .last("ORDER BY id DESC LIMIT 1")
              );
              rewardDistVO.setApprovalNo(Optional.ofNullable(approvalRecord).map(ApprovalRecord::getApprovalNo).orElse(""));
9ecc8f2d   姜超   feature(*): 数据录入修改
313
314
          }
  
edc57409   姜超   feature(*): 考评奖惩分配
315
316
317
          return rewardDistVO;
      }
  
347b9a76   姜超   feature(*): 考评审批
318
319
      @Transactional(rollbackFor = Exception.class)
      public void rewardDist(EvalRewardDistDTO rewardDistDTO, LoginAuthBean currentUser) {
edc57409   姜超   feature(*): 考评奖惩分配
320
321
322
323
324
325
326
327
328
329
330
331
          Long rewardDistId = rewardDistDTO.getEvalShopDistId();
          EvalRewardDist rewardDist = evalRewardDistService.getById(rewardDistId);
          BV.notNull(rewardDist, "奖惩分配不存在,请重试");
          BV.isNotEmpty(rewardDistDTO.getUsers(), "奖惩分配为空,请重试");
  
          BigDecimal totalReward = rewardDistDTO.getUsers().stream()
                                  .map(EvalRewardDistDetailDTO::getReward)
                                  .reduce(BigDecimal.ZERO, BigDecimal::add);
          if (totalReward.compareTo(totalReward) != 0) {
              throw new BusinessException("分配金额不等于总金额,请重试");
          }
  
9ecc8f2d   姜超   feature(*): 数据录入修改
332
333
          //删除之前的分配
          evalRewardDistDetailService.update(Wrappers.<EvalRewardDistDetail>lambdaUpdate()
beac6c98   姜超   feature(*): 分配查询
334
                  .eq(EvalRewardDistDetail::getDistId, rewardDistId)
9ecc8f2d   姜超   feature(*): 数据录入修改
335
336
337
                  .set(EvalRewardDistDetail::getYn, Boolean.FALSE)
          );
  
edc57409   姜超   feature(*): 考评奖惩分配
338
339
          List<EvalRewardDistDetail> distDetails = Lists.newArrayListWithCapacity(rewardDistDTO.getUsers().size());
          for (EvalRewardDistDetailDTO distDetailDTO : rewardDistDTO.getUsers()) {
9ecc8f2d   姜超   feature(*): 数据录入修改
340
341
              EvalRewardDistDetail evalRewardDistDetail = distDetailDTO.convertPo(rewardDistId);
              distDetails.add(evalRewardDistDetail);
edc57409   姜超   feature(*): 考评奖惩分配
342
343
          }
  
347b9a76   姜超   feature(*): 考评审批
344
345
346
347
348
          approvalBizService.applyApproveDistReward(rewardDist, currentUser);
          evalRewardDistDetailService.saveBatch(distDetails);
          rewardDist.setStatus(EvalRewardDistStatusEnum.APPROVAL);
          evalRewardDistService.saveOrUpdate(rewardDist);
      }
edc57409   姜超   feature(*): 考评奖惩分配
349
  
347b9a76   姜超   feature(*): 考评审批
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
      @Transactional(rollbackFor = Exception.class)
      public void approvalEvalRewardDist(ApprovalRecord approvalRecord, ApprovalResultEvent result) {
          log.info("收到考评门店奖惩分配审批信息:{}", JSON.toJSONString(result));
          Boolean agree = result.getAgree();
          Long rewardDistId = approvalRecord.getDataId();
          EvalRewardDist rewardDist = evalRewardDistService.getById(rewardDistId);
          BV.notNull(rewardDist, "奖惩分配不存在,请重试");
          rewardDist.setStatus(EvalRewardDistStatusEnum.APPROVAL_REJECT);
          if (agree) {
              BackLogItemDTO dto = new BackLogItemDTO(rewardDist.getUserId(), todoVal.getDistEvalReward(),
                      String.valueOf(rewardDist.getId()), new Date(), null);
              if (todoRpcService.cancel(dto)) {
  
              } else {
                  log.error("奖惩分配待办取消失败:{}", JSON.toJSONString(rewardDist));
                  throw new BusinessException("奖惩分配失败,请重试");
              }
              rewardDist.setStatus(EvalRewardDistStatusEnum.APPROVAL_AGREE);
2b241dae   姜超   feature(*): 奖惩分配状态设置
368
369
370
371
372
373
              evalRewardDistDetailService.update(Wrappers.<EvalRewardDistDetail>lambdaUpdate()
                      .eq(EvalRewardDistDetail::getDistId, rewardDistId)
                      .eq(EvalRewardDistDetail::getYn, Boolean.TRUE)
                      .set(EvalRewardDistDetail::getStatus, EvalRewardPushStatusEnum.WAIT_PUSH)
                      .set(EvalRewardDistDetail::getUpdateTime, new Date())
              );
347b9a76   姜超   feature(*): 考评审批
374
375
          }
          evalRewardDistService.saveOrUpdate(rewardDist);
edc57409   姜超   feature(*): 考评奖惩分配
376
      }
347b9a76   姜超   feature(*): 考评审批
377
  
ea6b2fd6   姜超   feature(*): 门店奖惩分配
378
  }