Browse Source

事件新增

Dun.Jason 8 tháng trước cách đây
mục cha
commit
7c1f400c16

+ 18 - 0
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -3920,6 +3920,24 @@ namespace Hotline.Api.Controllers.Bi
             return ExcelStreamResult(stream, "中心受理时间段统计");
         }
 
+        /// <summary>
+        /// 数据清单基础数据
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet("order-data-inventory-basedata")]
+        public async Task<object> OrderDataInventoryBaseData()
+        {
+            return new
+            {
+                OrderStatusOptions = EnumExts.GetDescriptions<EOrderStatus>(),
+                ChannelOptions = _sysDicDataCacheManager.GetSysDicDataCache(TimeLimitBaseDataConsts.SourceChannel),
+                ScreenStatusOptions = EnumExts.GetDescriptions<EScreenStatus>(),
+                AcceptTypeOptions = _sysDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.AcceptType),
+                IdentityTypeOptions = EnumExts.GetDescriptions<EIdentityType>(),
+                FromGenderOptions = EnumExts.GetDescriptions<EGender>(),
+            };
+        }
+
         /// <summary>
         /// 数据清单
         /// </summary>

+ 32 - 0
src/Hotline.Api/Controllers/HotSpotController.cs

@@ -11,6 +11,7 @@ using Hotline.Share.Enums.Order;
 using Hotline.Share.Enums.Settings;
 using MapsterMapper;
 using Microsoft.AspNetCore.Mvc;
+using NPOI.OpenXmlFormats.Vml;
 using SqlSugar;
 using StackExchange.Redis;
 using XF.Domain.Exceptions;
@@ -205,6 +206,37 @@ namespace Hotline.Api.Controllers
             await _eventCategoryRepository.RemoveRangeAsync(list, HttpContext.RequestAborted);
         }
 
+        /// <summary>
+        /// 修改事件
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost("event/modify-event")]
+        public async Task ModifyEventCategory([FromBody] ModifyEventCategoryDto dto)
+        {
+            var model = await _eventCategoryRepository.GetAsync(dto.Id, HttpContext.RequestAborted);
+            if (model == null)
+                throw UserFriendlyException.SameMessage("无效数据");
+
+            model.EventName = dto.EventName;
+            model.EventFullName = dto.EventFullName;
+            model.OrderBy = dto.OrderBy;
+            await _eventCategoryRepository.UpdateAsync(model, HttpContext.RequestAborted);
+        }
+
+        /// <summary>
+        /// 获取事件对象
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        [HttpGet("event")]
+        public async Task<EventCategoryDto> GetEventCategory(string id)
+        {
+            var model = await _eventCategoryRepository.GetAsync(id, HttpContext.RequestAborted);
+            if (model == null)
+                throw UserFriendlyException.SameMessage("无效数据");
+            return _mapper.Map<EventCategoryDto>(model);
+        }
 
         #endregion
         #endregion

+ 23 - 0
src/Hotline.Share/Dtos/Hotspots/EventCategoryDto.cs

@@ -16,9 +16,32 @@ namespace Hotline.Share.Dtos.Hotspots
     {
         public string EventName { get; set; }
 
+        public string EventFullName { get; set; }
+
         public string? ParentId { get; set; }
 
         public int OrderBy { get; set; }
 
     }
+
+    public class ModifyEventCategoryDto
+    {
+        public string Id { get; set; }
+
+        public string EventName { get; set; }
+
+        public string EventFullName { get; set; }
+
+        public int OrderBy { get; set; }
+    }
+
+    public class EventCategoryDto
+    {
+        public string Id { get; set; }
+        public string EventName { get; set; }
+        public string EventFullName { get; set; }
+        public int OrderBy { get; set; }
+
+        public string ParentId { get; set; }
+    }
 }

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

@@ -895,15 +895,6 @@ public record OrderDataInventoryReq : PagedRequest
     /// </summary>
     public string? PushTypeCode { get; set; }
 
-    /// <summary>
-    /// 坐席满意度
-    /// </summary>
-    public ESeatEvaluate? SeatEvaluate { get; set; }
-
-    /// <summary>
-    /// 办件结果满意度
-    /// </summary>
-    public string? OrgProcessingResults { get; set; }
 }
 public class OrderDataInventoryRep
 {