Files
Backend-Api/CompanyManagment.App.Contracts/Leave/ILeaveApplication.cs

82 lines
2.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using _0_Framework.Application;
using CompanyManagment.App.Contracts.Contract;
namespace CompanyManagment.App.Contracts.Leave;
public interface ILeaveApplication
{
OperationResult Create(CreateLeave command);
OperationResult Edit(EditLeave command);
EditLeave GetDetails(long id);
List<LeaveViewModel> search(LeaveSearchModel searchModel);
LeavePrintViewModel PrintOne(long id);
List<LeavePrintViewModel> PrintAll(List<long> id);
GroupLeavePrintViewModel PrintPersonnelLeaveList(List<long> id);
OperationResult RemoveLeave(long id);
LeaveViewModel LeavOnChekout(DateTime starContract, DateTime endContract, long employeeId, long workshopId);
List<LeaveMainViewModel> searchClient(LeaveSearchModel search);
#region Vafa
List<LeaveViewModel> LastLeaveMain(LeaveSearchModel searchModel);
#endregion
bool CheckIfValidToEdit(long id);
OperationResult<bool> HasDailyLeave(long workshopId, long employeeId, string dateFa);
#region Pooya
OperationResult ValidateNewLeaveWithExistingRollCalls(long workshopId, long employeeId, string paidLeaveType, DateTime start, DateTime end);
TimeSpan GetEmployeeLeaveTimeSpanInDates(long workshopId, long employeeId, string startFa, string endFa,
string type);
#endregion
/// <summary>
/// دریافت لیست مرخصی ها در کلاینت
/// Api
/// </summary>
/// <param name="searchModel"></param>
/// <returns></returns>
Task<PagedResult<leaveListDto>> GetList(
LeaveListSearchModel searchModel);
Task<List<LeavePrintResponseViewModel>> PrintAllAsync(List<long> ids, long workshopId);
Task<LeavePrintResponseViewModel> PrintOneAsync(long id, long workshopId);
}
public class LeavePrintResponseViewModel
{
public string FullName { get; set; }
public string NationalCode { get; set; }
public string WorkshopName { get; set; }
public List<string> EmployerNames { get; set; }
public string PaidLeaveType { get; set; }
public string ContractNo { get; set; }
public LeavePrintHourlyResponseViewModel HourlyLeave { get; set; }
public LeavePrintDailyResponseViewModel DailyLeave { get; set; }
}
public class LeavePrintDailyResponseViewModel
{
public string StartLeave { get; set; }
public string EndLeave { get; set; }
public string TotalDay { get; set; }
}
public class LeavePrintHourlyResponseViewModel
{
public string LeaveDate { get; set; }
public string StartHour { get; set; }
public string EndHour { get; set; }
public string TotalHour { get; set; }
}