ISyncService bővítése

This commit is contained in:
2025-02-27 12:47:58 +01:00
parent 5512120306
commit 883ae6b845
7 changed files with 130 additions and 36 deletions
@@ -16,9 +16,9 @@ namespace WorkFlowCheck.API.Controllers
}
[HttpGet("GetAllCheckPoints")]
public async Task<ApiResponseDTO<CheckPointListDTO>> GetAllCheckpoint()
public async Task<ApiResponseDTO<List<CheckPointDTO>>> GetAllCheckpointsAsync()
{
var retVal = new ApiResponseDTO<CheckPointListDTO>()
var retVal = new ApiResponseDTO<List<CheckPointDTO>>()
{
IsSuccess = true,
};
@@ -38,9 +38,57 @@ namespace WorkFlowCheck.API.Controllers
return retVal;
}
[HttpGet("GetAllEquipments")]
public async Task<ApiResponseDTO<List<EquipmentDTO>>> GetAllEquipmentsAsync()
{
var retVal = new ApiResponseDTO<List<EquipmentDTO>>()
{
IsSuccess = true,
};
var equipmentListDTO = await _syncService.GetAllEquipmentAsync();
[HttpGet("GetAllCheckListHeader")]
public async Task<ApiResponseDTO<List<CheckListTemplateHeaderDTO>>> GetAllCheckListHeader()
if (equipmentListDTO != null)
{
retVal.IsSuccess = true;
retVal.Data = equipmentListDTO;
}
else
{
retVal.IsSuccess = false;
retVal.Errors.Add("No data!");
}
return retVal;
}
[HttpGet("GetAllLocations")]
public async Task<ApiResponseDTO<List<LocationDTO>>> GetAllLocationsAsync()
{
var retVal = new ApiResponseDTO<List<LocationDTO>>()
{
IsSuccess = true,
};
var locationListDTO = await _syncService.GetAllLocationAsync();
if (locationListDTO != null)
{
retVal.IsSuccess = true;
retVal.Data = locationListDTO;
}
else
{
retVal.IsSuccess = false;
retVal.Errors.Add("No data!");
}
return retVal;
}
[HttpGet("GetAllCheckListTemplateHeader")]
public async Task<ApiResponseDTO<List<CheckListTemplateHeaderDTO>>> GetAllCheckListTemplateHeaderAsync()
{
var retVal = new ApiResponseDTO<List<CheckListTemplateHeaderDTO>>()
{