|
|
@ -16,9 +16,11 @@ import com.baiye.modules.distribute.entity.CustomEntity;
|
|
|
|
import com.baiye.modules.distribute.entity.CustomStoreEntity;
|
|
|
|
import com.baiye.modules.distribute.entity.CustomStoreEntity;
|
|
|
|
import com.baiye.modules.distribute.entity.StoreEntity;
|
|
|
|
import com.baiye.modules.distribute.entity.StoreEntity;
|
|
|
|
import com.baiye.modules.distribute.mapper.CustomMapper;
|
|
|
|
import com.baiye.modules.distribute.mapper.CustomMapper;
|
|
|
|
|
|
|
|
import com.baiye.modules.distribute.qo.ClueQo;
|
|
|
|
import com.baiye.modules.distribute.qo.CustomQo;
|
|
|
|
import com.baiye.modules.distribute.qo.CustomQo;
|
|
|
|
import com.baiye.modules.distribute.service.*;
|
|
|
|
import com.baiye.modules.distribute.service.*;
|
|
|
|
import com.baiye.modules.distribute.vo.AddressDTO;
|
|
|
|
import com.baiye.modules.distribute.vo.AddressDTO;
|
|
|
|
|
|
|
|
import com.baiye.modules.distribute.vo.ClueVO;
|
|
|
|
import com.baiye.modules.distribute.vo.CustomStoreVO;
|
|
|
|
import com.baiye.modules.distribute.vo.CustomStoreVO;
|
|
|
|
import com.baiye.modules.distribute.vo.CustomVO;
|
|
|
|
import com.baiye.modules.distribute.vo.CustomVO;
|
|
|
|
import com.baiye.polling.QueueBalance;
|
|
|
|
import com.baiye.polling.QueueBalance;
|
|
|
@ -78,6 +80,10 @@ public class CustomServiceImpl extends ExtendServiceImpl<CustomMapper, CustomEnt
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageResult<CustomVO> queryPage(PageParam pageParam, CustomQo qo) {
|
|
|
|
public PageResult<CustomVO> queryPage(PageParam pageParam, CustomQo qo) {
|
|
|
|
|
|
|
|
if (qo.getSalesmanType() == DefaultNumberConstants.TWO_NUMBER && qo.getSalesmanUserId() != null){
|
|
|
|
|
|
|
|
List<Long> customIdList = clueService.findCustomId(qo.getSalesmanUserId(), SecurityUtils.getCurrentUserId());
|
|
|
|
|
|
|
|
qo.setCustomIds(customIdList);
|
|
|
|
|
|
|
|
}
|
|
|
|
return baseMapper.queryPage(pageParam, qo);
|
|
|
|
return baseMapper.queryPage(pageParam, qo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -113,6 +119,13 @@ public class CustomServiceImpl extends ExtendServiceImpl<CustomMapper, CustomEnt
|
|
|
|
BeanUtils.copyProperties(customEntity, customVO);
|
|
|
|
BeanUtils.copyProperties(customEntity, customVO);
|
|
|
|
if (CollUtil.isNotEmpty(customEntity.getSalesmanUserId())){
|
|
|
|
if (CollUtil.isNotEmpty(customEntity.getSalesmanUserId())){
|
|
|
|
customVO.setSalesmanUserId(customEntity.getSalesmanUserId().stream().map(Long::parseLong).collect(Collectors.toList()));
|
|
|
|
customVO.setSalesmanUserId(customEntity.getSalesmanUserId().stream().map(Long::parseLong).collect(Collectors.toList()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ClueQo clueQo = new ClueQo();
|
|
|
|
|
|
|
|
clueQo.setCustomId(id);
|
|
|
|
|
|
|
|
List<ClueVO> clueVOS = clueService.queryList(clueQo);
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(clueVOS)){
|
|
|
|
|
|
|
|
customVO.setUserNameList(clueVOS.stream().map(ClueVO::getAssignedName).collect(Collectors.toList()));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<CustomStoreVO> customStoreVOList = new ArrayList<>();
|
|
|
|
List<CustomStoreVO> customStoreVOList = new ArrayList<>();
|
|
|
@ -176,7 +189,7 @@ public class CustomServiceImpl extends ExtendServiceImpl<CustomMapper, CustomEnt
|
|
|
|
if (Boolean.TRUE.equals(result)) {
|
|
|
|
if (Boolean.TRUE.equals(result)) {
|
|
|
|
ClueDTO clueDTO = new ClueDTO(clueId, customEntity.getChannelName(), phone, customEntity.getRemark(),
|
|
|
|
ClueDTO clueDTO = new ClueDTO(clueId, customEntity.getChannelName(), phone, customEntity.getRemark(),
|
|
|
|
otherClue, entity.getUserId(), username, currentUserId, Boolean.TRUE, companyId, customEntity.getSex(),
|
|
|
|
otherClue, entity.getUserId(), username, currentUserId, Boolean.TRUE, companyId, customEntity.getSex(),
|
|
|
|
customEntity.getCustomInformation(), customEntity.getChannelIdentifying(), customEntity.getChannelType());
|
|
|
|
customEntity.getCustomInformation(), customEntity.getChannelIdentifying(), customEntity.getChannelType(),dto.getCustomId());
|
|
|
|
list.add(clueDTO);
|
|
|
|
list.add(clueDTO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -193,7 +206,7 @@ public class CustomServiceImpl extends ExtendServiceImpl<CustomMapper, CustomEnt
|
|
|
|
Long clueId = IdUtil.getSnowflake(workerId, datacenterId).nextId();
|
|
|
|
Long clueId = IdUtil.getSnowflake(workerId, datacenterId).nextId();
|
|
|
|
ClueDTO clueDTO = new ClueDTO(clueId, customEntity.getChannelName(), phone, customEntity.getRemark(), null, userId,
|
|
|
|
ClueDTO clueDTO = new ClueDTO(clueId, customEntity.getChannelName(), phone, customEntity.getRemark(), null, userId,
|
|
|
|
username, currentUserId, Boolean.TRUE, companyId, customEntity.getSex(), customEntity.getCustomInformation(),
|
|
|
|
username, currentUserId, Boolean.TRUE, companyId, customEntity.getSex(), customEntity.getCustomInformation(),
|
|
|
|
customEntity.getChannelIdentifying(), customEntity.getChannelType());
|
|
|
|
customEntity.getChannelIdentifying(), customEntity.getChannelType(), dto.getCustomId());
|
|
|
|
list.add(clueDTO);
|
|
|
|
list.add(clueDTO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|