debug 共用設備 無 default table
This commit is contained in:
parent
a07d080198
commit
b4c7bac548
@ -278,7 +278,22 @@ namespace solarApp.Service
|
|||||||
foreach (var item in ds_sensor)
|
foreach (var item in ds_sensor)
|
||||||
{
|
{
|
||||||
tableName = item.TableName;
|
tableName = item.TableName;
|
||||||
break;
|
sql = @"select count(*) ct from " + _siteDB + "." + tableName + @"
|
||||||
|
where FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d') = @date1 ";
|
||||||
|
cmd.Connection = conn;
|
||||||
|
cmd.CommandTimeout = 720;
|
||||||
|
cmd.Parameters.AddWithValue("@date1", _date1);
|
||||||
|
cmd.CommandText = sql;
|
||||||
|
string CT = cmd.ExecuteScalar().ToString();
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
if (!string.IsNullOrEmpty(CT))
|
||||||
|
{
|
||||||
|
if (int.Parse(CT) >0)
|
||||||
|
{
|
||||||
|
tableName = item.TableName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sql = @"insert into sensor_history_hour( `PowerStationId`, `TIMESTAMP`, Irradiance, Temperature, EnvTemperature, Humidity, Vane, Dust, WingDirection, irrDay, irrDayHour)
|
sql = @"insert into sensor_history_hour( `PowerStationId`, `TIMESTAMP`, Irradiance, Temperature, EnvTemperature, Humidity, Vane, Dust, WingDirection, irrDay, irrDayHour)
|
||||||
|
|||||||
2
solarApp/fmArchive.Designer.cs
generated
2
solarApp/fmArchive.Designer.cs
generated
@ -772,7 +772,7 @@ namespace solarApp
|
|||||||
ClientSize = new System.Drawing.Size(1782, 1026);
|
ClientSize = new System.Drawing.Size(1782, 1026);
|
||||||
Controls.Add(tabControl1);
|
Controls.Add(tabControl1);
|
||||||
Name = "fmArchive";
|
Name = "fmArchive";
|
||||||
Text = "fmArchive 0918";
|
Text = "fmArchive 1229";
|
||||||
Load += fmArchive_Load;
|
Load += fmArchive_Load;
|
||||||
tabControl1.ResumeLayout(false);
|
tabControl1.ResumeLayout(false);
|
||||||
tabPage1.ResumeLayout(false);
|
tabPage1.ResumeLayout(false);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user