170 lines
5.5 KiB
C#
170 lines
5.5 KiB
C#
using _0_Framework.Application;
|
|
using CompanyManagment.App.Contracts.Checkout.Dto;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CompanyManagment.App.Contracts.Checkout;
|
|
|
|
public interface ICheckoutApplication
|
|
{
|
|
void Create(CreateCheckout command);
|
|
OperationResult Edit(EditCheckout command);
|
|
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>
|
|
/// <returns></returns>
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year,
|
|
string month,
|
|
string contractStart, string contractEnd);
|
|
/// <summary>
|
|
/// لیست تصفیه حساب
|
|
/// جدید
|
|
///
|
|
/// </summary>
|
|
/// <param name="searchModel"></param>
|
|
/// <returns></returns>
|
|
Task<List<CheckoutViewModel>> SearchCheckoutOptimized(CheckoutSearchModel searchModel);
|
|
Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel);
|
|
List<CheckoutViewModel> SimpleSearch(CheckoutSearchModel searchModel);
|
|
List<CheckoutViewModel> PrintAll(List<long> id);
|
|
CheckoutViewModel PrintOne(long id);
|
|
CheckoutLeavePrintViewModel LeavePrint(long id);
|
|
OperationResult Sign(long id);
|
|
OperationResult UnSign(long id);
|
|
OperationResult Active(long id);
|
|
OperationResult DeActive(long id);
|
|
|
|
OperationResult RemoveCheckout(long id);
|
|
OperationResult CustomSet(long id, double rewardPay, double salaryAidDeduction);
|
|
List<CheckoutViewModel> SearchForClient(CheckoutSearchModel searchModel);
|
|
#region NewChangeByHeydari
|
|
List<long> CheckHasSignature(List<long> ids);
|
|
OperationResult DeleteAllCheckouts(List<long> ids);
|
|
OperationResult DeleteCheckout(long id);
|
|
Task<List<CheckoutViewModel>> SearchForMainCheckout(CheckoutSearchModel searchModel);
|
|
#endregion
|
|
|
|
#region Pooya
|
|
|
|
|
|
List<(long EmployeeId, DateTime CheckoutStart, DateTime CheckoutEnd)> GetLastCheckoutsByWorkshopIdForWorkFlow(
|
|
long workshopId, DateTime start, DateTime end);
|
|
|
|
#endregion
|
|
|
|
Task<PagedResult<CheckoutListClientDto>> GetListForClient(long workshopId,
|
|
CheckoutListClientSearchModel searchModel);
|
|
|
|
#region ForApi
|
|
|
|
/// <summary>
|
|
/// دریافت سلکت لیست پرسنل کارگاه
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
Task<List<EmployeeSelectListDto>> GetEmployeeSelectListByWorkshopId(long id);
|
|
|
|
/// <summary>
|
|
/// دریافت لیست فیش های حقوقی ادمین
|
|
/// </summary>
|
|
/// <param name="searchModel"></param>
|
|
/// <returns></returns>
|
|
Task<PagedResult<CheckoutDto>> GetList(CheckoutSearchModelDto searchModel);
|
|
|
|
/// <summary>
|
|
/// دریافت نوبتکاری
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
Task<RotatingShiftOfCheckoutDto> GetRotatingShiftApi(long id);
|
|
|
|
/// <summary>
|
|
/// پرینت فیش حقوقی
|
|
/// Api
|
|
/// </summary>
|
|
/// <param name="ids"></param>
|
|
/// <returns></returns>
|
|
Task<List<CheckoutPrintDto>> CheckoutPrint(List<long> ids);
|
|
|
|
/// <summary>
|
|
/// دریافت لیست قراردادها برای ایجاد فیش حقوقی
|
|
/// </summary>
|
|
/// <param name="workshopId"></param>
|
|
/// <param name="year"></param>
|
|
/// <param name="month"></param>
|
|
/// <param name="employeeId"></param>
|
|
/// <returns></returns>
|
|
Task<OperationResult<List<ContractsListToCreateCheckoutDto>>> GetContractToCreateCheckout(long workshopId,
|
|
string year, string month, long employeeId);
|
|
/// <summary>
|
|
/// ایجاد فیش حقوقی
|
|
/// </summary>
|
|
/// <param name="ids"></param>
|
|
/// <param name="year"></param>
|
|
/// <param name="month"></param>
|
|
/// <returns></returns>
|
|
Task<OperationResult> CreateCheckoutApi(List<long> ids, string year, string month, long workshopId);
|
|
|
|
#endregion
|
|
}
|
|
|
|
public class CheckoutPrintInstallmentDto
|
|
{
|
|
public string RemainingAmount { get; set; }
|
|
public string LoanAmount { get; set; }
|
|
public string Amount { get; set; }
|
|
}
|
|
public class CheckoutPrintSalaryAidDto
|
|
{
|
|
public string Amount { get; set; }
|
|
public string SalaryAidDateTimeFa { get; set; }
|
|
}
|
|
|
|
|
|
public class CheckoutListClientSearchModel:PaginationRequest
|
|
{
|
|
public long? EmployeeId { get; set; }
|
|
public string Year { get; set; }
|
|
public string Month { get; set; }
|
|
public string StartDate { get; set; }
|
|
public string EndDate { get; set; }
|
|
public CheckoutClientListOrderType? OrderType { get; set; }
|
|
}
|
|
|
|
public class CheckoutListClientDto
|
|
{
|
|
public long Id { get; set; }
|
|
public string Year { get; set; }
|
|
public string Month { get; set; }
|
|
public string EmployeeName { get; set; }
|
|
public string ContractNo { get; set; }
|
|
public string ContractStart { get; set; }
|
|
public string ContractEnd { get; set; }
|
|
public bool Signature { get; set; }
|
|
}
|
|
|
|
public enum CheckoutClientListOrderType
|
|
{
|
|
ByCheckoutCreationDate,
|
|
BySignedCheckout,
|
|
ByUnSignedCheckout,
|
|
ByPersonnelCode,
|
|
ByPersonnelCodeDescending,
|
|
ByCheckoutStartDate,
|
|
ByCheckoutStartDateDescending
|
|
|
|
|
|
|
|
} |