zhuyiyi 7 月之前
父節點
當前提交
f6d71697d2
共有 4 個文件被更改,包括 13 次插入9 次删除
  1. 4 0
      SiteCore/Handler/noti.cs
  2. 3 3
      SiteCore/Handler/sync.order.cs
  3. 5 5
      SiteCore/taobao/commonHelper.cs
  4. 1 1
      SiteCore/taobao/preSalesHelper.cs

+ 4 - 0
SiteCore/Handler/noti.cs

@@ -589,6 +589,10 @@ namespace SiteCore.Handler
                     return;
                 }
                 string info_sql = string.Format("SELECT ctid FROM [dbo].[CE_ErpTradeCell] WHERE tid ='{0}'", tradeCell.tid);
+                if (tradeCell.ctid.Contains("S_"))
+                {
+                    info_sql = string.Format("SELECT ctid FROM [dbo].[CE_ErpTradeCell] WHERE ctid ='{0}'", tradeCell.ctid);
+                }
                 DataTable data = DbHelper.DbConn.ExecuteDataset(info_sql).Tables[0];
                 string content = GetPostString("content");
                 int eid = GetPostInt("id");

+ 3 - 3
SiteCore/Handler/sync.order.cs

@@ -57,7 +57,7 @@ namespace SiteCore.Handler
 
             string poscode = CurrentUser.UserPost.Post.Code;
             DataStruct dStruct = GetPostStruct();
-            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\CE_ErpProduct(2).xlsx");
+            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\店铺.xlsx");
             //apiHelper.Api_SyncOrderByTime("598825");
             //apiHelper.API_GetWaybill("ZTO-CAINIAO-TZJK", "4233447147588233939");
             //apiHelper.Api_SyacOrder("2460143282114312263", "yujia");
@@ -2492,7 +2492,7 @@ namespace SiteCore.Handler
 
         public List<string> getTidByCtidMore(string ctid)
         {
-            string sql = string.Format("select tid from CE_ErpTradeCell where (ctid = '{0}' or tid = '{0}' or orderSn = '{0}' or ParentSplitNo = '{0}' or ptid = '{0}')", ctid);
+            string sql = string.Format("select tid from CE_ErpTradeCell where (ctid = '{0}' or tid = '{0}' or orderSn = '{0}' or ( ParentSplitNo = '{0}' and IsSample =2) or (ptid = '{0}' and IsSample =2 ))", ctid);
             DataTable dataTable = DbHelper.DbConn.ExecuteDataset(sql).Tables[0];
             List<string> list = new List<string>();
             if (dataTable != null && dataTable.Rows.Count > 0)
@@ -12872,7 +12872,7 @@ namespace SiteCore.Handler
 
                     string result = designHelper.API_CheckOrderTo(ceErpTradeCellExtend.ctid, ceErpTradeCellExtend.spu_id, ceErpTradeCell.ShopId);
                     ceErpTradeCellExtend.ToType = result;
-                    List<int> products = new List<int>() { 4, 13, 19, 24, 28, 32, 40, 51, 57, 1971, 2319, 2377, 2521, 2524, 2533, 2538, 2542, 2554, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2568, 2569, 2570, 2571, 2572, 2619, 2625, 2634, 2636, 2637, 2638, 2645, 2646 };
+                    List<int> products = new List<int>() { 4, 13, 19, 24, 28, 32, 40, 51, 57, 1971, 2319, 2377, 2521, 2524, 2533, 2538, 2542, 2554, 2556, 2557, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2568, 2569, 2570, 2571, 2572, 2619, 2625, 2634, 2636, 2637, 2638, 2645, 2646 };
                     List<int> shopIds = new List<int>() { 5, 6, 8, 10, 11, 12, 14, 15, 16, 17, 18, 21, 23, 24, 27, 28, 31, 32, 56, 61, 63, 64, 66, 124, 126, 127, 128 };
                     if (products.Contains(ceErpTradeCell.ProductId) || ceErpTradeCell.seller_memo.IndexOf("手绘") > -1 || ceErpTradeCell.seller_memo.IndexOf("电子稿") > -1 || ceErpTradeCell.isDianziOrder > 0)
                     {

+ 5 - 5
SiteCore/taobao/commonHelper.cs

@@ -1867,7 +1867,7 @@ namespace SiteCore
                     }
                 }
             }
-            string info_sql = string.Format("SELECT ctid,ProductId,seller_memo FROM [dbo].[CE_ErpTradeCell] WHERE tid ='{0}'", tid);
+            string info_sql = string.Format("SELECT ctid,ProductId,seller_memo FROM [dbo].[CE_ErpTradeCell] WHERE tid ='{0}' AND OrderState < 5", tid);
             DataTable data = DbHelper.DbConn.ExecuteDataset(info_sql).Tables[0];
             string check_info = "无订单信息";
             if (data.Rows.Count > 0)
@@ -1880,7 +1880,7 @@ namespace SiteCore
 
                     if (cell != null)
                     {
-                        if (cell.DesignUserId == 0 || cell.DispatchSort == 2 || cell.seller_memo.Contains("S_"))
+                        if (cell.DesignUserId == 0 || cell.DispatchSort == 2 || cell.ctid.Contains("S_"))
                         {
                             designApiResponseVo result = checkOrderDesignInfo(cell, "", data);
                             check_info = result.msg;
@@ -1899,7 +1899,7 @@ namespace SiteCore
 
                 if (need_send && !has_design)
                 {
-                    string sql_pay = "update CE_ErpTradeCell with(rowlock) set DispatchSort=2 where tid='" + tid + "';";
+                    string sql_pay = "update CE_ErpTradeCell with(rowlock) set DispatchSort=2 where tid='" + tid + "' AND OrderState < 5;";
                     CeErpTradeCell.ExecuteNonQuery(sql_pay.ToString());
                     return new designApiResponseVo(200, "");
                 }
@@ -1932,7 +1932,7 @@ namespace SiteCore
 
             if ((post != "SysAdmin" && post != "Summarize"))
             {
-                if (ceErpTradeCell.DesignUserId != 0 && (ceErpTradeCell.DispatchSort != 2 && !ceErpTradeCell.seller_memo.Contains("S_")))
+                if (ceErpTradeCell.DesignUserId != 0 && (ceErpTradeCell.DispatchSort != 2 && !ceErpTradeCell.ctid.Contains("S_")))
                 {
                     return new designApiResponseVo(-1, "已有设计师无法指派");
                 }
@@ -2726,7 +2726,7 @@ namespace SiteCore
                         CeErpTradeCell ceErpTradeCell = CeErpTradeCell.GetByCtid(ceErpTradeCellExtend.ctid);
                         string result = designHelper.API_CheckOrderTo(ceErpTradeCellExtend.ctid, ceErpTradeCellExtend.spu_id, ceErpTradeCell.ShopId);
                         ceErpTradeCellExtend.ToType = result;
-                        List<int> products = new List<int>() { 4, 13, 19, 24, 28, 32, 40, 51, 57, 1971, 2319, 2377, 2521, 2524, 2533, 2538, 2542, 2554, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2568, 2569, 2570, 2571, 2572, 2619, 2625, 2634, 2636, 2637, 2638, 2645, 2646 };
+                        List<int> products = new List<int>() { 4, 13, 19, 24, 28, 32, 40, 51, 57, 1971, 2319, 2377, 2521, 2524, 2533, 2538, 2542, 2554, 2556, 2557, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2568, 2569, 2570, 2571, 2572, 2619, 2625, 2634, 2636, 2637, 2638, 2645, 2646 };
                         List<int> shopIds = new List<int>() { 5, 6, 8, 10, 11, 12, 14, 15, 16, 17, 18, 21, 23, 24, 27, 28, 31, 32, 56, 61, 63, 64, 66, 124, 126, 127, 128 };
                         if (products.Contains(ceErpTradeCell.ProductId) || ceErpTradeCell.seller_memo.IndexOf("手绘") > -1 || ceErpTradeCell.seller_memo.IndexOf("电子稿") > -1 || ceErpTradeCell.isDianziOrder > 0)
                         {

+ 1 - 1
SiteCore/taobao/preSalesHelper.cs

@@ -1921,7 +1921,7 @@ namespace SiteCore.Handler
                     {
                         string result = designHelper.API_CheckOrderTo(ceErpTradeCellExtend.ctid, ceErpTradeCellExtend.spu_id, entity.ShopId);
                         ceErpTradeCellExtend.ToType = result;
-                        List<int> products = new List<int>() { 4, 13, 19, 24, 28, 32, 40, 51, 57, 1971, 2319, 2377, 2521, 2524, 2533, 2538, 2542, 2554, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2568, 2569, 2570, 2571, 2572, 2619, 2625, 2634, 2636, 2637, 2638, 2645, 2646 };
+                        List<int> products = new List<int>() { 4, 13, 19, 24, 28, 32, 40, 51, 57, 1971, 2319, 2377, 2521, 2524, 2533, 2538, 2542, 2554, 2556, 2557, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2568, 2569, 2570, 2571, 2572, 2619, 2625, 2634, 2636, 2637, 2638, 2645, 2646 };
                         List<int> shopIds = new List<int>() { 5, 6, 8, 10, 11, 12, 14, 15, 16, 17, 18, 21, 23, 24, 27, 28, 31, 32, 56, 61, 63, 64, 66, 124, 126, 127, 128 };
                         if (products.Contains(entity.ProductId) || entity.seller_memo.IndexOf("手绘") > -1 || entity.seller_memo.IndexOf("电子稿") > -1 || entity.isDianziOrder > 0)
                         {