|
@@ -559,6 +559,7 @@ namespace Hotline.Api.Controllers
|
|
|
aiOrderVisitDetail.AiOrderVisitState = Share.Enums.Ai.EAiOrderVisitState.Ended; //更新AI子表
|
|
|
aiOrderVisitDetail.AiVisitTime = DateTime.Now;
|
|
|
aiOrderVisitDetail.CallTime = string.IsNullOrEmpty(callRecord.CallTime)? null : DateTime.Parse(callRecord.CallTime);
|
|
|
+ aiOrderVisitDetail.SentenceList = _mapper.Map<List<SentenceList>>(callRecord.SentenceList);
|
|
|
aiOrderVisit.VisitedCount++;
|
|
|
//处理结果
|
|
|
var visitDetail = _orderVisitDetailRepository.Queryable().Where(x => x.VisitId == aiOrderVisitDetail.OrderVisit.Id).ToList();
|
|
@@ -594,40 +595,44 @@ namespace Hotline.Api.Controllers
|
|
|
|
|
|
// }
|
|
|
//}
|
|
|
- //是否联系
|
|
|
- if (item.QuestionId == QuestionIdZero)
|
|
|
- {
|
|
|
- if (item.QuestionResult == "有联系")
|
|
|
- {
|
|
|
- isContact = true;
|
|
|
- }
|
|
|
- else if (item.QuestionResult == "没有联系")
|
|
|
- {
|
|
|
- isContact = false;
|
|
|
- }
|
|
|
- }
|
|
|
- //是否解决
|
|
|
- if (item.QuestionId == QuestionIdOne)
|
|
|
- {
|
|
|
- if (item.QuestionResult == "得到解决")
|
|
|
- {
|
|
|
- isSolve = true;
|
|
|
- }
|
|
|
- else if (item.QuestionResult == "未得到解决")
|
|
|
- {
|
|
|
- isSolve = false;
|
|
|
- }
|
|
|
- }
|
|
|
+ ////是否联系
|
|
|
+ //if (item.QuestionId == QuestionIdZero)
|
|
|
+ //{
|
|
|
+ // if (item.QuestionResult == "有联系")
|
|
|
+ // {
|
|
|
+ // isContact = true;
|
|
|
+ // }
|
|
|
+ // else if (item.QuestionResult == "没有联系")
|
|
|
+ // {
|
|
|
+ // isContact = false;
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ ////是否解决
|
|
|
+ //if (item.QuestionId == QuestionIdOne)
|
|
|
+ //{
|
|
|
+ // if (item.QuestionResult == "得到解决")
|
|
|
+ // {
|
|
|
+ // isSolve = true;
|
|
|
+ // }
|
|
|
+ // else if (item.QuestionResult == "未得到解决")
|
|
|
+ // {
|
|
|
+ // isSolve = false;
|
|
|
+ // }
|
|
|
+ //}
|
|
|
//办件结果满意度
|
|
|
if (item.QuestionId == QuestionIdTwo)
|
|
|
{
|
|
|
if (item.QuestionResult == "办件结果满意")
|
|
|
{
|
|
|
orgProcessingResults = new Kv() { Key = "4", Value = "满意" };
|
|
|
+ isContact = true;
|
|
|
+ isSolve = true;
|
|
|
}
|
|
|
else if (item.QuestionResult == "办件结果不满意")
|
|
|
{
|
|
|
orgProcessingResults = new Kv() { Key = "2", Value = "不满意" };
|
|
|
+ isContact = false;
|
|
|
+ isSolve = false;
|
|
|
visitContent = callRecord.SceneVariable != null ? callRecord.SceneVariable[VisitContentIdOne] : "";
|
|
|
}
|
|
|
}
|
|
@@ -661,8 +666,6 @@ namespace Hotline.Api.Controllers
|
|
|
x.VisitContent = seatVisitContent;
|
|
|
});
|
|
|
|
|
|
-
|
|
|
-
|
|
|
//处理结果
|
|
|
orgDetail.ForEach(x =>
|
|
|
{
|
|
@@ -674,13 +677,13 @@ namespace Hotline.Api.Controllers
|
|
|
x.VisitContent = visitContent;
|
|
|
x.Volved = isSolve;
|
|
|
x.IsContact = isContact;
|
|
|
- if (string.IsNullOrEmpty(orgProcessingResults?.Key) || isSolve == null || isContact == null || orgProcessingResults?.Value == "不满意")
|
|
|
+ if (string.IsNullOrEmpty(orgProcessingResults?.Key) || orgProcessingResults?.Value == "不满意")
|
|
|
{
|
|
|
//x.OrgNoSatisfiedReason = new List<Kv>() { new Kv() { Key = "7", Value = "未回复" } };
|
|
|
//TODO 记录不满意原因到内容中供人工回访甄别选择不满意原因
|
|
|
- if (dto.CallTimes.Value>=1 && orgProcessingResults == null && isSolve == null && isContact ==null)
|
|
|
+ if (dto.CallTimes.Value>=1 && orgProcessingResults == null)
|
|
|
{
|
|
|
- orgProcessingResults = new Kv() { Key = "0", Value = "默认满意" };
|
|
|
+ orgProcessingResults = new Kv() { Key = "6", Value = "未接通" };
|
|
|
aiOrderVisitDetail.OrderVisit.VisitState = EVisitState.Visited;
|
|
|
aiOrderVisitDetail.OrderVisit.NowEvaluate = orgProcessingResults;
|
|
|
x.VisitContent = "智能回访两次未接默认已回访";
|
|
@@ -696,7 +699,7 @@ namespace Hotline.Api.Controllers
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- aiOrderVisitDetail.OrderVisit.VisitState = Share.Enums.Order.EVisitState.WaitForVisit;
|
|
|
+ aiOrderVisitDetail.OrderVisit.VisitState = Share.Enums.Order.EVisitState.AiVisitWaitForVisit;
|
|
|
aiOrderVisitDetail.OrderVisit.IsEffectiveAiVisit = false;
|
|
|
}
|
|
|
|
|
@@ -719,6 +722,7 @@ namespace Hotline.Api.Controllers
|
|
|
aiOrderVisitDetail.OrderVisit.RecordUrl = recordUrl;
|
|
|
aiOrderVisitDetail.OrderVisit.VisitType = Share.Enums.Order.EVisitType.ChipVoiceVisit;
|
|
|
aiOrderVisitDetail.OrderVisit.AiVisitTime();
|
|
|
+ aiOrderVisitDetail.SentenceList = aiOrderVisitDetail.SentenceList;
|
|
|
aiOrderVisitDetail.IsSuccess = true;
|
|
|
aiOrderVisitDetail.AiVolved = isSolve;
|
|
|
aiOrderVisitDetail.AiIsContact = isContact;
|