Explorar o código

修改异常单时间

zhuyiyi hai 1 mes
pai
achega
8092519412
Modificáronse 3 ficheiros con 16 adicións e 9 borrados
  1. 2 2
      SiteCore/Handler/sync.order.cs
  2. 3 3
      SiteCore/taobao/commonHelper.cs
  3. 11 4
      ecomServer/MainForm.cs

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

@@ -66,7 +66,7 @@ namespace SiteCore.Handler
 
             DataStruct dStruct = GetPostStruct();
             //string a = SecurityHelper.DecryptSymmetric("BnK3+504SQ8=");
-            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\手环售价(3).xlsx");
+            //jiemiUtils.ossFileDecrypt("C:\\Users\\231010\\Downloads\\修筠评价12单\\早哥不吃羊\\新建文本文档.txt");
             //apiHelper.Api_SyncOrderByTime("598825");
             //apiHelper.API_GetWaybill("ZTO-CAINIAO-TZJK", "4233447147588233939");
             //apiHelper.Api_SyacOrder("2460143282114312263", "yujia");
@@ -12771,7 +12771,7 @@ namespace SiteCore.Handler
             DataTable afterSaleData = DbHelper.DbConn.ExecuteDataset(sql).Tables[0];
             data.Merge(afterSaleData);
 
-            sql = string.Format("SELECT SupplierId, ProductId, seller_memo, ProductCount, ProductName, payment, SupplierName, UnusualTime, FinishPlaceTime, OrderState, FinishDeliveryTime, AfterSaleState=0,AfterSaleReason = '',delivery=1 FROM view_ErpTradeCell  WHERE orderstate = 6  AND IsSample = 0  AND SupplierId > 0  AND  FinishPlaceTime > '2024-11-01 00:00:31.000' AND IsRefund <= 1 AND status = 'NOT_SHIPPED' AND LEN( ProductName ) > 0 AND SupplierId not in (86,10)", startMonthDate, endMonthDate);
+            sql = string.Format("SELECT SupplierId, ProductId, seller_memo, ProductCount, ProductName, payment, SupplierName, UnusualTime, FinishPlaceTime, OrderState, FinishDeliveryTime, AfterSaleState=0,AfterSaleReason = '',delivery=1 FROM view_ErpTradeCell  WHERE orderstate = 6  AND IsSample = 0  AND SupplierId > 0  AND  FinishPlaceTime > '2025-11-01 00:00:31.000' AND IsRefund <= 1 AND status = 'NOT_SHIPPED' AND LEN( ProductName ) > 0 AND SupplierId not in (86,10,105)", startMonthDate, endMonthDate);
             DataTable deliveryData = DbHelper.DbConn.ExecuteDataset(sql).Tables[0];
             data.Merge(deliveryData);
             //不干胶-----1,卡片-----29

+ 3 - 3
SiteCore/taobao/commonHelper.cs

@@ -491,7 +491,7 @@ namespace SiteCore
         public static void setDeliveryUnusualOrder2()
         {
             StringBuilder sql = new StringBuilder();
-            sql.AppendFormat("select ctid,IsSF,seller_memo,SupplierId,productId,FinishPlaceTime,ProductCount from view_ErpTradeCell where orderstate=6 and unusualTag=0 and FinishPlaceTime is not null AND DATEDIFF( HH, FinishPlaceTime, GETDATE( ) ) > 24 AND DATEDIFF( DAY, FinishPlaceTime, GETDATE( ) ) < 20  and IsXianHuo=0 and IsSample=0;");
+            sql.AppendFormat("select ctid,IsSF,seller_memo,SupplierId,productId,FinishPlaceTime,ProductCount from view_ErpTradeCell where orderstate=6 and unusualTag=0 and FinishPlaceTime is not null  AND DATEDIFF( DAY, FinishPlaceTime, GETDATE( ) ) < 20  and IsXianHuo=0 and IsSample=0 ;");
             DataTable dt = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
             List<string> tLst = new List<string>();
             if (dt != null && dt.Rows.Count > 0)
@@ -588,8 +588,8 @@ namespace SiteCore
                                 else if (deadLine.Hour > 0 && deadLine.Hour > placeTime.Hour)
                                 {
                                     //在截稿时间之前下单的可以减去一天时间
-                                    sendDay = Math.Max(1, sendDay - 2);
-                                    sendtime = DateTime.Parse(placeTime.ToString("yyyy-MM-dd 23:59:59")).AddDays(sendDay);
+                                    sendDay = Math.Max(1, sendDay - 1);
+                                    sendtime = DateTime.Parse(placeTime.ToString("yyyy-MM-dd 00:00:00")).AddDays(sendDay);
                                 }
                                 else
                                 {

+ 11 - 4
ecomServer/MainForm.cs

@@ -1610,10 +1610,17 @@ namespace ErpServer
         {
             new Thread(new ThreadStart(delegate ()
             {
-                WebClient wc = new WebClient();
-                wc.Encoding = Encoding.GetEncoding("utf-8");
-                byte[] ret = wc.UploadValues("http://183.250.143.56:8088/supplierBuildFile.aspx", "POST", new NameValueCollection());
-                string remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
+                try
+                {
+                    WebClient wc = new WebClient();
+                    wc.Encoding = Encoding.GetEncoding("utf-8");
+                    byte[] ret = wc.UploadValues("http://183.250.143.56:8088/supplierBuildFile.aspx", "POST", new NameValueCollection());
+                    string remoteInfo = Encoding.GetEncoding("utf-8").GetString(ret);
+                }
+                catch (Exception ex)
+                {
+                    WriteLog(string.Format("connetUrl:" + ex));
+                }
             })).Start();
         }