|
|
@@ -3,6 +3,7 @@ using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using System.ComponentModel;
|
|
|
using System.Data;
|
|
|
+using System.IO;
|
|
|
using System.Reflection;
|
|
|
using System.Text;
|
|
|
using System.Text.RegularExpressions;
|
|
|
@@ -453,6 +454,27 @@ namespace UAS_MES.PublicMethod
|
|
|
return URL;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 获取标签的路径
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="URL"></param>
|
|
|
+ /// <param name="LabelName"></param>
|
|
|
+ /// <param name="time"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static string GetLabelUrl(string URL, string LabelName, DateTime time)
|
|
|
+ {
|
|
|
+ //如果是传入的数据是从FTP取的文件
|
|
|
+ if (URL.Contains("ftp:"))
|
|
|
+ {
|
|
|
+ ftpOperater ftp = new ftpOperater();
|
|
|
+ return ftp.Download(LabelName, time);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return URL;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 往DataTable中添加数据
|
|
|
/// </summary>
|
|
|
@@ -869,5 +891,19 @@ namespace UAS_MES.PublicMethod
|
|
|
}
|
|
|
return ndt;
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 获取打印标签
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="labelName"></param>
|
|
|
+ /// <param name="labelUrl"></param>
|
|
|
+ /// <param name="indate"></param>
|
|
|
+ public static void GetPrintLabel(string labelName,string labelUrl,string indate) {
|
|
|
+ string LabelUrl = labelUrl;
|
|
|
+ string LabelName = labelName;
|
|
|
+ System.DateTime time = Convert.ToDateTime(indate);
|
|
|
+ FileInfo file = new FileInfo(ftpOperater.DownLoadTo + LabelName);
|
|
|
+ if (time.ToString() != file.LastWriteTime.ToString())
|
|
|
+ BaseUtil.GetLabelUrl(LabelUrl, LabelName, time);
|
|
|
+ }
|
|
|
}
|
|
|
}
|