qinchaoyue 5 月之前
父节点
当前提交
de639c16c9

+ 1 - 0
src/Hotline.Api/Controllers/Snapshot/SnapshotController.cs

@@ -224,6 +224,7 @@ public class SnapshotController : BaseController
     /// </summary>
     /// </summary>
     /// <returns></returns>
     /// <returns></returns>
     [HttpGet("area/tree")]
     [HttpGet("area/tree")]
+    [AllowAnonymous]
     public async Task<List<SystemAreaOutDto>> GetAreaTreeAsync()
     public async Task<List<SystemAreaOutDto>> GetAreaTreeAsync()
         => (await _systemAreaDomainService.GetAreaTree()).Adapt<List<SystemAreaOutDto>>();
         => (await _systemAreaDomainService.GetAreaTree()).Adapt<List<SystemAreaOutDto>>();
 
 

+ 5 - 1
src/Hotline.Application.Tests/Application/SnapshotApplicationTest.cs

@@ -4,6 +4,7 @@ using Hotline.Api.Controllers;
 using Hotline.Application.Identity;
 using Hotline.Application.Identity;
 using Hotline.Application.Snapshot;
 using Hotline.Application.Snapshot;
 using Hotline.Application.Tests.Mock;
 using Hotline.Application.Tests.Mock;
+using Hotline.Caching.Interfaces;
 using Hotline.File;
 using Hotline.File;
 using Hotline.Identity.Accounts;
 using Hotline.Identity.Accounts;
 using Hotline.Identity.Roles;
 using Hotline.Identity.Roles;
@@ -39,8 +40,9 @@ public class SnapshotApplicationTest : TestBase
     private readonly IOrderSnapshotRepository _orderSnapshotRepository;
     private readonly IOrderSnapshotRepository _orderSnapshotRepository;
     private readonly ISessionContext _sessionContext;
     private readonly ISessionContext _sessionContext;
     private readonly IGuiderSystemService _guiderSystemService;
     private readonly IGuiderSystemService _guiderSystemService;
+    private readonly ISystemSettingCacheManager _systemSettingCacheManager;
 
 
-    public SnapshotApplicationTest(IAccountRepository accountRepository, IRepository<Role> roleRepository, UserController userController, IServiceScopeFactory scopeFactory, IRepository<User> userRepository, IHttpContextAccessor httpContextAccessor, ISnapshotApplication snapshotApplication, IIdentityAppService identityAppService, IRepository<RedPackRecord> redPackRecordRepository, IIndustryApplication industryApplication, IIndustryRepository industryRepository, IFileRepository fileRepository, OrderServiceMock orderServiceMock, IOrderRepository orderRepository, IOrderSnapshotRepository orderSnapshotRepository, IThirdIdentiyService thirdService, IThirdAccountRepository thirdAccount, ISessionContext sessionContext, IGuiderSystemService guiderSystemService) : base(accountRepository, roleRepository, userController, scopeFactory, userRepository, httpContextAccessor, thirdService, thirdAccount)
+    public SnapshotApplicationTest(IAccountRepository accountRepository, IRepository<Role> roleRepository, UserController userController, IServiceScopeFactory scopeFactory, IRepository<User> userRepository, IHttpContextAccessor httpContextAccessor, ISnapshotApplication snapshotApplication, IIdentityAppService identityAppService, IRepository<RedPackRecord> redPackRecordRepository, IIndustryApplication industryApplication, IIndustryRepository industryRepository, IFileRepository fileRepository, OrderServiceMock orderServiceMock, IOrderRepository orderRepository, IOrderSnapshotRepository orderSnapshotRepository, IThirdIdentiyService thirdService, IThirdAccountRepository thirdAccount, ISessionContext sessionContext, IGuiderSystemService guiderSystemService, ISystemSettingCacheManager systemSettingCacheManager) : base(accountRepository, roleRepository, userController, scopeFactory, userRepository, httpContextAccessor, thirdService, thirdAccount)
     {
     {
         _snapshotApplication = snapshotApplication;
         _snapshotApplication = snapshotApplication;
         _identityAppService = identityAppService;
         _identityAppService = identityAppService;
@@ -54,6 +56,7 @@ public class SnapshotApplicationTest : TestBase
         SetWeiXin();
         SetWeiXin();
         _sessionContext = sessionContext;
         _sessionContext = sessionContext;
         _guiderSystemService = guiderSystemService;
         _guiderSystemService = guiderSystemService;
+        _systemSettingCacheManager = systemSettingCacheManager;
     }
     }
 
 
     [Fact]
     [Fact]
@@ -280,6 +283,7 @@ public class SnapshotApplicationTest : TestBase
         var order = await _orderRepository.GetAsync("08dd18e0-1c9e-4aa5-8dc6-f639e8d1b3ea");
         var order = await _orderRepository.GetAsync("08dd18e0-1c9e-4aa5-8dc6-f639e8d1b3ea");
         var token = new ThirdTokenDto { AppId = "TAjYAYuA", Secret = "c01eb299b9d784bf55681af4da86bab6ba428101" };
         var token = new ThirdTokenDto { AppId = "TAjYAYuA", Secret = "c01eb299b9d784bf55681af4da86bab6ba428101" };
         order.No = DateTime.Now.ToString("yyyyMMddhhmmssyyyy");
         order.No = DateTime.Now.ToString("yyyyMMddhhmmssyyyy");
+        orderSnapshot.DeadLine = DateTime.Now.AddDays(_systemSettingCacheManager.OvertimeBack);
         var result = await _guiderSystemService.PostOrder(order, orderSnapshot, token);
         var result = await _guiderSystemService.PostOrder(order, orderSnapshot, token);
         result.ShouldNotBeNull();
         result.ShouldNotBeNull();
     }
     }

+ 11 - 0
src/Hotline/Caching/Interfaces/ISystemSettingCacheManager.cs

@@ -78,5 +78,16 @@ namespace Hotline.Caching.Interfaces
         /// 小程序Banner集合
         /// 小程序Banner集合
         /// </summary>
         /// </summary>
         string AppBanner { get; }
         string AppBanner { get; }
+
+        /// <summary>
+        /// 网格员回复等待时间(单位:小时)
+        /// 超过该时间自动退回工单
+        /// </summary>
+        int OvertimeBack { get; }
+
+        /// <summary>
+        /// 天阙服务AppKey|AppSecret
+        /// </summary>
+        string TianQueAppKeySecret { get; }
     }
     }
 }
 }

+ 9 - 0
src/Hotline/Caching/Services/SystemSettingCacheManager.cs

@@ -174,5 +174,14 @@ namespace Hotline.Caching.Services
         /// </summary>
         /// </summary>
         public string AppBanner =>
         public string AppBanner =>
             GetOrDefault("08dcfe0a-e987-4981-8918-c272baaa4b04", SettingConstants.AppBanner, "小程序Bnner集合, 多个使用 | 分隔, 只写图片ID即可", "08dd136c-aed1-400a-8123-222987d4b087|08dd136c-aed1-400a-8123-222987d4b087", "小程序Bnner集合, 多个使用 | 分隔, 只写图片ID即可");
             GetOrDefault("08dcfe0a-e987-4981-8918-c272baaa4b04", SettingConstants.AppBanner, "小程序Bnner集合, 多个使用 | 分隔, 只写图片ID即可", "08dd136c-aed1-400a-8123-222987d4b087|08dd136c-aed1-400a-8123-222987d4b087", "小程序Bnner集合, 多个使用 | 分隔, 只写图片ID即可");
+
+        /// <summary>
+        /// 网格员回复等待时间(单位:小时)
+        /// 超过该时间自动退回工单
+        /// </summary>
+        public int OvertimeBack =>
+            GetOrDefault("08dd18e0-1c9e-4aa5-8dc6-f639e8d1b3ea", SettingConstants.OvertimeBack, "网格员回复等待时间(单元小时)", 4, "网格员回复等待时间(单位:小时), 超过该时间自动退回工单");
+
+        public string TianQueAppKeySecret => throw new NotImplementedException();
     }
     }
 }
 }

+ 16 - 0
src/Hotline/Settings/SettingConstants.cs

@@ -667,5 +667,21 @@ namespace Hotline.Settings
         /// 小程序Banner集合
         /// 小程序Banner集合
         /// </summary>
         /// </summary>
         public static string AppBanner = "小程序Banner";
         public static string AppBanner = "小程序Banner";
+
+		/// <summary>
+		/// 部门满意度明细不显示工单
+		/// </summary>
+		public const string OrgVisitDetailHiddenOrderNo = "OrgVisitDetailHiddenOrderNo";
+
+        /// <summary>
+        /// 交办单是否保密
+        /// </summary>
+        public const string IsTheAssignmentFormConfidential = "IsTheAssignmentFormConfidential";
+
+        /// <summary>
+        /// 网格员回复等待时间(单位:小时)
+        /// 超过该时间自动退回工单
+        /// </summary>
+        public const string OvertimeBack = "OvertimeBack";
     }
     }
 }
 }

+ 6 - 0
src/Hotline/Snapshot/OrderSnapshot.cs

@@ -76,6 +76,12 @@ public class OrderSnapshot : CreationSoftDeleteEntity
 
 
     #region 网格员回复
     #region 网格员回复
 
 
+    /// <summary>
+    /// 网格员回复截止日期
+    /// </summary>
+    [SugarColumn(ColumnDescription = "网格员回复截止日期")]
+    public DateTime? DeadLine { get; set; }
+
     /// <summary>
     /// <summary>
     /// 网格员是否办理
     /// 网格员是否办理
     /// </summary>
     /// </summary>

+ 3 - 3
src/TianQue.Sdk/TiqnQueService.cs

@@ -57,9 +57,9 @@ public class TiqnQueService : IGuiderSystemService, IScopeDependency
         acceptInfo.DetailContent = order.Content!; // 详细内容
         acceptInfo.DetailContent = order.Content!; // 详细内容
         acceptInfo.Lon = order.Longitude.ToString(); // 经度
         acceptInfo.Lon = order.Longitude.ToString(); // 经度
         acceptInfo.Lat = order.Latitude.ToString(); // 纬度
         acceptInfo.Lat = order.Latitude.ToString(); // 纬度
-        acceptInfo.RootCategoryInfo = order.HotspotName!; // 热点分类(大类)
-        acceptInfo.CategoryInfo = order.HotspotSpliceName!; // 热点分类(小类)
-        acceptInfo.DeadLine = DateTime.Now.AddDays(15); // 截止时间
+        acceptInfo.RootCategoryInfo = ""; // order.HotspotName!; // 热点分类(大类)
+        acceptInfo.CategoryInfo = "";// order.HotspotSpliceName!; // 热点分类(小类)
+        acceptInfo.DeadLine = orderSnapshot.DeadLine!.Value; // 截止时间
         acceptInfo.Prod = false; // 正式/测试
         acceptInfo.Prod = false; // 正式/测试
 
 
         // 反映人信息
         // 反映人信息