Michele: modifiche estrazione excel filtri
This commit is contained in:
parent
dcb0322a8a
commit
9261625a72
@ -137,19 +137,33 @@ namespace VirtualTask.Controllers
|
|||||||
|
|
||||||
modelList = JsonConvert.DeserializeObject<List<Rapportini>>(data);
|
modelList = JsonConvert.DeserializeObject<List<Rapportini>>(data);
|
||||||
|
|
||||||
if (impianto != null)
|
if (string.IsNullOrEmpty(impianto))
|
||||||
{
|
{
|
||||||
modelList = modelList.Where(x => x.codice_impianto.Equals(impianto)).ToList();
|
impianto = "- Impianto";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dataFin.ToString().Substring(0, 10).Equals("01/01/0001"))
|
if (impianto.Equals("System.Collections.Generic.List`1[Microsoft.AspNetCore.Mvc.Rendering.SelectListItem]") || impianto.Equals("- Impianto"))
|
||||||
{
|
{
|
||||||
modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date && x.data_rapportino.GetValueOrDefault().Date <= dataFin.Date).ToList();
|
modelList = modelList;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date).ToList();
|
if (impianto != null)
|
||||||
|
{
|
||||||
|
modelList = modelList.Where(x => x.codice_impianto.Equals(impianto)).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dataFin.ToString().Substring(0, 10).Equals("01/01/0001"))
|
||||||
|
{
|
||||||
|
modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date
|
||||||
|
&& x.data_rapportino.GetValueOrDefault().Date <= dataFin.Date).ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date).ToList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var workbook = new XLWorkbook();
|
var workbook = new XLWorkbook();
|
||||||
workbook.AddWorksheet("sheetName");
|
workbook.AddWorksheet("sheetName");
|
||||||
|
|||||||
@ -7,14 +7,14 @@
|
|||||||
},
|
},
|
||||||
"ApplicationInsights": {
|
"ApplicationInsights": {
|
||||||
//PRODUZIONE
|
//PRODUZIONE
|
||||||
//"rootUrlApi": "https://api.poloinformatico.it:9000/api/Polo/",
|
"rootUrlApi": "https://api.poloinformatico.it:9000/api/Polo/",
|
||||||
//"rootWebLoghi": "C:\\ZAPIPOLO\\api_polo\\wwwroot\\VIRTU\\",
|
"rootWebLoghi": "C:\\ZAPIPOLO\\api_polo\\wwwroot\\VIRTU\\",
|
||||||
//"rootUrlApi2": "https://api.poloinformatico.it:9000/VIRTU/",
|
"rootUrlApi2": "https://api.poloinformatico.it:9000/VIRTU/",
|
||||||
|
|
||||||
//TEST
|
//TEST
|
||||||
"rootUrlApi": "http://testapi.poloinformatico.it:9001/api/Polo/",
|
//"rootUrlApi": "http://testapi.poloinformatico.it:9001/api/Polo/",
|
||||||
"rootWebLoghi": "C:\\SORGENTI\\ApiPolo\\ApiPolo\\wwwroot\\VIRTU\\",
|
//"rootWebLoghi": "C:\\SORGENTI\\ApiPolo\\ApiPolo\\wwwroot\\VIRTU\\",
|
||||||
"rootUrlApi2": "http://testapi.poloinformatico.it:9001/VIRTU/",
|
//"rootUrlApi2": "http://testapi.poloinformatico.it:9001/VIRTU/",
|
||||||
|
|
||||||
"mittenteMail": "info@virtualtask.it",
|
"mittenteMail": "info@virtualtask.it",
|
||||||
"nomeMail": "Supporto Virtual Task",
|
"nomeMail": "Supporto Virtual Task",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user