浏览代码

4px服装专线面单直接交运

FLH 1 周之前
父节点
当前提交
34a852ca9e
共有 1 个文件被更改,包括 9 次插入16 次删除
  1. 9 16
      3.Service/XYY.Service.Standard.ChannelApi/_4PX/Api.cs

+ 9 - 16
3.Service/XYY.Service.Standard.ChannelApi/_4PX/Api.cs

@@ -50,7 +50,7 @@ namespace XYY.Service.Standard.ChannelApi._4PX
                 try
                 {
                     List<Order_listItem> order_ListItems = new List<Order_listItem>();
-                    order_ListItems.AddRange(item.Value.GroupBy(x=>x.TrackingNumber).Select(x => new Order_listItem() { order_no = x.FirstOrDefault().TrackingNumber, weight = x.FirstOrDefault().OPWeight }));
+                    order_ListItems.AddRange(item.Value.GroupBy(x => x.TrackingNumber).Select(x => new Order_listItem() { order_no = x.FirstOrDefault().TrackingNumber, weight = x.FirstOrDefault().OPWeight }));
                     var verifyNumber = item.Value.Select(x => x.TrackingNumber).ToList();//获取单号用于调试时校验
                     ChannelBagDeclareRequest request = new ChannelBagDeclareRequest();
                     //没有袋号不能出库
@@ -127,13 +127,6 @@ namespace XYY.Service.Standard.ChannelApi._4PX
             return list;
         }
 
-        string[] _4pxOrders = new string[] {
-                "420112189361210914450005548317",
-                "420367489361210914350007295021",
-                "420601319361210914250008057324",
-                "420912059361210914150004550389",
-                "420917029361210914150004582663"
-        };
         public async Task<UploadResult> DataUpload(Order_Order order, List<Order_OrderGoods> goods, Logistics_Channel channel, ExtendArg arg)
         {
             if (order.ReceiverCountryCode != "GB" && channel.ServiceCode == "O5")
@@ -171,7 +164,7 @@ namespace XYY.Service.Standard.ChannelApi._4PX
 
             foreach (var item in goods)
             {
-                if(item.CnName == "牙套")
+                if (item.CnName == "牙套")
                 {
                     item.CnName = "塑料支架";
                     item.EnName = "Plastic bracket";
@@ -294,7 +287,7 @@ namespace XYY.Service.Standard.ChannelApi._4PX
             }
             catch (Exception ex)
             {
-                if (ex.Message.Contains("单号已存在:参考单号")||ex.Message.Contains(" in processing"))
+                if (ex.Message.Contains("单号已存在:参考单号") || ex.Message.Contains(" in processing"))
                 {
                     orderResult = new OrderResult
                     {
@@ -398,18 +391,18 @@ namespace XYY.Service.Standard.ChannelApi._4PX
                 refNo += "-" + _order_OrderPrintQtyRepository.GetPackagePrintQty(order.SystemNo);
             }
 
-            if (_4pxOrders.Contains(order.TrackingNumber))
-            {
-                refNo = refNo.Replace("XYYEX", "0A");
-            }
             if (channel.Id == 263)
                 refNo = refNo.Replace("XYYEX", "B");
             else if (channel.Id >= 202)
                 refNo = refNo.Replace("XYYEX", "A");
-            if (order.ChannelId == 544 || order.ChannelId == 566 || order.ChannelId == 716)
+            if (order.ChannelId == 544 || order.ChannelId == 716)
             {
                 refNo = order.SystemNo;
             }
+            else if (order.ChannelId == 566)
+            {
+                refNo = order.TransferNumber;
+            }
             if (arg.IsReplate)
             {
                 refNo = order.SystemNo += _order_OrderPrintQtyRepository.GetPackagePrintQty(order.SystemNo);
@@ -793,7 +786,7 @@ namespace XYY.Service.Standard.ChannelApi._4PX
         //再写个特殊版本的袋号请求,部分没有打箱号的,直接走这里请求
         private async Task<string> GetChannelBagLabel(List<Order_listItem> order_ListItems, Logistics_Channel Channel)
         {
-            
+
             BagLabelRequest bagLabelRequest = new()
             {
                 finish_bagging_time = ConvertDateTimeInt(DateTime.Now),