debug : inv_hour insert double
This commit is contained in:
parent
dcf25a88b3
commit
003e678a5b
@ -65,7 +65,15 @@ namespace solarApp.Service
|
||||
delete from inverter_history_hour where powerstationID = @powerStationID and CrdDate = @date1;
|
||||
delete from inverter_history_day where powerstationID = @powerStationID and CrdDate = @date1;
|
||||
delete from inverter_history_month where powerstationID = @powerStationID and left(`TIMESTAMP`, 7) = left(@date1, 7) ;";
|
||||
var ds = conn.Execute(sql, new { date1 = _date1, PowerStationID = _powerStationID });
|
||||
//var ds = conn.Execute(sql, new { date1 = _date1, PowerStationID = _powerStationID });
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
cmd.Connection = conn;
|
||||
cmd.CommandTimeout = 360;
|
||||
cmd.Parameters.AddWithValue("@date1", _date1);
|
||||
cmd.Parameters.AddWithValue("@PowerStationID", _powerStationID);
|
||||
cmd.CommandText = sql;
|
||||
cmd.ExecuteNonQuery();
|
||||
cmd.Parameters.Clear();
|
||||
|
||||
if (_logger != null)
|
||||
{
|
||||
@ -194,7 +202,7 @@ namespace solarApp.Service
|
||||
//int ct = conn.Execute(sql, new { date1 = _date1 });
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
cmd.Connection = conn;
|
||||
cmd.CommandTimeout = 180;
|
||||
cmd.CommandTimeout = 360;
|
||||
cmd.Parameters.AddWithValue("@date1", _date1);
|
||||
cmd.CommandText = sql;
|
||||
cmd.ExecuteNonQuery();
|
||||
@ -365,7 +373,7 @@ namespace solarApp.Service
|
||||
//int ct = conn.Execute(sql, new { date1 = _date1 });
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
cmd.Connection = conn;
|
||||
cmd.CommandTimeout = 180;
|
||||
cmd.CommandTimeout = 360;
|
||||
cmd.Parameters.AddWithValue("@date1", _date1);
|
||||
cmd.Parameters.AddWithValue("@PowerStationID", _powerStationID);
|
||||
cmd.CommandText = sql;
|
||||
@ -390,7 +398,7 @@ namespace solarApp.Service
|
||||
if (_logger != null)
|
||||
_logger.LogInformation("【ProcInvSvc】執行完成[{0}]在{1}逆變器hour補償", _siteID, _date1);
|
||||
|
||||
ss = @$"DROP TABLE IF EXISTS del_Inv_day_" + _powerStationID + @"_s1; ";
|
||||
sql = @$"DROP TABLE IF EXISTS del_Inv_day_" + _powerStationID + @"_s1; ";
|
||||
//conn.Execute(ss);
|
||||
cmd.CommandText = sql;
|
||||
cmd.ExecuteNonQuery();
|
||||
@ -586,7 +594,7 @@ ALTER TABLE `temp_invDay{_powerStationID}_s1` ADD INDEX `temp_indexs1` (report_d
|
||||
//conn.Execute(ss);
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
cmd.Connection = conn;
|
||||
cmd.CommandTimeout = 180;
|
||||
cmd.CommandTimeout = 360;
|
||||
cmd.CommandText = sql;
|
||||
cmd.ExecuteNonQuery();
|
||||
#endregion
|
||||
|
||||
Loading…
Reference in New Issue
Block a user