From 22f13aea0bc0c7ca5bfc55896ed09c33925fd62b Mon Sep 17 00:00:00 2001 From: SamSys Date: Tue, 27 May 2025 16:18:39 +0330 Subject: [PATCH] metode change --- .../CheckoutAgg/ICheckoutRepository.cs | 14 +++++++++++++- .../Checkout/CreateCheckoutListViewModel.cs | 2 +- .../Checkout/ICheckoutApplication.cs | 8 +++++--- .../CheckoutApplication.cs | 2 +- .../Repository/CheckoutRepository.cs | 19 +++++++++++++++++-- 5 files changed, 37 insertions(+), 8 deletions(-) diff --git a/Company.Domain/CheckoutAgg/ICheckoutRepository.cs b/Company.Domain/CheckoutAgg/ICheckoutRepository.cs index 24f1d014..6828fe80 100644 --- a/Company.Domain/CheckoutAgg/ICheckoutRepository.cs +++ b/Company.Domain/CheckoutAgg/ICheckoutRepository.cs @@ -23,7 +23,19 @@ public interface ICheckoutRepository : IRepository EditCheckout GetDetails(long id); Task CreateCkeckout(Checkout command); - Task GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month, + /// + /// لود لیست اولیه جهت ایجاد فیش حقوقی + /// + /// + /// + /// + /// + /// + /// + /// + /// + Task GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, + string month, string contractStart, string contractEnd); //void CreateCkeckout(Checkout command); diff --git a/CompanyManagment.App.Contracts/Checkout/CreateCheckoutListViewModel.cs b/CompanyManagment.App.Contracts/Checkout/CreateCheckoutListViewModel.cs index 863fea68..2cad9045 100644 --- a/CompanyManagment.App.Contracts/Checkout/CreateCheckoutListViewModel.cs +++ b/CompanyManagment.App.Contracts/Checkout/CreateCheckoutListViewModel.cs @@ -15,7 +15,7 @@ public class CreateCheckoutListViewModel public string WorkshopName { get; set; } public string EmployeeName { get; set; } - public string ContarctStart { get; set; } + public string ContractStart { get; set; } public string ContractEnd { get; set; } diff --git a/CompanyManagment.App.Contracts/Checkout/ICheckoutApplication.cs b/CompanyManagment.App.Contracts/Checkout/ICheckoutApplication.cs index f88c56fa..40321f83 100644 --- a/CompanyManagment.App.Contracts/Checkout/ICheckoutApplication.cs +++ b/CompanyManagment.App.Contracts/Checkout/ICheckoutApplication.cs @@ -14,16 +14,18 @@ public interface ICheckoutApplication EditCheckout GetDetails(long id); /// - /// دریافت قرداد های کارگاه و پرسنل وآنالیز آنها جهت صدور فیش حقوقی + /// لود لیست اولیه جهت ایجاد فیش حقوقی /// /// + /// /// /// /// /// - /// /// - Task GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month, + /// + Task GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, + string month, string contractStart, string contractEnd); Task> Search(CheckoutSearchModel searchModel); List SimpleSearch(CheckoutSearchModel searchModel); diff --git a/CompanyManagment.Application/CheckoutApplication.cs b/CompanyManagment.Application/CheckoutApplication.cs index 7ed38d67..b7778cf3 100644 --- a/CompanyManagment.Application/CheckoutApplication.cs +++ b/CompanyManagment.Application/CheckoutApplication.cs @@ -239,7 +239,7 @@ public class CheckoutApplication : ICheckoutApplication return _checkoutRepository.GetDetails(id); } - public async Task GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month, + public async Task GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month, string contractStart, string contractEnd) { return await _checkoutRepository.GetContractResultToCreateCheckout(workshopId, employeeId, year, month, contractStart, diff --git a/CompanyManagment.EFCore/Repository/CheckoutRepository.cs b/CompanyManagment.EFCore/Repository/CheckoutRepository.cs index b6e29bcb..9af0fd60 100644 --- a/CompanyManagment.EFCore/Repository/CheckoutRepository.cs +++ b/CompanyManagment.EFCore/Repository/CheckoutRepository.cs @@ -123,8 +123,18 @@ public class CheckoutRepository : RepositoryBase, ICheckoutRepos .FirstOrDefault(x => x.Id == id); } - - public Task GetContractResultToCreateCheckout(long workshopId,long employeeId, string year, string month, string contractStart, + /// + /// لود لیست اولیه جهت ایجاد فیش حقوقی + /// + /// + /// + /// + /// + /// + /// + /// + /// + public Task GetContractResultToCreateCheckout(long workshopId,long employeeId, string year, string month, string contractStart, string contractEnd) { DateTime startSreach; @@ -139,6 +149,11 @@ public class CheckoutRepository : RepositoryBase, ICheckoutRepos { if (month == "0" && year == "0") + { + DateTime now = DateTime.Now; + startSreach = now; + endSearch = (now.ToFarsi().FindeEndOfMonth()).ToGeorgianDateTime(); + } else if (month == "0" && year != "0") { DateTime now = DateTime.Now; startSreach = now;