管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-02-08 f37d44a3cd90337504a5ea36e0d25d6e435499a2
DataLoader/CS/Importor.cs
@@ -14,6 +14,14 @@
{
    public class Importor
    {
        private static List<String> Exclusions = new List<string>() {
            "jp2.aux.xml",
            ".midx", ".strmi",
            ".rrd", ".img.aux.xml", ".hdr", ".img.enp", ".img.xml",
            ".tfw", ".tif.ovr", ".tif.aux.xml", ".tif.enp", ".tif.xml", ".prj",
            ".shx", ".dbf", ".cpg" //, ".prj"
        };
        private static PostgreHelper _ph = null;
        public static PostgreHelper Helper
@@ -65,6 +73,7 @@
                ViewData vd = new ViewData();
                vd.ID = i + 1;
                vd.FilePath = files[i];
                vd.Ext = System.IO.Path.GetExtension(files[i]);
                vd.Status = "准备";
                viewDatas.Add(vd);
@@ -94,7 +103,7 @@
                {
                    vd.Status = "生成MD5码...";
                    string guid = MD5Helper.GetMD5Hash(vd.FilePath);
                    if (IsFileExists(guid))
                    if (!Exclusions.Contains(vd.Ext) && IsFileExists(guid))
                    {
                        vd.Status = "已存在!";
                        return;
@@ -104,15 +113,15 @@
                    int start = GetSubPath(target, 1);
                    SysMeta mf = GetMetaFile(vd, start, guid);
                    vd.Status = "复制文件...";
                    CopyFile(vd.FilePath, Path.Combine(target, mf.path));
                    int metaId = InsertMeta(mf);
                    if (metaId == 0)
                    {
                        vd.Status = "元数据出错!";
                        return;
                    }
                    vd.Status = "复制文件...";
                    CopyFile(vd.FilePath, Path.Combine(target, mf.path));
                    vd.Status = "完成。";
                }