Second upload

This commit is contained in:
qi_0527 2024-10-01 15:02:36 +08:00
parent 1d91254c61
commit 6af20afa72

View File

@ -66,7 +66,7 @@ public class ParkingUpdateService : BackgroundService
{ {
Timestamp = DateTime.Now, Timestamp = DateTime.Now,
TotalParkingSpaces = totalParkingSpaces, TotalParkingSpaces = totalParkingSpaces,
RemainingSpaces = remainingSpaces, RemainingSpaces = Math.Max(remainingSpaces, 0), // 確保儲存時不為負數
MonthlyRentSpaces = monthlyRentNumber, MonthlyRentSpaces = monthlyRentNumber,
TemporaryRentSpaces = Math.Abs(temporaryRentNumber), TemporaryRentSpaces = Math.Abs(temporaryRentNumber),
DayOfWeek = DateTime.Now.ToString("dddd", new CultureInfo("zh-TW")) DayOfWeek = DateTime.Now.ToString("dddd", new CultureInfo("zh-TW"))