comment status for middle month aval mah kon

This commit is contained in:
SamSys
2025-03-12 23:41:30 +03:30
parent 22c1847cbe
commit b8f8485266
2 changed files with 7 additions and 7 deletions

View File

@@ -59,11 +59,11 @@ namespace CompanyManagment.Application
if(leftWork.StartWorkDate>DateTime.Today)
startStatus = leftWork.StartWorkDate;
else if(pc.GetMonth(DateTime.Today) == pc.GetMonth(leftWork.StartWorkDate))
{
startStatus = new DateTime(pc.GetYear(leftWork.StartWorkDate), pc.GetMonth(leftWork.StartWorkDate),
1, pc);
}
//else if(pc.GetMonth(DateTime.Today) == pc.GetMonth(leftWork.StartWorkDate))
//{
// startStatus = new DateTime(pc.GetYear(leftWork.StartWorkDate), pc.GetMonth(leftWork.StartWorkDate),
// 1, pc);
//}
RollCallEmployeeStatus newRecord = new(rollCallEmployee.id, startStatus);
_employeeRollCallStatusRepository.Create(newRecord);

View File

@@ -96,8 +96,8 @@ public class RollCallEmployeeRepository : RepositoryBase<long, RollCallEmployee>
var rawQuery = employeeQuery.Include(x => x.LeftWorks).Include(x => x.LeftWorkInsurances)
.Where(x => x.LeftWorks.Any(y =>
y.WorkshopId == command.WorkshopId && y.StartWorkDate <= dateNow &&
y.LeftWorkDate > dateNow) ||
(y.WorkshopId == command.WorkshopId && y.StartWorkDate <= dateNow &&
y.LeftWorkDate > dateNow) || y.StartWorkDate>dateNow) ||
x.LeftWorkInsurances.Any(y =>
y.WorkshopId == command.WorkshopId && y.StartWorkDate <= dateNow &&
(y.LeftWorkDate > dateNow || y.LeftWorkDate == null))).OrderByDescending(x => x.id)