metode change

This commit is contained in:
SamSys
2025-05-27 16:18:39 +03:30
parent 88a9a62dd3
commit 22f13aea0b
5 changed files with 37 additions and 8 deletions

View File

@@ -23,7 +23,19 @@ public interface ICheckoutRepository : IRepository<long, Checkout>
EditCheckout GetDetails(long id);
Task CreateCkeckout(Checkout command);
Task<CreateCheckout> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month,
/// <summary>
/// لود لیست اولیه جهت ایجاد فیش حقوقی
/// </summary>
/// <param name="workshopId"></param>
/// <param name="employeeId"></param>
/// <param name="year"></param>
/// <param name="month"></param>
/// <param name="contractStart"></param>
/// <param name="contractEnd"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year,
string month,
string contractStart, string contractEnd);
//void CreateCkeckout(Checkout command);

View File

@@ -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; }

View File

@@ -14,16 +14,18 @@ public interface ICheckoutApplication
EditCheckout GetDetails(long id);
/// <summary>
/// دریافت قرداد های کارگاه و پرسنل وآنالیز آنها جهت صدور فیش حقوقی
/// لود لیست اولیه جهت ایجاد فیش حقوقی
/// </summary>
/// <param name="workshopId"></param>
/// <param name="employeeId"></param>
/// <param name="year"></param>
/// <param name="month"></param>
/// <param name="contractStart"></param>
/// <param name="contractEnd"></param>
/// <param name="employeeId"></param>
/// <returns></returns>
Task<CreateCheckout> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month,
/// <exception cref="NotImplementedException"></exception>
Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year,
string month,
string contractStart, string contractEnd);
Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel);
List<CheckoutViewModel> SimpleSearch(CheckoutSearchModel searchModel);

View File

@@ -239,7 +239,7 @@ public class CheckoutApplication : ICheckoutApplication
return _checkoutRepository.GetDetails(id);
}
public async Task<CreateCheckout> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month,
public async Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month,
string contractStart, string contractEnd)
{
return await _checkoutRepository.GetContractResultToCreateCheckout(workshopId, employeeId, year, month, contractStart,

View File

@@ -123,8 +123,18 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
.FirstOrDefault(x => x.Id == id);
}
public Task<CreateCheckout> GetContractResultToCreateCheckout(long workshopId,long employeeId, string year, string month, string contractStart,
/// <summary>
/// لود لیست اولیه جهت ایجاد فیش حقوقی
/// </summary>
/// <param name="workshopId"></param>
/// <param name="employeeId"></param>
/// <param name="year"></param>
/// <param name="month"></param>
/// <param name="contractStart"></param>
/// <param name="contractEnd"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId,long employeeId, string year, string month, string contractStart,
string contractEnd)
{
DateTime startSreach;
@@ -139,6 +149,11 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, 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;