ソースを参照

修改弹窗逻辑

zhuyiyi 3 ヶ月 前
コミット
dc9005a3bf
4 ファイル変更46 行追加41 行削除
  1. 1 1
      SiteCore/Handler/sync.order.cs
  2. 32 24
      SiteCore/WebCache.cs
  3. 1 1
      SiteCore/taobao/tmcHelper.cs
  4. 12 15
      Web/js/index.js

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

@@ -65,7 +65,7 @@ namespace SiteCore.Handler
             DataStruct dStruct = GetPostStruct();
 
             //string a = SecurityHelper.DecryptSymmetric("YDaPXIhsKgw=");
-            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\特光不干胶成本和售价.xlsx");
+            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\领淘文件名命名规范.xls");
             //apiHelper.Api_SyncOrderByTime("598825");
             //apiHelper.API_GetWaybill("ZTO-CAINIAO-TZJK", "4233447147588233939");
             //apiHelper.Api_SyacOrder("2460143282114312263", "yujia");

+ 32 - 24
SiteCore/WebCache.cs

@@ -1015,7 +1015,6 @@ namespace SiteCore
             if (dStruct.isExport)
             {
                 string where = CommonHelper.CombineWhere(dStruct.MainWhere, dStruct.SecondWhere);
-                //string sql;
                 StringBuilder sql = new StringBuilder();
                 if (dStruct.PageSize != 100000)
                 {
@@ -1027,29 +1026,43 @@ namespace SiteCore
                 }
                 if (where.Length > 0) sql.AppendFormat(" where {0}", where);
                 if (dStruct.Order.Length > 0) sql.AppendFormat(" order by {0}", dStruct.Order);
-                //if (where.Length > 0) sql = string.Format("select top {0} {1} from {2} where {3}", dStruct.PageSize, dStruct.Fileds, tableName, where);
-                //else sql = string.Format("select top {0} {1} from {2} ", dStruct.PageSize, dStruct.Fileds, tableName);
                 DataTable dt = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
                 return dt;
-                /*int pageSize = 1000;
+                /*int pageSize = 0;
                 int pageIndex = 1;
                 DataTable dt = new DataTable();
-                while (true)
+
+                StringBuilder sql = new StringBuilder();
+                sql.AppendFormat("SELECT tid FROM CE_ErpTrade WITH ( NOLOCK ) ");
+
+                if (where.Length > 0) sql.AppendFormat(" where {0}", where);
+
+                DataTable dt_tid = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
+                List<string> tids = new List<string>();
+                foreach (DataRow item in dt_tid.Rows)
                 {
-                    StringBuilder sql = new StringBuilder();
-                    if (dStruct.PageSize != 100000)
-                    {
-                        sql.AppendFormat("select top {0} {1} from {2}", dStruct.PageSize, dStruct.Fileds, tableName);
-                    }
-                    else
+                    tids.Add("'" + item["tid"] + "'");
+                    if (pageSize == 1000)
                     {
-                        sql.AppendFormat("SELECT TOP {2} * FROM (SELECT row_number()  OVER(ORDER BY ID) AS rownumber, {0} FROM {1} WITH(NOLOCK) ", dStruct.Fileds, tableName, pageSize);
-                    }
-
-                    if (where.Length > 0) sql.AppendFormat(" where {0}", where);
+                        DataTable dt_temp = DbHelper.DbConn.ExecuteDataset(string.Format("select * from view_orderlist where tid in ({0})", string.Join(",", tids))).Tables[0];
+                        if (pageIndex == 1)
+                        {
+                            dt = dt_temp.Clone();
+                        }
+                        else
+                        {
+                            dt.Merge(dt_temp);
+                        }
 
-                    sql.AppendFormat(" ) temp_row where rownumber > (({0} - 1) * {1}); ", pageIndex, pageSize);
-                    DataTable dt_temp = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
+                        pageIndex++;
+                        pageSize = 0;
+                        tids = new List<string>();
+                    }
+                    pageSize++;
+                }
+                if (tids.Count > 0)
+                {
+                    DataTable dt_temp = DbHelper.DbConn.ExecuteDataset(string.Format("select * from view_orderlist where tid in ({0})", string.Join(",", tids))).Tables[0];
                     if (pageIndex == 1)
                     {
                         dt = dt_temp.Clone();
@@ -1058,19 +1071,14 @@ namespace SiteCore
                     {
                         dt.Merge(dt_temp);
                     }
-                    if (dt_temp.Rows.Count < pageSize)
-                    {
-                        break;
-                    }
-                    pageIndex++;
+                }*/
 
-                }
 
                 //if (dStruct.Order.Length > 0) sql.AppendFormat(" order by {0}", dStruct.Order);
                 //if (where.Length > 0) sql = string.Format("select top {0} {1} from {2} where {3}", dStruct.PageSize, dStruct.Fileds, tableName, where);
                 //else sql = string.Format("select top {0} {1} from {2} ", dStruct.PageSize, dStruct.Fileds, tableName);
 
-                return dt;*/
+                //return dt;
             }
 
             SqlParameter[] sqlParameter ={

+ 1 - 1
SiteCore/taobao/tmcHelper.cs

@@ -731,7 +731,7 @@ namespace SiteCore
                     {
                         order.spu_id = item.refSpuId;
                     }
-                    List<string> standards_list = new List<string>() { "现货", "封酒贴", "兔团团", "帆布", "手拉旗", "kt", "条幅"};
+                    List<string> standards_list = new List<string>() { "现货", "封酒贴", "兔团团", "帆布", "手拉旗", "kt", "条幅","臂贴"};
                     bool isInList = false;
                     foreach (string text in standards_list)
                     {

+ 12 - 15
Web/js/index.js

@@ -212,10 +212,11 @@ function getMyTipOrder() {
                             callback: function (action) {
                                 if (action == "前往处理") {
                                     goToCheckOrder(ids);
-                                    setTimeout(function () {
-                                        getMyTipOrder();
-                                    }, 3 * 60000);
+                                    
                                 }
+                                setTimeout(function () {
+                                    getMyTipOrder();
+                                }, 3 * 60000);
                             }
                         });
                     } else {
@@ -244,16 +245,13 @@ function getMyTipOrder() {
                                 if (action == "前往处理") {
                                     ids = ids.substring(0, ids.length - 1);
                                     goToHandleOrder(ids, toOrderState);
-                                    setTimeout(function () {
-                                        getMyTipOrder();
-                                    }, intervalTime);
                                 }
                                 else if (action == "稍后提醒") {
                                     laterTipIdx = 30;
-                                    setTimeout(function () {
-                                        getMyTipOrder();
-                                    }, intervalTime);
                                 }
+                                setTimeout(function () {
+                                    getMyTipOrder();
+                                }, intervalTime);
                             }
                         });
                     }
@@ -293,16 +291,15 @@ function getMyTipOrder() {
                             if (action == "前往处理") {
                                 ids = ids.substring(0, ids.length - 1);
                                 goToHandleOrder(ids, toOrderState);
-                                setTimeout(function () {
-                                    getMyTipOrder();
-                                }, intervalTime);
+                                
                             }
                             else if (action == "稍后提醒") {
                                 laterTipIdx = 30;
-                                setTimeout(function () {
-                                    getMyTipOrder();
-                                }, intervalTime);
+                               
                             }
+                            setTimeout(function () {
+                                getMyTipOrder();
+                            }, intervalTime);
                         }
                     });
                 }