2026-07-24 17:35:34 -03:00
|
|
|
using Data.SeaHavenIndustries;
|
|
|
|
|
using Data.SeaHavenIndustries.Enums;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using SeaHaven.DataServices.Models;
|
2026-04-28 18:55:14 -05:00
|
|
|
using SeaHaven.Services.DTOs;
|
|
|
|
|
|
|
|
|
|
namespace SeaHaven.Services.Interfaces
|
|
|
|
|
{
|
|
|
|
|
public interface IWorkOrderService
|
|
|
|
|
{
|
|
|
|
|
Task<WorkOrderDTO?> GetWorkOrderByIdAsync(int id);
|
|
|
|
|
Task<WorkOrderDTO?> GetWorkOrderByIdWithDetailsAsync(int id);
|
|
|
|
|
Task<IEnumerable<WorkOrderDTO>> GetAllWorkOrdersAsync();
|
|
|
|
|
Task<PagedResult<WorkOrderDTO>> GetWorkOrdersPagedAsync(int page, int pageSize, string? search = null, string? status = null, string? priority = null);
|
2026-05-14 11:00:12 -05:00
|
|
|
Task<int> CreateWorkOrderAsync(CreateWorkOrderDTO dto, string userId);
|
|
|
|
|
Task<bool> UpdateWorkOrderAsync(int id, UpdateWorkOrderDTO dto, string userId);
|
|
|
|
|
Task<bool> DeleteWorkOrderAsync(int id, string userId);
|
2026-04-28 18:55:14 -05:00
|
|
|
Task<bool> WorkOrderExistsAsync(int id);
|
|
|
|
|
Task<string> GenerateNextInternalWONumberAsync();
|
|
|
|
|
Task<int> GetTotalWorkOrderCountAsync();
|
2026-07-24 17:35:34 -03:00
|
|
|
|
|
|
|
|
Task<(IEnumerable<WorkOrderListItemReadModel> Items, int TotalCount)> GetWorkOrderListPagedAsync(
|
|
|
|
|
int page, int pageSize, string? search, string? status, string? assignee,
|
|
|
|
|
int? locationId, string? sortBy, string? sortDir);
|
|
|
|
|
Task<WorkOrderDetailReadModel?> GetWorkOrderDetailAsync(int id);
|
|
|
|
|
Task<FilteredWorkOrderPageDTO> GetFilteredWorkOrdersAsync(
|
|
|
|
|
string[] assignto, int[]? location, string[]? priority,
|
|
|
|
|
string[]? status, string[]? duedate, string search, string sort, string sortby, int page, int pageSize);
|
|
|
|
|
Task<FilteredWorkOrderPageDTO> GetFilteredWorkOrders2Async(
|
|
|
|
|
string[] assignto, int[]? location, string[]? priority,
|
|
|
|
|
string[]? status, string[]? duedate, string search, string sort, string sortby, int page, int pageSize);
|
|
|
|
|
Task<WorkOrderDTO?> ChangeStatusAsync(int id, string status, string userId);
|
|
|
|
|
Task<ChangeAssignmentResult?> ChangeAssignmentAsync(int id, string? assignTo, string userId);
|
|
|
|
|
Task<int> CreateWorkOrderWithDetailsAsync(CreateWorkOrderWithDetailsInput input, string userId);
|
|
|
|
|
Task<bool> UpdateWorkOrderWithDetailsAsync(UpdateWorkOrderWithDetailsInput input, string userId);
|
|
|
|
|
Task<bool> DeleteWorkOrderCascadeAsync(int id, string userId);
|
|
|
|
|
Task<Comments> AddCommentAsync(AddCommentInput input, string userId);
|
|
|
|
|
Task<CommentResult> AddCommentJsonAsync(AddCommentInput input, string userId);
|
|
|
|
|
Task<IEnumerable<CommentListItemReadModel>> GetCommentsAsync();
|
|
|
|
|
Task<IEnumerable<CommentListItemReadModel>> GetCommentsByWorkorderIdAsync(int woid);
|
|
|
|
|
Task<IEnumerable<WorkOrder>> GetWorkordersDDAsync();
|
|
|
|
|
Task<IEnumerable<WorkorderFilterVM>> GetWorkordersAsync();
|
2026-04-28 18:55:14 -05:00
|
|
|
}
|
|
|
|
|
}
|