aa
This commit is contained in:
parent
f6642e7a27
commit
a62394bcb7
@ -172,7 +172,12 @@ namespace ApiSoftway.Controllers
|
||||
//step 1 : calcolo il nuovo seriale
|
||||
_giriConsView = _consegnevista_context.GiriView;
|
||||
var ser = await _giriConsView.Take(1).OrderByDescending(t => t.SerialeGiro).ToListAsync();
|
||||
string ultSer = ser.First().SerialeGiro;
|
||||
string ultSer = "0";
|
||||
if (ser!=null && ser.Count>0)
|
||||
{
|
||||
ultSer = ser.First().SerialeGiro;
|
||||
}
|
||||
|
||||
string newSer = calcolaNuovoSeriale(ultSer);
|
||||
|
||||
//step 2 : inserisco in PIGIRCON
|
||||
@ -192,7 +197,10 @@ namespace ApiSoftway.Controllers
|
||||
|
||||
//step 3 aggiorno con il seriale le righe delle destinazioni
|
||||
_destinazioni = _destinazioni_context.Destinazioni;
|
||||
var dest = await _destinazioni.Where(t => t.CodAutista != null && t.CodAutista.Equals(model.CodAutista) && t.DataCarico != null && t.DataCarico == model.DataGiro && t.serialeGiro == null).OrderByDescending(t => t.DataCarico).ToListAsync();
|
||||
var dest = await _destinazioni.Where(t => t.CodAutista != null && t.CodAutista.Equals(model.CodAutista)
|
||||
&& t.DataCarico != null && t.DataCarico == model.DataGiro
|
||||
&& t.serialeGiro == null
|
||||
&& t.CodAutomezzo!=null && t.CodAutomezzo.Equals(model.CodMezzo)).OrderByDescending(t => t.DataCarico).ToListAsync();
|
||||
foreach (Destinazioni d in dest)
|
||||
{
|
||||
Sbr_ord sbr_Ord = new Sbr_ord();
|
||||
@ -418,7 +426,9 @@ namespace ApiSoftway.Controllers
|
||||
|
||||
List<Destinazioni_out> lst = new List<Destinazioni_out>();
|
||||
_destinazioni = _destinazioni_context.Destinazioni;
|
||||
var r = await _destinazioni.Where(t => t.CodAutista != null && t.CodAutista.Equals(usr) && t.DataCarico != null && t.DataCarico == data).OrderByDescending(t => t.DataCarico).ToListAsync();
|
||||
var r = await _destinazioni.Where(t => t.CodAutista != null && t.CodAutista.Equals(usr) && t.DataCarico != null && t.DataCarico == data
|
||||
//&& !string.IsNullOrEmpty(t.serialeGiro)
|
||||
).OrderByDescending(t => t.DataCarico).ToListAsync();
|
||||
foreach (Destinazioni d in r)
|
||||
{
|
||||
Destinazioni_out o = new Destinazioni_out();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user