|
@@ -10,6 +10,8 @@ import com.slibra.business.domain.TCutOffWater;
|
|
import com.slibra.business.domain.TUserInfo;
|
|
import com.slibra.business.domain.TUserInfo;
|
|
import com.slibra.business.mapper.TCutOffWaterMapper;
|
|
import com.slibra.business.mapper.TCutOffWaterMapper;
|
|
import com.slibra.business.mapper.TUserInfoMapper;
|
|
import com.slibra.business.mapper.TUserInfoMapper;
|
|
|
|
+import com.slibra.business.res.CallRecordCount;
|
|
|
|
+import com.slibra.common.DecimalUtils;
|
|
import com.slibra.common.exception.ServiceException;
|
|
import com.slibra.common.exception.ServiceException;
|
|
import com.slibra.common.utils.DateUtils;
|
|
import com.slibra.common.utils.DateUtils;
|
|
import com.slibra.common.utils.SecurityUtils;
|
|
import com.slibra.common.utils.SecurityUtils;
|
|
@@ -22,6 +24,7 @@ import com.slibra.business.mapper.TCallRecordMapper;
|
|
import com.slibra.business.domain.TCallRecord;
|
|
import com.slibra.business.domain.TCallRecord;
|
|
import com.slibra.business.service.ITCallRecordService;
|
|
import com.slibra.business.service.ITCallRecordService;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
+import org.springframework.util.NumberUtils;
|
|
|
|
|
|
import static com.slibra.common.constant.MyConstants.LONG_1;
|
|
import static com.slibra.common.constant.MyConstants.LONG_1;
|
|
|
|
|
|
@@ -251,6 +254,48 @@ public class TCallRecordServiceImpl implements ITCallRecordService
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public CallRecordCount callRecordCountInfo() {
|
|
|
|
+ CallRecordCount callRecordCount = CallRecordCount.builder().build();
|
|
|
|
+ //处理通话统计信息
|
|
|
|
+ int total = this.tCallRecordMapper.getTotalByType(null);
|
|
|
|
+ callRecordCount.setTotal(total);
|
|
|
|
+ int humanTotal = this.tCallRecordMapper.getTotalByType(2);
|
|
|
|
+ callRecordCount.setHumanTotal(humanTotal);
|
|
|
|
+ int whiteListTotal = this.tCallRecordMapper.getTotalByType(0);
|
|
|
|
+ callRecordCount.setWhiteListTotal(whiteListTotal);
|
|
|
|
+ int aiTotal = this.tCallRecordMapper.getTotalByIsAi(1);
|
|
|
|
+ callRecordCount.setAiTotal(aiTotal);
|
|
|
|
+ int traditionTotal = this.tCallRecordMapper.getTotalByIsAi(0);
|
|
|
|
+ callRecordCount.setTraditionTotal(traditionTotal);
|
|
|
|
+ if(total > 0){
|
|
|
|
+ callRecordCount.setHumanPercent((double) (humanTotal / total));
|
|
|
|
+ callRecordCount.setWhiteListPercent((double) (whiteListTotal / total));
|
|
|
|
+ callRecordCount.setAiPercent((double) (aiTotal / total));
|
|
|
|
+ callRecordCount.setTraditionPercent((double) (traditionTotal / total));
|
|
|
|
+ }
|
|
|
|
+ callRecordCount.setSpecialCount(this.tCallRecordMapper.getSpecialCount());
|
|
|
|
+ int transferCount = this.tCallRecordMapper.getTransferCount();
|
|
|
|
+ callRecordCount.setTransferCount(transferCount);
|
|
|
|
+ //处理人工客服状态统计信息
|
|
|
|
+ callRecordCount.setTotalPerson(this.tCallRecordMapper.getPersonCountByState(null));
|
|
|
|
+ callRecordCount.setIdlePerson(this.tCallRecordMapper.getPersonCountByState(2));
|
|
|
|
+ callRecordCount.setBusyPerson(this.tCallRecordMapper.getPersonCountByState(1));
|
|
|
|
+ callRecordCount.setOnlinePerson(this.tCallRecordMapper.getPersonCountByState(3));
|
|
|
|
+ callRecordCount.setDialPerson(this.tCallRecordMapper.getPersonCountByState(5));
|
|
|
|
+
|
|
|
|
+ //通话次数和通话时长
|
|
|
|
+ callRecordCount.setPersonCount(this.tCallRecordMapper.getPersonCountRecordIsRobot(0));
|
|
|
|
+ callRecordCount.setPersonTotal(this.tCallRecordMapper.getPersonTotalRecordIsRobot(0));
|
|
|
|
+
|
|
|
|
+ callRecordCount.setRobotCount(this.tCallRecordMapper.getPersonCountRecordIsRobot(1));
|
|
|
|
+ callRecordCount.setRobotTotal(this.tCallRecordMapper.getPersonTotalRecordIsRobot(1));
|
|
|
|
+ //转人工次数
|
|
|
|
+ callRecordCount.setRobotTransfer(transferCount);
|
|
|
|
+
|
|
|
|
+ return callRecordCount;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 校验数据
|
|
* 校验数据
|