2
schangxiang@126.com
2024-06-26 96fd4864d4beb421fbedc67b02393735b0942229
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using iWare_SCADA_BusinessLogical.Utils;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.IO;
 
namespace iWare_SCADA_Test
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
 
            //计算大头孔直径,大头孔直径=(大头上面X方向直径+大头上面Y方向直径+大头下面X方向直径+大头下面Y方向直径)/4
            List<decimal> valueList = new List<decimal>() {
                                                        SystemHelper.GetDecimal(""),
                                                        SystemHelper.GetDecimal("sss"),
                                                        SystemHelper.GetDecimal("12.365"),
                                                        SystemHelper.GetDecimal("201.24557"),
                                                        SystemHelper.GetDecimal("100"),
                                                    };
            var bb = SystemHelper.CalcDecimalAvg(valueList, 3);
            Assert.Fail();
        }
 
        [TestMethod]
        public void xx()
        {
            string path = ConfigHelper.GetConfigString("OP80QualityData_Test");//OP80的地址
 
            var newFiles = FileHelper.DetectNewFilesCSV(path, 300, DateTime.Now.AddDays(-10), DateTime.Now.AddDays(1));
 
            foreach (System.IO.FileInfo file in newFiles)
            {
                File.Move(file.FullName, "../CA4GC20TD_COPY/" + file.Name);//移动
            }
        }
 
 
        [TestMethod]
        public void bb()
        {
            var aa = "-2024-06-16_08_43_23__part_";
            var bb = aa.Split('-');
 
            string cc = bb[0];
        }
    }
}