debug 單一 inv 日報表 SQL 語法問題
This commit is contained in:
parent
6e5b27c709
commit
008c98feec
@ -722,10 +722,13 @@ set a.inv_02 = b.inv_02 ");
|
||||
sql = sb.ToString() + sb_select.ToString() + sb_update_columns.ToString();
|
||||
|
||||
try
|
||||
{
|
||||
int rowCT = 0;
|
||||
if (!String.IsNullOrEmpty(sql))
|
||||
{
|
||||
cmd.CommandText = sql;
|
||||
int rowCT = cmd.ExecuteNonQuery();
|
||||
|
||||
rowCT = cmd.ExecuteNonQuery();
|
||||
}
|
||||
sql = @$"DROP TABLE IF EXISTS temp_invDay{_powerStationID}_s1; ";
|
||||
//conn.Execute(ss);
|
||||
cmd.CommandText = sql;
|
||||
|
||||
@ -49,7 +49,8 @@ namespace solarApp
|
||||
//sensorSvc._date2 = date1;
|
||||
|
||||
//sensorSvc.archiveData();
|
||||
MessageBox.Show("OK");
|
||||
//MessageBox.Show("OK");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " sensor OK";
|
||||
}
|
||||
|
||||
private void fmArchive_Load(object sender, EventArgs e)
|
||||
@ -95,9 +96,10 @@ namespace solarApp
|
||||
|
||||
private void _timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
if (System.DateTime.Now.Hour == 00 && DateTime.Now.Minute == 45)
|
||||
if (System.DateTime.Now.Hour == 00 && DateTime.Now.Minute == 15)
|
||||
{
|
||||
MessageBox.Show("ok");
|
||||
//MessageBox.Show("ok");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " timer start";
|
||||
dtSelect1.Value = System.DateTime.Now.AddDays(-1);
|
||||
dtSelect2.Value = System.DateTime.Now.AddDays(-1);
|
||||
bt_archive.PerformClick();
|
||||
@ -153,7 +155,8 @@ namespace solarApp
|
||||
invSvc.archiveData(lbSiteID_sensor.Text.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
||||
}
|
||||
//sensorSvc.archiveData();
|
||||
MessageBox.Show("OK");
|
||||
//MessageBox.Show("OK");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " Inv OK";
|
||||
}
|
||||
|
||||
private void dtSelect_ValueChanged(object sender, EventArgs e)
|
||||
@ -178,7 +181,8 @@ namespace solarApp
|
||||
//invSvc._date2 = date1;
|
||||
invSvc.clearData();
|
||||
//sensorSvc.archiveData();
|
||||
MessageBox.Show("OK");
|
||||
//MessageBox.Show("OK");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " inv clear OK";
|
||||
}
|
||||
|
||||
private void bt_clear_station_Click(object sender, EventArgs e)
|
||||
@ -193,7 +197,8 @@ namespace solarApp
|
||||
//siteSvc._date2 = date1;
|
||||
siteSvc.clearData();
|
||||
//sensorSvc.archiveData();
|
||||
MessageBox.Show("OK");
|
||||
//MessageBox.Show("OK");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " clear station OK";
|
||||
}
|
||||
|
||||
private void bt_site_Click(object sender, EventArgs e)
|
||||
@ -213,7 +218,8 @@ namespace solarApp
|
||||
siteSvc.archiveData(lbSiteID_sensor.Text.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
||||
}
|
||||
//sensorSvc.archiveData();
|
||||
MessageBox.Show("OK");
|
||||
//MessageBox.Show("OK");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " site OK";
|
||||
}
|
||||
|
||||
private void bt_archive_Click(object sender, EventArgs e)
|
||||
@ -261,7 +267,8 @@ namespace solarApp
|
||||
//sensorSvc._date2 = date1;
|
||||
sensorSvc.clearData();
|
||||
//sensorSvc.archiveData();
|
||||
MessageBox.Show("OK");
|
||||
//MessageBox.Show("OK");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " clear_sensor OK";
|
||||
}
|
||||
|
||||
private void lbSiteDB_sensor_Click(object sender, EventArgs e)
|
||||
@ -277,7 +284,8 @@ namespace solarApp
|
||||
procSensorSvc sensorSvc = new procSensorSvc();
|
||||
|
||||
sensorSvc.archiveMeterData(lbSiteID_sensor.Text.Substring(0, 9), date1);
|
||||
MessageBox.Show("OK");
|
||||
//MessageBox.Show("OK");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " meter OK";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -296,7 +304,8 @@ namespace solarApp
|
||||
invSvc.report_invDay(lbSiteID_sensor.Text.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
MessageBox.Show("OK");
|
||||
//MessageBox.Show("OK");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " 日報 OK";
|
||||
}
|
||||
|
||||
private void bt_invDay_Click(object sender, EventArgs e)
|
||||
@ -426,7 +435,8 @@ namespace solarApp
|
||||
}
|
||||
i++;
|
||||
}
|
||||
MessageBox.Show("OK");
|
||||
// MessageBox.Show("OK");
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " sensor_lackData OK";
|
||||
}
|
||||
|
||||
private void bt_lackStation_Click(object sender, EventArgs e)
|
||||
@ -443,7 +453,8 @@ namespace solarApp
|
||||
invSvc.report_invDay(item.SITEID, item.TIMESTAMP.ToString("yyyy-MM-dd")); // 補日報表
|
||||
}
|
||||
|
||||
MessageBox.Show("OK");
|
||||
//MessageBox.Show("OK"); lackStation
|
||||
lbMsgTitle.Text = DateTime.Now.ToString() + " lackStation OK";
|
||||
}
|
||||
|
||||
private void bt_updateInstantValue_Click(object sender, EventArgs e)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user