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)
|
||||
{
|
||||
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)
|
||||
|
||||
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);
|
||||
Controls.Add(tabControl1);
|
||||
Name = "fmArchive";
|
||||
Text = "fmArchive 0918";
|
||||
Text = "fmArchive 1229";
|
||||
Load += fmArchive_Load;
|
||||
tabControl1.ResumeLayout(false);
|
||||
tabPage1.ResumeLayout(false);
|
||||
|
||||
@ -108,7 +108,7 @@ namespace solarApp
|
||||
f2.Dock = DockStyle.Fill;
|
||||
f2.Show();
|
||||
#endregion
|
||||
logger.Information("start winform process @" + System.DateTime.Now.ToString());
|
||||
logger.Information("start winform process @" + System.DateTime.Now.ToString());
|
||||
}
|
||||
|
||||
private void _timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user