Commit 81ad74fdf2b710135f40b81426a9b1c15d7771fd

Authored by 张志伟
1 parent 99e77aad

:bug: v1.1.0 首保线索处理优化

fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/strategy/impl/FMFollowStrategy.java
... ... @@ -145,13 +145,16 @@ public class FMFollowStrategy extends AbstractFollowStrategy {
145 145 public boolean origin2task(OriginalData originalData) throws Exception {
146 146 Customer customer = customerService.queryById(originalData.getCustomerId());
147 147 BV.notNull(customer, () -> "档案不存在");
  148 + boolean bool = Objects.isNull(customer.getAdviserId()) || Objects.isNull(customer.getShopId());
  149 + BV.isFalse(bool, () -> "档案信息不完整");
  150 + CustomerCluePool cluePool = customerCluePoolService.queryByRefererId(customer.getId(), customer.getGroupId(), getFollowType());
148 151 if (DataTypeEnum.FM.equals(originalData.getType())) {
149   - CustomerCluePool cluePool = customerCluePoolService.queryByRefererId(customer.getId(), customer.getGroupId(), getFollowType());
150 152 completeClue(cluePool, originalData);
151 153 return true;
152 154 }
153   - boolean bool = Objects.isNull(customer.getAdviserId()) || Objects.isNull(customer.getShopId());
154   - BV.isFalse(bool, () -> "档案信息不完整");
  155 + if (DataTypeEnum.OD.equals(originalData.getType()) && Objects.nonNull(cluePool) && ClueStatusEnum.WAITING.equals(cluePool.getClueStatus())) {
  156 + customerCluePoolService.removeById(cluePool.getId());
  157 + }
155 158 CustomerCluePool clue = createClueInfo(originalData, getFollowType(), customer);
156 159 customerCluePoolService.save(clue);
157 160 createFirstNotice(clue, originalData.getGenerateTime());
... ...