封装调整
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 25s
Docker Build & Deploy / Deploy to Production (push) Successful in 8s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s

This commit is contained in:
孙诚
2026-01-08 14:41:50 +08:00
parent 500a6495bd
commit 58ee44987b
15 changed files with 353 additions and 672 deletions

View File

@@ -181,7 +181,6 @@ public class BudgetController(
factor = b.Type switch
{
BudgetPeriodType.Month => 12,
BudgetPeriodType.Week => 52,
BudgetPeriodType.Year => 1,
_ => 0
};
@@ -191,7 +190,6 @@ public class BudgetController(
factor = b.Type switch
{
BudgetPeriodType.Month => 1,
BudgetPeriodType.Week => 52m / 12m,
BudgetPeriodType.Year => 1m / 12m,
_ => 0
};

View File

@@ -35,10 +35,8 @@ public class BudgetDto
StartDate = entity.StartDate.ToString("yyyy-MM-dd"),
Period = entity.Type switch
{
BudgetPeriodType.Longterm => "长期",
BudgetPeriodType.Year => $"{start:yy}年",
BudgetPeriodType.Month => $"{start:yy}年第{start.Month}月",
BudgetPeriodType.Week => $"{start:yy}年第{System.Globalization.CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(start, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Monday)}周",
_ => $"{start:yyyy-MM-dd} ~ {end:yyyy-MM-dd}"
},
PeriodStart = start,