调整挂单统计,修改删除区域报错

This commit is contained in:
2025-09-16 11:49:02 +08:00
parent f1e3f555e6
commit 40da17b414
11 changed files with 220 additions and 294 deletions

View File

@@ -63,16 +63,6 @@ public class guadanStatisticsTableController: ApiController
.OrderBy(x => x.date)
.ToList();
var todayDate = DateTime.Today;
dynamic today = statistics.FirstOrDefault(x => x.date == todayDate);
if (today == null)
{
var todayCount = _db.RegionAndRoomAndBedSchedule
.Where(s => s.ScheduleDate == todayDate && !s.IsCancel)
.Count();
today = new { date = todayDate, todaytotalbookers = todayCount };
}
var bedcount = _db.RegionRoomBed
.Where(a => a.IsDeleted == false)
@@ -83,11 +73,6 @@ public class guadanStatisticsTableController: ApiController
bedcount,
roomcount,
statistics,
today,
totalbookers = _db.RegionAndRoomAndBedSchedule
.Where(s => s.IsCancel == false)
.Where(s => s.ScheduleDate >= DateTime.Today)
.Count(),
};
return Ok(result);