|
@@ -959,15 +959,13 @@ public class CorpServiceImpl implements CorpService {
|
|
|
//默认接入最少的优先分配 接待人最少的在集合前面
|
|
//默认接入最少的优先分配 接待人最少的在集合前面
|
|
|
//不超过最多接待人数 默认30
|
|
//不超过最多接待人数 默认30
|
|
|
Integer maxNum = Optional.ofNullable(corpKfAccountSessionConfig.getMaxNum()).orElse(30);
|
|
Integer maxNum = Optional.ofNullable(corpKfAccountSessionConfig.getMaxNum()).orElse(30);
|
|
|
- List<CorpKfServicerDto> filterKfCs = corpKfServicerDtos.stream().filter(kfCs -> {
|
|
|
|
|
- if (corpKfServiceIds.contains(kfCs.getServicerUserid()) && kfCs.getNum() < maxNum) {
|
|
|
|
|
- if (CollUtil.isNotEmpty(deviceFollowIds) && !deviceFollowIds.contains(kfCs.getServicerUserid())) {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- return false;
|
|
|
|
|
- }).collect(Collectors.toList());
|
|
|
|
|
|
|
+ List<CorpKfServicerDto> filterKfCs = null;
|
|
|
|
|
+ if (CollUtil.isNotEmpty(deviceFollowIds)) {
|
|
|
|
|
+ filterKfCs = corpKfServicerDtos.stream().filter(kfCs -> corpKfServiceIds.contains(kfCs.getServicerUserid()) && kfCs.getNum() < maxNum && deviceFollowIds.contains(kfCs.getServicerUserid())).collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (CollUtil.isEmpty(filterKfCs)) {
|
|
|
|
|
+ filterKfCs = corpKfServicerDtos.stream().filter(kfCs -> corpKfServiceIds.contains(kfCs.getServicerUserid()) && kfCs.getNum() < maxNum).collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
if (CollUtil.isEmpty(filterKfCs)) {
|
|
if (CollUtil.isEmpty(filterKfCs)) {
|
|
|
log.info("当前客服账号:{}值班接待上限:{},将客户:{}移入等待池", openKfId, maxNum, externalUserid);
|
|
log.info("当前客服账号:{}值班接待上限:{},将客户:{}移入等待池", openKfId, maxNum, externalUserid);
|
|
|
//动态排队信息
|
|
//动态排队信息
|
|
@@ -1010,7 +1008,7 @@ public class CorpServiceImpl implements CorpService {
|
|
|
}
|
|
}
|
|
|
Integer serviceCorpUserNum = corpKfServicerSessionRecordMapper.selectServiceCorpUserNum(openKfId, dutyFollowIds);
|
|
Integer serviceCorpUserNum = corpKfServicerSessionRecordMapper.selectServiceCorpUserNum(openKfId, dutyFollowIds);
|
|
|
Integer count = corpKfWaitingQueueUserMapper.selectCount(Wrappers.lambdaQuery(CorpKfWaitingQueueUser.class).eq(CorpKfWaitingQueueUser::getOpenKfId, openKfId));
|
|
Integer count = corpKfWaitingQueueUserMapper.selectCount(Wrappers.lambdaQuery(CorpKfWaitingQueueUser.class).eq(CorpKfWaitingQueueUser::getOpenKfId, openKfId));
|
|
|
- return dynamicQueueTips.replaceAll("#", "" + serviceCorpUserNum + count) + queueTips;
|
|
|
|
|
|
|
+ return dynamicQueueTips.replaceAll("#", serviceCorpUserNum + count + "") + "\n" + queueTips;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void moveWaitingQueue(String corpId, String openKfId, String externalUserId) throws Exception {
|
|
private void moveWaitingQueue(String corpId, String openKfId, String externalUserId) throws Exception {
|