Timbrature Vista
This commit is contained in:
parent
b1e803ef99
commit
6da6e49b48
@ -1,46 +1,44 @@
|
||||
using ApiPolo.Models;
|
||||
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Renci.SshNet;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Net;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using ApiPolo.Models.VT_dbcontext;
|
||||
using FirebaseAdmin;
|
||||
using FirebaseAdmin.Auth.Multitenancy;
|
||||
using FirebaseAdmin.Messaging;
|
||||
using Google.Apis.Auth.OAuth2;
|
||||
using Newtonsoft.Json;
|
||||
using static ApiPolo.Controllers.PoloController;
|
||||
using System.Net.Http.Headers;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using FirebaseAdmin.Auth.Multitenancy;
|
||||
using System.Globalization;
|
||||
using ApiPolo.Models.VT_dbcontext;
|
||||
using System.Diagnostics.Contracts;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using System.Diagnostics.Metrics;
|
||||
using System.Transactions;
|
||||
using System.Web.Razor.Parser;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Renci.SshNet;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Diagnostics.Metrics;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Net;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Transactions;
|
||||
using System.Web.Razor.Parser;
|
||||
using static ApiPolo.Controllers.PoloController;
|
||||
using static Microsoft.Extensions.Logging.EventSource.LoggingEventSource;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
using System.IO;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace ApiPolo.Controllers
|
||||
{
|
||||
@ -136,6 +134,7 @@ namespace ApiPolo.Controllers
|
||||
|
||||
#region VT-TIMBRATURE
|
||||
private readonly VT_TIMBRATURE_DbContext _VT_timbr;
|
||||
private readonly VT_TIMBRATURE_VW_DbContext _VT_VW_timbr;
|
||||
#endregion
|
||||
|
||||
#region VT-ARTICOLI
|
||||
@ -172,6 +171,7 @@ namespace ApiPolo.Controllers
|
||||
private DbSet<Pagam>? _pagam;
|
||||
private DbSet<Commessa>? _comm;
|
||||
private DbSet<Timbratura>? _timbr;
|
||||
private DbSet<TimbraturaView>? _timbrVW;
|
||||
private DbSet<Sto_Imp>? _sto_imp;
|
||||
private DbSet<AziendaRif>? _azi_coll;
|
||||
private DbSet<Impianto>? _impianto;
|
||||
@ -238,6 +238,7 @@ namespace ApiPolo.Controllers
|
||||
VT_Buoni_DbContext VT_Buoni,
|
||||
VT_STO_RAPP_DbContext VT_StoRapp,
|
||||
VT_TIMBRATURE_DbContext VT_timbr,
|
||||
VT_TIMBRATURE_VW_DbContext VT_VW_timbr,
|
||||
VT_ARTICOLI_TABLE_DbContext VT_artTable,
|
||||
VT_MAG_NEW_DbContext VT_MagNew,
|
||||
VT_MAGAZZINI_DbContext VT_Magazzini,
|
||||
@ -280,6 +281,7 @@ namespace ApiPolo.Controllers
|
||||
_VT_Buoni = VT_Buoni;
|
||||
_VT_StoRapp = VT_StoRapp;
|
||||
_VT_timbr = VT_timbr;
|
||||
_VT_VW_timbr = VT_VW_timbr;
|
||||
_VT_articoliTable = VT_artTable;
|
||||
_VT_MagNew = VT_MagNew;
|
||||
_VT_Magazzini = VT_Magazzini;
|
||||
@ -529,17 +531,29 @@ namespace ApiPolo.Controllers
|
||||
}
|
||||
return seriale;
|
||||
}
|
||||
private static readonly SemaphoreSlim _serialLock = new(1, 1);
|
||||
private async Task<string> GetSerialeThreadSafe(string token)
|
||||
private static readonly ConcurrentDictionary<string, SemaphoreSlim> _locks = new();
|
||||
private static SemaphoreSlim GetLockForTenant(string tenant)
|
||||
{
|
||||
await _serialLock.WaitAsync();
|
||||
return _locks.GetOrAdd(tenant, _ => new SemaphoreSlim(1, 1));
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
/// <summary>gestione della concorrenza</summary>
|
||||
public async Task<string> GetSerialeThreadSafe(string token)
|
||||
{
|
||||
string ten = getClaimValueByToken(token, "tenant") ??
|
||||
getClaimValueByToken(token, "tenantConfigurazioni");
|
||||
|
||||
var sem = GetLockForTenant(ten);
|
||||
|
||||
await sem.WaitAsync();
|
||||
try
|
||||
{
|
||||
return await getSerialeInternal(token);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_serialLock.Release();
|
||||
sem.Release();
|
||||
}
|
||||
}
|
||||
|
||||
@ -4204,21 +4218,6 @@ namespace ApiPolo.Controllers
|
||||
return o;
|
||||
}
|
||||
|
||||
private async Task<string> getDescrImpTedesco(string codimp, string ten)
|
||||
{
|
||||
string descImp = string.Empty;
|
||||
//_impianto = _Tedes_impianti.Impia;
|
||||
var l = await _impianto.Where(t => t.imcodazi != null && t.imcodazi.Equals(ten) && t.imcodimp != null && t.imcodimp.Equals(codimp)).ToListAsync();
|
||||
if (l != null && l.Count()>0 )
|
||||
{
|
||||
foreach(Impianto i in l)
|
||||
{
|
||||
descImp = i.imdescri;
|
||||
}
|
||||
}
|
||||
return descImp;
|
||||
}
|
||||
|
||||
/// <summary>Manutenzioni per tecnico e azienda (tenant). Intervallo: 1 mese prima e 1 mese dopo rispetto a GETDATE() con GENERATO diverso da S return:ActionResult</summary>
|
||||
[HttpGet("manutenzioni")]
|
||||
public async Task<ActionResult<IEnumerable<Manprog_out>>> manutenzioni(string token)
|
||||
@ -4345,335 +4344,6 @@ namespace ApiPolo.Controllers
|
||||
newSerial = await getSeriale(token);
|
||||
Rapp_New r = await fillRappNewChiudiManByInput(model, token, newSerial, _confLette);
|
||||
|
||||
//switch (ten)
|
||||
//{
|
||||
// case Clienti.Marrocco:
|
||||
// using (var transaction = _Marro_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Marro_rapp.Rapps.AddAsync(r);
|
||||
// await _Marro_rapp.SaveChangesAsync();
|
||||
// transaction.Commit();
|
||||
// }
|
||||
|
||||
|
||||
// break;
|
||||
// case Clienti.Ferrari:
|
||||
// using (var transaction = _Ferra_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Ferra_rapp.Rapps.AddAsync(r);
|
||||
// await _Ferra_rapp.SaveChangesAsync();
|
||||
// transaction.Commit();
|
||||
// }
|
||||
// break;
|
||||
// case Clienti.Sarom:
|
||||
// using (var transaction = _Sarom_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Sarom_rapp.Rapps.AddAsync(r);
|
||||
// await _Sarom_rapp.SaveChangesAsync();
|
||||
// transaction.Commit();
|
||||
// }
|
||||
// break;
|
||||
// case Clienti.Sicilia:
|
||||
// using (var transaction = _Sicilia_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Sicilia_rapp.Rapps.AddAsync(r);
|
||||
// await _Sicilia_rapp.SaveChangesAsync();
|
||||
// transaction.Commit();
|
||||
// }
|
||||
// int riga = 0;
|
||||
// if (model.compo_add != null && model.compo_add.Count() > 0)
|
||||
// {
|
||||
|
||||
// using (var transaction2 = _Sicilia_mag.Database.BeginTransaction())
|
||||
// {
|
||||
|
||||
// foreach (Saldiart co in model.compo_add)
|
||||
// {
|
||||
// riga = riga + 1;
|
||||
// Mag_New mn = new Mag_New();
|
||||
// mn = saldiartToMag_New(co, riga, newSerial, tecnico);
|
||||
|
||||
// await _Sicilia_mag.Mag.AddAsync(mn);
|
||||
// await _Sicilia_mag.SaveChangesAsync();
|
||||
|
||||
// }
|
||||
// transaction2.Commit();
|
||||
// }
|
||||
// }
|
||||
// if (model.compo_del != null && model.compo_del.Count() > 0)
|
||||
// {
|
||||
|
||||
|
||||
// using (var transaction3 = _Sicilia_mag.Database.BeginTransaction())
|
||||
// {
|
||||
// foreach (Compo_Impia co in model.compo_del)
|
||||
// {
|
||||
// Mag_New mn = new Mag_New();
|
||||
// riga = riga + 1;
|
||||
// mn = compo_ImpiaToMag_New(co, riga, newSerial, tecnico);
|
||||
|
||||
// await _Sicilia_mag.Mag.AddAsync(mn);
|
||||
// await _Sicilia_mag.SaveChangesAsync();
|
||||
// }
|
||||
// transaction3.Commit();
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case Clienti.Discovery:
|
||||
// using (var transaction4 = _Disco_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Disco_rapp.Rapps.AddAsync(r);
|
||||
// await _Disco_rapp.SaveChangesAsync();
|
||||
// transaction4.Commit();
|
||||
// }
|
||||
// break;
|
||||
// case Clienti.Gitoga:
|
||||
// using (var transactionGit = _Gitoga_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Gitoga_rapp.Rapps.AddAsync(r);
|
||||
// await _Gitoga_rapp.SaveChangesAsync();
|
||||
// transactionGit.Commit();
|
||||
// }
|
||||
// break;
|
||||
// case Clienti.Lifta:
|
||||
// using (var transactionLif = _Lifta_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Lifta_rapp.Rapps.AddAsync(r);
|
||||
// await _Lifta_rapp.SaveChangesAsync();
|
||||
// transactionLif.Commit();
|
||||
// }
|
||||
// break;
|
||||
//case Clienti.Siet:
|
||||
// using (var transactionSiet = _Siet_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Siet_rapp.Rapps.AddAsync(r);
|
||||
// await _Siet_rapp.SaveChangesAsync();
|
||||
// transactionSiet.Commit();
|
||||
// }
|
||||
// int rigaSiet = 0;
|
||||
// if (model.compo_add != null && model.compo_add.Count() > 0)
|
||||
// {
|
||||
|
||||
// using (var transaction2 = _Siet_mag.Database.BeginTransaction())
|
||||
// {
|
||||
|
||||
// foreach (Saldiart co in model.compo_add)
|
||||
// {
|
||||
// rigaSiet = rigaSiet + 1;
|
||||
// Mag_New mn = new Mag_New();
|
||||
// mn = saldiartToMag_New(co, rigaSiet, newSerial, tecnico);
|
||||
|
||||
// await _Siet_mag.Mag.AddAsync(mn);
|
||||
// await _Siet_mag.SaveChangesAsync();
|
||||
|
||||
// }
|
||||
// transaction2.Commit();
|
||||
// }
|
||||
// }
|
||||
// if (model.compo_del != null && model.compo_del.Count() > 0)
|
||||
// {
|
||||
// using (var transaction3 = _Siet_mag.Database.BeginTransaction())
|
||||
// {
|
||||
// foreach (Compo_Impia co in model.compo_del)
|
||||
// {
|
||||
// Mag_New mn = new Mag_New();
|
||||
// rigaSiet = rigaSiet + 1;
|
||||
// mn = compo_ImpiaToMag_New(co, rigaSiet, newSerial, tecnico);
|
||||
|
||||
// await _Siet_mag.Mag.AddAsync(mn);
|
||||
// await _Siet_mag.SaveChangesAsync();
|
||||
// }
|
||||
// transaction3.Commit();
|
||||
// }
|
||||
// }
|
||||
|
||||
// break;
|
||||
//case Clienti.PMS:
|
||||
// using (var transactionPms = _Pms_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Pms_rapp.Rapps.AddAsync(r);
|
||||
// await _Pms_rapp.SaveChangesAsync();
|
||||
// transactionPms.Commit();
|
||||
// }
|
||||
// int rigapms = 0;
|
||||
// if (model.compo_add != null && model.compo_add.Count() > 0)
|
||||
// {
|
||||
|
||||
// using (var transaction2 = _PMS_mag.Database.BeginTransaction())
|
||||
// {
|
||||
|
||||
// foreach (Saldiart co in model.compo_add)
|
||||
// {
|
||||
// rigapms = rigapms + 1;
|
||||
// Mag_New mn = new Mag_New();
|
||||
// mn = saldiartToMag_New(co, rigapms, newSerial, tecnico);
|
||||
|
||||
// await _PMS_mag.Mag.AddAsync(mn);
|
||||
// await _PMS_mag.SaveChangesAsync();
|
||||
|
||||
// }
|
||||
// transaction2.Commit();
|
||||
// }
|
||||
// }
|
||||
// if (model.compo_del != null && model.compo_del.Count() > 0)
|
||||
// {
|
||||
// using (var transaction3 = _PMS_mag.Database.BeginTransaction())
|
||||
// {
|
||||
// foreach (Compo_Impia co in model.compo_del)
|
||||
// {
|
||||
// Mag_New mn = new Mag_New();
|
||||
// rigapms = rigapms + 1;
|
||||
// mn = compo_ImpiaToMag_New(co, rigapms, newSerial, tecnico);
|
||||
|
||||
// await _PMS_mag.Mag.AddAsync(mn);
|
||||
// await _PMS_mag.SaveChangesAsync();
|
||||
// }
|
||||
// transaction3.Commit();
|
||||
// }
|
||||
// }
|
||||
|
||||
// break;
|
||||
|
||||
//case Clienti.LW:
|
||||
// using (var transactionLW = _LW_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _LW_rapp.Rapps.AddAsync(r);
|
||||
// await _LW_rapp.SaveChangesAsync();
|
||||
// transactionLW.Commit();
|
||||
// }
|
||||
// int rigalw = 0;
|
||||
// if (model.compo_add != null && model.compo_add.Count() > 0)
|
||||
// {
|
||||
|
||||
// using (var transaction2 = _LW_mag.Database.BeginTransaction())
|
||||
// {
|
||||
|
||||
// foreach (Saldiart co in model.compo_add)
|
||||
// {
|
||||
// rigalw = rigalw + 1;
|
||||
// Mag_New mn = new Mag_New();
|
||||
// mn = saldiartToMag_New(co, rigalw, newSerial, tecnico);
|
||||
|
||||
// await _LW_mag.Mag.AddAsync(mn);
|
||||
// await _LW_mag.SaveChangesAsync();
|
||||
|
||||
// }
|
||||
// transaction2.Commit();
|
||||
// }
|
||||
// }
|
||||
// if (model.compo_del != null && model.compo_del.Count() > 0)
|
||||
// {
|
||||
// using (var transaction3 = _LW_mag.Database.BeginTransaction())
|
||||
// {
|
||||
// foreach (Compo_Impia co in model.compo_del)
|
||||
// {
|
||||
// Mag_New mn = new Mag_New();
|
||||
// rigalw = rigalw + 1;
|
||||
// mn = compo_ImpiaToMag_New(co, rigalw, newSerial, tecnico);
|
||||
|
||||
// await _LW_mag.Mag.AddAsync(mn);
|
||||
// await _LW_mag.SaveChangesAsync();
|
||||
// }
|
||||
// transaction3.Commit();
|
||||
// }
|
||||
// }
|
||||
|
||||
// break;
|
||||
|
||||
//case Clienti.Tedesco:
|
||||
// using (var transactionTedes = _Tedes_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Tedes_rapp.Rapps.AddAsync(r);
|
||||
// await _Tedes_rapp.SaveChangesAsync();
|
||||
// transactionTedes.Commit();
|
||||
// }
|
||||
// int rigatedes = 0;
|
||||
// if (model.compo_add != null && model.compo_add.Count() > 0)
|
||||
// {
|
||||
|
||||
// using (var transaction2 = _Tedes_mag.Database.BeginTransaction())
|
||||
// {
|
||||
|
||||
// foreach (Saldiart co in model.compo_add)
|
||||
// {
|
||||
// rigatedes = rigatedes + 1;
|
||||
// Mag_New mn = new Mag_New();
|
||||
// mn = saldiartToMag_New(co, rigatedes, newSerial, tecnico);
|
||||
|
||||
// await _Tedes_mag.Mag.AddAsync(mn);
|
||||
// await _Tedes_mag.SaveChangesAsync();
|
||||
|
||||
// }
|
||||
// transaction2.Commit();
|
||||
// }
|
||||
// }
|
||||
// if (model.compo_del != null && model.compo_del.Count() > 0)
|
||||
// {
|
||||
// using (var transaction3 = _Tedes_mag.Database.BeginTransaction())
|
||||
// {
|
||||
// foreach (Compo_Impia co in model.compo_del)
|
||||
// {
|
||||
// Mag_New mn = new Mag_New();
|
||||
// rigatedes = rigatedes + 1;
|
||||
// mn = compo_ImpiaToMag_New(co, rigatedes, newSerial, tecnico);
|
||||
|
||||
// await _Tedes_mag.Mag.AddAsync(mn);
|
||||
// await _Tedes_mag.SaveChangesAsync();
|
||||
// }
|
||||
// transaction3.Commit();
|
||||
// }
|
||||
// }
|
||||
|
||||
// break;
|
||||
|
||||
//case Clienti.Syscom:
|
||||
// using (var transactionSys = _Sys_rapp.Database.BeginTransaction())
|
||||
// {
|
||||
// await _Sys_rapp.Rapps.AddAsync(r);
|
||||
// await _Sys_rapp.SaveChangesAsync();
|
||||
// transactionSys.Commit();
|
||||
// }
|
||||
// int rigasys = 0;
|
||||
// if (model.compo_add != null && model.compo_add.Count() > 0)
|
||||
// {
|
||||
|
||||
// using (var transaction2 = _Sys_mag.Database.BeginTransaction())
|
||||
// {
|
||||
|
||||
// foreach (Saldiart co in model.compo_add)
|
||||
// {
|
||||
// rigasys = rigasys + 1;
|
||||
// Mag_New mn = new Mag_New();
|
||||
// mn = saldiartToMag_New(co, rigasys, newSerial, tecnico);
|
||||
|
||||
// await _Sys_mag.Mag.AddAsync(mn);
|
||||
// await _Sys_mag.SaveChangesAsync();
|
||||
|
||||
// }
|
||||
// transaction2.Commit();
|
||||
// }
|
||||
// }
|
||||
// if (model.compo_del != null && model.compo_del.Count() > 0)
|
||||
// {
|
||||
// using (var transaction3 = _Sys_mag.Database.BeginTransaction())
|
||||
// {
|
||||
// foreach (Compo_Impia co in model.compo_del)
|
||||
// {
|
||||
// Mag_New mn = new Mag_New();
|
||||
// rigasys = rigasys + 1;
|
||||
// mn = compo_ImpiaToMag_New(co, rigasys, newSerial, tecnico);
|
||||
|
||||
// await _Sys_mag.Mag.AddAsync(mn);
|
||||
// await _Sys_mag.SaveChangesAsync();
|
||||
// }
|
||||
// transaction3.Commit();
|
||||
// }
|
||||
// }
|
||||
|
||||
// break;
|
||||
//default:
|
||||
// break;
|
||||
//}
|
||||
man = await getManutenzioneByChiaveOut(model, token,r);
|
||||
output = fillManprogOut(man, ten);
|
||||
output.err_status_code = StatiRisposta.Ok;
|
||||
@ -12732,6 +12402,35 @@ namespace ApiPolo.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>VIRTUAL TASK: Timbrature da App</summary>
|
||||
[HttpGet("timbratureListVW")]
|
||||
public async Task<ActionResult<IEnumerable<Timbratura>>> timbratureListVW(string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<TimbraturaView> ilist = new List<TimbraturaView>();
|
||||
string ten = getClaimValueByToken(token, "tenant2");
|
||||
string tecnico = getClaimValueByToken(token, "tccodice");
|
||||
_timbrVW = _VT_VW_timbr.Timbs;
|
||||
|
||||
|
||||
var t = await _timbrVW.Where(
|
||||
t => t.azienda.Equals(ten)
|
||||
).ToListAsync();
|
||||
|
||||
foreach (TimbraturaView ch in t)
|
||||
{
|
||||
ilist.Add(ch);
|
||||
}
|
||||
return StatusCode(StatusCodes.Status200OK, ilist);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string err = "Errore: " + ex.Message;
|
||||
return StatusCode(StatusCodes.Status500InternalServerError, err);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>VIRTUAL TASK: lista articoli per azienda</summary>
|
||||
[HttpGet("articoliList")]
|
||||
public async Task<ActionResult<IEnumerable<Articoli>>> ArticoliList(string token)
|
||||
|
||||
61
ApiPolo/Models/TimbraturaView.cs
Normal file
61
ApiPolo/Models/TimbraturaView.cs
Normal file
@ -0,0 +1,61 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace ApiPolo.Models
|
||||
{
|
||||
/// <summary>Vista API_TIMBRATURE_VT</summary>
|
||||
[Keyless]
|
||||
public class TimbraturaView
|
||||
{
|
||||
public int id { get; set; }
|
||||
|
||||
/// <summary>data</summary>
|
||||
public DateTime? data_timbratura { get; set; }
|
||||
|
||||
/// <summary>ora inizio</summary>
|
||||
public int ora_ini { get; set; }
|
||||
|
||||
/// <summary>minuto inizio</summary>
|
||||
public int min_ini { get; set; }
|
||||
|
||||
/// <summary>ora fine</summary>
|
||||
public int ora_fin { get; set; }
|
||||
|
||||
/// <summary>minuto fine</summary>
|
||||
public int min_fin { get; set; }
|
||||
|
||||
/// <summary>SERIALE commessa</summary>
|
||||
public string? commessa { get; set; }
|
||||
|
||||
/// <summary>ore viaggio</summary>
|
||||
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(7, 2)")]
|
||||
public decimal? ore_viaggio { get; set; }
|
||||
|
||||
/// <summary>totale ore</summary>
|
||||
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(7, 2)")]
|
||||
public decimal? tot_ore { get; set; }
|
||||
|
||||
/// <summary>giorno settimana</summary>
|
||||
public int? giorno { get; set; }
|
||||
|
||||
/// <summary>azienda</summary>
|
||||
public string? azienda { get; set; }
|
||||
|
||||
/// <summary>tecnico</summary>
|
||||
public string? tecnico { get; set; }
|
||||
|
||||
/// <summary>cpccchk</summary>
|
||||
public string? cpccchk { get; set; }
|
||||
|
||||
/// <summary>note</summary>
|
||||
public string? note { get; set; }
|
||||
|
||||
/// <summary>Giorno della settimana descrizione</summary>
|
||||
public string? giodesc { get; set; }
|
||||
|
||||
/// <summary>Commessa descrizione</summary>
|
||||
public string? commdesc { get; set; }
|
||||
|
||||
/// <summary>tecnico descrizione</summary>
|
||||
public string? tecdesc { get; set; }
|
||||
}
|
||||
}
|
||||
22
ApiPolo/Models/VT_dbcontext/VT_TIMBRATURE_VW_DbContext.cs
Normal file
22
ApiPolo/Models/VT_dbcontext/VT_TIMBRATURE_VW_DbContext.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace ApiPolo.Models.VT_dbcontext
|
||||
{
|
||||
/// <summary></summary>
|
||||
public class VT_TIMBRATURE_VW_DbContext: DbContext
|
||||
{
|
||||
/// <summary></summary>
|
||||
public DbSet<TimbraturaView>? Timbs { get; set; }
|
||||
|
||||
/// <summary></summary>
|
||||
public VT_TIMBRATURE_VW_DbContext(DbContextOptions<VT_TIMBRATURE_VW_DbContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary></summary>
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<TimbraturaView>().ToView("API_TIMBRATURE_VT");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -103,6 +103,9 @@ namespace ApiPolo
|
||||
services.AddDbContext<VT_TIMBRATURE_DbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("VIRTUAL_TASK")
|
||||
, options => { options.CommandTimeout(commandTimeoutInSeconds); }
|
||||
));
|
||||
services.AddDbContext<VT_TIMBRATURE_VW_DbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("VIRTUAL_TASK")
|
||||
, options => { options.CommandTimeout(commandTimeoutInSeconds); }
|
||||
));
|
||||
services.AddDbContext<VT_COMMESSE_APP_DbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("VIRTUAL_TASK")
|
||||
, options => { options.CommandTimeout(commandTimeoutInSeconds); }
|
||||
));
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
"ApiStr": "Data Source=dbsql01.poloinformatico.it;Initial Catalog=API_POLO;User Id=apipolo; Password=38HdflydkDrXI4l;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Encrypt=False;TrustServerCertificate=True",
|
||||
//"ApiStr": "Data Source=MARCO_PC\\SQL_2022;Initial Catalog=API_POLO;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Encrypt=False;TrustServerCertificate=True",
|
||||
|
||||
"VIRTUAL_TASK": "Data Source=dbsql01.poloinformatico.it;Initial Catalog=VIRTUAL_TASK;User Id=apipolo; Password=38HdflydkDrXI4l;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Encrypt=False;TrustServerCertificate=True"
|
||||
//"VIRTUAL_TASK": "Data Source=MARCO_PC\\SQL_2022;Initial Catalog=VIRTUAL_TASK;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
|
||||
//"VIRTUAL_TASK": "Data Source=dbsql01.poloinformatico.it;Initial Catalog=VIRTUAL_TASK;User Id=apipolo; Password=38HdflydkDrXI4l;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Encrypt=False;TrustServerCertificate=True"
|
||||
"VIRTUAL_TASK": "Data Source=MARCO_PC\\SQL_2022;Initial Catalog=VIRTUAL_TASK;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
|
||||
//"VIRTUAL_TASK": "Data Source=172.25.30.1;Initial Catalog=VIRTUAL_TASK;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"
|
||||
|
||||
},
|
||||
|
||||
BIN
ApiPolo/wwwroot/VIRTU/AZI02/servizi_associati_perugia_logo.jpg
Normal file
BIN
ApiPolo/wwwroot/VIRTU/AZI02/servizi_associati_perugia_logo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
BIN
ApiPolo/wwwroot/VIRTU/AZI02/sulga.png
Normal file
BIN
ApiPolo/wwwroot/VIRTU/AZI02/sulga.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Loading…
Reference in New Issue
Block a user