| | |
| | | string uploadFolder = Tools.GetSetting("uploadFolder"); |
| | | foreach (SysMeta meta in metas) |
| | | { |
| | | if (metsIds.Contains(meta.id)) return PrintInfo("元数据[" + meta.id + "] 已发布。"); |
| | | |
| | | if (metsIds.Contains(meta.id)) |
| | | { |
| | | PrintInfo("元数据[" + meta.id + "] 已发布。"); |
| | | continue; |
| | | } |
| | | string sourceFile = Path.Combine(uploadFolder, meta.path); |
| | | if (!File.Exists(sourceFile)) return PrintInfo("元数据[" + meta.id + "] 不存在。"); |
| | | if (!File.Exists(sourceFile)) |
| | | { |
| | | PrintInfo("元数据[" + meta.id + "] 不存在。"); |
| | | continue; |
| | | } |
| | | |
| | | string targetFile = Path.Combine(subPath, meta.name); |
| | | string targetFile = Path.Combine(subPath, meta.path.Split(new string[] { "\\", "//" }, StringSplitOptions.None)[1]); |
| | | ConvertRaster(sourceFile, targetFile); |
| | | if (File.Exists(targetFile)) |
| | | { |
| | |
| | | if (!ids.Contains(m.id)) PubDBHelper.InsertMetaPub(m.id, pubid, args.userId); |
| | | } |
| | | string geom = GetPointZ(args); |
| | | PubDBHelper.UpdatePublish(pubid, args.name, args.userId, geom); |
| | | int rows = PubDBHelper.UpdatePublish(pubid, args.name, args.userId, geom); |
| | | |
| | | return pubid; |
| | | } |