歸檔日期改為上個月 addMonth(-1)
This commit is contained in:
parent
df2654fb57
commit
a07d080198
@ -43,8 +43,8 @@ namespace solarApp.Service
|
||||
// string yyyymm = System.DateTime.Now.AddMonths(-2).ToString("yyyy-MM");
|
||||
_siteID = siteID;
|
||||
//搬移的月份
|
||||
// move_month = System.DateTime.Now.AddMonths(-1).ToString("yyyy-MM")+ "-01";
|
||||
move_month = System.DateTime.Now.ToString("yyyy-MM") + "-01"; //這個月
|
||||
move_month = System.DateTime.Now.AddMonths(-1).ToString("yyyy-MM")+ "-01";
|
||||
// move_month = System.DateTime.Now.ToString("yyyy-MM") + "-01"; //這個月
|
||||
|
||||
//_date1 = date1;
|
||||
get_siteInfo();
|
||||
|
||||
@ -87,7 +87,7 @@ namespace solarApp.Service
|
||||
/// <returns></returns>
|
||||
public List<raw_station_day> get_station_rawAvg(string date1, string date2, string siteDB, string siteID)
|
||||
{
|
||||
List<raw_station_day> ds;
|
||||
List<raw_station_day> ds = null;
|
||||
using (MySqlConnection conn = new MySqlConnection(Connection1))
|
||||
{
|
||||
conn.Open();
|
||||
|
||||
@ -319,7 +319,7 @@ namespace solarApp.Service
|
||||
|
||||
logger.Error("【ProcInvSvc】執行失敗[{0}]在{1}逆變器hour補償", _siteID, _date1);
|
||||
logger.Error("【ProcInvSvc】執行失敗[{0}]在{1}逆變器hour補償 - [Exception]:{2}", _siteID, _date1, ex.ToString());
|
||||
arclog.insert_log(_powerStationID, "inverter_history_hour step1 " + _date1, 0, "inverter_history_hour", "insert inverter_history_hour error", "0", "", "", conn, cmd);
|
||||
// arclog.insert_log(_powerStationID, "inverter_history_hour step1 " + _date1, 0, "inverter_history_hour", "insert inverter_history_hour error", "0", "", "", conn, cmd);
|
||||
// throw ex;
|
||||
}
|
||||
|
||||
@ -372,7 +372,6 @@ namespace solarApp.Service
|
||||
cmd.ExecuteNonQuery();
|
||||
cmd.Parameters.Clear();
|
||||
cmd.Dispose();
|
||||
|
||||
|
||||
logger.Information("【ProcInvSvc】執行完成[{0}]在{1}逆變器day補償", _siteID, _date1);
|
||||
}
|
||||
@ -382,7 +381,7 @@ namespace solarApp.Service
|
||||
logger.Error("【ProcInvSvc】執行失敗[{0}]在{1}逆變器day補償", _siteID, _date1);
|
||||
logger.Error("【ProcInvSvc】執行失敗[{0}]在{1}逆變器day補償 - [Exception]:{2}", _siteID, _date1, ex.ToString());
|
||||
//throw ex;
|
||||
arclog.insert_log(_powerStationID, "inverter_history_day step1 ", 0, "inverter_history_day", "insert inverter_history_day error", "0", "", ex.Message, conn, cmd);
|
||||
//arclog.insert_log(_powerStationID, "inverter_history_day step1 ", 0, "inverter_history_day", "insert inverter_history_day error", "0", "", ex.Message, conn, cmd);
|
||||
}
|
||||
#endregion day
|
||||
|
||||
@ -443,7 +442,7 @@ namespace solarApp.Service
|
||||
|
||||
logger.Error("【ProcInvSvc】執行失敗[{0}]在{1}逆變器month補償", _siteID, _date1);
|
||||
logger.Error("【ProcInvSvc】執行失敗[{0}]在{1}逆變器month補償 - [Exception]:{2}", _siteID, _date1, ex.ToString());
|
||||
arclog.insert_log(_powerStationID, "inverter_history_month step1 ", 0, "inverter_history_month", "insert inverter_history_month error", "0", "", ex.Message, conn, cmd);
|
||||
// arclog.insert_log(_powerStationID, "inverter_history_month step1 ", 0, "inverter_history_month", "insert inverter_history_month error", "0", "", ex.Message, conn, cmd);
|
||||
// throw ex;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user