feat(finance): expose Form 990 line catalog endpoint
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,19 @@ public class Form990ReportService : IForm990ReportService
|
||||
private readonly AppDbContext _db;
|
||||
public Form990ReportService(AppDbContext db) => _db = db;
|
||||
|
||||
public async Task<List<Form990ExpenseLineDto>> GetLinesAsync() =>
|
||||
await _db.Form990ExpenseLines.AsNoTracking().Where(l => l.IsActive)
|
||||
.OrderBy(l => l.SortOrder)
|
||||
.Select(l => new Form990ExpenseLineDto
|
||||
{
|
||||
Id = l.Id,
|
||||
LineCode = l.LineCode,
|
||||
Name_en = l.Name_en,
|
||||
Name_zh = l.Name_zh,
|
||||
SortOrder = l.SortOrder,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
public async Task<FunctionalExpenseStatementDto> GetFunctionalExpenseStatementAsync(DateOnly? from, DateOnly? to)
|
||||
{
|
||||
var lines = await _db.Form990ExpenseLines.AsNoTracking()
|
||||
|
||||
@@ -4,4 +4,5 @@ namespace ROLAC.API.Services;
|
||||
public interface IForm990ReportService
|
||||
{
|
||||
Task<FunctionalExpenseStatementDto> GetFunctionalExpenseStatementAsync(DateOnly? from, DateOnly? to);
|
||||
Task<List<Form990ExpenseLineDto>> GetLinesAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user