1
13693261870
2024-04-26 889ada155e457dbc703531f9628353d288ca3f92
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
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terra.YaoGan.Common;
 
namespace Terra.YaoGan.Service
{
  public  class DataLake
    {
        sqlserverDBhelper DB = new sqlserverDBhelper();
        //获取当前选中的面积统计
        public DataTable GetCurrentArea(string where)
        {
            string sql = @"SELECT  SUM(CAST(area as FLOAT))  lakeArea,simName,[time]  from  SSHP  WHERE name='" + where
                + "'  GROUP BY [time],simName ORDER BY [time] ";
            DataTable dt = DB.QueryTable(sql);
            return dt;
        }
 
        //获取当前的选中的湖泊以及时间
        public DataTable GetManyYearAndLake(string where)
        {
            string sql = @"SELECT  SUM(CAST(area as FLOAT))  lakeArea,simName,[time]  from  SSHP " + where
               + " GROUP BY [time],simName ORDER BY [time] ";
            DataTable dt = DB.QueryTable(sql);
            return dt;
        }
 
        //获取多年多湖数据
        public DataTable GetManyYearAndManyLake(string sql)
        {
            DataTable dt = DB.QueryTable(sql);
            return dt;
        }
 
        //获取湖泊的数据
        public  DataTable  GetYear(string sql)
        {
            DataTable dt = DB.QueryTable(sql);
            return dt;
        }
 
 
       
    }
}