Browse Source

Merge branch 'master' of http://47.244.232.78:3000/FLH/XYY.Core

lzk 4 days ago
parent
commit
544c255c31
1 changed files with 9 additions and 16 deletions
  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
                 try
                 {
                 {
                     List<Order_listItem> order_ListItems = new List<Order_listItem>();
                     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();//获取单号用于调试时校验
                     var verifyNumber = item.Value.Select(x => x.TrackingNumber).ToList();//获取单号用于调试时校验
                     ChannelBagDeclareRequest request = new ChannelBagDeclareRequest();
                     ChannelBagDeclareRequest request = new ChannelBagDeclareRequest();
                     //没有袋号不能出库
                     //没有袋号不能出库
@@ -127,13 +127,6 @@ namespace XYY.Service.Standard.ChannelApi._4PX
             return list;
             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)
         public async Task<UploadResult> DataUpload(Order_Order order, List<Order_OrderGoods> goods, Logistics_Channel channel, ExtendArg arg)
         {
         {
             if (order.ReceiverCountryCode != "GB" && channel.ServiceCode == "O5")
             if (order.ReceiverCountryCode != "GB" && channel.ServiceCode == "O5")
@@ -171,7 +164,7 @@ namespace XYY.Service.Standard.ChannelApi._4PX
 
 
             foreach (var item in goods)
             foreach (var item in goods)
             {
             {
-                if(item.CnName == "牙套")
+                if (item.CnName == "牙套")
                 {
                 {
                     item.CnName = "塑料支架";
                     item.CnName = "塑料支架";
                     item.EnName = "Plastic bracket";
                     item.EnName = "Plastic bracket";
@@ -294,7 +287,7 @@ namespace XYY.Service.Standard.ChannelApi._4PX
             }
             }
             catch (Exception ex)
             catch (Exception ex)
             {
             {
-                if (ex.Message.Contains("单号已存在:参考单号")||ex.Message.Contains(" in processing"))
+                if (ex.Message.Contains("单号已存在:参考单号") || ex.Message.Contains(" in processing"))
                 {
                 {
                     orderResult = new OrderResult
                     orderResult = new OrderResult
                     {
                     {
@@ -398,18 +391,18 @@ namespace XYY.Service.Standard.ChannelApi._4PX
                 refNo += "-" + _order_OrderPrintQtyRepository.GetPackagePrintQty(order.SystemNo);
                 refNo += "-" + _order_OrderPrintQtyRepository.GetPackagePrintQty(order.SystemNo);
             }
             }
 
 
-            if (_4pxOrders.Contains(order.TrackingNumber))
-            {
-                refNo = refNo.Replace("XYYEX", "0A");
-            }
             if (channel.Id == 263)
             if (channel.Id == 263)
                 refNo = refNo.Replace("XYYEX", "B");
                 refNo = refNo.Replace("XYYEX", "B");
             else if (channel.Id >= 202)
             else if (channel.Id >= 202)
                 refNo = refNo.Replace("XYYEX", "A");
                 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;
                 refNo = order.SystemNo;
             }
             }
+            else if (order.ChannelId == 566)
+            {
+                refNo = order.TransferNumber;
+            }
             if (arg.IsReplate)
             if (arg.IsReplate)
             {
             {
                 refNo = order.SystemNo += _order_OrderPrintQtyRepository.GetPackagePrintQty(order.SystemNo);
                 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)
         private async Task<string> GetChannelBagLabel(List<Order_listItem> order_ListItems, Logistics_Channel Channel)
         {
         {
-            
+
             BagLabelRequest bagLabelRequest = new()
             BagLabelRequest bagLabelRequest = new()
             {
             {
                 finish_bagging_time = ConvertDateTimeInt(DateTime.Now),
                 finish_bagging_time = ConvertDateTimeInt(DateTime.Now),