管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2024-08-05 b73e6de0b85cd54ad9b6226fb357f89389ff3cb8
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Web.Http;
using Turf.cs;
 
namespace Turf.Controllers
{
    public class AiController : ApiController
    {
        [HttpPost]
        [Route("footprint/predict/2")]
        [Route("riverface/predict/2")]
        [Route("roadface/predict/2")]
        [Route("woodland/predict/2")]
        public R<Result> footprint([FromBody]Args args)
        {
            try
            {
                if (null == args || string.IsNullOrEmpty(args.data_dir))
                {
                    return new R<Result>(2, "Sorry, the parameter is wrong");
                }
 
                Thread.Sleep(7000);
                Result rs = new Result();
 
                return new R<Result>(0, "ok", rs);
            }
            catch (Exception ex)
            {
                return new R<Result>(5, ex.Message);
            }
        }
    }
}