FrameAppWS

<back to all web services

ListaProcesosEmpresaRQ

Requires Authentication
The following routes are available for this service:
All Verbs/Utilidades/ListaEjecucionEmpresa
import Foundation
import ServiceStack

public class ListaProcesosEmpresaRQ : Codable
{
    public var codigoEmpresa:Double?
    public var estado:String
    public var fechaInicio:Date?
    public var fechaFin:Date?

    required public init(){}
}

public class ListaProcesosEmpresaRS : GeneralRS
{
    public var empresasEjecucion:[EmpresaEjecucion] = []
    /**
    * Id del código de respuesta 1: Correcto, -1: Error
    */
    // @ApiMember(DataType="int", Description="Id del código de respuesta 1: Correcto, -1: Error", IsRequired=true, ParameterType="body")
    public var codigo:Int

    /**
    * Mensaje que se envía al ejecutar el servicio
    */
    // @ApiMember(DataType="string", Description="Mensaje que se envía al ejecutar el servicio", IsRequired=true, ParameterType="body")
    public var mensaje:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case empresasEjecucion
        case codigo
        case mensaje
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        empresasEjecucion = try container.decodeIfPresent([EmpresaEjecucion].self, forKey: .empresasEjecucion) ?? []
        codigo = try container.decodeIfPresent(Int.self, forKey: .codigo)
        mensaje = try container.decodeIfPresent(String.self, forKey: .mensaje)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if empresasEjecucion.count > 0 { try container.encode(empresasEjecucion, forKey: .empresasEjecucion) }
        if codigo != nil { try container.encode(codigo, forKey: .codigo) }
        if mensaje != nil { try container.encode(mensaje, forKey: .mensaje) }
    }
}

public class GeneralRS : Codable
{
    /**
    * Id del código de respuesta 1: Correcto, -1: Error
    */
    // @ApiMember(DataType="int", Description="Id del código de respuesta 1: Correcto, -1: Error", IsRequired=true, ParameterType="body")
    public var codigo:Int

    /**
    * Mensaje que se envía al ejecutar el servicio
    */
    // @ApiMember(DataType="string", Description="Mensaje que se envía al ejecutar el servicio", IsRequired=true, ParameterType="body")
    public var mensaje:String

    required public init(){}
}

public class EmpresaEjecucion : Codable
{
    public var idEmpresa:Double
    public var nombre:String
    public var listaProcesos:[EstadoEjecucion] = []

    required public init(){}
}

public class EstadoEjecucion : Codable
{
    public var codigoEjecucion:Double
    public var aliasFuncion:String
    public var descripcion:String
    public var usuario:String
    public var fechaHoraIni:Date
    public var fechaHoraFin:Date?
    public var fechaHoraAct:Date?
    public var totalRegistros:Int?
    public var cantProcesados:Int?
    public var response:String
    public var estado:String
    public var usuarioCancela:String
    public var motivoCancela:String

    required public init(){}
}


Swift ListaProcesosEmpresaRQ DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Utilidades/ListaEjecucionEmpresa HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CodigoEmpresa: 0,
	Estado: String,
	FechaInicio: 0001-01-01,
	FechaFin: 0001-01-01
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	EmpresasEjecucion: 
	[
		{
			IdEmpresa: 0,
			Nombre: String,
			ListaProcesos: 
			[
				{
					CodigoEjecucion: 0,
					AliasFuncion: String,
					Descripcion: String,
					Usuario: String,
					FechaHoraFin: 0001-01-01,
					FechaHoraAct: 0001-01-01,
					TotalRegistros: 0,
					CantProcesados: 0,
					Response: String,
					Estado: String,
					UsuarioCancela: String,
					MotivoCancela: String
				}
			]
		}
	],
	Codigo: 0,
	Mensaje: String
}