|
@@ -52,8 +52,9 @@ namespace Hotline.Api.Controllers
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
private readonly ICallApplication _callApplication;
|
|
private readonly ICallApplication _callApplication;
|
|
private readonly IOptionsSnapshot<CallCenterConfiguration> _callcenterOptions;
|
|
private readonly IOptionsSnapshot<CallCenterConfiguration> _callcenterOptions;
|
|
|
|
+ private readonly IRepository<SystemLog> _logRepository;
|
|
|
|
|
|
- public QualityController(
|
|
|
|
|
|
+ public QualityController(
|
|
ISessionContext sessionContext,
|
|
ISessionContext sessionContext,
|
|
IMapper mapper,
|
|
IMapper mapper,
|
|
IQualityRepository qualitey,
|
|
IQualityRepository qualitey,
|
|
@@ -70,7 +71,8 @@ namespace Hotline.Api.Controllers
|
|
ILogger<QualityController> logger,
|
|
ILogger<QualityController> logger,
|
|
ISystemSettingCacheManager systemSettingCacheManager,
|
|
ISystemSettingCacheManager systemSettingCacheManager,
|
|
ICallApplication callApplication,
|
|
ICallApplication callApplication,
|
|
- IOptionsSnapshot<CallCenterConfiguration> callcenterOptions)
|
|
|
|
|
|
+ IOptionsSnapshot<CallCenterConfiguration> callcenterOptions,
|
|
|
|
+ IRepository<SystemLog> logRepository)
|
|
{
|
|
{
|
|
_sessionContext = sessionContext;
|
|
_sessionContext = sessionContext;
|
|
_mapper = mapper;
|
|
_mapper = mapper;
|
|
@@ -89,7 +91,8 @@ namespace Hotline.Api.Controllers
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
_callApplication = callApplication;
|
|
_callApplication = callApplication;
|
|
_callcenterOptions = callcenterOptions;
|
|
_callcenterOptions = callcenterOptions;
|
|
- }
|
|
|
|
|
|
+ _logRepository = logRepository;
|
|
|
|
+ }
|
|
#region 质检管理
|
|
#region 质检管理
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 删除质检
|
|
/// 删除质检
|
|
@@ -630,7 +633,7 @@ namespace Hotline.Api.Controllers
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
- /// 智能质检结果返回接收
|
|
|
|
|
|
+ /// 智能质检结果返回接收
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
@@ -639,10 +642,12 @@ namespace Hotline.Api.Controllers
|
|
[LogFilter("智能质检结果返回接收")]
|
|
[LogFilter("智能质检结果返回接收")]
|
|
public async Task AiResult([FromBody] List<AiQualityResultDto> dto)
|
|
public async Task AiResult([FromBody] List<AiQualityResultDto> dto)
|
|
{
|
|
{
|
|
- Request.EnableBuffering();
|
|
|
|
- var sr = new StreamReader(Request.Body);
|
|
|
|
- var data = await sr.ReadToEndAsync(HttpContext.RequestAborted);
|
|
|
|
- _logger.LogInformation(data);
|
|
|
|
|
|
+ //Request.EnableBuffering();
|
|
|
|
+ //var sr = new StreamReader(Request.Body);
|
|
|
|
+ //var data = await sr.ReadToEndAsync(HttpContext.RequestAborted);
|
|
|
|
+ // _logger.LogInformation(data);
|
|
|
|
+ // await _logRepository.Updateable().SetColumns( x=> new SystemLog(){ ExecuteParam = data }).Where(x => x.Id == "08dcb132-cf60-4d1f-84ae-eb0c463f2175").ExecuteCommandAsync();
|
|
|
|
+
|
|
await _qualityApplication.AiResultAsync(dto, HttpContext.RequestAborted);
|
|
await _qualityApplication.AiResultAsync(dto, HttpContext.RequestAborted);
|
|
}
|
|
}
|
|
|
|
|