diff --git a/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs b/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs index 57ac69f0..f5a8ac1d 100644 --- a/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs +++ b/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs @@ -1,15 +1,19 @@ using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; using System.Linq; using System.Threading.Tasks; using _0_Framework.Application; using CompanyManagment.App.Contracts.Checkout; +using CompanyManagment.App.Contracts.Workshop; +using Microsoft.AspNetCore.Mvc; namespace CompanyManagment.App.Contracts.InstitutionContract; public interface IInstitutionContractApplication { OperationResult Create(CreateInstitutionContract command); - OperationResult Extension(CreateInstitutionContract command); + OperationResult Extension(CreateInstitutionContract command); OperationResult Edit(EditInstitutionContract command); EditInstitutionContract GetDetails(long id); @@ -23,6 +27,7 @@ public interface IInstitutionContractApplication /// /// List GetInstitutionContractToSetServicesExcelImport(); + List PrintAll(List id); InstitutionContractViewModel PrintOne(long id); OperationResult Active(long id); @@ -38,4 +43,150 @@ public interface IInstitutionContractApplication void CreateContractingPartyAccount(long contractingPartyid, long accountId); double GetcontractAmount(int countPerson); + + #region Api + + /// + /// لیست قرارداد های مالی + /// + /// + /// + Task>> GetList + (InstitutionContractListSearchModel searchModel); + + #endregion +} + +public class InstitutionContractListSearchModel +{ + /// + /// کارفرما / کارگاه / طرف حساب / معرف + /// + public string EmployerOrWorkshopOrContractingPartyOrRepresentativeName { get; set; } + + /// + /// تعداد نفرات از + /// + public int EmployeeCountFrom { get; set; } + + /// + /// تعداد نفرات تا + /// + public int EmployeeCountTo { get; set; } + + /// + /// استان + /// + public string Province { get; set; } + + /// + /// شهر + /// + public string City { get; set; } + + /// + /// مبلغ قرارداد از + /// + public double AmountFrom { get; set; } + + /// + /// مبلغ قرارداد تا + /// + public double AmountTo { get; set; } + + /// + /// تاریخ قرارداد از + /// + public string ContractDateFrom { get; set; } + + /// + /// تاریخ قرارداد تا + /// + public string ContractDateTo { get; set; } +} + +/// +/// لیست قرارداد های موسسه +/// +public class GetInstitutionContractListViewModel +{ + /// + /// آیدی + /// + public long Id { get; set; } + + /// + /// دارای امضا + /// + public bool HasSigniture { get; set; } + + /// + /// شماره قرارداد + /// + public string ContractNo { get; set; } + + /// + /// نام معرف + /// + public string RepresentativeName { get; set; } + + /// + /// نام طرف حساب + /// + public string ContractingPartyName { get; set; } + + /// + /// شماره کارفرما + /// + public string ArchiveNo { get; set; } + + /// + /// نام کارفرماها + /// + public List EmployerNames { get; set; } + + /// + /// تعداد کارگاه + /// + public int WorkshopsCount { get; set; } + + /// + /// نام کارگاه ها + /// + public List WorkshopNames { get; set; } + + /// + /// تعداد پرسنل + /// + public int EmployeesCount { get; set; } + + /// + /// شروع قرارداد + /// + public string ContractStartFa { get; set; } + + /// + /// پایان قرارداد + /// + public string ContractEndFa { get; set; } + + /// + /// مبلغ قرارداد بدون کارگاه + /// + public double ContractWithoutWorkshopAmount { get; set; } + + /// + /// مبلغ قرارداد + /// + public double ContractAmount { get; set; } + + /// + /// وضعیت مالی + /// + public double Balance { get; set; } + + /// + /// رنگ بک گراند + /// + public KnownColor Color { get; set; } } \ No newline at end of file diff --git a/CompanyManagment.Application/InstitutionContractApplication.cs b/CompanyManagment.Application/InstitutionContractApplication.cs index fd87513b..cb4db42a 100644 --- a/CompanyManagment.Application/InstitutionContractApplication.cs +++ b/CompanyManagment.Application/InstitutionContractApplication.cs @@ -868,6 +868,11 @@ public class InstitutionContractApplication : IInstitutionContractApplication { return _institutionContractRepository.GetcontractAmount(countPerson); } + + public Task>> GetList(InstitutionContractListSearchModel searchModel) + { + throw new NotImplementedException(); + } } diff --git a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs new file mode 100644 index 00000000..a8904df8 --- /dev/null +++ b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs @@ -0,0 +1,28 @@ +using _0_Framework.Application; +using CompanyManagment.App.Contracts.InstitutionContract; +using Microsoft.AspNetCore.Mvc; + +namespace ServiceHost.Areas.Admin.Controllers; + +/// +/// کنترلر قرارداد های مالی موسسه +/// +public class institutionContractController : Controller +{ + private readonly IInstitutionContractApplication _institutionContractApplication; + + public institutionContractController(IInstitutionContractApplication institutionContractApplication) + { + _institutionContractApplication = institutionContractApplication; + } + + /// + /// لیست قرارداد های مالی + /// + /// + [HttpGet] + public async Task>>> GetList(InstitutionContractListSearchModel searchModel) + { + return await _institutionContractApplication.GetList(searchModel); + } +} \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/InstitutionContracts/Index.cshtml.cs b/ServiceHost/Areas/Admin/Pages/Company/InstitutionContracts/Index.cshtml.cs index 4826037c..763b8baf 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InstitutionContracts/Index.cshtml.cs +++ b/ServiceHost/Areas/Admin/Pages/Company/InstitutionContracts/Index.cshtml.cs @@ -1,4 +1,5 @@ using System.Diagnostics.CodeAnalysis; +using System.Drawing; using _0_Framework.Application; using AccountManagement.Application.Contracts.Account; using CompanyManagement.Infrastructure.Excel.InstitutionContract;