fix: include contained room expenses in bill generation

This commit is contained in:
2026-07-14 14:53:07 +08:00
parent ce5fd1c6cb
commit eac336a54a
2 changed files with 39 additions and 2 deletions

View File

@@ -50,10 +50,10 @@ export class BillsService {
.execute();
}
// 获取所有有费用的宿舍
// 获取账单周期内所有有费用的宿舍
const roomExpenses = await this.roomExpRepo
.createQueryBuilder('e')
.where('e.periodStart = :periodStart AND e.periodEnd = :periodEnd', {
.where('e.periodStart >= :periodStart AND e.periodEnd <= :periodEnd', {
periodStart,
periodEnd,
})