瀏覽代碼

打印快递传递needlogo字段参数为TRUE
添加参数startGotTime

dujj 2 年之前
父節點
當前提交
c31eb7ecd2
共有 2 個文件被更改,包括 22 次插入2 次删除
  1. 14 2
      Demo/Demo/Common/Request/Label/OrderParam.cs
  2. 8 0
      Demo/Demo/Utils/DateUtils.cs

+ 14 - 2
Demo/Demo/Common/Request/Label/OrderParam.cs

@@ -150,7 +150,19 @@ namespace Common.Request.Label
         ///  预约取件开始时间
         /// </summary>
         /// <value></value>
-        public long startGotTime;
+        public long startGotTime
+        {
+            get
+            {
+                if (this.kuaidicom.Equals("kuayue"))
+                { return Utils.DateUtils.GetStartGotTime(); }
+                else
+                {
+                    return  0;
+                }
+                
+            }
+        }
         /// <summary>
         ///  预约取件结束时间
         /// </summary>
@@ -334,7 +346,7 @@ namespace Common.Request.Label
         ///  是否需要logo false:关闭(默认)true:开启
         /// </summary>
         /// <value></value>
-        public bool needLogo;
+        public bool needLogo = true;
         /// <summary>
         ///  打印类型(HTML,IMAGE,CMD,CLOUD,NON)
         ///  NON:只下单不打印(默认)

+ 8 - 0
Demo/Demo/Utils/DateUtils.cs

@@ -9,5 +9,13 @@ namespace Utils
              TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
             return Convert.ToInt64(ts.TotalMilliseconds).ToString();
         }
+
+        public static long GetStartGotTime()
+        {
+            DateTime td = DateTime.Today;
+            DateTime startGotTime = new DateTime(td.Year,td.Month,td.Day,16,30,0,0,DateTimeKind.Utc);
+            TimeSpan ts = startGotTime - new DateTime(1970, 1, 1, 0, 0, 0, 0);
+            return Convert.ToInt64(ts.TotalMilliseconds);
+        }
     }
 }