| | |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
| | | using System.Data; |
| | | using System.Diagnostics; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Threading; |
| | | using System.Web; |
| | | |
| | | namespace ExportMap.cs |
| | |
| | | |
| | | int maxId = GetMaxId(); |
| | | RomoveNoneFiles(list); |
| | | if (list.Count == 0) return 0; |
| | | |
| | | LinkFiles(list); |
| | | |
| | | for (int i = 0; i < 25; i++) |
| | | { |
| | | Thread.Sleep(3000); |
| | | |
| | | List<SpatialItem> items = SelectItems(maxId); |
| | | if (null == items || items.Count == 0) continue; |
| | | |
| | | List<SpatialItem> items = SelectItems(maxId); |
| | | if (null == items || items.Count == 0) return 0; |
| | | // |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | |
| | | i++; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 链接文件 |
| | | /// </summary> |
| | | private string LinkFiles(List<SysMeta> metas) |
| | | { |
| | | string uploadFolder = Tool.GetSetting("uploadFolder"); |
| | | |
| | | List<string> list = new List<string>(); |
| | | foreach (SysMeta meta in metas) |
| | | { |
| | | switch (meta.type) |
| | | { |
| | | case "3dml": |
| | | string d3ml = Path.Combine(uploadFolder, meta.path); |
| | | break; |
| | | case "mpt": |
| | | string mpt = Path.Combine(uploadFolder, meta.path); |
| | | string midx = Path.Combine(uploadFolder, meta.path.Replace(".mpt", ".midx")); |
| | | string strmi = Path.Combine(uploadFolder, meta.path.Replace(".mpt", ".strmi")); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | //foreach (string file in list) |
| | | //{ |
| | | // string fileName = Path.GetFileName(file); |
| | | // string path = Path.Combine(target, fileName); |
| | | // string text = string.Format("mklink \"{0}\" \"{1}\"", path, file); // /H |
| | | |
| | | // p.StandardInput.WriteLine(text); |
| | | //} |
| | | |
| | | string str = Tool.ExecCmd(list); |
| | | |
| | | return str; |
| | | } |
| | | } |
| | | } |