diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs
index cc78f4b8266f535f8df8588579bdcd9d91a0ac91..b97e9544acff89cc018a9dd385340c719c3cc066 100644
--- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs
+++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs
@@ -42,6 +42,7 @@ namespace EOM.TSHotelManagement.Application
/// 构造函数
///
///
+ ///
///
///
///
@@ -50,13 +51,18 @@ namespace EOM.TSHotelManagement.Application
///
///
///
- public class EmployeeService(GenericRepository workerRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passportTypeRepository, IDataProtectionProvider dataProtectionProvider, JWTHelper jWTHelper, MailHelper mailHelper) : IEmployeeService
+ public class EmployeeService(GenericRepository workerRepository, GenericRepository photoRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passportTypeRepository, IDataProtectionProvider dataProtectionProvider, JWTHelper jWTHelper, MailHelper mailHelper) : IEmployeeService
{
///
/// 员工信息
///
private readonly GenericRepository workerRepository = workerRepository;
+ ///
+ /// 员工照片
+ ///
+ private readonly GenericRepository photoRepository = photoRepository;
+
///
/// 学历类型
///
@@ -78,7 +84,7 @@ namespace EOM.TSHotelManagement.Application
private readonly GenericRepository positionRepository = positionRepository;
///
- /// 职务
+ /// 证件
///
private readonly GenericRepository passportTypeRepository = passportTypeRepository;
@@ -388,6 +394,10 @@ namespace EOM.TSHotelManagement.Application
var source = EntityMapper.Map(w);
+ var employeePhoto = photoRepository.GetSingle(a => a.EmployeeId.Equals(source.EmployeeId));
+ if (employeePhoto != null && !string.IsNullOrEmpty(employeePhoto.PhotoPath))
+ source.PhotoUrl = employeePhoto.PhotoPath ?? string.Empty;
+
return new SingleOutputDto { Source = source };
}
diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs
index c7e60b4008b3c47b570515c1c9b7585e8091bca3..2a2ddd0dea85fbc959ea6f8c9a4f8f87b66d1472 100644
--- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs
+++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs
@@ -28,5 +28,6 @@ namespace EOM.TSHotelManagement.Common.Contract
public int IsEnable { get; set; }
public string Password { get; set; }
public string EmailAddress { get; set; }
+ public string PhotoUrl { get; set; }
}
}