소스 검색

完成天阙推送

qinchaoyue 4 달 전
부모
커밋
c65ad9f8e6

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

@@ -279,6 +279,7 @@ public class SnapshotApplicationTest : TestBase
             .OrderByDescending(m => m.CreationTime).FirstAsync();
         var order = await _orderRepository.GetAsync("08dd18e0-1c9e-4aa5-8dc6-f639e8d1b3ea");
         var token = new ThirdTokenDto { AppId = "TAjYAYuA", Secret = "c01eb299b9d784bf55681af4da86bab6ba428101" };
+        order.No = DateTime.Now.ToString("yyyyMMddhhmmssyyyy");
         var result = await _guiderSystemService.PostOrder(order, orderSnapshot, token);
         result.ShouldNotBeNull();
     }

+ 9 - 4
src/TianQue.Sdk/Models/AcceptInfo.cs

@@ -18,9 +18,9 @@ public class AcceptInfo
     /// <summary>
     /// 区域Id
     /// </summary>
-    [Required]
-    [MaxLength(20)]
-    public long OrgId { get; set; }
+    //[Required]
+    //[MaxLength(20)]
+    //public long OrgId { get; set; }
 
     /// <summary>
     /// 经度
@@ -88,6 +88,11 @@ public class AcceptInfo
     /// </summary>
     public bool Prod { get; set; } = false;
 
+    /// <summary>
+    /// 是否高频举报
+    /// </summary>
+    public int IsFrequentReporting { get; set; } = 0;
+
     /// <summary>
     /// 热点分类(大类)
     /// </summary>
@@ -122,7 +127,7 @@ public class PersonInfo
     /// 反映人身份证号
     /// </summary>
     [MaxLength(20)]
-    public string ReflectCardId { get; set; }
+    public string ReflectCardId { get; set; } = "";
 }
 
 public class FileInfo

+ 17 - 1
src/TianQue.Sdk/Models/ApiReponse.cs

@@ -1,4 +1,5 @@
-using System;
+using Microsoft.EntityFrameworkCore.ValueGeneration.Internal;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -29,3 +30,18 @@ public class ApiReponse<T>
     /// </summary>
     public string Msg { get; set; }
 }
+
+public class AcceptInfoSuccessDto
+{
+    // {"appealNumber":"1867128700022034506","orgId":137872}
+
+    /// <summary>
+    /// 编号
+    /// </summary>
+    public string AppealNumber { get; set; }
+
+    /// <summary>
+    /// OrgId
+    /// </summary>
+    public uint OrgId { get; set; }
+}

+ 4 - 5
src/TianQue.Sdk/TiqnQueService.cs

@@ -49,10 +49,9 @@ public class TiqnQueService : IGuiderSystemService, IScopeDependency
 #endif
         var acceptInfo = order.Adapt<AcceptInfo>();
         acceptInfo.ReplyCode = order.No!; // 唯一标识
-        acceptInfo.OrgId = order.ActualHandleOrgAreaCode.NotNullOrEmpty() ? long.Parse(order.ActualHandleOrgAreaCode) : 0; // 区域Id
-        // acceptInfo.DepartmentNo = order.ActualHandleOrgCode!; // 部门编码
         acceptInfo.TypeName = order.AcceptType!; // 诉求类型名称
         acceptInfo.OccurDate = order.CreationTime; // 事发时间
+        //acceptInfo.OccurDate = DateTime.Now; // 事发时间
         acceptInfo.DetailAddress = order.FullAddress!; // 详细地址
         acceptInfo.Topic = order.Title!; // 线索主题
         acceptInfo.DetailContent = order.Content!; // 详细内容
@@ -68,11 +67,11 @@ public class TiqnQueService : IGuiderSystemService, IScopeDependency
         {
             new() {
                 // ReflectCardId = // 反映人身份证号
-                ReflectPhone = order.Contact!,
-                ReflectUserName = order.FromName!,
+                ReflectPhone = order.Contact!, // 电话
+                ReflectUserName = order.FromName!, // 姓名
             } 
         };
-        var result = await httpClient.PostAsync<ApiReponse<string>>(new Uri(_url), acceptInfo);
+        var result = await httpClient.PostAsync<ApiReponse<AcceptInfoSuccessDto>>(new Uri(_url), acceptInfo);
         return result.ToJson();
     }
 }