Browse Source

添加站位回退功能

callm 5 months ago
parent
commit
f17ce416de

+ 1 - 2
UAS_MES_ZJT/DataOperate/ExcelHandler.cs

@@ -20,11 +20,10 @@ namespace UAS_MES_NEW.DataOperate
         /// </summary>
         public string ExportExcel(DataTable dt, string FolderPath)
         {
-            //创建一个内存流,用来接收转换成Excel的内容
             MemoryStream ms;
             ms = DataTableToExcel(dt);
             //以系统当前时间命名文件,FileMode.Create表示创建文件,FileAccess.Write表示拥有写的权限
-            string filePath = @FolderPath + "\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls";
+            string filePath = FolderPath;
             FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
             byte[] data = ms.ToArray();
             fs.Write(data, 0, data.Length);

+ 1 - 1
UAS_MES_ZJT/FunctionCode/Special/Special_Reset.cs

@@ -68,7 +68,7 @@ namespace UAS_MES_NEW.Special
             }
             string makecode = dt.Rows[0]["ms_makecode"].ToString();
             string stname = dh.getFieldDataByCondition("step", "st_name", "st_code = '" + stepcode + "'").ToString();
-            dh.ExecuteSql("update makeserial set ms_status=1,ms_outboxcode='',ms_printcount = 0, ms_nextstepcode= '" + stepcode + "' where ms_sncode='" + sncode + "' and ms_makecode='" + makecode + "'", "update");
+            dh.ExecuteSql("update makeserial set ms_status=1,ms_outboxcode='',ms_stepcode='',ms_printcount = 0, ms_nextstepcode= '" + stepcode + "' where ms_sncode='" + sncode + "' and ms_makecode='" + makecode + "'", "update");
             dh.ExecuteSql("delete makebad where mb_sncode = '" + sncode + "' and mb_makecode='" + makecode + "' and mb_status = 0", "delete");
             dh.ExecuteSql("delete labelprintlog where lpl_value = '" + sncode + "'  ", "delete");
             sql.Clear();