public IActionResult ConsultarTrackingContratoPorContratoId([FromBody] ConsultaTrackingContratoPorContratoIdRequestDTO request)
        {
            Guid guid = Guid.NewGuid();

            _log.RegistrarEvento($"{guid}{Environment.NewLine}{JsonConvert.SerializeObject(request)}");

            ConsultaTrackingContratoPorContratoIdResponseDTO response = new ConsultaTrackingContratoPorContratoIdResponseDTO();

            try
            {
                response.Result.Data    = _contratoService.ConsultarTrackingContratoPorContratoId(request);
                response.Result.Success = true;
            }
            catch (ResultException ex)
            {
                response.Result = new Result()
                {
                    Success = true, ErrCode = ex.Result.ErrCode, Message = ex.Result.Message
                };
            }
            catch (Exception ex)
            {
                response.Result = new Result()
                {
                    Success = false, Message = "Ocurrio un problema en el servicio, intentelo nuevamente."
                };
                _log.RegistrarEvento(ex, guid.ToString());
            }

            _log.RegistrarEvento($"{guid}{Environment.NewLine}{JsonConvert.SerializeObject(response)}");
            return(Ok(response));
        }
Пример #2
0
        public ConsultarTrackingContratoPorContratoIdBE ConsultarTrackingContratoPorContratoId(ConsultaTrackingContratoPorContratoIdRequestDTO request)
        {
            ConsultarTrackingContratoPorContratoIdBE consultarTrackingContratoPorContratoIdBE = _IContratoRepository.ConsultarTrackingContratoPorContratoId(request.ContratoId, request.Idioma);

            consultarTrackingContratoPorContratoIdBE.Cargamentos = _IContratoRepository.ConsultarTrackingContratoCargamentoPorContratoId(request.ContratoId, request.Idioma).ToList();

            consultarTrackingContratoPorContratoIdBE.Certificaciones = _IContratoRepository.ConsultarTrackingContratoCertificacionPorContratoId(request.ContratoId, request.Idioma).ToList();


            return(consultarTrackingContratoPorContratoIdBE);
        }