From 3e3eccf0f09dc967b05464b1d059fe8610d10017 Mon Sep 17 00:00:00 2001 From: SamSys Date: Sat, 24 May 2025 16:33:02 +0330 Subject: [PATCH] add new metod to rcheckoutRepository --- Company.Domain/CheckoutAgg/ICheckoutRepository.cs | 4 ++++ .../Checkout/ICheckoutApplication.cs | 13 ++++++++++++- CompanyManagment.Application/CheckoutApplication.cs | 7 +++++++ .../Repository/CheckoutRepository.cs | 6 ++++++ .../Admin/Pages/Company/Checkouts/Index.cshtml.cs | 10 +++++++++- 5 files changed, 38 insertions(+), 2 deletions(-) diff --git a/Company.Domain/CheckoutAgg/ICheckoutRepository.cs b/Company.Domain/CheckoutAgg/ICheckoutRepository.cs index 1d67c406..8be04067 100644 --- a/Company.Domain/CheckoutAgg/ICheckoutRepository.cs +++ b/Company.Domain/CheckoutAgg/ICheckoutRepository.cs @@ -22,8 +22,12 @@ public interface ICheckoutRepository : IRepository string year, string month); EditCheckout GetDetails(long id); + Task GetContractResultToCreateCheckout(long workshopId, string year, string month, + string contractStart, string contractEnd, long employeeId); void CreateCkeckout(Checkout command); + + Task> Search(CheckoutSearchModel searchModel); List SimpleSearch(CheckoutSearchModel searchModel); diff --git a/CompanyManagment.App.Contracts/Checkout/ICheckoutApplication.cs b/CompanyManagment.App.Contracts/Checkout/ICheckoutApplication.cs index 5d8c3277..61f62226 100644 --- a/CompanyManagment.App.Contracts/Checkout/ICheckoutApplication.cs +++ b/CompanyManagment.App.Contracts/Checkout/ICheckoutApplication.cs @@ -13,7 +13,18 @@ public interface ICheckoutApplication OperationResult Edit(EditCheckout command); EditCheckout GetDetails(long id); - + /// + /// دریافت قرداد های کارگاه و پرسنل وآنالیز آنها جهت صدور فیش حقوقی + /// + /// + /// + /// + /// + /// + /// + /// + Task GetContractResultToCreateCheckout(long workshopId, string year, string month, + string contractStart, string contractEnd, long employeeId); Task> Search(CheckoutSearchModel searchModel); List SimpleSearch(CheckoutSearchModel searchModel); List PrintAll(List id); diff --git a/CompanyManagment.Application/CheckoutApplication.cs b/CompanyManagment.Application/CheckoutApplication.cs index 7ae53f91..863d26de 100644 --- a/CompanyManagment.Application/CheckoutApplication.cs +++ b/CompanyManagment.Application/CheckoutApplication.cs @@ -207,6 +207,13 @@ public class CheckoutApplication : ICheckoutApplication return _checkoutRepository.GetDetails(id); } + public async Task GetContractResultToCreateCheckout(long workshopId, string year, string month, + string contractStart, string contractEnd, long employeeId) + { + return await _checkoutRepository.GetContractResultToCreateCheckout(workshopId, year, month, contractStart, + contractEnd, employeeId); + + } public async Task> Search(CheckoutSearchModel searchModel) { var result = new List(); diff --git a/CompanyManagment.EFCore/Repository/CheckoutRepository.cs b/CompanyManagment.EFCore/Repository/CheckoutRepository.cs index fd3414b0..f71c2196 100644 --- a/CompanyManagment.EFCore/Repository/CheckoutRepository.cs +++ b/CompanyManagment.EFCore/Repository/CheckoutRepository.cs @@ -116,6 +116,12 @@ public class CheckoutRepository : RepositoryBase, ICheckoutRepos .FirstOrDefault(x => x.Id == id); } + public Task GetContractResultToCreateCheckout(long workshopId, string year, string month, string contractStart, + string contractEnd, long employeeId) + { + throw new NotImplementedException(); + } + public void CreateCkeckout(Checkout command) { diff --git a/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs b/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs index 91e37fe6..ec688986 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs +++ b/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs @@ -1000,9 +1000,17 @@ public class IndexModel : PageModel return Partial("Details", res); } + public IActionResult OnGetPrintOne(long id) + { + var res = _checkoutApplication.PrintOne(id); + //var res = _contractApplication.PrintAll(ids); + if (res.HasRollCall) return Partial("PrintDetailsRollCall", res); - public IActionResult OnGetPrintLeave(long id) + return Partial("Details", res); + } + + public IActionResult OnGetPrintLeave(long id) { var res = _checkoutApplication.LeavePrint(id); return Partial("PrintLeave", res);