Files
Backend-Api/Company.Domain/WorkshopAgg/IWorkshopRepository.cs

109 lines
4.3 KiB
C#

using System.Collections.Generic;
using System.Threading.Tasks;
using _0_Framework.Application;
using _0_Framework.Domain;
using CompanyManagment.App.Contracts.Contract;
using CompanyManagment.App.Contracts.PersonalContractingParty;
using CompanyManagment.App.Contracts.Workshop;
using CompanyManagment.App.Contracts.Workshop.DTOs;
namespace Company.Domain.WorkshopAgg;
public interface IWorkshopRepository : IRepository<long, Workshop>
{
List<WorkshopViewModel> GetWorkshop();
List<WorkshopViewModel> GetWorkshopAll();
List<WorkshopViewModel> GetWorkshopAccount();
EditWorkshop GetDetails(long id);
List<long> GetRelation(long workshopid);
List<long> GetWorkshopAccountRelation(long workshopid);
void EmployerWorkshop(long workshopid, long employerid);
void WorkshopAccounts(List<long> AccountIds, long workshopId);
WorkshopViewModel GetWorkshopInfo(long id);
void RemoveOldRelation(long workshopid);
List<WorkshopViewModel> Search(WorkshopSearchModel searchModel);
List<WorkshopViewModel> GetWorkshopsByEmployerId(List<long> emloyerIds);
List<ConnectedPersonnelViewModel> GetConnectedPersonnels(long workshopId);
List<PersonnelInfoViewModel> GetPersonnelInfo(long workshopId);
int PersonnnelCount(long workshopId);
#region client
bool Remove(long id);
List<WorkshopViewModel> GetWorkshopByTextSearchForClient(string textSearch);
List<WorkshopViewModel> SearchForClient(WorkshopSearchModel searchModel);
void CreateWorkshopAccounts(List<long> accountIds, long id);
bool GetWorkshopAccountByAcountID(long acountId);
void RemoveEmployerWorkshop(long workshopid);
bool ExistsWorkshopAccountInsuranceCode(string insuranceCode);
bool ExistsWorkshopAccountInsuranceCodeByworkshopId(long workshopId, string insuranceCode);
bool ExistsWorkshopAccountArchiveCodeByWorkshopId(long commandId, string commandArchiveCode);
bool ExistsWorkshopAccountArchiveCode(string commandArchiveCode);
bool CheckAccountWorkshop(long workshopId);
List<WorkshopViewModel> SearchForClientRollCall();
#endregion
#region NewByHeydari
//List<WorkshopViewModel> GetWorkshopByWorkshopIds(List<long> workshopIds);
List<WorkshopEmployerViewModel> WorkshopEmployers();
List<WorkshopViewModel> GetWorkshopByTextSearch(string searchText);
List<WorkshopViewModel> SearchForMain(WorkshopSearchModel searchModel);
OperationResult DeActiveAll(long id);
OperationResult ActiveAll(long id);
#endregion
#region Vafa
List<PrintListWorkshop> PrintWorkshopList(WorkshopSearchModel searchModel);
#endregion
#region Mahan
PersonalContractingPartyViewModel GetPersonalContractingPartyByWorkshopId(long workshopId);
List<WorkshopViewModel> GetWorkshopsByClientAccountId(long clientAccountId);
Task<List<WorkshopWithStartedEmployeesDto>> GetWorkshopsForEmployeeStartWork(long accountId);
Task<int> GetWorkshopsForEmployeeStartWorkCount(long accountId);
Task<List<WorkshopWithLeftWorkTempEmployeesDto>> GetWorkshopsForLeftWorkTemp(long accountId);
Task<int> GetWorkshopsForLeftWorkTempCount(long accountId);
Task<List<WorkshopSelectListViewModel>> GetSelectList(string search, long id);
int GetLastArchiveCode();
#endregion
#region Insurance
/// <summary>
/// لیست انتخاب کارگاه در مودال ایجاد بیمه
/// </summary>
/// <returns></returns>
List<WorkshopViewModel> GetWorkshopSelectListInsuransce();
#endregion
/// <summary>
/// ایجاد دسترسی برای کاربران ادمین در زمان ایجاد کارگاه
/// </summary>
/// <param name="AccountIds"></param>
/// <param name="workshopId"></param>
/// <returns></returns>
OperationResult CreateAccountLeftWorkAndWorkshopAccounts(List<long> accountIds, long workshopId);
/// <summary>
/// ویرایش دسترسی کاربران ادمین به کارگاه در زمان ویرایش کارگاه
/// </summary>
/// <param name="AccountIds"></param>
/// <param name="workshopId"></param>
/// <returns></returns>
OperationResult EditAccountLeftWorkAndWorkshopAccounts(List<long> accountIds, long workshopId);
#region Pooya
List<PersonnelInfoViewModel> GetPersonnelInfoRemastered(long searchModelWorkshopId);
#endregion
}