This commit is contained in:
MahanCh
2025-05-27 18:06:36 +03:30
2 changed files with 17 additions and 58 deletions

View File

@@ -234,11 +234,23 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
private async Task UpdateAdminMonthlyOverviewStatus(int year, int month, List<long> workshopIds, DateTime targetDate, DateTime nextMonth)
{
var workingCheckoutEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= targetDate && x.LeftWorkDate.AddDays(-1) >= targetDate)
.Select(x => new { x.WorkshopId, x.EmployeeId });
var workingCheckoutEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
.Join(
_companyContext.Contracts.AsNoTracking(),
leftWork => new { leftWork.EmployeeId, WorkshopId = leftWork.WorkshopId },
contract => new { contract.EmployeeId, WorkshopId = contract.WorkshopIds },
(leftWork, contract) => new { leftWork, contract }
)
.Where(x =>
workshopIds.Contains(x.leftWork.WorkshopId) &&
x.leftWork.StartWorkDate <= targetDate &&
x.leftWork.LeftWorkDate.AddDays(-1) >= targetDate &&
x.contract.ContarctStart <= targetDate &&
x.contract.ContractEnd >= targetDate
)
.Select(x => new { x.leftWork.WorkshopId, x.leftWork.EmployeeId });
var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= nextMonth && x.LeftWorkDate.AddDays(-1) >= nextMonth)
.Select(x => new { x.WorkshopId, x.EmployeeId });

View File

@@ -401,60 +401,7 @@
</ul>
</li>
<li class="has_sub" permission="500">
<a class="waves-effect MainMenuItem">
<div class="menuTitle">
<i class="fa fa-file-text-o"></i>
<span> مدیریت متن </span>
</div>
<span class="pull-right">
<i class="md md-add"></i>
</span>
</a>
<ul class="list-unstyled sdf5">
<li permission="501">
<a class="clik5 " asp-area="Admin" asp-page="/Company/TextManager/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white" />
</svg>
لیست متون
</a>
</li>
<li permission="502">
<a class="clik5 " asp-area="Admin" asp-page="/Company/OriginalTitle/Index">
عنوان
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white" />
</svg>
</a>
</li>
<li permission="503">
<a class="clik5 " asp-area="Admin" asp-page="/Company/Subtitle/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white" />
</svg>
بخش
</a>
</li>
<li permission="504">
<a class="clik5 " asp-area="Admin" asp-page="/Company/Chapter/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white" />
</svg>
فصل
</a>
</li>
<li permission="505">
<a class="clik5 " asp-area="Admin" asp-page="/Company/Module/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white" />
</svg>
ماژول
</a>
</li>
</ul>
</li>
<li class="has_sub" permission="700">