qinchaoyue vor 3 Monaten
Ursprung
Commit
05d9fe5984

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

@@ -83,6 +83,8 @@ public class SnapshotController : BaseController
     [LogFilter("添加随手拍工单")]
     public async Task<AddSnapshotOrderOutDto> AddOrderAsync([FromBody] AddSnapshotOrderInDto dto)
     {
+        var ssp = _systemDicDataCacheManager.SourceChannel.FirstOrDefault(m => m.DicDataName == "随手拍") 
+            ?? throw UserFriendlyException.SameMessage("请添加[随手拍]来源.");
         var order = dto.Adapt<Order>();
         dto.ValidateObject();
         var industry = await _industryRepository.GetAsync(dto.IndustryId, HttpContext.RequestAborted)
@@ -94,6 +96,8 @@ public class SnapshotController : BaseController
         order.Content = dto.GetContent(industry.IndustryType);
         order.FromPhone = _sessionContext.Phone;
         order.Contact = _sessionContext.Phone;
+        order.SourceChannel = ssp.DicDataName;
+        order.SourceChannelCode = ssp.DicDataValue;
         order.InitId();
         await _orderDomainService.AddAsync(order);
         if (dto.Files.NotNullOrEmpty())

+ 1 - 0
src/Hotline.Application.Tests/Application/OrderSnapshotApplicationTest.cs

@@ -66,6 +66,7 @@ public class OrderSnapshotApplicationTest : TestBase
 
         var labelLog = await _orderSnapshotApplication.GetSignOrderSnapshotLogItemsAsync(new SignOrderSnapshotLogItemsInDto()).ToPagedListAsync(new PagedRequest());
         labelLog.Items.Any(m => m.Title.IsNullOrEmpty()).ShouldBe(false);
+        labelLog.Items.Any(m => m.SourceChannel.IsNullOrEmpty()).ShouldBe(false);
     }
 }
 

+ 4 - 4
src/Hotline.Application/Snapshot/OrderSnapshotApplication.cs

@@ -277,10 +277,10 @@ public class OrderSnapshotApplication : IOrderSnapshotApplication, IScopeDepende
         //    snapshot.IsRectifyDepartment = true;
         //if (labels.Any(m => m.Key == "wzg"))
         //    snapshot.IsRectifyDepartment = false;
-        //if (labels.Any(m => m.Key == "ss"))
-        //    snapshot.IsTruthDepartment = true;
-        //if (labels.Any(m => m.Key == "bss"))
-        //    snapshot.IsTruthDepartment = false;
+        if (labels.Any(m => m.Key == "ss"))
+            snapshot.IsTruthDepartment = true;
+        if (labels.Any(m => m.Key == "bss"))
+            snapshot.IsTruthDepartment = false;
         await _orderSnapshotRepository.UpdateAsync(snapshot);
 
         var entity = new SnapshotLabelLog { 

+ 56 - 3
src/Hotline.Share/Dtos/Snapshot/OrderDto.cs

@@ -1452,7 +1452,7 @@ public class SignOrderSnapshotLogItemsOutDto
     /// <summary>
     /// 来源
     /// </summary>
-    public string Source { get; set; }
+    public string SourceChannel { get; set; }
 
     /// <summary>
     /// 受理编号
@@ -1507,10 +1507,63 @@ public class SignOrderSnapshotLogItemsOutDto
 
 public record OrderSnapshotItemsInDto : PagedRequest
 {
-
+    
 }
 
 public class OrderSnapshotItemsOutDto
-{ 
+{
+    /// <summary>
+    /// 过期状态
+    /// </summary>
+    public EExpiredStatus ExpiredStatus { get; set; }
+
+    /// <summary>
+    /// 过期状态
+    /// </summary>
+    public string ExpiredStatusText => ExpiredStatus.GetDescription();
+
+    /// <summary>
+    /// 受理编号
+    /// </summary>
+    public string No { get; set; }
 
+    /// <summary>
+    /// 信件状态
+    /// </summary>
+    public EOrderStatus Status { get; set; }
+
+    /// <summary>
+    /// 信件状态
+    /// </summary>
+    public string StatusTxt => Status.GetDescription();
+
+    /// <summary>
+    /// 来源
+    /// </summary>
+    public string SourceChannel { get; set; }
+
+    /// <summary>
+    /// 当前节点
+    /// </summary>
+    public string CurrentStepName { get; set; }
+
+    /// <summary>
+    /// 重办次数
+    /// </summary>
+    public int ReTransactNum { get; set; }
+
+    /// <summary>
+    /// 是否紧急
+    /// </summary>
+    public bool IsUrgent { get; set; }
+
+    /// <summary>
+    /// 是否超期
+    /// </summary>
+    public bool IsExpired { get; set; }
+
+    /// <summary>
+    /// 超期时间
+    /// </summary>
+    public DateTime ExpiredTime { get; set; }
 }