schangxiang@126.com
2024-09-02 f0826424c58f3e925a77437111a2e06808bfff26
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs
@@ -1,4 +1,5 @@
using iWare_SCADA_BusinessLogical.Utils;
using iWare_SCADA_BusinessLogical;
using iWare_SCADA_BusinessLogical.Utils;
using iWare_SCADA_Model;
using System;
using System.Collections.Generic;
@@ -102,7 +103,10 @@
        private void button4_Click(object sender, EventArgs e)
        {
            string paht = "C:\\Users\\Administrator\\Desktop\\临时\\aa\\FO_000006966558.txt";
            DataCaptureHandler_02 dataCaptureHandler_02 = new DataCaptureHandler_02();
            dataCaptureHandler_02.GetCH5InfoForOP30(paht, new WorkPieceLogMiddle());
        }
        private void btn_TongJi_Click(object sender, EventArgs e)
@@ -285,7 +289,7 @@
            total += "\r\n";
            //处理
            workPieceProcessList = workPieceProcessList.OrderBy(x => x.WorkingProcedureCurrent).ToList();
            workPieceProcessList = workPieceProcessList.OrderBy(x => x.WorkingProcedureCurrent).ThenBy(x=>x.WorkPieceID).ToList();
            foreach (var item in workPieceProcessList)
            {
                str += $"缺少{item.WorkingProcedureCurrent}工序,WorkPieceID: {item.WorkPieceID}  \r\n";
@@ -313,5 +317,29 @@
            }
            return new_strList;
        }
        private void button6_Click(object sender, EventArgs e)
        {
            try
            {
                string path = @"U:\\NutrunnerData\\FO\\SEQ_24";
                var newFiles = FileHelper.DetectNewFiles(path, "*.dfq", 300, DateTime.Now.AddDays(-100), DateTime.Now.AddDays(1));
                foreach (System.IO.FileInfo file in newFiles)
                {
                    //MessageBox.Show("找到文件:" + file.FullName);
                    var toPath = file.FullName.Replace("Measuring_Data_df_Test", "Measuring_Data_df_Copy");
                    //MessageBox.Show("要移动到:" + file.FullName);
                    File.Move(file.FullName, toPath);//移动
                }
                MessageBox.Show("成功");
            }
            catch (Exception ex)
            {
                MessageBox.Show("异常:" + ex.Message);
            }
        }
    }
}