fix 访客预约自动化处理

This commit is contained in:
2024-10-17 15:57:13 +08:00
parent 360eab9882
commit b1347fbe18
4 changed files with 183 additions and 18 deletions

View File

@@ -61,24 +61,25 @@ public class AppointmentService : IAppointmentService
IdNo = item.IdNo,
Name = item.Name,
Source = request.Source,
Phone = item.Phone
Phone = item.Phone,
Factory = mst.Factory
};
await _dbContext.InsertAsync(gainfo);
}
else
{
(gainfo.Type != GainfoUserTypeEnumType.External && item.IsEnterDoorArea).ThrowIfTrue("内部人员无法发起门岗预约");
if (gainfo.Type == GainfoUserTypeEnumType.External)
{
gainfo.Source = request.Source;
gainfo.Phone = item.Phone;
gainfo.Factory = mst.Factory;
await _dbContext.UpdateAsync(gainfo);
}
}
//todo
//(gainfo.Type == GainfoUserTypeEnumType.External && item.IsEnterWorkplace && item.ImageUrl.IsEmpty()).ThrowIfTrue($"{item.Name}的社保照片不可为空");
var detail = new VisitorAppointmentDetailEntity
{
UserNo = gainfo.No,