Se le agrega el control de status del viaje

develop
Al Garcia 2 years ago
parent 20dce25012
commit 701577dead
  1. 1
      Contracts/Operaciones/IOpViajesRepository.cs
  2. 6
      Controllers/Operaciones/OpViajesController.cs
  3. 8
      DTO/Operaciones/DTOChangeTripStatus.cs
  4. 8
      DTO/Operaciones/DTOResultTripStatus.cs
  5. 11
      Repository/Operaciones/OpViajesRepository.cs
  6. BIN
      bin/Debug/net6.0/AOLBackend.dll
  7. BIN
      bin/Debug/net6.0/AOLBackend.pdb
  8. 2
      obj/Debug/net6.0/AOLBackend.csproj.CoreCompileInputs.cache
  9. BIN
      obj/Debug/net6.0/AOLBackend.dll
  10. BIN
      obj/Debug/net6.0/AOLBackend.pdb
  11. BIN
      obj/Debug/net6.0/ref/AOLBackend.dll
  12. BIN
      obj/Debug/net6.0/refint/AOLBackend.dll
  13. 12
      obj/staticwebassets.pack.sentinel

@ -10,6 +10,7 @@ namespace AOLBackend.Contracts.Operaciones
public Task<IEnumerable<DTOOpViajesServicios>> GetAllServices(); public Task<IEnumerable<DTOOpViajesServicios>> GetAllServices();
public Task<DTOUltimaCaja> GetLastTrailerBox(int idViaje); public Task<DTOUltimaCaja> GetLastTrailerBox(int idViaje);
public Task<IEnumerable<DTOOpViajesEstatusSecuencia>> GetStatusSecuence(); public Task<IEnumerable<DTOOpViajesEstatusSecuencia>> GetStatusSecuence();
public Task<DTOResultTripStatus> ChangeTripStatus(DTOChangeTripStatus data);
public Task<Boolean> Delete(int id); public Task<Boolean> Delete(int id);
public Task<Boolean> DeleteService(int id); public Task<Boolean> DeleteService(int id);
} }

@ -63,6 +63,12 @@ namespace AOLBackend.Controllers.Operaciones
return entrada; return entrada;
} }
[HttpPut("ChangeTripStatus/{id}")]
public async Task<DTOResultTripStatus> Update2(int id, [FromBody] DTOChangeTripStatus data)
{
var entrada = await _Repo.ChangeTripStatus(data);
return entrada;
}
[HttpDelete("Delete/{id}")] [HttpDelete("Delete/{id}")]
public async Task<IActionResult> Delete(int id) public async Task<IActionResult> Delete(int id)

@ -0,0 +1,8 @@
namespace AOLBackend.DTO.Operaciones
{
public class DTOChangeTripStatus
{
public int IdViaje { get; set; } = 0;
public int IdEstatus { get; set; } = 0;
}
}

@ -0,0 +1,8 @@
namespace AOLBackend.DTO.Operaciones
{
public class DTOResultTripStatus
{
public int IdViaje { get; set; } = 0;
public int Secuencia { get; set; } = 0;
}
}

@ -82,6 +82,17 @@ namespace AOLBackend.Repository.Operaciones
var entrada = await connection.QueryAsync<DTOOpViajesEstatusSecuencia>(query, new { }, commandType: CommandType.StoredProcedure); var entrada = await connection.QueryAsync<DTOOpViajesEstatusSecuencia>(query, new { }, commandType: CommandType.StoredProcedure);
return entrada; return entrada;
} }
public async Task<DTOResultTripStatus> ChangeTripStatus(DTOChangeTripStatus data)
{
var query = "[Operaciones.Viajes.ChangeStatus]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<DTOResultTripStatus>(query, new
{
@IdViaje = data.IdViaje,
@Secuencia = data.IdEstatus
}, commandType: CommandType.StoredProcedure);
return entrada.First();
}
public async Task<Boolean> Delete(int id) public async Task<Boolean> Delete(int id)
{ {
var query = "[Operaciones.Viajes.Delete]"; var query = "[Operaciones.Viajes.Delete]";

Binary file not shown.

Binary file not shown.

@ -1 +1 @@
426ec8bbce8e97d6039a98b067cc59727cdd5187 eefe8f67b06397f0ffbb2eddb23dd69eb10fac57

Binary file not shown.

Binary file not shown.

@ -130,3 +130,15 @@
2.0 2.0
2.0 2.0
2.0 2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0

Loading…
Cancel
Save