Browse Source

修改跟踪单号增加推送日志

FLH 3 tuần trước cách đây
mục cha
commit
35662f346f

+ 3 - 0
2.Data/XYY.Data.Strandard/Order/IOrderRepository.cs

@@ -971,6 +971,8 @@ DECLARE @idoc int
             }
         }
 
+        /*方法准备弃用,改为接口处理*/
+        [Obsolete]
         async Task IOrderRepository.UpdateTrackingNumber(List<UpdateDataDto> updateDatas)
         {
             StringBuilder sb = new StringBuilder();
@@ -979,6 +981,7 @@ DECLARE @idoc int
                 string serviceOrderNumebr = item.ServiceOrderNumebr;
                 sb.AppendLine($"update order_order set TransferNumber='{item.TransferNumber}',trackingnumber = '{item.TrackingNumber}',SendOutTime='{item.ReceiveTime.ToString_yyyyMMddHHmmss()}'," +
                     $"ServiceOrderNumber4='{serviceOrderNumebr}',ReceiveTime='{item.ReceiveTime.ToString_yyyyMMddHHmmss()}',OrderStatus=3 where Id = '{item.Id}'");
+                /*这里需要加一个Alter更新*/
                 if (!string.IsNullOrEmpty(item.ServiceOrderNumebr))
                 {
                     sb.AppendLine(@$"  if (select count(0) from Order_ZZESBJJData(nolock) where SystemNo = '{item.SystemNo}')=0

+ 24 - 7
2.Data/XYY.Model.Strandard/Order/AlterExpressNoLog.cs

@@ -8,26 +8,43 @@ using XYY.Core.Standard;
 
 namespace XYY.Model.Standard.Order
 {
+
+    public enum AlterType
+    {
+        TrackingNumber = 0,
+        TransferNumber = 1
+    }
+
     [Table("AlterExpressNoLog")]
     public class AlterExpressNoLog : BaseEntity
     {
-        /// <summary>
-        /// 是否不发送给客户(服务商到库换单的渠道)
-        /// </summary>
-        public bool IsNotSendUser
+
+        public AlterType AlterType
         {
             get; set;
         }
-        public string OldTrackingNumber
+
+        public int OrderId
         {
             get; set;
         }
-
-        public int OrderId
+        public string SystemNo
         {
             get; set;
         }
 
+
+        /// <summary>
+        /// 是否不发送给客户(服务商到库换单的渠道)
+        /// </summary>
+        public bool IsNotSendUser
+        {
+            get; set;
+        }
+        public string OldTrackingNumber
+        {
+            get; set;
+        } 
         public string NewTrackingNumber
         {
             get; set;

+ 4 - 0
3.Service/XYY.Service.Standard.ChannelApi/CaiNiao/Api.cs

@@ -92,6 +92,10 @@ namespace XYY.Service.Standard.ChannelApi.CaiNiao
                         else if (result.data.trackingNumber.StartsWith("UUSC"))
                         {
 
+                        }
+                        else if (result.data.trackingNumber.StartsWith("CNUSUP"))
+                        {
+
                         }
                         else
                         {

+ 2 - 2
3.Service/XYY.Service.Standard.Finance/IFinance_Customer_SupplementService.cs

@@ -62,8 +62,8 @@ namespace XYY.Service.Standard.Finance
 
         public void AddMQ(List<Finance_Customer_SupplementNew> supplementNews)
         {
-            string baseUrl = $"http://localhost:22707/api/Finance/AddSupplementMQ";
-            //string baseUrl = $"http://120.24.149.148/api/Finance/AddSupplementMQ";
+            //string baseUrl = $"http://localhost:22707/api/Finance/AddSupplementMQ";
+            string baseUrl = $"http://120.24.149.148/api/Finance/AddSupplementMQ";
 
             var client = new RestSharp.RestClient(baseUrl);
             var request = new RestSharp.RestRequest();

+ 1 - 0
3.Service/XYY.Service.Standard.Order/ICustomerLazyService.cs

@@ -148,6 +148,7 @@ namespace XYY.Service.Standard.Order
 
         public async Task<bool> AsyncLastTrackingNumber()
         {
+            throw new Exception("方法弃用");
             var orders = await orderRepository.GetWaitSyncCustomerTracking(30);
             string url = $@"http://124.220.133.174:8082/selectTrack.htm?documentCode={string.Join(",", orders.Select(x => x.CustomerOrderNo))}";
             var restClient = new RestClient(url);

+ 2 - 1
3.Service/XYY.Service.Standard.Order/OrderService.cs

@@ -1233,7 +1233,8 @@ where a.OrderStatus<3 and a.SystemNo in @SystemNo";//小于三属于未装箱数
                             OldChannelid = o.ChannelId,
                             NewTrackingNumber = TrackingNumber,
                             OldTrackingNumber = o.SystemNo,
-                            OldLabelPath = o.ServiceLabelPath
+                            OldLabelPath = o.ServiceLabelPath,
+                            SystemNo = o.SystemNo
                         });
                     }
 

+ 2 - 2
5.Api/XYY.Api.Finance/Controllers/FinanceCustomerSupplementsController.cs

@@ -157,11 +157,11 @@ namespace XYY.Api.Finance.Controllers
                 System.Net.WebClient client = new System.Net.WebClient();
                 byte[] data = client.DownloadData(url);
                 MSExcelHelper excelHelper = new MSExcelHelper();
-                excelHelper.LoadDataByByte<CustomerSupplementMapping, Finance_Customer_Supplement>(data);
+                list = excelHelper.LoadDataByByte<CustomerSupplementMapping, Finance_Customer_Supplement>(data);
                 foreach (var item in list)
                 {
                     item.CurrenyRate = currencyCode;
-                    item.SupplementTargetType = (int)type;
+                    item.SupplementTargetType = (int)targetValue;
                     item.FinanceCustomerSupplementType = type;
                 }
                 FinanceCustomerSupplementOrDeductionType financeCustomerSupplementType = type;