Bladeren bron

修改售后导出字段

zhuyiyi 5 maanden geleden
bovenliggende
commit
8fa91de237
2 gewijzigde bestanden met toevoegingen van 161 en 9 verwijderingen
  1. 160 9
      SiteCore/taobao/commonHelper.cs
  2. 1 0
      Web/EAfterSale/AllAfterSale.aspx

+ 160 - 9
SiteCore/taobao/commonHelper.cs

@@ -29,6 +29,7 @@ using System.Reflection.Emit;
 using NPOI.SS.Formula.Functions;
 using System.Security.Cryptography;
 using NHibernate.Hql.Ast;
+using System.Security.Principal;
 
 namespace SiteCore
 {
@@ -2151,7 +2152,7 @@ namespace SiteCore
             }
             catch (Exception ex)
             {
-                LogHelper.addLog(entity.ctid, 0, "CYT售后单推送:" + ex.ToString());
+                LogHelper.addLog(entity.ctid, 0, "CYT售后单推送:" + ex);
             }
 
         }
@@ -2777,11 +2778,13 @@ namespace SiteCore
             string result = designHelper.API_CheckOrderTo(ceErpTradeCellExtend.ctid, ceErpTradeCellExtend.spu_id, ceErpTradeCell.ShopId);
             ceErpTradeCellExtend.ToType = result;
             int dispatchSort = 0;
-            if (spu_products.Contains(ceErpTradeCell.ProductId) || ceErpTradeCell.seller_memo.IndexOf("手绘") > -1 || ceErpTradeCell.seller_memo.IndexOf("电子稿") > -1 || ceErpTradeCell.isDianziOrder > 0)
+            if ("无".Equals(result) && spu_shopIds.Contains(ceErpTradeCell.ShopId))
             {
-                ceErpTradeCellExtend.ToType = "外协";
-                dispatchSort = 2;
+                ceErpTradeCellExtend.ToType = "内部";
+
+                dispatchSort = 0;
             }
+
             if ((ceErpTradeCell.seller_memo.Contains("改稿") || ceErpTradeCell.OtherMemo.Contains("改稿")) && spu_shopIds.Contains(ceErpTradeCell.ShopId) && !spu_products.Contains(ceErpTradeCell.ProductId))
             {
                 ceErpTradeCellExtend.ToType = "内部";
@@ -2796,12 +2799,12 @@ namespace SiteCore
                 dispatchSort = 0;
 
             }
-            if ("无".Equals(result) && spu_shopIds.Contains(ceErpTradeCell.ShopId))
+            if (spu_products.Contains(ceErpTradeCell.ProductId) || ceErpTradeCell.seller_memo.IndexOf("手绘") > -1 || ceErpTradeCell.seller_memo.IndexOf("电子稿") > -1 || ceErpTradeCell.isDianziOrder > 0)
             {
-                ceErpTradeCellExtend.ToType = "内部";
-
-                dispatchSort = 0;
+                ceErpTradeCellExtend.ToType = "外协";
+                dispatchSort = 2;
             }
+
             string sql_pay = string.Format("update CE_ErpTradeCell with(rowlock) set DispatchSort={0} where ctid='{1}';", dispatchSort, ceErpTradeCell.ctid);
             CeErpTradeCell.ExecuteNonQuery(sql_pay.ToString());
             if (ceErpTradeCellExtend.ID > 0)
@@ -3313,11 +3316,12 @@ namespace SiteCore
             }
             itemMemo = itemMemo.Replace("\r", " ");
             itemMemo = itemMemo.Replace("\n", " ");
-            string[] acclist = itemMemo.Split('-');
             string newmemo = "";
 
             if (itemMemo.Contains("logo") || itemMemo.Contains("LOGO"))
             {
+                string[] acclist = itemMemo.Split('-');
+
                 if (acclist.Length < 4) return null;
 
 
@@ -3364,8 +3368,155 @@ namespace SiteCore
                 entity.seller_memo = newmemo;
                 entity.OtherMemo = newOtherMemo;
             }
+            else if (itemMemo.Contains("合包"))
+            {
+                itemMemo = itemMemo.Replace(",", ",");
+                string[] hebaoMemoList = itemMemo.Split(',');
+                string newOtherMemo = "";
+                bool isMulity = true;
+                if (string.IsNullOrEmpty(entity.SplitTag))
+                {
+                    isMulity = false;
+                }
+                string memo_index1 = hebaoMemoList[0];
+                string[] acclist = memo_index1.Split('-');
+                string account = acclist[5];
+                newmemo = "(" + entity.OrderSn + ")-";
+                for (int idx = 0; idx < hebaoMemoList.Length; idx++)
+                {
+
+                    string smallitem = hebaoMemoList[idx];
+                    if (idx == 0 && smallitem.IndexOf("海报") != -1)
+                    {
+                        newmemo = "";
+                    }
+
+                    string[] smallList = smallitem.Split('-');
+
+                    if (smallList.Length > 5 && idx > 0)
+                    {
+                        string itemsize = smallList[0];
+                        string itemcount = smallList[1];
+                        string itemmt = "", itemct = "";
+                        if ((smallList[3] == "不干胶" || smallitem.IndexOf("PVC卡片") != -1 || smallitem.IndexOf("pvc卡片") != -1 || smallitem.IndexOf("海报") != -1) && smallitem.IndexOf("礼物") == -1)
+                        {
+                            itemmt = acclist[2];
+                        }
+                        else
+                        {
+                            itemmt = acclist[3];
+                        }
+                        itemct = acclist[4];
+                        entity.ProductSize = entity.ProductSize + "," + itemsize;
+                        entity.ProductCount = entity.ProductCount + "," + itemcount;
+                        entity.Material = entity.Material + "," + itemmt;
+                        entity.Craft = entity.Craft + "," + itemct;
+
+                    }
+
+
+                    if (smallList.Length >= 7)
+                    {
+                        smallList[6] = smallList[6].Replace("(", "");
+                        smallList[6] = smallList[6].Replace(")", "");
+                        smallList[6] = smallList[6].Replace("(", "");
+                        smallList[6] = smallList[6].Replace(")", "");
+                        entity.MakeSupplier = smallList[6];
+                        smallList[6] = "(" + smallList[6] + ")";
+                        newmemo += smallList[6];
+                        newmemo += "-";
+                    }
+                    if (false)
+                    {
+                        newmemo += smallList[2];
+                        newmemo += smallList[0];
+                        newmemo += "-";
+                        newmemo += smallList[1];
+                        newmemo += "(";
+                        newmemo += entity.OrderSn;
+                        newmemo += ")";
+                        newmemo += "-";
+                        newmemo += smallList[4];
+                        if (smallList.Length > 7)
+                        {
+                            for (int i = 7; i < smallList.Length; i++)
+                            {
+                                newOtherMemo += smallList[i];
+                                newOtherMemo += "-";
+                            }
+                        }
+                        if (smallitem.IndexOf("5mmpvc") != -1)
+                        {
+                            entity.ProductId = 8;  //pvc卡片
+                        }
+                    }
+                    else
+                    {
+                        for (int i = 0; i < smallList.Length; i++)
+                        {
+                            if (isMulity && i == 5)
+                            {
+                                continue;
+                            }
+
+                            if (i >= 7)
+                            {
+                                newOtherMemo += smallList[i];
+                                if (i < smallList.Length - 2 && i != 2 && i != 3)
+                                {
+                                    newOtherMemo += "-";
+                                }
+                            }
+                            else
+                            {
+                                if (i == 5 || i == 6)
+                                {
+                                    continue;
+                                }
+                                else
+                                    newmemo += smallList[i];
+
+                                if (i != 2 && i != 3)
+                                {
+                                    newmemo += "-";
+                                }
+                            }
+
+                        }
+                    }
+
+
+                    if (hebaoMemoList.Length > idx + 1)
+                    {
+                        newmemo += ",";
+                        newOtherMemo += ",";
+                    }
+                }
+                entity.ProductCount = commonHelper.getProductCount(entity.ProductCount);
+                string sName = tmcHelper.getShopSNameByName(father.seller_nick);
+                newmemo += (sName);
+                if (father.buyer_nick.IndexOf("*") < 0)
+                {
+                    newmemo += ("-" + father.buyer_nick);
+                }
+                newmemo += ("-" + father.receiver_state);
+                DataRow cusInfo = tmcHelper.getUserInfoByAccount(account); //客服id
+                if (cusInfo != null)
+                {
+                    entity.CustomerUserId = Convert.ToInt32(cusInfo["ID"]);
+                }
+                if (cusInfo != null)
+                {
+                    newmemo += ("-" + Convert.ToString(cusInfo["Tb"]));
+                }
+
+                entity.seller_memo = newmemo;
+                entity.OtherMemo = newOtherMemo;
+            }
             else
             {
+                string[] acclist = itemMemo.Split('-');
+
                 bool isXianhuo = false;
                 if (acclist[0] == "现货")
                 {

+ 1 - 0
Web/EAfterSale/AllAfterSale.aspx

@@ -107,6 +107,7 @@
             <div field="AfterSaleSupplierMemo" visible="false" width="40" align="center" headeralign="center">不认可原因</div>
 
             <div field="seller_memo" width="40" visible="false" align="center" headeralign="center">文件名</div>
+            <div field="spu_id" width="40" visible="false" align="center" headeralign="center">spu</div>
             <div field="TextResult" width="40" visible="false" align="center" headeralign="center">客户售后结果</div>
             <div field="diffResultPrice" visible="false" align="center" headeralign="center">客户售后退差金额</div>
             <div field="IsBad" width="40" visible="false" align="center" headeralign="center" renderer="handIsBadRenderer">差评</div>