fix AsAppointment

This commit is contained in:
2024-10-11 15:12:35 +08:00
parent aeffa95a96
commit e4946d7351
6 changed files with 24 additions and 10 deletions

View File

@@ -110,7 +110,7 @@ public class AppointmentService : IAppointmentService
}
catch (Exception)
{
throw new UserFriendlyException("凭证有误");
//ignore
}
var now = DateTime.Now;
@@ -118,7 +118,10 @@ public class AppointmentService : IAppointmentService
.LeftJoin<GainfoEntity>((x, ga) => ga.IdNo == idNo)
.Where((x, ga) => ga.IdNo == idNo)
.Where(x => (x.IsEnterDoorArea && SqlFunc.DateIsSame(x.DoorStart, now)) || (x.IsEnterWorkplace && SqlFunc.DateIsSame(x.WorkplaceStart, now)))
.Select<AppointmentDetailResponse>()
.Select(x => new AppointmentDetailResponse
{
Mst = SqlFunc.Subqueryable<VisitorAppointmentDetailEntity>().Where(p => p.No == x.No).First<AppointmentPageResponse>()
}, true)
.SingleAsync();
}