104 lines
2.9 KiB
C#
104 lines
2.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using OliviaAddInPro.Helper;
|
|
using OliviaAddInPro.Services;
|
|
using ArcGIS.Core.Geometry;
|
|
using static OliviaAddInPro.Model.ComunDef;
|
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
|
using OliviaAddInPro.Services.LanzaSrv;
|
|
|
|
namespace OliviaAddInPro.Model
|
|
{
|
|
class Recogida : TratamientoComun
|
|
{
|
|
//**********************************************
|
|
//Se recogen en PaneRecogidaSub1
|
|
/**
|
|
* Tipo de fracción
|
|
*/
|
|
public int TipoFrac { get; set; } = -1;
|
|
/**
|
|
* Tipo de fracción
|
|
*/
|
|
public string TipoFracStr { get; set; } = string.Empty;
|
|
/**
|
|
* Tipo de carga
|
|
*/
|
|
public int TipoCarg { get; set; } = -1;
|
|
/**
|
|
* Tipo de carga
|
|
*/
|
|
public string TipoCargStr { get; set; } = string.Empty;
|
|
/**
|
|
* Tipo de Vehículo
|
|
*/
|
|
public int TipoVehic { get; set; } = -1;
|
|
/**
|
|
* Tipo de Lateralidad
|
|
*/
|
|
public int TipoLate { get; set; } = -1;
|
|
/**
|
|
* kg capac camión
|
|
*/
|
|
public int KgMaxVehic { get; set; } = 0;
|
|
/**
|
|
* dens contenedor
|
|
*/
|
|
public int DensCont { get; set; } = 0;
|
|
/**
|
|
* Tiempo de vaciado del contenedor, en seg
|
|
*/
|
|
public int TVaciCont { get; set; } = 0;
|
|
/**
|
|
* kg de carga en cada contenedor
|
|
*/
|
|
public int KgCont { get; set; } = 0;
|
|
/**
|
|
* grados en º de giro del vehículo
|
|
*/
|
|
public int GiroVehic { get; set; } = 0;
|
|
|
|
/*
|
|
*
|
|
* */
|
|
public double AnchoVehiculo
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
public RecogidaServ Serv { get; set; } = null;
|
|
public LanzaRecoSrv LanzaSrv { get; set; } = null;
|
|
public Recogida()
|
|
{
|
|
Serv = new RecogidaServ(this);
|
|
LanzaSrv = new LanzaRecoSrv();
|
|
}
|
|
|
|
public override Respuesta<TiposEjecucion> Ejecuta(ModosEjec modo)
|
|
{
|
|
Respuesta<bool> res = new Respuesta<bool> { Value = false };
|
|
Respuesta<TiposEjecucion> res2 = new Respuesta<TiposEjecucion>() { Value = TiposEjecucion.FinEjecNOk };
|
|
res = Serv.Ejecuta(modo);
|
|
if (res.Value)
|
|
{
|
|
res = LanzaSrv.ejec(this, modo, TipoTtoStr);
|
|
if (res.Value)
|
|
{
|
|
ProceSrv.ConfigConex();
|
|
res2 = ProceSrv.start(LanzaSrv.str_cfg, ProgrSrc._ProgrSrc);
|
|
if (!LanzaSrv.EsperaProcess(GeneralDef.NombOlvTasks))
|
|
res2.Error.Add("No se ha podido cerrar oliviaTask.");
|
|
}
|
|
}
|
|
if (res.HasError)
|
|
{
|
|
res2.Error.AddRange(res.Error);
|
|
}
|
|
return res2;
|
|
}
|
|
}
|
|
}
|