workFlow capsolat and undifin bug fixed - sum of leave on client

This commit is contained in:
SamSys
2025-01-12 21:49:27 +03:30
parent 2bb3cd2758
commit d74851d8c4
31 changed files with 2657 additions and 656 deletions

View File

@@ -3,6 +3,7 @@ using _0_Framework.Domain.CustomizeCheckoutShared.Base;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
using _0_Framework.InfraStructure;
using Company.Domain.EmployeeAgg;
using Company.Domain.RollCallAgg;
using Company.Domain.RollCallEmployeeAgg;
using Company.Domain.WorkshopAgg;
@@ -1381,5 +1382,14 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
TotalWorkingHoursSpan = x.EndDate == null ? new() : x.EndDate.Value - x.StartDate.Value
}).ToList();
}
public void RemoveEmployeeRollCallsWithUndefinedInDate(long workshopId, long employeeId, DateTime date)
{
var rollCalls = _context.RollCalls.IgnoreQueryFilters().Where(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId && x.ShiftDate == date.Date);
if (!rollCalls.Any())
return;
_context.RollCalls.RemoveRange(rollCalls);
}
}