浏览代码

任务 64 回访不满意原因统计
第三方查询通知公告增加公开范围

tangjiang 4 月之前
父节点
当前提交
d47f3580c6

+ 16 - 4
src/Hotline.Api/Controllers/WebPortalController.cs

@@ -117,11 +117,14 @@ namespace Hotline.Api.Controllers
         [HttpPost("getarticlelist")]
         public async Task<OpenResponse> GetArticleList([FromBody] QueryArticleListDto dto)
         {
+            if (string.IsNullOrEmpty(dto.PushRanges))
+                dto.PushRanges = "2";
+
             RefAsync<int> total = 0;
             var items = await _bulletinRepository.Queryable()
                 .Where(p => p.LoseEfficacyTime >= DateTime.Now)
                 .Where(p => p.IsArrive == true)
-                .Where(p => SqlFunc.JsonListObjectAny(p.PushRanges, "Key", "2"))
+                .Where(p => SqlFunc.JsonListObjectAny(p.PushRanges, "Key", dto.PushRanges))
                  .Where(p => p.BulletinTypeId == dto.NoticeType)
                  .WhereIF(!string.IsNullOrEmpty(dto.Condition), p => p.Title.Contains(dto.Condition))
                  .OrderByDescending(p => p.CreationTime)
@@ -160,10 +163,13 @@ namespace Hotline.Api.Controllers
         [HttpPost("getarticlelistbynum")]
         public async Task<OpenResponse> GetArticleListByNum([FromBody] ArticleIdByNumDto dto)
         {
+            if (string.IsNullOrEmpty(dto.PushRanges))
+                dto.PushRanges = "2";
+
             var items = await _bulletinRepository.Queryable()
                 .Where(p => p.LoseEfficacyTime >= DateTime.Now)
                 .Where(p => p.IsArrive == true)
-                .Where(p => SqlFunc.JsonListObjectAny(p.PushRanges, "Key", "2"))
+                .Where(p => SqlFunc.JsonListObjectAny(p.PushRanges, "Key", dto.PushRanges))
                 //  .Where(p => p.BulletinTypeId == dto.BulletinTypeId)
                 .WhereIF(!string.IsNullOrEmpty(dto.BulletinTypeId), p => p.BulletinTypeId == dto.BulletinTypeId)
                 .WhereIF(!string.IsNullOrEmpty(dto.CheckChar), p => p.Content.Contains(dto.CheckChar))
@@ -269,10 +275,13 @@ namespace Hotline.Api.Controllers
         [HttpPost("getpreviousandnext")]
         public async Task<OpenResponse> GetPreviousAndNext([FromBody] ArticlePreviousAndNextDto dto)
         {
+            if (string.IsNullOrEmpty(dto.PushRanges))
+                dto.PushRanges = "2";
+
             var sugar = _bulletinRepository.Queryable()
                 .Where(p => p.LoseEfficacyTime >= DateTime.Now)
                  .Where(p => p.IsArrive == true)
-                .Where(p => SqlFunc.JsonListObjectAny(p.PushRanges, "Key", "2"))
+                .Where(p => SqlFunc.JsonListObjectAny(p.PushRanges, "Key", dto.PushRanges))
                 ;
             if (dto.FullSearch == "1")//全文搜索
             {
@@ -347,6 +356,9 @@ namespace Hotline.Api.Controllers
         [HttpPost("getfulltextsearchlist")]
         public async Task<OpenResponse> GetFullTextSearchList([FromBody] QueryArticleListDto dto)
         {
+            if (string.IsNullOrEmpty(dto.PushRanges))
+                dto.PushRanges = "2";
+
             if (string.IsNullOrEmpty(dto.Condition))
                 return OpenResponse.Ok(WebPortalDeResponse<FullTextSearchListDataDto>.Success(null));
 
@@ -354,7 +366,7 @@ namespace Hotline.Api.Controllers
             var items = await _bulletinRepository.Queryable()
                 .Where(p => p.LoseEfficacyTime >= DateTime.Now)
                  .Where(p => p.IsArrive == true)
-                .Where(p => SqlFunc.JsonListObjectAny(p.PushRanges, "Key", "2"))
+                .Where(p => SqlFunc.JsonListObjectAny(p.PushRanges, "Key", dto.PushRanges))
                 .WhereIF(_appOptions.Value.IsYiBin, p => p.BulletinTypeId == "1" || p.BulletinTypeId == "5" || p.BulletinTypeId == "6" || p.BulletinTypeId == "7" || p.BulletinTypeId == "3" || p.BulletinTypeId == "4")
                 .WhereIF(_appOptions.Value.IsZiGong, p => p.BulletinTypeId == "5013" || p.BulletinTypeId == "5016" || p.BulletinTypeId == "5011" || p.BulletinTypeId == "5015" || p.BulletinTypeId == "5017")
                 .WhereIF(!string.IsNullOrEmpty(dto.Condition), p => p.Title.Contains(dto.Condition))

+ 2 - 0
src/Hotline.Application/StatisticalReport/OrderReportApplication.cs

@@ -1648,6 +1648,7 @@ namespace Hotline.Application.StatisticalReport
                 .WhereIF(dto.StartTime.HasValue, x => x.OrderVisit.VisitTime >= dto.StartTime.Value)
                 .WhereIF(dto.EndTime.HasValue, x => x.OrderVisit.VisitTime <= dto.EndTime.Value)
                 .WhereIF(isCenter == false, x => x.VisitOrgCode.StartsWith(_sessionContext.RequiredOrgId))
+                .WhereIF(!string.IsNullOrEmpty(dto.OrgProcessingResults), x => SqlFunc.JsonListObjectAny(x.OrgProcessingResults, "Key", dto.OrgProcessingResults))
                 .GroupBy((x, org) => new { VisitOrgName = org.Name, VisitOrgCode = x.VisitOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6")) })
                 .Select((x, org) => new BiVisitNoSatisfiedDto
                 {
@@ -1754,6 +1755,7 @@ namespace Hotline.Application.StatisticalReport
                 .WhereIF(IsCenter == false, x => x.VisitOrgCode.StartsWith(_sessionContext.RequiredOrgId))
                 .WhereIF(IsCenter == true, x => x.VisitOrgCode.StartsWith(dto.OrgCode))
                 .WhereIF(!string.IsNullOrEmpty(dto.Keyword), x => x.OrderVisit.Order.No.Contains(dto.Keyword) || x.OrderVisit.Order.Title.Contains(dto.Keyword))
+                .WhereIF(!string.IsNullOrEmpty(dto.OrgProcessingResults), x => SqlFunc.JsonListObjectAny(x.OrgProcessingResults, "Key", dto.OrgProcessingResults))
                 .OrderBy(x => x.OrderVisit.VisitTime);
 
             return query;

+ 5 - 0
src/Hotline.Share/Dtos/Bi/BiOrderDto.cs

@@ -5,6 +5,11 @@ namespace Hotline.Share.Dtos.Bi
 {
     public record QueryVisitNoSatisfiedDto
     {
+        /// <summary>
+        /// 回访结果 空查询全部,-1:视为满意;2:不满意
+        /// </summary>
+        public string? OrgProcessingResults { get; set; }
+
         public string OrgName { get; set; }
 
         public DateTime? StartTime { get; set; }

+ 14 - 0
src/Hotline.Share/Dtos/WebPortal/ArticleDetailsDto.cs

@@ -54,6 +54,11 @@ namespace Hotline.Share.Dtos.WebPortal
         /// 显示位置
         /// </summary>
         public string? BulletinDisplayLocation { get; set; }
+
+        /// <summary>
+        /// 公告范围,不传默认查询门户网站  0:全部;1:微信小程序;2:门户网站;4:市民APP;8:部门APP
+        /// </summary>
+        public string? PushRanges {  get; set; }
     }
 
     /// <summary>
@@ -91,6 +96,10 @@ namespace Hotline.Share.Dtos.WebPortal
         /// </summary>
         public string? FullSearch { get; set; }
 
+        /// <summary>
+        /// 公告范围,不传默认查询门户网站  0:全部;1:微信小程序;2:门户网站;4:市民APP;8:部门APP
+        /// </summary>
+        public string? PushRanges { get; set; }
     }
 
     /// <summary>
@@ -256,6 +265,11 @@ namespace Hotline.Share.Dtos.WebPortal
         /// 标题
         /// </summary>
         public string? Condition { get; set; }
+
+        /// <summary>
+        /// 公告范围,不传默认查询门户网站  0:全部;1:微信小程序;2:门户网站;4:市民APP;8:部门APP
+        /// </summary>
+        public string? PushRanges { get; set; }
     }
 
     /// <summary>

+ 10 - 0
src/Hotline.Share/Requests/PagedKeywordRequest.cs

@@ -291,12 +291,22 @@ public record QuerySeatSwitchRequest : ReportRequiredPagedRequest
 
 public record QueryVisitNoSatiisfiedRequest : ReportPagedRequest
 {
+    /// <summary>
+    /// 回访结果 空查询全部,-1:视为满意;2:不满意
+    /// </summary>
+    public string? OrgProcessingResults { get; set; }
+
     public string? OrgName { get; set; }
 
 }
 
 public record BiQueryVisitNoSatisfiedDetailDto : ReportPagedRequest
 {
+    /// <summary>
+    /// 回访结果 空查询全部,-1:视为满意;2:不满意
+    /// </summary>
+    public string? OrgProcessingResults { get; set; }
+
     /// <summary>
     /// 部门Code
     /// </summary>