using Hotline.CallCenter.Calls;
using Hotline.Orders;
using Hotline.Permissions;
using Hotline.Settings;
using Hotline.Settings.CommonOpinions;
using Hotline.Share.Dtos.Settings;
using Hotline.Share.Enums.FlowEngine;
using MapsterMapper;
using Microsoft.AspNetCore.Mvc;
using MongoDB.Driver;
using SqlSugar;
using System.Reflection.Metadata;
using Hotline.Application.CallCenter;
using Hotline.CallCenter.Configs;
using Hotline.FlowEngine.Workflows;
using Hotline.Settings.TimeLimits;
using Hotline.Share.Enums.CallCenter;
using Hotline.Share.Enums.Order;
using Microsoft.Extensions.Options;
using XF.Domain.Authentications;
using XF.Domain.Exceptions;
using XF.Domain.Repository;
using Hotline.Configurations;
namespace Hotline.Api.Controllers
{
///
/// 常用意见接口
///
public class CommonPController : BaseController
{
private readonly ISystemCommonOpinionDomainService _commonOpinionDomainService;
private readonly ISystemAreaDomainService _systemAreaDomainService;
private readonly IMapper _mapper;
private readonly ISessionContext _sessionContext;
// private readonly IRepository _trCallRecordRepository;
private readonly IOrderRepository _orderRepository;
private readonly IOrderDelayRepository _orderDelayRepository;
private readonly ITimeLimitDomainService _timeLimitDomainService;
private readonly IOrderScreenRepository _orderScreenRepository;
private readonly IRepository _orderVisitedDetailRepository;
private readonly ICallApplication _callApplication;
private readonly IOptionsSnapshot _appOptions;
public CommonPController(
ISystemCommonOpinionDomainService commonOpinionDomainService,
ISystemAreaDomainService systemAreaDomainService,
ISessionContext sessionContext,
// IRepository trCallRecordRepository,
IOrderRepository orderRepository,
IMapper mapper,
IOrderDelayRepository orderDelayRepository,
ITimeLimitDomainService timeLimitDomainService,
IOrderScreenRepository orderScreenRepository,
IRepository orderVisitedDetailRepository,
ICallApplication callApplication,
IOptionsSnapshot appOptions)
{
_commonOpinionDomainService = commonOpinionDomainService;
_systemAreaDomainService = systemAreaDomainService;
_mapper = mapper;
_sessionContext = sessionContext;
// _trCallRecordRepository = trCallRecordRepository;
_orderRepository = orderRepository;
_orderDelayRepository = orderDelayRepository;
_timeLimitDomainService = timeLimitDomainService;
_orderScreenRepository = orderScreenRepository;
_orderVisitedDetailRepository = orderVisitedDetailRepository;
_callApplication = callApplication;
_appOptions = appOptions;
}
#region 省市区
///
/// 获取省市区树形
///
///
[HttpGet("tree-area")]
[Obsolete("请调用sys/area/tree")]
public async Task> GetAearTree()
{
return await _systemAreaDomainService.GetAreaTree();
}
#endregion
///
/// 首页基础数据
///
///
[HttpGet("home_data")]
public async Task