[BGService]因網路斷線資料回補問題,月歸檔拉長一個月

This commit is contained in:
張家睿 2024-11-07 10:17:12 +08:00
parent 08f6c3f125
commit d41217adbd

View File

@ -1442,7 +1442,7 @@ namespace BackendWorkerService.Services.Implement
} }
public IEnumerable<DateTime> EachMonth(string from, string thru) public IEnumerable<DateTime> EachMonth(string from, string thru)
{ {
var strtday = DateTime.Parse(from); var strtday = DateTime.Parse(from).AddMonths(-1);
var endday = DateTime.Parse(thru); var endday = DateTime.Parse(thru);
for (var _month = strtday.Date; _month <= endday; _month = _month.AddMonths(1)) for (var _month = strtday.Date; _month <= endday; _month = _month.AddMonths(1))