fix 501单独处理不走主流程
This commit is contained in:
@@ -30,8 +30,12 @@ public class AppointmentService : IAppointmentService
|
||||
}
|
||||
|
||||
public async Task ReceiveAsync(VisitorAppointmentReceiveRequest request)
|
||||
{
|
||||
if (request.Factory == "501")
|
||||
{
|
||||
await ReSendTo501Async(request);
|
||||
return;
|
||||
}
|
||||
|
||||
var exists = await _dbContext.Queryable<VisitorAppointmentEntity>().Where(x => x.No == request.No).AnyAsync();
|
||||
exists.ThrowIfTrue("已经存在申请");
|
||||
@@ -202,10 +206,6 @@ public class AppointmentService : IAppointmentService
|
||||
|
||||
|
||||
private async Task ReSendTo501Async(VisitorAppointmentReceiveRequest request)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (request.Factory == "501")
|
||||
{
|
||||
var gainfo = await _dbContext.Queryable<GainfoEntity>()
|
||||
.LeftJoin<DepartmentEntity>((ga, dept) => ga.DepartmentNo == dept.No)
|
||||
@@ -228,8 +228,6 @@ public class AppointmentService : IAppointmentService
|
||||
var areas = await _dbContext.Queryable<AppointmentAreaEntity>().Where(x => x.TenantId == request.Factory).ToListAsync();
|
||||
|
||||
foreach (var dto in list)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = await httpClient.PostAsync("https://pay.aizhuhotel.com/jschuneng", new StringContent(new
|
||||
{
|
||||
@@ -262,16 +260,5 @@ public class AppointmentService : IAppointmentService
|
||||
|
||||
_logger.LogInformation("发送到501访客预约{idNo}--{name} ,返回:{responseJson}", dto.IdNo, dto.Name, responseJson);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "发送到501访客预约{idNo}--{name}", dto.IdNo, dto.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "发送到501访客预约失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user