Admin Repoert --> add EmployeeOptionsCheck to report

This commit is contained in:
SamSys
2025-11-04 17:27:55 +03:30
parent c080e11fe0
commit 2125e15fb9
7 changed files with 1092 additions and 815 deletions

View File

@@ -11,21 +11,23 @@ namespace Company.Domain.ReportAgg
{
Task<AllReport> GetAllActiveWorkshopsNew(string year, string month);
AllReport GetAllActiveWorkshops(string year, string month);
WorkshopResult GetWorkshopContractDone(string year, string month, long accountId, List<long> workshopList);
WorkshopResult GetWorkshopContractSignDone(string year, string month, long accountId, List<long> workshopList);
WorkshopResult GetWorkshopCheckoutDone(string year, string month, long accountId, List<long> workshopList);
WorkshopResult GetWorkshopCheckoutSignDone(string year, string month, long accountId, List<long> workshopList);
List<EmployeeNotDone> GetEmployeeContract(string year, string month, long workshopId);
List<EmployeeNotDone> GetEmployeeContractSign(string year, string month, long workshopId);
List<EmployeeNotDone> GetEmployeeCheckout(string year, string month, long workshopId);
List<EmployeeNotDone> GetEmployeeCheckoutSign(string year, string month, long workshopId);
PrintAllContractCheckout GetPrintAllContractDone(string year, string month, long accountId,
Task<WorkshopResult> GetWorkshopContractDone(string year, string month, long accountId, List<long> workshopList);
Task<WorkshopResult> GetWorkshopContractSignDone(string year, string month, long accountId,
List<long> workshopList);
PrintAllContractCheckout GetPrintAllContractSignDone(string year, string month, long accountId,
Task<WorkshopResult> GetWorkshopCheckoutDone(string year, string month, long accountId, List<long> workshopList);
Task<WorkshopResult> GetWorkshopCheckoutSignDone(string year, string month, long accountId,
List<long> workshopList);
PrintAllContractCheckout GetPrintAllCheckoutDone(string year, string month, long accountId,
Task<List<EmployeeNotDone>> GetEmployeeContract(string year, string month, long workshopId);
Task<List<EmployeeNotDone>> GetEmployeeContractSign(string year, string month, long workshopId);
Task<List<EmployeeNotDone>> GetEmployeeCheckout(string year, string month, long workshopId);
Task<List<EmployeeNotDone>> GetEmployeeCheckoutSign(string year, string month, long workshopId);
Task<PrintAllContractCheckout> GetPrintAllContractDone(string year, string month, long accountId,
List<long> workshopList);
PrintAllContractCheckout GetPrintAllCheckoutSignDone(string year, string month, long accountId,
Task<PrintAllContractCheckout> GetPrintAllContractSignDone(string year, string month, long accountId,
List<long> workshopList);
Task<PrintAllContractCheckout> GetPrintAllCheckoutDone(string year, string month, long accountId,
List<long> workshopList);
Task<PrintAllContractCheckout> GetPrintAllCheckoutSignDone(string year, string month, long accountId,
List<long> workshopList);

View File

@@ -27,6 +27,8 @@ namespace CompanyManagment.App.Contracts.Report
public int ContractSignNotDone { get; set; }
public int ContractSignDone { get; set; }
public int ContractSignToBe { get; set; }
//تصفیه
public int AllCheckout { get; set; }
public int CheckoutNotDone { get; set; }
@@ -34,6 +36,8 @@ namespace CompanyManagment.App.Contracts.Report
public int CheckoutSignNotDone { get; set; }
public int CheckoutSignDone { get; set; }
public int CheckoutSignToBe { get; set; }
}

View File

@@ -10,21 +10,23 @@ namespace CompanyManagment.App.Contracts.Report
{
Task<AllReport> GetAllActiveWorkshops(string year, string month);
Task<AllReport> GetAllReports(string year, string month);
WorkshopResult GetWorkshopContractDone(string year, string month, long accountId, List<long> workshopList);
WorkshopResult GetWorkshopContractSignDone(string year, string month, long accountId, List<long> workshopList);
WorkshopResult GetWorkshopCheckoutDone(string year, string month, long accountId, List<long> workshopList);
WorkshopResult GetWorkshopCheckoutSignDone(string year, string month, long accountId, List<long> workshopList);
List<EmployeeNotDone> GetEmployeeContract(string year, string month, long workshopId);
List<EmployeeNotDone> GetEmployeeContractSign(string year, string month, long workshopId);
List<EmployeeNotDone> GetEmployeeCheckout(string year, string month, long workshopId);
List<EmployeeNotDone> GetEmployeeCheckoutSign(string year, string month, long workshopId);
PrintAllContractCheckout GetPrintAllContractDone(string year, string month, long accountId,
Task<WorkshopResult> GetWorkshopContractDone(string year, string month, long accountId, List<long> workshopList);
Task<WorkshopResult> GetWorkshopContractSignDone(string year, string month, long accountId,
List<long> workshopList);
PrintAllContractCheckout GetPrintAllContractSignDone(string year, string month, long accountId,
Task<WorkshopResult> GetWorkshopCheckoutDone(string year, string month, long accountId, List<long> workshopList);
Task<WorkshopResult> GetWorkshopCheckoutSignDone(string year, string month, long accountId,
List<long> workshopList);
PrintAllContractCheckout GetPrintAllCheckoutDone(string year, string month, long accountId,
Task<List<EmployeeNotDone>> GetEmployeeContract(string year, string month, long workshopId);
Task<List<EmployeeNotDone>> GetEmployeeContractSign(string year, string month, long workshopId);
Task<List<EmployeeNotDone>> GetEmployeeCheckout(string year, string month, long workshopId);
Task<List<EmployeeNotDone>> GetEmployeeCheckoutSign(string year, string month, long workshopId);
Task<PrintAllContractCheckout> GetPrintAllContractDone(string year, string month, long accountId,
List<long> workshopList);
PrintAllContractCheckout GetPrintAllCheckoutSignDone(string year, string month, long accountId,
Task<PrintAllContractCheckout> GetPrintAllContractSignDone(string year, string month, long accountId,
List<long> workshopList);
Task<PrintAllContractCheckout> GetPrintAllCheckoutDone(string year, string month, long accountId,
List<long> workshopList);
Task<PrintAllContractCheckout> GetPrintAllCheckoutSignDone(string year, string month, long accountId,
List<long> workshopList);
}
}

View File

@@ -29,67 +29,67 @@ public class ReportApplication : IReportApplication
return await _reportRepository.GetAllActiveWorkshopsNew(year, month);
}
public WorkshopResult GetWorkshopContractDone(string year, string month, long accountId, List<long> workshopList)
public async Task<WorkshopResult> GetWorkshopContractDone(string year, string month, long accountId, List<long> workshopList)
{
return _reportRepository.GetWorkshopContractDone(year, month, accountId, workshopList);
return await _reportRepository.GetWorkshopContractDone(year, month, accountId, workshopList);
}
public WorkshopResult GetWorkshopContractSignDone(string year, string month, long accountId, List<long> workshopList)
public async Task<WorkshopResult> GetWorkshopContractSignDone(string year, string month, long accountId, List<long> workshopList)
{
return _reportRepository.GetWorkshopContractSignDone(year, month, accountId, workshopList);
return await _reportRepository.GetWorkshopContractSignDone(year, month, accountId, workshopList);
}
public WorkshopResult GetWorkshopCheckoutDone(string year, string month, long accountId, List<long> workshopList)
public async Task<WorkshopResult> GetWorkshopCheckoutDone(string year, string month, long accountId, List<long> workshopList)
{
return _reportRepository.GetWorkshopCheckoutDone(year, month, accountId, workshopList);
return await _reportRepository.GetWorkshopCheckoutDone(year, month, accountId, workshopList);
}
public WorkshopResult GetWorkshopCheckoutSignDone(string year, string month, long accountId, List<long> workshopList)
public async Task<WorkshopResult> GetWorkshopCheckoutSignDone(string year, string month, long accountId, List<long> workshopList)
{
return _reportRepository.GetWorkshopCheckoutSignDone(year, month, accountId, workshopList);
return await _reportRepository.GetWorkshopCheckoutSignDone(year, month, accountId, workshopList);
}
public List<EmployeeNotDone> GetEmployeeContract(string year, string month, long workshopId)
public async Task<List<EmployeeNotDone>> GetEmployeeContract(string year, string month, long workshopId)
{
return _reportRepository.GetEmployeeContract(year, month, workshopId);
return await _reportRepository.GetEmployeeContract(year, month, workshopId);
}
public List<EmployeeNotDone> GetEmployeeContractSign(string year, string month, long workshopId)
public async Task<List<EmployeeNotDone>> GetEmployeeContractSign(string year, string month, long workshopId)
{
return _reportRepository.GetEmployeeContractSign(year, month, workshopId);
return await _reportRepository.GetEmployeeContractSign(year, month, workshopId);
}
public List<EmployeeNotDone> GetEmployeeCheckout(string year, string month, long workshopId)
public async Task<List<EmployeeNotDone>> GetEmployeeCheckout(string year, string month, long workshopId)
{
return _reportRepository.GetEmployeeCheckout(year, month, workshopId);
return await _reportRepository.GetEmployeeCheckout(year, month, workshopId);
}
public List<EmployeeNotDone> GetEmployeeCheckoutSign(string year, string month, long workshopId)
public async Task<List<EmployeeNotDone>> GetEmployeeCheckoutSign(string year, string month, long workshopId)
{
return _reportRepository.GetEmployeeCheckoutSign(year, month, workshopId);
return await _reportRepository.GetEmployeeCheckoutSign(year, month, workshopId);
}
#region Print
public PrintAllContractCheckout GetPrintAllContractDone(string year, string month, long accountId,
public async Task<PrintAllContractCheckout> GetPrintAllContractDone(string year, string month, long accountId,
List<long> workshopList)
{
return _reportRepository.GetPrintAllContractDone(year, month, accountId, workshopList);
return await _reportRepository.GetPrintAllContractDone(year, month, accountId, workshopList);
}
public PrintAllContractCheckout GetPrintAllContractSignDone(string year, string month, long accountId,
public async Task<PrintAllContractCheckout> GetPrintAllContractSignDone(string year, string month, long accountId,
List<long> workshopList)
{
return _reportRepository.GetPrintAllContractSignDone(year, month, accountId, workshopList);
return await _reportRepository.GetPrintAllContractSignDone(year, month, accountId, workshopList);
}
public PrintAllContractCheckout GetPrintAllCheckoutDone(string year, string month, long accountId,
public async Task<PrintAllContractCheckout> GetPrintAllCheckoutDone(string year, string month, long accountId,
List<long> workshopList)
{
return _reportRepository.GetPrintAllCheckoutDone(year, month, accountId, workshopList);
return await _reportRepository.GetPrintAllCheckoutDone(year, month, accountId, workshopList);
}
public PrintAllContractCheckout GetPrintAllCheckoutSignDone(string year, string month, long accountId,
public async Task<PrintAllContractCheckout> GetPrintAllCheckoutSignDone(string year, string month, long accountId,
List<long> workshopList)
{
return _reportRepository.GetPrintAllCheckoutSignDone(year, month, accountId, workshopList);
return await _reportRepository.GetPrintAllCheckoutSignDone(year, month, accountId, workshopList);
}
#endregion

File diff suppressed because it is too large Load Diff

View File

@@ -287,7 +287,7 @@
<div class="textsChart">
<p class="alltxt">
<span style="width: 40px;display: inline-block;">@Model.ContrcatDone</span> : <span style="width: 62px;display: inline-block;">کل</span>
<span style="width: 40px;display: inline-block;">@Model.ContractSignToBe</span> : <span style="width: 62px;display: inline-block;">کل</span>
</p>
<p class="alldonetxt">
<span style="width: 40px;display: inline-block;">@Model.ContractSignDone</span> : <span style="width: 62px;display: inline-block;color: #283344;">انجام شده</span>
@@ -353,7 +353,7 @@
<div class="textsChart">
<p class="alltxt">
<span style="width: 40px;display: inline-block;">@Model.CheckoutDone</span> : <span style="width: 62px;display: inline-block;">کل</span>
<span style="width: 40px;display: inline-block;">@Model.CheckoutSignToBe</span> : <span style="width: 62px;display: inline-block;">کل</span>
</p>
<p class="alldonetxt">
<span style="width: 40px;display: inline-block;">@Model.CheckoutSignDone</span> : <span style="width: 62px;display: inline-block;color: #283344;">انجام شده</span>

View File

@@ -1,4 +1,5 @@
using _0_Framework.Application;
using AccountMangement.Infrastructure.EFCore;
using CompanyManagment.App.Contracts.Report;
using CompanyManagment.App.Contracts.Workshop;
using CompanyManagment.App.Contracts.YearlySalary;
@@ -42,6 +43,7 @@ public class IndexModel : PageModel
public int ContrcatDone { get; set; }
public int ContractSignNotDone { get; set; }
public int ContractSignDone { get; set; }
public int ContractSignToBe { get; set; }
//تصفیه
public int AllCheckout { get; set; }
@@ -49,8 +51,9 @@ public class IndexModel : PageModel
public int CheckoutDone { get; set; }
public int CheckoutSignNotDone { get; set; }
public int CheckoutSignDone { get; set; }
public int CheckoutSignToBe { get; set; }
public async Task OnGet(string year, string month)
public async Task OnGet(string year, string month)
{
YearlyList = _yearlySalaryApplication.GetYears();
var allReports = await _reportApplication.GetAllReports(year, month);
@@ -73,19 +76,23 @@ public class IndexModel : PageModel
ContrcatDone = allReports.ContrcatDone;
ContractSignNotDone = allReports.ContractSignNotDone;
ContractSignDone = allReports.ContractSignDone;
AllCheckout = allReports.AllCheckout;
ContractSignToBe = allReports.ContractSignToBe;
AllCheckout = allReports.AllCheckout;
CheckoutNotDone = allReports.CheckoutNotDone;
CheckoutDone = allReports.CheckoutDone;
CheckoutSignNotDone = allReports.CheckoutSignNotDone;
CheckoutSignDone = allReports.CheckoutSignDone;
CheckoutSignToBe = allReports.CheckoutSignToBe;
}
#region workshopFirstLoad
public IActionResult OnGetWorkshopContractDone(string year, string month, long accountId, List<long> workshopList)
{
var res = _reportApplication.GetWorkshopContractDone(year, month, accountId, workshopList);
var res = _reportApplication.GetWorkshopContractDone(year, month, accountId, workshopList).GetAwaiter().GetResult();
return new JsonResult(new
{
success = true,
@@ -96,7 +103,7 @@ public class IndexModel : PageModel
public IActionResult OnGetWorkshopContractSignDone(string year, string month, long accountId, List<long> workshopList)
{
var res = _reportApplication.GetWorkshopContractSignDone(year, month, accountId, workshopList);
var res = _reportApplication.GetWorkshopContractSignDone(year, month, accountId, workshopList).GetAwaiter().GetResult();
return new JsonResult(new
{
success = true,
@@ -107,7 +114,7 @@ public class IndexModel : PageModel
public IActionResult OnGetWorkshopCheckoutDone(string year, string month, long accountId, List<long> workshopList)
{
var res = _reportApplication.GetWorkshopCheckoutDone(year, month, accountId, workshopList);
var res = _reportApplication.GetWorkshopCheckoutDone(year, month, accountId, workshopList).GetAwaiter().GetResult();
return new JsonResult(new
{
success = true,
@@ -118,7 +125,7 @@ public class IndexModel : PageModel
public IActionResult OnGetWorkshopCheckoutSignDone(string year, string month, long accountId, List<long> workshopList)
{
var res = _reportApplication.GetWorkshopCheckoutSignDone(year, month, accountId, workshopList);
var res = _reportApplication.GetWorkshopCheckoutSignDone(year, month, accountId, workshopList).GetAwaiter().GetResult();
return new JsonResult(new
{
success = true,
@@ -133,7 +140,7 @@ public class IndexModel : PageModel
public IActionResult OnGetEmployeeContract(string year, string month, long workshopId)
{
var res = _reportApplication.GetEmployeeContract(year, month, workshopId);
var res = _reportApplication.GetEmployeeContract(year, month, workshopId).GetAwaiter().GetResult();
return new JsonResult(new
{
success = true,
@@ -143,7 +150,7 @@ public class IndexModel : PageModel
public IActionResult OnGetEmployeeContractSign(string year, string month, long workshopId)
{
var res = _reportApplication.GetEmployeeContractSign(year, month, workshopId);
var res = _reportApplication.GetEmployeeContractSign(year, month, workshopId).GetAwaiter().GetResult();
return new JsonResult(new
{
success = true,
@@ -153,7 +160,7 @@ public class IndexModel : PageModel
public IActionResult OnGetEmployeeCheckout(string year, string month, long workshopId)
{
var res = _reportApplication.GetEmployeeCheckout(year, month, workshopId);
var res = _reportApplication.GetEmployeeCheckout(year, month, workshopId).GetAwaiter().GetResult();
return new JsonResult(new
{
success = true,
@@ -163,7 +170,7 @@ public class IndexModel : PageModel
public IActionResult OnGetEmployeeCheckoutSign(string year, string month, long workshopId, long accountId)
{
var res = _reportApplication.GetEmployeeCheckoutSign(year, month, workshopId);
var res = _reportApplication.GetEmployeeCheckoutSign(year, month, workshopId).GetAwaiter().GetResult();
return new JsonResult(new
{
success = true,
@@ -180,14 +187,14 @@ public class IndexModel : PageModel
{
var workshopIds = Tools.ExtractNumbers(workshopList);
var res = _reportApplication.GetPrintAllContractDone(year, month, accountId, workshopIds);
var res = _reportApplication.GetPrintAllContractDone(year, month, accountId, workshopIds).GetAwaiter().GetResult();
return Partial("PrintAll", res);
}
public IActionResult OnGetPrintAllContractSignDone(string year, string month, long accountId, string workshopList)
{
var workshopIds = Tools.ExtractNumbers(workshopList);
var res = _reportApplication.GetPrintAllContractSignDone(year, month, accountId, workshopIds);
var res = _reportApplication.GetPrintAllContractSignDone(year, month, accountId, workshopIds).GetAwaiter().GetResult();
return Partial("PrintAll", res);
}
@@ -195,14 +202,14 @@ public class IndexModel : PageModel
{
var workshopIds = Tools.ExtractNumbers(workshopList);
var res = _reportApplication.GetPrintAllCheckoutDone(year, month, accountId, workshopIds);
var res = _reportApplication.GetPrintAllCheckoutDone(year, month, accountId, workshopIds).GetAwaiter().GetResult();
return Partial("PrintAll", res);
}
public IActionResult OnGetPrintAllCheckoutSignDone(string year, string month, long accountId, string workshopList)
{
var workshopIds = Tools.ExtractNumbers(workshopList);
var res = _reportApplication.GetPrintAllCheckoutSignDone(year, month, accountId, workshopIds);
var res = _reportApplication.GetPrintAllCheckoutSignDone(year, month, accountId, workshopIds).GetAwaiter().GetResult();
return Partial("PrintAll", res);
}
//================Employee
@@ -211,7 +218,7 @@ public class IndexModel : PageModel
public IActionResult OnGetPrintEmployeeContract(string year, string month, long workshopId, string accountFullName)
{
var workshop = _workshopApplication.GetDetails(workshopId);
var res = _reportApplication.GetEmployeeContract(year, month, workshopId);
var res = _reportApplication.GetEmployeeContract(year, month, workshopId).GetAwaiter().GetResult();
var next = $"{year}/{month}/01";
var y = Convert.ToInt32(year);
var m = Convert.ToInt32(month);
@@ -235,7 +242,7 @@ public class IndexModel : PageModel
string accountFullName)
{
var workshop = _workshopApplication.GetDetails(workshopId);
var res = _reportApplication.GetEmployeeContractSign(year, month, workshopId);
var res = _reportApplication.GetEmployeeContractSign(year, month, workshopId).GetAwaiter().GetResult();
var next = $"{year}/{month}/01";
var y = Convert.ToInt32(year);
var m = Convert.ToInt32(month);
@@ -258,7 +265,7 @@ public class IndexModel : PageModel
public IActionResult OnGetPrintEmployeeCheckout(string year, string month, long workshopId, string accountFullName)
{
var workshop = _workshopApplication.GetDetails(workshopId);
var res = _reportApplication.GetEmployeeCheckout(year, month, workshopId);
var res = _reportApplication.GetEmployeeCheckout(year, month, workshopId).GetAwaiter().GetResult();
var final = new PrintEmployeeNotDone
{
@@ -277,7 +284,7 @@ public class IndexModel : PageModel
string accountFullName)
{
var workshop = _workshopApplication.GetDetails(workshopId);
var res = _reportApplication.GetEmployeeCheckoutSign(year, month, workshopId);
var res = _reportApplication.GetEmployeeCheckoutSign(year, month, workshopId).GetAwaiter().GetResult();
var final = new PrintEmployeeNotDone
{