修改相关问题
This commit is contained in:
@@ -58,6 +58,22 @@ public class OnboardingAuditService : IOnboardingAuditService
|
||||
var contractStartDate = await ResolveContractStartDate(task.Id);
|
||||
|
||||
var employee = employeeInfo.Adapt<ObEmployee>();
|
||||
if (string.IsNullOrWhiteSpace(employee.EmployeeNo))
|
||||
{
|
||||
var taskContractIds = await _db.Queryable<ObTaskContract>()
|
||||
.Where(item => item.TaskId == task.Id)
|
||||
.Select(item => item.Id)
|
||||
.ToListAsync();
|
||||
|
||||
if (taskContractIds.Count > 0)
|
||||
{
|
||||
employee.EmployeeNo = await _db.Queryable<ObTaskContractVariable>()
|
||||
.Where(item => taskContractIds.Contains(item.TaskContractId) && item.VariableCode == "hr.EmployeeNo" && item.VariableValue != null && item.VariableValue != "")
|
||||
.OrderBy(item => item.SortCode)
|
||||
.Select(item => item.VariableValue)
|
||||
.FirstAsync();
|
||||
}
|
||||
}
|
||||
employee.Id = global::SimpleAdmin.Core.Utils.CommonUtils.GetSingleId();
|
||||
employee.CompanyId = task.CompanyId;
|
||||
employee.DepartmentId = task.DepartmentId;
|
||||
|
||||
Reference in New Issue
Block a user