xf 2 سال پیش
والد
کامیت
f818fe6b24

+ 9 - 6
src/Hotline.Api/Controllers/OrderController.cs

@@ -13,6 +13,7 @@ using Microsoft.AspNetCore.Mvc;
 using XF.Domain.Authentications;
 using XF.Domain.Exceptions;
 using XF.Domain.Extensions;
+using XF.Utility.EnumExtensions;
 
 namespace Hotline.Api.Controllers;
 
@@ -37,7 +38,7 @@ public class OrderController : BaseController
         _orderRepository = orderRepository;
         _workflowApplication = workflowApplication;
         _workflowDomainService = workflowDomainService;
-        _hotSpotTypeRepository= hotSpotTypeRepository;
+        _hotSpotTypeRepository = hotSpotTypeRepository;
         _mapper = mapper;
     }
 
@@ -79,7 +80,7 @@ public class OrderController : BaseController
     {
         var order = await _orderRepository.Queryable()
             .Includes(d => d.OrderComplain)
-            .Includes(d=>d.OrderReport)
+            .Includes(d => d.OrderReport)
             .FirstAsync(d => d.Id == id);
         var workflow = await _workflowDomainService.GetWorkflowAsync(WorkflowModuleConsts.Order, order.Id,
             withSupplements: true, cancellationToken: HttpContext.RequestAborted);
@@ -135,9 +136,11 @@ public class OrderController : BaseController
     {
         return new
         {
-            //ModuleOptions = WorkflowModule.Modules.ToList(),
-            //GenderOptions = EnumExts.GetDescriptions<EHandlerType>(),
-            //CountersignMode = EnumExts.GetDescriptions<ECountersignMode>().Where(d => d.Key != 1)
+            ChannelOptions = EnumExts.GetDescriptions<EChannel>(),
+            GenderOptions = EnumExts.GetDescriptions<EGender>(),
+            IdentityTypeOptions = EnumExts.GetDescriptions<EIdentityType>(),
+            LicenceTypeOptions = EnumExts.GetDescriptions<ELicenceType>(),
+            //AgeRangeOptions = 
         };
     }
 
@@ -149,7 +152,7 @@ public class OrderController : BaseController
     [HttpGet("hotspottype-list-parent")]
     public async Task<List<HotSpotType>> GetHotSpotType(string? parentId)
     {
-       return await _hotSpotTypeRepository.Queryable().Where(x => x.ParentId == parentId).ToListAsync();
+        return await _hotSpotTypeRepository.Queryable().Where(x => x.ParentId == parentId).ToListAsync();
     }
 
 }

+ 1 - 1
src/Hotline.Api/Controllers/WorkflowController.cs

@@ -387,7 +387,7 @@ public class WorkflowController : BaseController
         return new
         {
             ModuleOptions = WorkflowModule.Modules.ToList(),
-            GenderOptions = EnumExts.GetDescriptions<EHandlerType>(),
+            HandlerTypeOptions = EnumExts.GetDescriptions<EHandlerType>(),
             CountersignMode = EnumExts.GetDescriptions<ECountersignMode>().Where(d => d.Key != 1)
         };
     }

+ 6 - 1
src/Hotline.Share/Enums/Order/EFromIdentity.cs

@@ -1,4 +1,6 @@
-namespace Hotline.Share.Enums.Order;
+using System.ComponentModel;
+
+namespace Hotline.Share.Enums.Order;
 
 /// <summary>
 /// 来电/信人身份
@@ -8,15 +10,18 @@ public enum EIdentityType
     /// <summary>
     /// 未知
     /// </summary>
+    [Description("未知")]
     Unknown = 0,
 
     /// <summary>
     /// 市民
     /// </summary>
+    [Description("市民")]
     Citizen = 1,
 
     /// <summary>
     /// 企业
     /// </summary>
+    [Description("企业")]
     Enterprise = 2,
 }