diff --git a/DataServer/api/get_carbon_measure.cs b/DataServer/api/get_carbon_measure.cs
index 22222dd..e63fdbf 100644
--- a/DataServer/api/get_carbon_measure.cs
+++ b/DataServer/api/get_carbon_measure.cs
@@ -22,7 +22,7 @@ namespace DataServer.Model
///
/// 数据
///
- public List data { get; set; }
+ public List data { get; set; }
}
public class carbon_measureData
{
diff --git a/DataServer/bin/Debug/DataServer.pdb b/DataServer/bin/Debug/DataServer.pdb
index c2503f8..f158e98 100644
Binary files a/DataServer/bin/Debug/DataServer.pdb and b/DataServer/bin/Debug/DataServer.pdb differ
diff --git a/DataServer/obj/Debug/DataServer.csproj.CoreCompileInputs.cache b/DataServer/obj/Debug/DataServer.csproj.CoreCompileInputs.cache
index a89074b..4cc9e9b 100644
--- a/DataServer/obj/Debug/DataServer.csproj.CoreCompileInputs.cache
+++ b/DataServer/obj/Debug/DataServer.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-752a6e1b70ab5d71df5d0cbf0bbd0a7b1da79829
+7fcd104ed931a93f81505ce377f5e1bfe52798a6
diff --git a/DataServer/obj/Debug/DataServer.dll b/DataServer/obj/Debug/DataServer.dll
index 6466d25..7054b5e 100644
Binary files a/DataServer/obj/Debug/DataServer.dll and b/DataServer/obj/Debug/DataServer.dll differ
diff --git a/DataServer/obj/Debug/DataServer.pdb b/DataServer/obj/Debug/DataServer.pdb
index c2503f8..f158e98 100644
Binary files a/DataServer/obj/Debug/DataServer.pdb and b/DataServer/obj/Debug/DataServer.pdb differ
diff --git a/DongYingAPI/Controllers/api/GetCarbonMeasureController.cs b/DongYingAPI/Controllers/api/GetCarbonMeasureController.cs
index 9b17a95..23cb292 100644
--- a/DongYingAPI/Controllers/api/GetCarbonMeasureController.cs
+++ b/DongYingAPI/Controllers/api/GetCarbonMeasureController.cs
@@ -20,13 +20,13 @@ namespace DongYingAPI.Controllers
DataServer.BLL.device_info bll_info = new DataServer.BLL.device_info();
public HttpResponseMessage Get(string date = "")
{
- var res = new get_air_conditioner();
+ var res = new get_carbon_measure();
try
{
if (!string.IsNullOrEmpty(date))
{
- var data = new List();
- var list = bll_info.GetModelList("").Where(x => x.DeviceName.Contains("空调")).ToList();
+ var data = new List();
+ var list = bll_info.GetModelList("");
var time = DateTime.Now.ToString("yyyyMM");
if (date == "日")
{
@@ -35,27 +35,25 @@ namespace DongYingAPI.Controllers
var b = 0;
for (int i = 0; i < 6; i++)
{
- var model = new air_conditionerData();
+ var model = new carbon_measureData();
var j = i * 60;
b = Convert.ToInt32(a);
string now = "";
model.time = DateTime.Now.AddMinutes(-j).ToString("HH:00");
now = DateTime.Now.ToString("yyyy-MM-dd HH:00:00");
- a = "31";
var datetime = Convert.ToDateTime(now);
var sdate = datetime.AddHours(-i);
var edate = datetime.AddHours(-i + 1);
- //var list1 = bll_info.GetModelList("").Where(x =>x.DeviceName.Contains("空调")&& x.EntireTime >= sdate && x.EntireTime < edate).ToList();
decimal? num1 = 0;
foreach (var item in list)
{
var list1 = bll.GetModelListDate("", time).Where(x => x.DeviceId == item.DeviceId && x.EntireTime >= sdate && x.EntireTime < edate).ToList();
foreach (var aitem in list1)
{
- num1 += aitem.P;
+ num1 += aitem.EH;
}
- model.P = num1;
+ model.CarbonValue = num1 / 1000 * Convert.ToDecimal(0.5703);
}
data.Add(model);
@@ -65,7 +63,7 @@ namespace DongYingAPI.Controllers
{
for (int i = 0; i < 6; i++)
{
- var model = new air_conditionerData();
+ var model = new carbon_measureData();
var atime = DateTime.Now.AddDays(-i).ToString("dd号");
model.time = atime;
var now = DateTime.Now.AddDays(-i);
@@ -79,9 +77,9 @@ namespace DongYingAPI.Controllers
foreach (var aitem in alist)
{
- num += aitem.P;
+ num += aitem.EH;
}
- model.P = num;
+ model.CarbonValue = num / 1000 * Convert.ToDecimal(0.5703);
}
data.Add(model);
@@ -91,7 +89,7 @@ namespace DongYingAPI.Controllers
{
for (int i = 0; i < 6; i++)
{
- var model = new air_conditionerData();
+ var model = new carbon_measureData();
var atime = DateTime.Now.AddMonths(-i).ToString("MM月");
model.time = atime;
var now = DateTime.Now.AddMonths(-i);
@@ -104,9 +102,9 @@ namespace DongYingAPI.Controllers
var alist = list1.Where(x => x.EntireTime >= Convert.ToDateTime(sdate) && x.EntireTime < Convert.ToDateTime(edate)).ToList();
foreach (var aitem in alist)
{
- num += aitem.P;
+ num += aitem.EH;
}
- model.P = num;
+ model.CarbonValue = num / 1000 * Convert.ToDecimal(0.5703);
}
data.Add(model);
diff --git a/DongYingAPI/Web.config b/DongYingAPI/Web.config
index 02ebcc4..b482a74 100644
--- a/DongYingAPI/Web.config
+++ b/DongYingAPI/Web.config
@@ -5,7 +5,7 @@
-->
-
+
diff --git a/DongYingAPI/bin/DataServer.dll b/DongYingAPI/bin/DataServer.dll
index 6466d25..7054b5e 100644
Binary files a/DongYingAPI/bin/DataServer.dll and b/DongYingAPI/bin/DataServer.dll differ
diff --git a/DongYingAPI/bin/DataServer.pdb b/DongYingAPI/bin/DataServer.pdb
index c2503f8..f158e98 100644
Binary files a/DongYingAPI/bin/DataServer.pdb and b/DongYingAPI/bin/DataServer.pdb differ
diff --git a/DongYingAPI/bin/DongYingAPI.dll b/DongYingAPI/bin/DongYingAPI.dll
index 4fa3cf9..18fc26c 100644
Binary files a/DongYingAPI/bin/DongYingAPI.dll and b/DongYingAPI/bin/DongYingAPI.dll differ
diff --git a/DongYingAPI/bin/DongYingAPI.pdb b/DongYingAPI/bin/DongYingAPI.pdb
index c4a626d..92acb0c 100644
Binary files a/DongYingAPI/bin/DongYingAPI.pdb and b/DongYingAPI/bin/DongYingAPI.pdb differ
diff --git a/DongYingAPI/obj/Debug/DongYingAPI.csproj.AssemblyReference.cache b/DongYingAPI/obj/Debug/DongYingAPI.csproj.AssemblyReference.cache
index c7929bf..5833169 100644
Binary files a/DongYingAPI/obj/Debug/DongYingAPI.csproj.AssemblyReference.cache and b/DongYingAPI/obj/Debug/DongYingAPI.csproj.AssemblyReference.cache differ
diff --git a/DongYingAPI/obj/Debug/DongYingAPI.csproj.CoreCompileInputs.cache b/DongYingAPI/obj/Debug/DongYingAPI.csproj.CoreCompileInputs.cache
index 432b326..91f813e 100644
--- a/DongYingAPI/obj/Debug/DongYingAPI.csproj.CoreCompileInputs.cache
+++ b/DongYingAPI/obj/Debug/DongYingAPI.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-2daf8a227faca6c6caeee6c2b7aed66fd89baba1
+abb0e93bff5eee475ebe2f4c7d86f766480d3a15
diff --git a/DongYingAPI/obj/Debug/DongYingAPI.dll b/DongYingAPI/obj/Debug/DongYingAPI.dll
index 4fa3cf9..18fc26c 100644
Binary files a/DongYingAPI/obj/Debug/DongYingAPI.dll and b/DongYingAPI/obj/Debug/DongYingAPI.dll differ
diff --git a/DongYingAPI/obj/Debug/DongYingAPI.pdb b/DongYingAPI/obj/Debug/DongYingAPI.pdb
index c4a626d..92acb0c 100644
Binary files a/DongYingAPI/obj/Debug/DongYingAPI.pdb and b/DongYingAPI/obj/Debug/DongYingAPI.pdb differ
diff --git a/Security/bin/Debug/DataServer.dll b/Security/bin/Debug/DataServer.dll
index 1170a49..7054b5e 100644
Binary files a/Security/bin/Debug/DataServer.dll and b/Security/bin/Debug/DataServer.dll differ
diff --git a/Security/bin/Debug/DataServer.pdb b/Security/bin/Debug/DataServer.pdb
index 007168e..f158e98 100644
Binary files a/Security/bin/Debug/DataServer.pdb and b/Security/bin/Debug/DataServer.pdb differ
diff --git a/Security/bin/Debug/ServiceSecurity.application b/Security/bin/Debug/ServiceSecurity.application
index 31d5436..2eb9dd4 100644
--- a/Security/bin/Debug/ServiceSecurity.application
+++ b/Security/bin/Debug/ServiceSecurity.application
@@ -7,14 +7,14 @@
-
+
- MaSB9zKFQS+iDnEjY5O32c/t1YAFFfG/1BnLDJ8aat8=
+ XCGE4OqWR85JxWdl4SmtwTIMQ5nBl8ZkF7zpfQJxrjE=
diff --git a/Security/bin/Debug/ServiceSecurity.exe.manifest b/Security/bin/Debug/ServiceSecurity.exe.manifest
index f25842a..3c0516d 100644
--- a/Security/bin/Debug/ServiceSecurity.exe.manifest
+++ b/Security/bin/Debug/ServiceSecurity.exe.manifest
@@ -42,14 +42,14 @@
-
+
- 8aAyf2+5JgbZz56G6PmGmTJqLWjHrxqhVhKhq6BJugE=
+ mMU5DkMd36SSoV9C4OC7va8L9Q4t1oI5f8IWnzSUES0=
diff --git a/Security/obj/Debug/Security.csproj.AssemblyReference.cache b/Security/obj/Debug/Security.csproj.AssemblyReference.cache
index 519b5e4..8530a8e 100644
Binary files a/Security/obj/Debug/Security.csproj.AssemblyReference.cache and b/Security/obj/Debug/Security.csproj.AssemblyReference.cache differ
diff --git a/Security/obj/Debug/ServiceSecurity.application b/Security/obj/Debug/ServiceSecurity.application
index 31d5436..2eb9dd4 100644
--- a/Security/obj/Debug/ServiceSecurity.application
+++ b/Security/obj/Debug/ServiceSecurity.application
@@ -7,14 +7,14 @@
-
+
- MaSB9zKFQS+iDnEjY5O32c/t1YAFFfG/1BnLDJ8aat8=
+ XCGE4OqWR85JxWdl4SmtwTIMQ5nBl8ZkF7zpfQJxrjE=
diff --git a/Security/obj/Debug/ServiceSecurity.exe.manifest b/Security/obj/Debug/ServiceSecurity.exe.manifest
index f25842a..3c0516d 100644
--- a/Security/obj/Debug/ServiceSecurity.exe.manifest
+++ b/Security/obj/Debug/ServiceSecurity.exe.manifest
@@ -42,14 +42,14 @@
-
+
- 8aAyf2+5JgbZz56G6PmGmTJqLWjHrxqhVhKhq6BJugE=
+ mMU5DkMd36SSoV9C4OC7va8L9Q4t1oI5f8IWnzSUES0=