212 lines
7.7 KiB
C#
212 lines
7.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using _0_Framework.Application;
|
|
using CompanyManagment.App.Contracts.InsuranceList;
|
|
using CompanyManagment.App.Contracts.Workshop;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace CompanyManagment.App.Contracts.InsuranceList;
|
|
|
|
public interface IInsuranceListApplication
|
|
{
|
|
OperationResult Create(CreateInsuranceList command);
|
|
OperationResult Edit(EditInsuranceList command);
|
|
EditInsuranceList GetDetails(long id);
|
|
List<InsuranceListViewModel> Search(InsuranceListSearchModel searchModel);
|
|
MainEmployeeDetailsViewModel SearchEmployeeForCreateInsuranceList(EmployeeForCreateInsuranceListSearchModel searchModel);
|
|
|
|
double MarriedAllowance(string maritalStatus, long jobId, bool includedStatus,
|
|
int countWorkingDays, double marriedAlowance, int endMonthCurrentDay);
|
|
|
|
OperationResult CreateEmployeeDetailsInfo(EmployeeDetailsForInsuranceListViewModel command);
|
|
OperationResult EditEmployeeDetailsInfo(EmployeeDetailsForInsuranceListViewModel command);
|
|
OperationResult Remove(long id);
|
|
EditInsuranceList GetDetailsForEdit(long id);
|
|
MainEmployeeDetailsViewModel SearchEmployeeListForEditByInsuranceListId(EmployeeForEditInsuranceListSearchModel searchModel);
|
|
|
|
MainEmployeeDetailsViewModel GetEmployeeListForEditByInsuranceListId(EmployeeForEditInsuranceListSearchModel searchModel);
|
|
double GetRoundValue(double value);
|
|
OperationResult ConfirmInsuranceList(long id);
|
|
|
|
#region New
|
|
/// <summary>
|
|
/// دستمزد روزانه مشاغل مقطوع بیمه
|
|
/// </summary>
|
|
/// <param name="year"></param>
|
|
/// <param name="workshopId"></param>
|
|
/// <param name="employeeId"></param>
|
|
/// <param name="startDateGr"></param>
|
|
/// <param name="endDateGr"></param>
|
|
/// <param name="jobId"></param>
|
|
/// <param name="population"></param>
|
|
/// <param name="insuranceJobId"></param>
|
|
/// <returns></returns>
|
|
double? GetDailyWageFixedSalary(string year, long workshopId, long employeeId, DateTime? startDateGr,
|
|
DateTime? endDateGr, long jobId, string population, long? insuranceJobId);
|
|
|
|
/// <summary>
|
|
/// محاسبه مزایای ماهانه
|
|
/// </summary>
|
|
/// <param name="endMonthCurrentDay"></param>
|
|
/// <param name="consumableItemsItemValue"></param>
|
|
/// <param name="housingAllowanceItemValue"></param>
|
|
/// <param name="maritalStatus"></param>
|
|
/// <param name="countWorkingDays"></param>
|
|
/// <param name="typeOfInsuranceSendWorkshop"></param>
|
|
/// <param name="jobId"></param>
|
|
/// <param name="employeeId"></param>
|
|
/// <param name="includeStatus"></param>
|
|
/// <returns></returns>
|
|
public double GetMonthlyBenefits(int endMonthCurrentDay, double consumableItemsItemValue,
|
|
double housingAllowanceItemValue, double maritalStatus, int countWorkingDays,
|
|
string typeOfInsuranceSendWorkshop, long jobId, long employeeId, bool includeStatus);
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="yearlysalaryItemValue"></param>
|
|
/// <param name="employeeId"></param>
|
|
/// <param name="workshopId"></param>
|
|
/// <param name="year"></param>
|
|
/// <returns></returns>
|
|
public double ComputeDailyWage(double yearlysalaryItemValue, long employeeId, long workshopId, string year);
|
|
|
|
#endregion
|
|
List<InsuranceListViewModel> SearchForClient(InsuranceListSearchModel searchModel);
|
|
|
|
//farokhiChanges
|
|
(double basic, int totalYear) BasicYear(long employeeId, long worshopId, DateTime startDate);
|
|
double GetMonthlyBaseYear(double dayliBase, int countWorkingDays);
|
|
|
|
#region Mahan
|
|
/// <summary>
|
|
/// مراحل اجرایی برای تکمیل و ارسال لیست بیمه
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Task<OperationResult> ConfirmInsuranceOperation(InsuranceListConfirmOperation command);
|
|
Task<InsuranceListConfirmOperation> GetInsuranceOperationDetails(long id);
|
|
|
|
Task<InsuranceListTabsCountViewModel> GetTabCounts(InsuranceListSearchModel searchModel);
|
|
Task<PagedResult<InsuranceClientListViewModel>> GetInsuranceClientList(InsuranceClientSearchModel searchModel);
|
|
|
|
|
|
#endregion
|
|
|
|
Task<List<InsuranceListViewModel>> GetNotCreatedWorkshop(InsuranceListSearchModel searchModel);
|
|
Task<InsuranceClientPrintViewModel> ClientPrintOne(long id);
|
|
}
|
|
|
|
public class InsuranceClientPrintViewModel
|
|
{
|
|
public string Month { get; set; }
|
|
public string Year { get; set; }
|
|
public string WorkshopName { get; set; }
|
|
public string ListNo { get; set; }
|
|
public string AgreementNumber { get; set; }
|
|
public string WorkshopInsuranceCode { get; set; }
|
|
public string WorkshopEmployerName { get; set; }
|
|
public string WorkshopAddress { get; set; }
|
|
public List<InsuranceClientPrintItemsViewModel> Items { get; set; }
|
|
public string EmployerShare { get; set; }
|
|
public string InsuredShare { get; set; }
|
|
public string UnEmploymentInsurance { get; set; }
|
|
public string AllInsuredShare { get; set; }
|
|
|
|
}
|
|
public class InsuranceClientPrintItemsViewModel
|
|
{
|
|
/// <summary>
|
|
/// شماره بیمه
|
|
/// </summary>
|
|
public string InsuranceCode { get; set; }
|
|
/// <summary>
|
|
/// نام و نام خانوادگی
|
|
/// </summary>
|
|
public string FullName { get; set; }
|
|
/// <summary>
|
|
/// شغل
|
|
/// </summary>
|
|
public string JobName { get; set; }
|
|
/// <summary>
|
|
/// کد ملی
|
|
/// </summary>
|
|
public string NationalCode { get; set; }
|
|
/// <summary>
|
|
/// شروع به کار
|
|
/// </summary>
|
|
public string StartWork { get; set; }
|
|
/// <summary>
|
|
/// ترک کار
|
|
/// </summary>
|
|
public string LeftWork { get; set; }
|
|
/// <summary>
|
|
/// روزهای کارکرد
|
|
/// </summary>
|
|
public string WorkingDays { get; set; }
|
|
/// <summary>
|
|
/// دستمزد روزانه
|
|
/// </summary>
|
|
public string DailyWage { get; set; }
|
|
/// <summary>
|
|
/// پایه سنوات روزانه
|
|
/// </summary>
|
|
public string BaseYears { get; set; }
|
|
/// <summary>
|
|
/// دستمزد ماهانه
|
|
/// </summary>
|
|
public string MonthlySalary { get; set; }
|
|
/// <summary>
|
|
/// مزایای ماهیانه مشمول
|
|
/// </summary>
|
|
public string MonthlyBenefits { get; set; }
|
|
/// <summary>
|
|
/// حق تاهل
|
|
/// </summary>
|
|
public string MarriedAllowance { get; set; }
|
|
/// <summary>
|
|
/// حقوق و مزایای ماهیانه مشمول
|
|
/// </summary>
|
|
public string BenefitsIncludedContinuous { get; set; }
|
|
/// <summary>
|
|
/// حقوق و مزایای ماهیانه غیر مشمول
|
|
/// </summary>
|
|
public string BenefitsIncludedNonContinuous { get; set; }
|
|
/// <summary>
|
|
/// مجموع مزایای ماهیانه مشمول و غیر مشمول
|
|
/// </summary>
|
|
public string IncludedAndNotIncluded { get; set; }
|
|
/// <summary>
|
|
/// حق بیمه سهم بیمه شده
|
|
/// </summary>
|
|
public string InsuranceShare { get; set; }
|
|
|
|
|
|
}
|
|
|
|
public class InsuranceClientSearchModel:PaginationRequest
|
|
{
|
|
public int Year { get; set; }
|
|
public int Month { get; set; }
|
|
public string Sorting { get; set; }
|
|
}
|
|
public class InsuranceClientListViewModel
|
|
{
|
|
public long Id { get; set; }
|
|
public string Year { get; set; }
|
|
public string Month { get; set; }
|
|
public long WorkShopId { get; set; }
|
|
public int YearInt { get; set; }
|
|
public string MonthName { get; set; }
|
|
public int MonthInt { get; set; }
|
|
public int PersonnelCount { get; set; }
|
|
public int LeftWorkCount { get; set; }
|
|
public string AllInsuredShare { get; set; }
|
|
public string InsuredShare { get; set; }
|
|
public string EmployerShare { get; set; }
|
|
public string UnEmploymentInsurance { get; set; }
|
|
|
|
} |