管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2022-11-08 788a78efe33a76ffa80ba6b8430a593cd883c508
1
已修改3个文件
26 ■■■■ 文件已修改
ExportMap/Controllers/ExportController.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Models/ExportArgs.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Test.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Controllers/ExportController.cs
@@ -1,4 +1,5 @@
using System;
using LFServer.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
@@ -10,9 +11,16 @@
    public class ExportController : ApiController
    {
        [HttpPost]
        public void start([FromBody]string value)
        public void Start([FromBody]ExportArgs args)
        {
            if (args == null ||
                string.IsNullOrWhiteSpace(args.layers)||
                (args.xmin == 0 && args.ymin == 0 && args.xmax == 0 && args.ymax == 0))
            {
                return;
            }
            args.SetDefault();
        }
    }
}
ExportMap/Models/ExportArgs.cs
@@ -71,5 +71,16 @@
        /// X最大
        /// </summary>
        public double xmax { set; get; }
        public void SetDefault()
        {
            if (string.IsNullOrWhiteSpace(title)) title = "管道基础大数据平台";
            if (string.IsNullOrWhiteSpace(province)) province = string.Empty;
            if (string.IsNullOrWhiteSpace(scale)) scale = string.Empty;
            if (string.IsNullOrWhiteSpace(resolution)) resolution = string.Empty;
            if (string.IsNullOrWhiteSpace(date)) date = DateTime.Now.ToString("yyyy.MM.dd");
            imgPath = "";
        }
    }
}
}
ExportMap/Test.html
@@ -3,6 +3,7 @@
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title></title>
  <script src="js/jquery.1.12.4.js"></script>
</head>
<body>
  <h2>API Upload</h2>