|
@@ -1,4 +1,4 @@
|
|
|
-using DocumentFormat.OpenXml.Spreadsheet;
|
|
|
+using DocumentFormat.OpenXml.Office.CoverPageProps;
|
|
|
using Hotline.Application.Bulletin;
|
|
|
using Hotline.Application.Identity;
|
|
|
using Hotline.Application.Orders;
|
|
@@ -7,38 +7,25 @@ using Hotline.Caching.Interfaces;
|
|
|
using Hotline.Configurations;
|
|
|
using Hotline.KnowledgeBase;
|
|
|
using Hotline.Orders;
|
|
|
-using Hotline.Push.Notifies;
|
|
|
using Hotline.Repository.SqlSugar.Extensions;
|
|
|
-using Hotline.Repository.SqlSugar.Knowledge;
|
|
|
using Hotline.Settings;
|
|
|
using Hotline.Settings.Hotspots;
|
|
|
using Hotline.Share.Dtos;
|
|
|
-using Hotline.Share.Dtos.DataSharing.PusherHotlineDto;
|
|
|
using Hotline.Share.Dtos.Identity;
|
|
|
-using Hotline.Share.Dtos.Order;
|
|
|
using Hotline.Share.Dtos.Schedulings;
|
|
|
using Hotline.Share.Dtos.WebPortal;
|
|
|
using Hotline.Share.Enums.KnowledgeBase;
|
|
|
using Hotline.Share.Enums.Order;
|
|
|
-using Hotline.Share.Enums.Push;
|
|
|
-using Hotline.Share.Tools;
|
|
|
using Hotline.Tools;
|
|
|
+using Hotline.Users;
|
|
|
using Hotline.WebPortal;
|
|
|
-using Hotline.YbEnterprise.Sdk;
|
|
|
using MapsterMapper;
|
|
|
-using MathNet.Numerics;
|
|
|
using MediatR;
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
using Microsoft.Extensions.Options;
|
|
|
-using MongoDB.Driver.Core.WireProtocol.Messages;
|
|
|
-using Newtonsoft.Json.Linq;
|
|
|
-using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp.WxAppJson;
|
|
|
-using Senparc.Weixin.WxOpen.Entities;
|
|
|
-using SharpCompress.Common;
|
|
|
+using NPOI.XWPF.UserModel;
|
|
|
using SqlSugar;
|
|
|
-using System.Text.Json;
|
|
|
-using System.Threading;
|
|
|
using XF.Domain.Authentications;
|
|
|
using XF.Domain.Cache;
|
|
|
using XF.Domain.Filters;
|
|
@@ -62,6 +49,8 @@ namespace Hotline.Api.Controllers
|
|
|
private readonly IRepository<OrderPublish> _orderPublishRepository;
|
|
|
private readonly IOrderRepository _orderRepository;
|
|
|
private readonly IRepository<OrderVisit> _orderVisitRepository;
|
|
|
+ private readonly IRepository<Order> _orderListRepository;
|
|
|
+ private readonly IRepository<User> _userRepository;
|
|
|
private readonly IOrderApplication _orderApplication;
|
|
|
private readonly ISessionContext _sessionContext;
|
|
|
private readonly IRepository<OrderVisitDetail> _orderVisitDetailRepository;
|
|
@@ -89,6 +78,8 @@ namespace Hotline.Api.Controllers
|
|
|
IRepository<OrderPublish> orderPublishRepository,
|
|
|
IOrderRepository orderRepository,
|
|
|
IRepository<OrderVisit> orderVisitRepository,
|
|
|
+ IRepository<Order> orderListRepository,
|
|
|
+ IRepository<User> userRepository,
|
|
|
IOrderApplication orderApplication,
|
|
|
ISessionContext sessionContext,
|
|
|
IRepository<OrderVisitDetail> orderVisitDetailRepository,
|
|
@@ -117,6 +108,8 @@ namespace Hotline.Api.Controllers
|
|
|
_orderPublishRepository = orderPublishRepository;
|
|
|
_orderRepository = orderRepository;
|
|
|
_orderVisitRepository = orderVisitRepository;
|
|
|
+ _userRepository = userRepository;
|
|
|
+ _orderListRepository = orderListRepository;
|
|
|
_orderApplication = orderApplication;
|
|
|
_sessionContext = sessionContext;
|
|
|
_orderVisitDetailRepository = orderVisitDetailRepository;
|
|
@@ -146,6 +139,9 @@ namespace Hotline.Api.Controllers
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
+
|
|
|
+ #region 自贡门户查询接口
|
|
|
+
|
|
|
#region 受理统计
|
|
|
|
|
|
/// <summary>getacceptancetypestatisticsbymonth
|
|
@@ -773,5 +769,115 @@ namespace Hotline.Api.Controllers
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 泸州电信查询接口
|
|
|
+
|
|
|
+ #region 工单信息
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 工单信息
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("getOrderResultList")]
|
|
|
+ public async Task<OpenResponse> GetOrderResultList([FromBody] DateDto dto)
|
|
|
+ {
|
|
|
+ TimeSpan timeSpan = dto.EndTime - dto.StartTime;
|
|
|
+ if (timeSpan.TotalHours > 24)
|
|
|
+ {
|
|
|
+ return OpenResponse.Ok(WebPortalDeResponse<IReadOnlyList<Hotline.Share.Dtos.WebPortal.OrderResultDto>>.Failed("0", "开始结束时间不能大于24小时!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ var items = await _orderListRepository.Queryable()
|
|
|
+ .Where(x => x.CreationTime >= dto.StartTime)
|
|
|
+ .Where(x => x.CreationTime <= dto.EndTime)
|
|
|
+ .OrderByDescending(x => x.CreationTime)
|
|
|
+ .Select(it => new
|
|
|
+ {
|
|
|
+ Id = it.Id,
|
|
|
+ No = it.No,
|
|
|
+ Title = it.Title,
|
|
|
+ Content = it.Content,
|
|
|
+ ActualHandleOrgName = it.ActualHandleOrgName,
|
|
|
+ CreationTime = it.CreationTime,
|
|
|
+ FromName = it.FromName,
|
|
|
+ FromPhone = string.IsNullOrEmpty(it.FromPhone) ? it.FromPhone : it.Contact
|
|
|
+ })
|
|
|
+ .ToListAsync();
|
|
|
+
|
|
|
+ var OrderDto = _mapper.Map<IReadOnlyList<Hotline.Share.Dtos.WebPortal.OrderResultDto>>(items);
|
|
|
+ return OpenResponse.Ok(WebPortalDeResponse<IReadOnlyList<Hotline.Share.Dtos.WebPortal.OrderResultDto>>.Success(OrderDto, "成功"));
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 评价信息
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 评价信息
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("getVisitResultList")]
|
|
|
+ public async Task<OpenResponse> GetVisitResultList([FromBody] DateDto dto)
|
|
|
+ {
|
|
|
+ TimeSpan timeSpan = dto.EndTime - dto.StartTime;
|
|
|
+ if (timeSpan.TotalHours > 24)
|
|
|
+ {
|
|
|
+ return OpenResponse.Ok(WebPortalDeResponse<IReadOnlyList<Hotline.Share.Dtos.WebPortal.VisitResultDto>>.Failed("0", "开始结束时间不能大于24小时!"));
|
|
|
+ }
|
|
|
+
|
|
|
+ var items = await _orderVisitRepository.Queryable()
|
|
|
+ .Includes(x => x.OrderVisitDetails)
|
|
|
+ .LeftJoin<OrderPublish>((x, op) => x.OrderId == op.OrderId)
|
|
|
+ .Where(x => x.CreationTime >= dto.StartTime)
|
|
|
+ .Where(x => x.CreationTime <= dto.EndTime)
|
|
|
+ .OrderByDescending(x => x.CreationTime)
|
|
|
+ .Select((x, op) => new
|
|
|
+ {
|
|
|
+ OrderID = x.OrderId,
|
|
|
+ NowEvaluate = x.NowEvaluate,
|
|
|
+ VisitContent = x.OrderVisitDetails.Where(n => n.VisitTarget == EVisitTarget.Org || n.VisitTarget == EVisitTarget.Seat).Select(s => s.VisitContent).First(),
|
|
|
+ VisitTime = x.VisitTime,
|
|
|
+ VisitName = x.Employee.Name,
|
|
|
+ PublishState = op.PublishState
|
|
|
+ })
|
|
|
+ .ToListAsync();
|
|
|
+
|
|
|
+ var VisitDto = _mapper.Map<IReadOnlyList<Hotline.Share.Dtos.WebPortal.VisitResultDto>>(items);
|
|
|
+ return OpenResponse.Ok(WebPortalDeResponse<IReadOnlyList<Hotline.Share.Dtos.WebPortal.VisitResultDto>>.Success(VisitDto, "成功"));
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 账号信息
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 账号信息
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("getUserResultList")]
|
|
|
+ public async Task<OpenResponse> GetUserResultList()
|
|
|
+ {
|
|
|
+ var items = await _userRepository.Queryable()
|
|
|
+ .OrderByDescending(x => x.CreationTime)
|
|
|
+ .Select(it => new
|
|
|
+ {
|
|
|
+ UUID = it.Id,
|
|
|
+ Name = it.Name
|
|
|
+ })
|
|
|
+ .ToListAsync();
|
|
|
+
|
|
|
+ var UserDto = _mapper.Map<IReadOnlyList<Hotline.Share.Dtos.WebPortal.UserResultDto>>(items);
|
|
|
+ return OpenResponse.Ok(WebPortalDeResponse<IReadOnlyList<Hotline.Share.Dtos.WebPortal.UserResultDto>>.Success(UserDto, "成功"));
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
}
|
|
|
}
|