From 186cb95c709e03d14f8001624910b7af9a81c289 Mon Sep 17 00:00:00 2001 From: mahan Date: Sat, 20 Dec 2025 18:37:44 +0330 Subject: [PATCH] refactor: remove unused discount-related classes and update workshop ID handling --- .../IInstitutionContractApplication.cs | 139 +----------------- .../InstitutionContractApplication.cs | 2 +- .../Pages/Company/AndroidApk/Index.cshtml.cs | 2 +- 3 files changed, 6 insertions(+), 137 deletions(-) diff --git a/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs b/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs index 258814af..42ac1305 100644 --- a/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs +++ b/CompanyManagment.App.Contracts/InstitutionContract/IInstitutionContractApplication.cs @@ -276,49 +276,10 @@ public interface IInstitutionContractApplication } -public class InstitutionContractDiscountResponse -{ - public InstitutionContractDiscountOneTimeViewModel OneTime { get; set; } - public InstitutionContractDiscountMonthlyViewModel Monthly { get; set; } -} -public class InstitutionContractDiscountMonthlyViewModel:InstitutionContractDiscountOneTimeViewModel -{ - public List Installments { get; set; } -} -public class InstitutionContractDiscountOneTimeViewModel -{ - /// - /// مجموع مبالغ - /// - public string TotalAmount { get; set; } - /// - /// ارزش افزوده - /// - public string Tax { get; set; } - /// - /// مبلغ قابل پرداخت - /// - public string PaymentAmount { get; set; } - - public string DiscountedAmount { get; set; } - - public int DiscountPercetage { get; set; } - public string Obligation { get; set; } - - public string OneMonthAmount { get; set; } -} -public class InstitutionContractResetDiscountForCreateRequest -{ - public int DiscountPercentage { get; set; } - public double TotalAmount { get; set; } - public bool IsInstallment { get; set; } - public InstitutionContractDuration Duration { get; set; } - public double OneMonthAmount { get; set; } -} public class GetInstitutionAmendmentVerificationDetailsViewModel { @@ -338,28 +299,9 @@ public class GetInstitutionAmendmentVerificationDetailsViewModel } -public class InstitutionContractSetDiscountForExtensionRequest -{ - public Guid TempId { get; set; } - public int DiscountPercentage { get; set; } - public double TotalAmount { get; set; } - public bool IsInstallment { get; set; } -} -public class InstitutionContractResetDiscountForExtensionRequest -{ - public Guid TempId { get; set; } - public bool IsInstallment { get; set; } -} -public class InstitutionContractSetDiscountRequest -{ - public int DiscountPercentage { get; set; } - public double TotalAmount { get; set; } - public InstitutionContractDuration Duration { get; set; } - public double OneMonthAmount { get; set; } - public bool IsInstallment { get; set; } -} + public class InstitutionContractAmendmentCompleteRequest { @@ -377,83 +319,10 @@ public class GetInstitutionContractWorkshopsDetails } -public class InstitutionContractPrintViewModel -{ - public InstitutionContratVerificationParty FirstParty { get; set; } - public InstitutionContratVerificationParty SecondParty { get; set; } - public string ContractNo { get; set; } - public string CreationDate { get; set; } - public string ContractStart { get; set; } - public string ContractEnd { get; set; } - public List Workshops { get; set; } - public string TotalPrice { get; set; } - public string TaxPrice { get; set; } - public string PaymentPrice { get; set; } - public string OneMonthPrice { get; set; } - public string VerifyCode { get; set; } - public string VerifyDate { get; set; } - public string VerifyTime { get; set; } - public string VerifierFullName { get; set; } - public string VerifierPhoneNumber { get; set; } - public LawViewModel LawViewModel { get; set; } - public string Obligation { get; set; } -} - -public class InsertAmendmentTempWorkshopResponse -{ - public Guid WorkshopTempId { get; set; } - public string Amount { get; set; } -} - -public class InstitutionContractAmendmentWorkshopsResponse -{ - /// - /// - /// - public List Workshops { get; set; } - - public Guid TempId { get; set; } - -} - -public class InstitutionContractSelectListViewModel : SelectListViewModel; - -public class InstitutionContractExtensionInquiryResponse -{ - public long Id { get; set; } - public string FName { get; set; } - public string LName { get; set; } - public string DateOfBirthFa { get; set; } - public string FatherName { get; set; } - public string IdNumberSerial { get; set; } - public string IdNumber { get; set; } - public string Address { get; set; } - public string Phone { get; set; } - public string City { get; set; } - public string State { get; set; } - public long RepresentativeId { get; set; } - public string NationalCode { get; set; } -} -public class InstitutionContractExtensionPaymentMonthly:InstitutionContractExtensionPaymentOneTime -{ - public List Installments { get; set; } -} -public class InstitutionContractExtensionPaymentOneTime -{ - /// - /// مجموع مبالغ - /// - public string TotalAmount { get; set; } - /// - /// ارزش افزوده - /// - public string Tax { get; set; } - /// - /// مبلغ قابل پرداخت - /// - public string PaymentAmount { get; set; } -} \ No newline at end of file + + + diff --git a/CompanyManagment.Application/InstitutionContractApplication.cs b/CompanyManagment.Application/InstitutionContractApplication.cs index 9d771ba8..08a3aa18 100644 --- a/CompanyManagment.Application/InstitutionContractApplication.cs +++ b/CompanyManagment.Application/InstitutionContractApplication.cs @@ -1566,7 +1566,7 @@ public class InstitutionContractApplication : IInstitutionContractApplication createdWorkshop.Services.ContractInPerson, createdWorkshop.Services.Insurance, createdWorkshop.Services.InsuranceInPerson,createdWorkshop.PersonnelCount, createdWorkshop.Price, createdWorkshop.InstitutionContractWorkshopGroupId,createdWorkshop.WorkshopGroup, - createdWorkshop.WorkshopId!.Value, createdWorkshop.id); + createdWorkshop.WorkshopId!.Value, createdWorkshop.id,false); institutionContract.WorkshopGroup.AddCurrentWorkshop(currentWorkshop); } diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/AndroidApk/Index.cshtml.cs b/ServiceHost/Areas/AdminNew/Pages/Company/AndroidApk/Index.cshtml.cs index 321c0311..dedfed7a 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Company/AndroidApk/Index.cshtml.cs +++ b/ServiceHost/Areas/AdminNew/Pages/Company/AndroidApk/Index.cshtml.cs @@ -955,7 +955,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk x.PersonnelCount, x.Price, x.InstitutionContractWorkshopGroupId, group, - x.WorkshopId.Value,x.id); + x.WorkshopId.Value,x.id,false); entity.SetEmployers(x.Employers.Select(e => e.EmployerId).ToList()); return entity;