|
@@ -1,4 +1,6 @@
|
|
|
-using DotNetCore.CAP;
|
|
|
+using DocumentFormat.OpenXml.Office2010.Excel;
|
|
|
+using DocumentFormat.OpenXml.Spreadsheet;
|
|
|
+using DotNetCore.CAP;
|
|
|
using Hotline.Api.Filter;
|
|
|
using Hotline.Application.CallCenter;
|
|
|
using Hotline.Application.Systems;
|
|
@@ -22,6 +24,7 @@ using Hotline.Share.Dtos.TrCallCenter;
|
|
|
using Hotline.Share.Enums.CallCenter;
|
|
|
using Hotline.Share.Enums.Quality;
|
|
|
using Hotline.Share.Requests;
|
|
|
+using Hotline.Share.Tools;
|
|
|
using Hotline.Tools;
|
|
|
using Hotline.Users;
|
|
|
using Mapster;
|
|
@@ -30,6 +33,7 @@ using Microsoft.AspNetCore.Authorization;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
using Microsoft.Extensions.Options;
|
|
|
using Newtonsoft.Json;
|
|
|
+using SqlSugar;
|
|
|
using XF.Domain.Authentications;
|
|
|
using XF.Domain.Cache;
|
|
|
using XF.Domain.Exceptions;
|
|
@@ -764,7 +768,29 @@ namespace Hotline.Api.Controllers
|
|
|
{
|
|
|
var (total, items) = await _callRecordRepository.GetCallList(dto)
|
|
|
.ToPagedListAsync(dto.PageIndex, dto.PageSize);
|
|
|
- return new PagedDto<TrCallDto>(total, _mapper.Map<IReadOnlyList<TrCallDto>>(items));
|
|
|
+
|
|
|
+ var isCallBindOrder = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.IsCallBindOrder).SettingValue[0]);
|
|
|
+
|
|
|
+ var itemsResult = _mapper.Map<List<TrCallDto>>(items);
|
|
|
+ itemsResult.ForEach(x =>
|
|
|
+ {
|
|
|
+ if (isCallBindOrder)
|
|
|
+ {
|
|
|
+ if (x.Order == null && !string.IsNullOrEmpty(x.OtherAccept))
|
|
|
+ x.IsBindOrder = true;
|
|
|
+ else
|
|
|
+ x.IsBindOrder = false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (string.IsNullOrEmpty(x.UserId) && x.Order == null && !string.IsNullOrEmpty(x.OtherAccept))
|
|
|
+ x.IsBindOrder = true;
|
|
|
+ else
|
|
|
+ x.IsBindOrder = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return new PagedDto<TrCallDto>(total, _mapper.Map<IReadOnlyList<TrCallDto>>(itemsResult));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -821,14 +847,12 @@ namespace Hotline.Api.Controllers
|
|
|
[HttpGet("calls/basedata")]
|
|
|
public async Task<object> CallBaseData()
|
|
|
{
|
|
|
- var isCallBindOrder = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.IsCallBindOrder).SettingValue[0]);
|
|
|
return new
|
|
|
{
|
|
|
OnState = EnumExts.GetDescriptions<EOnState>(),
|
|
|
CallDirection = EnumExts.GetDescriptions<ECallDirection>(),
|
|
|
EndBy = EnumExts.GetDescriptions<EEndBy>(),
|
|
|
- PhoneTypes = EnumExts.GetDescriptions<EPhoneTypes>(),
|
|
|
- IsCallBindOrder = isCallBindOrder
|
|
|
+ PhoneTypes = EnumExts.GetDescriptions<EPhoneTypes>()
|
|
|
};
|
|
|
}
|
|
|
|