add new metod to rcheckoutRepository

This commit is contained in:
SamSys
2025-05-24 16:33:02 +03:30
parent 789b0fbc24
commit 3e3eccf0f0
5 changed files with 38 additions and 2 deletions

View File

@@ -22,8 +22,12 @@ public interface ICheckoutRepository : IRepository<long, Checkout>
string year, string month);
EditCheckout GetDetails(long id);
Task<CreateCheckout> GetContractResultToCreateCheckout(long workshopId, string year, string month,
string contractStart, string contractEnd, long employeeId);
void CreateCkeckout(Checkout command);
Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel);
List<CheckoutViewModel> SimpleSearch(CheckoutSearchModel searchModel);

View File

@@ -13,7 +13,18 @@ public interface ICheckoutApplication
OperationResult Edit(EditCheckout command);
EditCheckout GetDetails(long id);
/// <summary>
/// دریافت قرداد های کارگاه و پرسنل وآنالیز آنها جهت صدور فیش حقوقی
/// </summary>
/// <param name="workshopId"></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, string year, string month,
string contractStart, string contractEnd, long employeeId);
Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel);
List<CheckoutViewModel> SimpleSearch(CheckoutSearchModel searchModel);
List<CheckoutViewModel> PrintAll(List<long> id);

View File

@@ -207,6 +207,13 @@ public class CheckoutApplication : ICheckoutApplication
return _checkoutRepository.GetDetails(id);
}
public async Task<CreateCheckout> 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<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel)
{
var result = new List<CheckoutViewModel>();

View File

@@ -116,6 +116,12 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
.FirstOrDefault(x => x.Id == id);
}
public Task<CreateCheckout> GetContractResultToCreateCheckout(long workshopId, string year, string month, string contractStart,
string contractEnd, long employeeId)
{
throw new NotImplementedException();
}
public void CreateCkeckout(Checkout command)
{

View File

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