diff --git a/MP-ADM/Web.config b/MP-ADM/Web.config index 1a3fc145..f7d16808 100644 --- a/MP-ADM/Web.config +++ b/MP-ADM/Web.config @@ -32,6 +32,7 @@ + @@ -43,6 +44,9 @@ + diff --git a/MP-ADM/WebMasterPages/MoonPro.master b/MP-ADM/WebMasterPages/MoonPro.master index d123435c..c43db5d5 100644 --- a/MP-ADM/WebMasterPages/MoonPro.master +++ b/MP-ADM/WebMasterPages/MoonPro.master @@ -12,7 +12,7 @@ - MP-ADM: <%: SteamWare.devicesAuthProxy.getPage(Request.Url) %> + MP-ADM diff --git a/MP-ADM/WebUserControls/mod_barcode.ascx.cs b/MP-ADM/WebUserControls/mod_barcode.ascx.cs index 1c445b2f..a69d29ab 100644 --- a/MP-ADM/WebUserControls/mod_barcode.ascx.cs +++ b/MP-ADM/WebUserControls/mod_barcode.ascx.cs @@ -382,7 +382,7 @@ namespace MP_ADM.WebUserControls DS_ProdTempi.PromesseODLDataTable tabPODL = new DS_ProdTempi.PromesseODLDataTable(); if (memLayer.ML.cdvb("mpAdm_TcFromPODL")) { - // controllos e richiesto ricerca preliminare x articolo + macchina + // controllo se richiesto ricerca preliminare x articolo + macchina if (memLayer.ML.cdvb("mpAdm_TcByMachine")) { // recupero TC promessa da ultimo per articolo/macchina @@ -673,7 +673,7 @@ namespace MP_ADM.WebUserControls #region Public Methods /// - /// effettua al ettura da sessione del comando cliccato e lo inserisce come fosse barcode + /// effettua la lettura da sessione del comando cliccato e lo inserisce come fosse barcode /// public void loadBtnClickComando() { diff --git a/MP-IO/Controllers/IOBController.cs b/MP-IO/Controllers/IOBController.cs index 9259f2cc..5770e5db 100644 --- a/MP-IO/Controllers/IOBController.cs +++ b/MP-IO/Controllers/IOBController.cs @@ -39,15 +39,18 @@ namespace MP_IO.Controllers return answ; } - /// AGGIUNGE TASK richiesto x macchina: + /// + /// AGGIUNGE TASK richiesto x macchina: /// /// GET: IOB/addTask2Exe/3010?taskName=startSetup&taskVal=T190406101512 /// GET: IOB/addTask2Exe/3010?taskName=stopSetup&taskVal=T190406101512 /// GET: IOB/addTask2Exe/SIMUL_03?taskName=setProg&taskVal=P00000001 /// GET: IOB/addTask2Exe/SIMUL_03?taskName=setComm&taskVal=ODL_0000123 /// GET: IOB/addTask2Exe/SIMUL_03?taskName=setArt&taskVal=ART_0000321 - /// - /// + /// + /// + /// + /// public string addTask2Exe(string id, string taskName, string taskVal) { string answ = ""; @@ -111,33 +114,6 @@ namespace MP_IO.Controllers return answ; } -#if false - /// - /// Chiude ODL x macchina: - /// - /// GET: IOB/closeODL/SIMUL_03?idxOdl=123 - /// - /// id macchina - /// idx dell'ODL da chiudere - /// bool esecuzione - public bool closeODL(string id, int idxOdl) - { - bool answ = false; - // init obj DataLayer - DataLayer DataLayerObj = new DataLayer(); - try - { - // chiamata diretta sul DB... - DateTime dtEvento = DateTime.Now; - DataLayerObj.taODL.forceClose(idxOdl, id, dtEvento); - answ = true; - } - catch - { } - return answ; - } -#endif - /// /// Chiude ODL x macchina: /// @@ -209,7 +185,11 @@ namespace MP_IO.Controllers return answ; } - // GET: IOB/enabled/SIMUL_03 + /// + /// GET: IOB/enabled/SIMUL_03 + /// + /// + /// public string enabled(string id) { string answ = "ND"; @@ -225,6 +205,9 @@ namespace MP_IO.Controllers DataLayer DataLayerObj = new DataLayer(); // salvo risposta! answ = DataLayerObj.insEnab(id) ? "OK" : "NO"; + // 2025.03.04 aggiunto keepalive x evitare C101 + MapoDb.MapoDb connDb = new MapoDb.MapoDb(); + connDb.scriviKeepAlive(id, DateTime.Now); } catch (Exception exc) { @@ -282,7 +265,7 @@ namespace MP_IO.Controllers { if (memLayer.ML.CRI("_logLevel") > 6) { - logger.lg.scriviLog($"Valori letti: idxMacchina: {id} | valore: {item.valore}", tipoLog.INFO); + logger.lg.scriviLog($"Valori letti: id: {id} | valore: {item.valore}", tipoLog.INFO); } // formato datetime come yyyyMMddHHmmssfff -->es: 20181223180600000 @@ -349,7 +332,8 @@ namespace MP_IO.Controllers string caller = $"takeFlogSnapshot({id})"; DateTime dtStart = dtFrom.Date; DateTime dtEnd = dtFrom; - int maxAdd = 5; + // max 10 dossier alla volta (se non configurato diversamente) + int maxAdd = memLayer.ML.CRI("IO_numDossMaxCreate"); if (dtStart < dtTo) { // verifico di avere almeno 1 dossier da produrre ciclo fino ad esaurire le @@ -479,7 +463,7 @@ namespace MP_IO.Controllers DateTime dataOraEvento = DateTime.Now; if (memLayer.ML.CRI("_logLevel") > 6) { - logger.lg.scriviLog($"Valori letti: idxMacchina: {id} | flux: {flux} valore: {valore}", tipoLog.INFO); + logger.lg.scriviLog($"Valori letti: id: {id} | flux: {flux} valore: {valore}", tipoLog.INFO); } try { @@ -609,10 +593,15 @@ namespace MP_IO.Controllers return answ; } - /// Creazione nuovo ODL dato CodXdl + numPz - /// GET: IOB/forceCreatePOdl/SIMUL_03?CodXdl=ABCD_1234&numPz=5 IdxODL creato + /// + /// Creazione nuovo ODL dato CodXdl + numPz + /// GET: IOB/forceCreatePOdl/SIMUL_03?CodXdl=ABCD_1234&numPz=5 + /// + /// + /// + /// + /// + /// IdxODL creato public int forceCreatePOdl(string id, string CodArt, string CodGruppo, int numPz) { int answ = 0; @@ -740,33 +729,6 @@ namespace MP_IO.Controllers return answ; } - /// - /// Recupera codice numerico ODL/PODL dato CodXdl, in pratica la parte finale SENZA ODL/PODL - /// Funzione per impianti che accettano solo INT in scrittura: - /// - /// GET: IOB/getXdlNum/SIMUL_03?CodXdl=ODL00000123 - /// - /// IdxMacchina (NON considerato) - /// CodXdl richiesto, se vuoto restituisce TUTTI i valori in tabella di decodifica - /// SINGOLO VALORE calcolato on the fly - public string getXdlNum(string id, string CodXdl = "") - { - // in realtà ID macchina non conta e lo ignoriamo... - string answ = ""; - // scrivo keep alive!!! (se necessario, altrimenti è in cache...) - MapoDb.MapoDb connDb = new MapoDb.MapoDb(); - DataLayer DataLayerObj = new DataLayer(); - connDb.scriviKeepAlive(id, DateTime.Now); - try - { - // sostituisco PODL/ODL con "" e lascio zero iniziali (conversione INT in IOB) - answ = CodXdl.Replace("PODL", "").Replace("ODL", ""); - } - catch - { } - return answ; - } - /// /// Recupera elenco articoli USATI: /// @@ -987,25 +949,8 @@ namespace MP_IO.Controllers /// Json contenente lista oggetti PODL serializzati public string getCurrPODL(string id) { - // attenzione! poiché nell'URL il carattere "#" viene filtrato ci aspettiamo il - // carattere "|" che poi trasformiamo ora in "#" - if (!string.IsNullOrEmpty(id)) - { - id = id.Replace("|", "#"); - } - string answ = ""; - - // init obj DataLayer - DataLayer DataLayerObj = new DataLayer(); - try - { - // recupero dati macchina... - var elencoOdl = DataLayerObj.taPODL.getByMaccArt(id, "", "", true); - answ = JsonConvert.SerializeObject(elencoOdl); - } - catch - { } - return answ; + // lasciato x retrocompatibilità, FixMe ToDo ELiminare con udpate IOB.... + return getPOdlNext(id); } /// @@ -1506,6 +1451,70 @@ namespace MP_IO.Controllers return answ; } + /// + /// Recupera DATI PODL Running/Actual (AVVIATO e in corso) x macchina: + /// + /// GET: IOB/getPOdlAct/SIMUL_03 + /// + /// id macchina, se "" mostra tutto + /// Json contenente lista 1 oggetto PODL serializzato, se presente + public string getPOdlAct(string id) + { + // attenzione! poiché nell'URL il carattere "#" viene filtrato ci aspettiamo il + // carattere "|" che poi trasformiamo ora in "#" + if (!string.IsNullOrEmpty(id)) + { + id = id.Replace("|", "#"); + } + string answ = ""; + + // init obj DataLayer + DataLayer DataLayerObj = new DataLayer(); + try + { + // recupero IdxOdl corrente + string sIdxOdl = DataLayerObj.currODL(id); + int IdxOdl = 0; + int.TryParse(sIdxOdl, out IdxOdl); + // recupero Podl running x macchina ... + DS_ProdTempi.PromesseODLDataTable elencoOdl = DataLayerObj.taPODL.getByIdxOdl(IdxOdl); + answ = JsonConvert.SerializeObject(elencoOdl); + } + catch + { } + return answ; + } + + /// + /// Recupera DATI PODL NEXT (=NON AVVIATI) x macchina: (copia di getCurrPODL) + /// + /// GET: IOB/getPOdlNext/SIMUL_03 + /// + /// id macchina, se "" mostra tutto + /// Json contenente lista oggetti PODL serializzati + public string getPOdlNext(string id) + { + // attenzione! poiché nell'URL il carattere "#" viene filtrato ci aspettiamo il + // carattere "|" che poi trasformiamo ora in "#" + if (!string.IsNullOrEmpty(id)) + { + id = id.Replace("|", "#"); + } + string answ = ""; + + // init obj DataLayer + DataLayer DataLayerObj = new DataLayer(); + try + { + // recupero dati macchina... + var elencoOdl = DataLayerObj.taPODL.getByMaccArt(id, "", "", true); + answ = JsonConvert.SerializeObject(elencoOdl); + } + catch + { } + return answ; + } + /// /// Recupera TASK richiesto x macchina: /// @@ -1531,6 +1540,35 @@ namespace MP_IO.Controllers return answ; } + /// + /// Recupera codice numerico ODL/PODL dato CodXdl, in pratica la parte finale SENZA ODL/PODL + /// Funzione per impianti che accettano solo INT in scrittura: + /// + /// GET: IOB/getXdlNum/SIMUL_03?CodXdl=ODL00000123 + /// + /// IdxMacchina (NON considerato) + /// + /// CodXdl richiesto, se vuoto restituisce TUTTI i valori in tabella di decodifica + /// + /// SINGOLO VALORE calcolato on the fly + public string getXdlNum(string id, string CodXdl = "") + { + // in realtà ID macchina non conta e lo ignoriamo... + string answ = ""; + // scrivo keep alive!!! (se necessario, altrimenti è in cache...) + MapoDb.MapoDb connDb = new MapoDb.MapoDb(); + DataLayer DataLayerObj = new DataLayer(); + connDb.scriviKeepAlive(id, DateTime.Now); + try + { + // sostituisco PODL/ODL con "" e lascio zero iniziali (conversione INT in IOB) + answ = CodXdl.Replace("PODL", "").Replace("ODL", ""); + } + catch + { } + return answ; + } + // GET: IOB (è un check alive del server) public string Index() { @@ -1564,7 +1602,7 @@ namespace MP_IO.Controllers DateTime dataOraEvento = DateTime.Now; if (memLayer.ML.CRI("_logLevel") > 6) { - logger.lg.scriviLog($"Valori letti: idxMacchina: {id} | valore: {valore}", tipoLog.INFO); + logger.lg.scriviLog($"Valori letti: id: {id} | valore: {valore}", tipoLog.INFO); } try { @@ -1627,7 +1665,7 @@ namespace MP_IO.Controllers DateTime dataOraEvento = DateTime.Now; if (memLayer.ML.CRI("_logLevel") > 6) { - logger.lg.scriviLog($"Valori Live:{Environment.NewLine}idxMacchina: {id}{Environment.NewLine}liveData: {liveData}", tipoLog.INFO); + logger.lg.scriviLog($"Valori Live:{Environment.NewLine}id: {id}{Environment.NewLine}liveData: {liveData}", tipoLog.INFO); } try { @@ -1983,7 +2021,7 @@ namespace MP_IO.Controllers string answ = ""; DateTime dataOraEvento = DateTime.Now; // salvo SEMPRE log x questo tipo di dati! - logger.lg.scriviLog($"Salvataggio incremento contapezzi | idxMacchina: {id} | pezzi: {qty}", tipoLog.INFO); + logger.lg.scriviLog($"Salvataggio incremento contapezzi | id: {id} | pezzi: {qty}", tipoLog.INFO); try { DataLayer DataLayerObj = new DataLayer(); @@ -1996,6 +2034,7 @@ namespace MP_IO.Controllers } return answ; } + /// /// SALVA in blocco un incremento pezzi x macchina restituendo il valore appena inviato o, /// se mancasse chaive redis, del valore da DB @@ -2015,7 +2054,7 @@ namespace MP_IO.Controllers string answ = ""; DateTime dataOraEvento = DateTime.Now; // salvo SEMPRE log x questo tipo di dati! - logger.lg.scriviLog($"Salvataggio incremento contapezzi | idxMacchina: {id} | pezzi: {qty}", tipoLog.INFO); + logger.lg.scriviLog($"Salvataggio incremento contapezzi | id: {id} | pezzi: {qty}", tipoLog.INFO); try { DataLayer DataLayerObj = new DataLayer(); @@ -2032,7 +2071,7 @@ namespace MP_IO.Controllers /// /// Registrazione variazione allarmi /// - /// GET: IOB/sendAlarmBankUpdate/SIMUL_03 + /// GET: IOB/sendAlarmBankUpdate/SIMUL_03?memAddr=SIM_BANK&index=0&currStatus=22 /// /// /// @@ -2088,9 +2127,9 @@ namespace MP_IO.Controllers } /// Salva MAC adress + IP dopo il reboot - /// GET: IOB/sendReboot?idxMacchina=5&mac=18:C0:4D:37:3C:8C IP + /// GET: IOB/sendReboot/SIMUL_05?mac=18:C0:4D:37:3C:8C IP /// del Gateway - public string sendReboot(string idxMacchina, string mac) + public string sendReboot(string id, string mac) { string answ = "NO"; string IPv4 = ""; @@ -2107,7 +2146,7 @@ namespace MP_IO.Controllers { // ora salvo che la macchina è stata (ri)avviata... MapoDb.MapoDb MapoDbObj = new MapoDb.MapoDb(); - MapoDbObj.registraStartup(idxMacchina, IPv4, agent, mac); + MapoDbObj.registraStartup(id, IPv4, agent, mac); answ = "OK"; } catch (Exception exc) @@ -2153,7 +2192,7 @@ namespace MP_IO.Controllers DateTime dataOraEvento = DateTime.Now; if (memLayer.ML.CRI("_logLevel") > 6) { - logger.lg.scriviLog($"Salvataggio counter | idxMacchina: {id}", tipoLog.INFO); + logger.lg.scriviLog($"Salvataggio counter | id: {id}", tipoLog.INFO); } try { @@ -2368,7 +2407,7 @@ namespace MP_IO.Controllers DateTime dataOraEvento = DateTime.Now; if (memLayer.ML.CRI("_logLevel") > 6) { - logger.lg.scriviLog($"ulog | Valori letti: idxMacchina: {id} | flux: {flux} valore: {valore} | matrOpr: {matrOpr} | label: {label} | valNum: {valNum}", tipoLog.INFO); + logger.lg.scriviLog($"ulog | Valori letti: id: {id} | flux: {flux} valore: {valore} | matrOpr: {matrOpr} | label: {label} | valNum: {valNum}", tipoLog.INFO); } try { @@ -2565,7 +2604,7 @@ namespace MP_IO.Controllers DateTime dataOraEvento = DateTime.Now; if (memLayer.ML.CRI("_logLevel") > 6) { - logger.lg.scriviLog($"{caller} | Richiesta snapshot dati FluxLog macchina: idxMacchina: {id} | periodo: {dtStart} - {dtEnd}", tipoLog.INFO); + logger.lg.scriviLog($"{caller} | Richiesta snapshot dati FluxLog macchina: id: {id} | periodo: {dtStart} - {dtEnd}", tipoLog.INFO); } try { diff --git a/MP-IO/Web.config b/MP-IO/Web.config index 9b4053a2..63becdb7 100644 --- a/MP-IO/Web.config +++ b/MP-IO/Web.config @@ -40,6 +40,7 @@ + @@ -50,6 +51,9 @@ + diff --git a/MP-IO/status.aspx b/MP-IO/status.aspx index 99803f15..e91e0b32 100644 --- a/MP-IO/status.aspx +++ b/MP-IO/status.aspx @@ -4,7 +4,7 @@ - + MP-IO
diff --git a/MP-SITE/example-NLog.config b/MP-SITE/example-NLog.config deleted file mode 100644 index a11a39e6..00000000 --- a/MP-SITE/example-NLog.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/MP-SITE/example-app.config b/MP-SITE/example-app.config deleted file mode 100644 index fb421650..00000000 --- a/MP-SITE/example-app.config +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/MP-SITE/example-config-table.txt b/MP-SITE/example-config-table.txt deleted file mode 100644 index dd0ab8ef..00000000 --- a/MP-SITE/example-config-table.txt +++ /dev/null @@ -1,30 +0,0 @@ -# chiave valore valoreStd note -_adminEmail samuele@steamware.net,info@steamware.net samuele@steamware.net,info@steamware.net info@steamware.net -_allowForceUser true true abilita login forzato -_commonPages menu menu pagina comune -_emailPwd drmfsls16 drmfsls16 drmfsls16 -_emailUser steamwarebot@gmail.com steamwarebot@gmail.com steamwarebot@gmail.com -_enableSSL true true true -_fromEmail webmaster@admodelling.org webmaster@admodelling.org email mittente eventuali msg -_righeDataGrid 30 30 Num righe datagrid std -_righeDataGridAnagr 20 20 Num righe datagrid anagrafiche -_righeDataGridLong 30 30 Num righe datagrid long -_righeDataGridMed 15 15 Num righe datagrid med -_righeDataGridShort 10 10 Num righe datagrid short -_smtpCli smtp.gmail.com smtp.gmail.com smtp.gmail.com -_useAIMSmtp false false impiego client posta elettronica alternativo -_useAuthSmtp true true true -AuthCookieName admodellingAuth admodellingAuth Cookie applicativo -autoConfCmd true true Conferma automatica comandi barcode -baseUrl http://site_name http://iis02/site_name URL base del sito -cacheValSec 60 60 Validità cache dati in gestore Barcode -cookieDayExp 365 365 Periodo validità cookie -cookieUsed admodellingAuth admodellingAuth,CTrack_CodOpr,CTrack_CodPost Elenco dei cookie impiegati -enableCookie true true Abilitazione uso cookie -enableLogOut true false Abilita button logout COMPLETO in alto a sx -enablePlain true true Abilitazione decode plain -maxAuth 1000 1000 num auth minimo per NON consumare tokens -serializeSession true true Serializzazione valori in sessione (REDIS) -SiteName iis02/site_name iis02/site_name Nome sito -enableDumpDiag false false abilitazione dumb diagnostico x eccezioni di default -doShrinkFolder true true Imposta compressione area LOGS \ No newline at end of file diff --git a/MP-SITE/example-favicon.ico b/MP-SITE/example-favicon.ico deleted file mode 100644 index 4f0e0ad0..00000000 Binary files a/MP-SITE/example-favicon.ico and /dev/null differ diff --git a/MP-SITE/images/favicon.png b/MP-SITE/images/favicon.png new file mode 100644 index 00000000..7552c223 Binary files /dev/null and b/MP-SITE/images/favicon.png differ diff --git a/MP-Site/MP-Site.csproj b/MP-Site/MP-Site.csproj index 08e3cf62..4280c12b 100644 --- a/MP-Site/MP-Site.csproj +++ b/MP-Site/MP-Site.csproj @@ -290,8 +290,6 @@ - - @@ -326,6 +324,7 @@ + @@ -373,8 +372,6 @@ - - diff --git a/MP-Site/Web.config b/MP-Site/Web.config index 2461f8b4..e196412c 100644 --- a/MP-Site/Web.config +++ b/MP-Site/Web.config @@ -34,6 +34,7 @@ + @@ -42,6 +43,9 @@ + diff --git a/MP-Site/WebMasterPages/MAPO_refresh.master b/MP-Site/WebMasterPages/MAPO_refresh.master index f07801c1..10b87914 100644 --- a/MP-Site/WebMasterPages/MAPO_refresh.master +++ b/MP-Site/WebMasterPages/MAPO_refresh.master @@ -6,7 +6,7 @@ - MP.SITE: <%: SteamWare.devicesAuthProxy.getPage(Request.Url) %> + MP-SITE <%--vecchie libs esterne da deprecare--%> <%----%> <%-- diff --git a/MP-Site/WebUserControls/mod_infoAggiuntive.ascx.cs b/MP-Site/WebUserControls/mod_infoAggiuntive.ascx.cs index 1e9883b9..27ced16d 100644 --- a/MP-Site/WebUserControls/mod_infoAggiuntive.ascx.cs +++ b/MP-Site/WebUserControls/mod_infoAggiuntive.ascx.cs @@ -78,8 +78,8 @@ namespace MP_SITE.WebUserControls } } dataFrom = rigaOdl.DataInizio; - lblOdl.Text = idxPOdl > 0 ? $"PODL{idxPOdl:00000000} | " : "[NO PODL] "; - lblOdl.Text += $"ODL{idxOdl:00000000}"; + lblOdl.Text = idxPOdl > 0 ? $"PODL{idxPOdl:000000} | " : "[NO PODL] "; + lblOdl.Text += $"ODL{idxOdl:000000}"; lblOdlPer.Text = $"start: {dataFrom:dd/MM/yy HH:mm}"; } catch diff --git a/MP-Site/WebUserControls/mod_statoMacchina.ascx.cs b/MP-Site/WebUserControls/mod_statoMacchina.ascx.cs index a424c639..2bf65653 100644 --- a/MP-Site/WebUserControls/mod_statoMacchina.ascx.cs +++ b/MP-Site/WebUserControls/mod_statoMacchina.ascx.cs @@ -392,7 +392,7 @@ namespace MP_SITE.WebUserControls // leggo valori da MSE... valMacchina.Text = tabMSE[0].Nome; valCodArticolo.Text = tabMSE[0].CodArticolo; - valPODL.Text = tabMSE[0].idxPODL > 0 ? $"PODL{tabMSE[0].idxPODL:00000000}" : "PODL -"; + valPODL.Text = tabMSE[0].idxPODL > 0 ? $"PODL{tabMSE[0].idxPODL:000000}" : "PODL -"; valODL.Text = tabMSE[0].idxODL > 0 ? $"ODL{tabMSE[0].idxODL}" : "ODL -"; // carico ultimo stato che sia durato almeno 6 sec (0.1 min) int idxStato = 0; diff --git a/MP-TAB/Web.config b/MP-TAB/Web.config index ad6c3ff9..3af4aeb2 100644 --- a/MP-TAB/Web.config +++ b/MP-TAB/Web.config @@ -61,6 +61,7 @@ + @@ -74,6 +75,9 @@ + diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs index df4804c2..dbeb6217 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs @@ -1209,7 +1209,7 @@ namespace MoonProTablet.WebUserControls var datiODL = DataLayerObj.taODL.getByMacchina(idxMacchinaFix)[0]; string setArtVal = $"{datiODL.CodArticolo}"; string setPzCommVal = $"{datiODL.NumPezzi}"; - string setCommVal = $"ODL{datiODL.IdxODL:00000000}"; + string setCommVal = $"ODL{datiODL.IdxODL:000000}"; // FIXME TODO: scrivere come sotto? testare valvital x linea LASCO DataLayerObj.addTask4Machine(idxMacchinaFix, taskType.startSetup, outData); DataLayerObj.addTask4Machine(idxMacchinaFix, taskType.setArt, setArtVal); diff --git a/MP-TAB/WebUserControls/mod_dettMacchina.ascx b/MP-TAB/WebUserControls/mod_dettMacchina.ascx index deab4ed4..84e961c7 100644 --- a/MP-TAB/WebUserControls/mod_dettMacchina.ascx +++ b/MP-TAB/WebUserControls/mod_dettMacchina.ascx @@ -21,7 +21,7 @@
- +
diff --git a/MP-TAB/WebUserControls/mod_mappaStato.ascx b/MP-TAB/WebUserControls/mod_mappaStato.ascx index f0ab645a..ee979854 100644 --- a/MP-TAB/WebUserControls/mod_mappaStato.ascx +++ b/MP-TAB/WebUserControls/mod_mappaStato.ascx @@ -23,10 +23,10 @@
- +
- +
diff --git a/MapoDb/DS_DossPar.Designer.cs b/MapoDb/DS_DossPar.Designer.cs index 004cece7..fe5aa18e 100644 --- a/MapoDb/DS_DossPar.Designer.cs +++ b/MapoDb/DS_DossPar.Designer.cs @@ -1340,7 +1340,7 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); - this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonProConnectionString; + this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonPro_FluxDataConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1796,7 +1796,7 @@ SELECT IdxMacchina, CodFlux, EnabDoss FROM ConfFlux WHERE (CodFlux = @CodFlux) A [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); - this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonProConnectionString; + this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonPro_FluxDataConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] diff --git a/MapoDb/DS_DossPar.xsd b/MapoDb/DS_DossPar.xsd index df93671a..703e23ce 100644 --- a/MapoDb/DS_DossPar.xsd +++ b/MapoDb/DS_DossPar.xsd @@ -2,14 +2,15 @@ - + + - + DELETE FROM [Dossiers] WHERE (([IdxDossier] = @Original_IdxDossier) AND ([IdxMacchina] = @Original_IdxMacchina) AND ([DtRif] = @Original_DtRif) AND ([IdxODL] = @Original_IdxODL) AND ([CodArticolo] = @Original_CodArticolo) AND ([DataType] = @Original_DataType)) @@ -77,7 +78,7 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO - + dbo.stp_DOSS_getLastByArt @@ -88,7 +89,7 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO - + dbo.stp_DOSS_getLastByMacch @@ -99,7 +100,7 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO - + dbo.stp_DOSS_getLastByPODL @@ -113,7 +114,7 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO - + DELETE FROM [ConfFlux] WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([CodFlux] = @Original_CodFlux) AND ([EnabDoss] = @Original_EnabDoss)) @@ -179,30 +180,30 @@ SELECT IdxMacchina, CodFlux, EnabDoss FROM ConfFlux WHERE (CodFlux = @CodFlux) A - + - - - + + + - + - + @@ -212,24 +213,24 @@ SELECT IdxMacchina, CodFlux, EnabDoss FROM ConfFlux WHERE (CodFlux = @CodFlux) A - + - + - + - + diff --git a/MapoDb/DS_ProdTempi1.Designer.cs b/MapoDb/DS_ProdTempi.Designer.cs similarity index 99% rename from MapoDb/DS_ProdTempi1.Designer.cs rename to MapoDb/DS_ProdTempi.Designer.cs index 4c7d77c9..5c8fe055 100644 --- a/MapoDb/DS_ProdTempi1.Designer.cs +++ b/MapoDb/DS_ProdTempi.Designer.cs @@ -9864,6 +9864,8 @@ namespace MapoDb { private global::System.Data.DataColumn columnDataTo; + private global::System.Data.DataColumn columnPz2RecRilav; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public StatoProdDataTable() { @@ -9977,6 +9979,14 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn Pz2RecRilavColumn { + get { + return this.columnPz2RecRilav; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -10014,7 +10024,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] - public StatoProdRow AddStatoProdRow(string idxMacchina, int IdxOdl, int PzTotODL, int PzConfScarto, int PzConfBuoni, int PzRichODL, int Pz2RecTot, int Pz2RecScarto, System.DateTime DataFrom, System.DateTime DataTo) { + public StatoProdRow AddStatoProdRow(string idxMacchina, int IdxOdl, int PzTotODL, int PzConfScarto, int PzConfBuoni, int PzRichODL, int Pz2RecTot, int Pz2RecScarto, System.DateTime DataFrom, System.DateTime DataTo, int Pz2RecRilav) { StatoProdRow rowStatoProdRow = ((StatoProdRow)(this.NewRow())); object[] columnValuesArray = new object[] { idxMacchina, @@ -10026,7 +10036,8 @@ namespace MapoDb { Pz2RecTot, Pz2RecScarto, DataFrom, - DataTo}; + DataTo, + Pz2RecRilav}; rowStatoProdRow.ItemArray = columnValuesArray; this.Rows.Add(rowStatoProdRow); return rowStatoProdRow; @@ -10059,6 +10070,7 @@ namespace MapoDb { this.columnPz2RecScarto = base.Columns["Pz2RecScarto"]; this.columnDataFrom = base.Columns["DataFrom"]; this.columnDataTo = base.Columns["DataTo"]; + this.columnPz2RecRilav = base.Columns["Pz2RecRilav"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -10084,6 +10096,8 @@ namespace MapoDb { base.Columns.Add(this.columnDataFrom); this.columnDataTo = new global::System.Data.DataColumn("DataTo", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDataTo); + this.columnPz2RecRilav = new global::System.Data.DataColumn("Pz2RecRilav", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPz2RecRilav); this.columnidxMacchina.ReadOnly = true; this.columnidxMacchina.MaxLength = 50; this.columnIdxOdl.ReadOnly = true; @@ -10095,6 +10109,7 @@ namespace MapoDb { this.columnPz2RecScarto.ReadOnly = true; this.columnDataFrom.ReadOnly = true; this.columnDataTo.ReadOnly = true; + this.columnPz2RecRilav.ReadOnly = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -15756,6 +15771,22 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public int Pz2RecRilav { + get { + try { + return ((int)(this[this.tableStatoProd.Pz2RecRilavColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Pz2RecRilav\' in table \'StatoProd\' is DBNull.", e); + } + } + set { + this[this.tableStatoProd.Pz2RecRilavColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsidxMacchinaNull() { @@ -15875,6 +15906,18 @@ namespace MapoDb { public void SetDataToNull() { this[this.tableStatoProd.DataToColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsPz2RecRilavNull() { + return this.IsNull(this.tableStatoProd.Pz2RecRilavColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void SetPz2RecRilavNull() { + this[this.tableStatoProd.Pz2RecRilavColumn] = global::System.Convert.DBNull; + } } /// @@ -29230,6 +29273,7 @@ SELECT IdxMacchina, T1, T2, T3 FROM TurniMacchina WHERE (IdxMacchina = @IdxMacch tableMapping.ColumnMappings.Add("Pz2RecScarto", "Pz2RecScarto"); tableMapping.ColumnMappings.Add("DataFrom", "DataFrom"); tableMapping.ColumnMappings.Add("DataTo", "DataTo"); + tableMapping.ColumnMappings.Add("Pz2RecRilav", "Pz2RecRilav"); this._adapter.TableMappings.Add(tableMapping); } diff --git a/MapoDb/DS_ProdTempi.xsd b/MapoDb/DS_ProdTempi.xsd index 4f9097e8..22f2e0d3 100644 --- a/MapoDb/DS_ProdTempi.xsd +++ b/MapoDb/DS_ProdTempi.xsd @@ -269,7 +269,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_AutoDayGenerFull @@ -290,7 +290,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_AutoStart @@ -309,7 +309,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_clearSetup @@ -321,7 +321,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_deleteQuery @@ -332,7 +332,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_dividiDaAltraTav @@ -345,7 +345,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_fineProd @@ -357,7 +357,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_fixMachineSlave @@ -370,7 +370,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_forceClose @@ -488,7 +488,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_inizioSetup @@ -504,7 +504,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_inizioSetupPromessa @@ -521,7 +521,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_inizioSetupPromessaPostuma @@ -534,7 +534,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_insertProvv @@ -550,7 +550,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_insertQuery @@ -568,7 +568,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_insPostumo @@ -591,7 +591,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_split @@ -609,7 +609,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_updateQta @@ -622,7 +622,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_update @@ -642,7 +642,7 @@ FROM v_ODL_exp ORDER BY IdxODL DESC - + dbo.stp_ODL_updateSetup @@ -2511,7 +2511,7 @@ FROM v_ECP - + dbo.stp_StatoProd_getByMacchina @@ -2535,6 +2535,7 @@ FROM v_ECP + @@ -2628,109 +2629,109 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - + - + - + - - - + + + - + - - + + - + - + - + - + - - - - - + + + + + - - + + - - - - + + + + - - + + - + @@ -2740,53 +2741,53 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - + - + - + - + - + - - + + - + @@ -2796,72 +2797,72 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - - + + - - + + - - - + + + - + - + - + - + - + - + - - - + + + @@ -2871,70 +2872,70 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - + - - - + + + - + - - - - - - + + + + + + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - - + + @@ -2944,50 +2945,50 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - + - + - - - - - - + + + + + + - + - - - - - - - - + + + + + + + + - + @@ -2997,178 +2998,178 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - + + - + - - - - - + + + + + - + - + - - - + + + - + - - - + + + - + - + - + - - - + + + - + - - - - + + + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - - - + + + + + + - + - - - - - - + + + + + + - + @@ -3178,35 +3179,35 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - + - + - + - - - - - + + + + + @@ -3216,36 +3217,36 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - - - + + + - - + + - - - + + + - + @@ -3255,63 +3256,63 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - + - - + + - + - - + + - + - - - + + + - + - + @@ -3321,89 +3322,89 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - - + + - + - - - + + + - + - + - + - + - + - - - - - - + + + + + + - + - - + + @@ -3413,32 +3414,32 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - - + + - - - - - - - + + + + + + + - - + + @@ -3448,39 +3449,40 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I - + - + - - - - - - - - - + + + + + + + + + + - + - + - + diff --git a/MapoDb/DS_ProdTempi.xss b/MapoDb/DS_ProdTempi.xss index 8bbfcec7..bd561064 100644 --- a/MapoDb/DS_ProdTempi.xss +++ b/MapoDb/DS_ProdTempi.xss @@ -4,32 +4,32 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - + + - + - - + + - + - + - - + + - - - + + + - - + + \ No newline at end of file diff --git a/MapoDb/DS_applicazione.Designer.cs b/MapoDb/DS_applicazione.Designer.cs index 92186888..134cebca 100644 --- a/MapoDb/DS_applicazione.Designer.cs +++ b/MapoDb/DS_applicazione.Designer.cs @@ -29176,7 +29176,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); - this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonProConnectionString; + this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonPro_FluxDataConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] diff --git a/MapoDb/DS_applicazione.xsd b/MapoDb/DS_applicazione.xsd index fc37c08a..e78c8e9b 100644 --- a/MapoDb/DS_applicazione.xsd +++ b/MapoDb/DS_applicazione.xsd @@ -5,6 +5,7 @@ + @@ -2475,7 +2476,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew, Disegno FROM Anag - + DELETE FROM [dbo].[FluxLog] WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([dtEvento] = @Original_dtEvento) AND ([CodFlux] = @Original_CodFlux) AND ([Valore] = @Original_Valore) AND ([Cnt] = @Original_Cnt)) @@ -2535,7 +2536,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + dbo.stp_FL_getFilt @@ -2549,7 +2550,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + dbo.stp_FL_getFiltCount @@ -2564,7 +2565,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + dbo.stp_FL_getFiltOrdered @@ -2579,7 +2580,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + dbo.stp_FL_getFiltPaged @@ -2596,7 +2597,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + dbo.stp_FL_getFirstByMacc @@ -2608,7 +2609,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + dbo.stp_FL_InsNew @@ -2623,7 +2624,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + dbo.stp_FL_TakeSnapshot @@ -2635,7 +2636,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + dbo.stp_FL_TakeSnapshotLast @@ -3985,17 +3986,17 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + - + - + @@ -4136,33 +4137,33 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index e8687ab3..10c28ea0 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -832,10 +832,11 @@ namespace MapoDb Log.Info($"Eccezione in ConfermaProduzione{Environment.NewLine}{exc}", tipoLog.EXCEPTION); } } - // attendo 100 msec - Thread.Sleep(100); + // 2025.02.19 portato da 100 a 1000 ms attesa x evitare che ODL sia avviato PRIMA della conferma + // attendo 1000 msec x chiudere ODL + Thread.Sleep(1000); // chiamo splitOdl - MapoDbObj.taODL.autoStart(currData[0].IdxODL, 0, idxMacchina, currData[0].TCRichAttr, currData[0].PzPallet, $"Nuovo ODL da forceSplitOdl", true, qtyNew, keyRichiesta); + MapoDbObj.taODL.autoStart(currData[0].IdxODL, 0, idxMacchina, currData[0].TCRichAttr, currData[0].PzPallet, $"Nuovo ODL da forceSplitOdl.autoStart", true, qtyNew, keyRichiesta); // elimino eventuale ODL precedente... string rKey = memLayer.ML.redHash($"ODL:{idxMacchina}"); memLayer.ML.setRSV(rKey, ""); @@ -886,6 +887,7 @@ namespace MapoDb ts = string.Format("{0:yyMMdd}T{0:HHmmss.fff}Z", DateTime.Now); outData = $"TS:{ts}|MATR:{MatrOpr}|ODL:{newOdl}"; addTask4Machine(machine.IdxMacchinaSlave, taskType.fixStopSetup, outData); + addTask4Machine(machine.IdxMacchinaSlave, taskType.forceResetPzCount, outData); // invio task caricamento dati ODL addTask4Machine(machine.IdxMacchinaSlave, taskType.setArt, setArtVal); @@ -1459,7 +1461,7 @@ namespace MapoDb { DataLayer man = new DataLayer(); rawData = memLayer.ML.getRSV(redKey); - if (!string.IsNullOrEmpty(rawData)) + if (!string.IsNullOrEmpty(rawData) && rawData.Length > 2) { var redisResult = JsonConvert.DeserializeObject>(rawData); resultList = redisResult != null ? redisResult : new List(); @@ -2365,7 +2367,7 @@ namespace MapoDb // ...oppure dritto su DB else { - answ = MapoDbObj.isMulti(idxMacchina); + answ = MapoDbObj.isSlave(idxMacchina); } return answ; } @@ -4369,6 +4371,7 @@ namespace MapoDb string connectionStringIS = memLayer.ML.confReadString("MoonProConnectionStringIS"); string connectionStringArca = memLayer.ML.confReadString("MoonProConnectionStringArca"); string connectionStringES3 = memLayer.ML.confReadString("MoonProConnectionStringES3"); + string connectionStringFluxData = memLayer.ML.confReadString("MoonProConnectionStringFluxData"); string connectionStringMAG = memLayer.ML.confReadString("MoonProConnectionStringMAG"); // connections del db taAG.Connection.ConnectionString = connectionString; @@ -4383,7 +4386,7 @@ namespace MapoDb taCalFF.Connection.ConnectionString = connectionString; taConfig.Connection.ConnectionString = connectionString; taComm.Connection.ConnectionString = connectionString; - taConfFlux.Connection.ConnectionString = connectionString; + taConfFlux.Connection.ConnectionString = connectionStringFluxData; taDatiConf.Connection.ConnectionString = connectionString; taDatiMacchine.Connection.ConnectionString = connectionString; taDatiProd.Connection.ConnectionString = connectionString; @@ -4391,9 +4394,9 @@ namespace MapoDb taDatiProdMacchPer.Connection.ConnectionString = connectionString; taDatiStatoMacch.Connection.ConnectionString = connectionString; taDiarioDich.Connection.ConnectionString = connectionString; - taDOSS.Connection.ConnectionString = connectionString; + taDOSS.Connection.ConnectionString = connectionStringFluxData; taEventi.Connection.ConnectionString = connectionString; - taFL.Connection.ConnectionString = connectionString; + taFL.Connection.ConnectionString = connectionStringFluxData; taIS_TrDati.Connection.ConnectionString = connectionStringIS; taIstK.Connection.ConnectionString = connectionStringIS; taKeepAlive.Connection.ConnectionString = connectionString; diff --git a/MapoDb/MapoDb.csproj b/MapoDb/MapoDb.csproj index 8a0a08f6..710d4b5b 100644 --- a/MapoDb/MapoDb.csproj +++ b/MapoDb/MapoDb.csproj @@ -268,7 +268,7 @@ DS_ProdTempi.xsd - + True True DS_ProdTempi.xsd @@ -385,7 +385,7 @@ Designer MSDataSetGenerator - DS_ProdTempi1.Designer.cs + DS_ProdTempi.Designer.cs DS_ProdTempi.xsd diff --git a/MapoDb/Properties/Settings.Designer.cs b/MapoDb/Properties/Settings.Designer.cs index a40daa65..fb665dea 100644 --- a/MapoDb/Properties/Settings.Designer.cs +++ b/MapoDb/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace MapoDb.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.12.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -88,5 +88,16 @@ namespace MapoDb.Properties { return ((string)(this["MoonPro_MAGConnectionString"])); } } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQL2016DEV;Initial Catalog=MoonPro_FluxData;Persist Security Info=Tru" + + "e;User ID=sa;Password=keyhammer16;TrustServerCertificate=True")] + public string MoonPro_FluxDataConnectionString { + get { + return ((string)(this["MoonPro_FluxDataConnectionString"])); + } + } } } diff --git a/MapoDb/Properties/Settings.settings b/MapoDb/Properties/Settings.settings index bf25ac11..3afda9f2 100644 --- a/MapoDb/Properties/Settings.settings +++ b/MapoDb/Properties/Settings.settings @@ -50,5 +50,13 @@ </SerializableConnectionString> Data Source=SQL2016DEV;Initial Catalog=MoonPro_MAG;Persist Security Info=True;User ID=sa;Password=keyhammer16; TrustServerCertificate=True; + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <ConnectionString>Data Source=SQL2016DEV;Initial Catalog=MoonPro_FluxData;Persist Security Info=True;User ID=sa;Password=keyhammer16;TrustServerCertificate=True</ConnectionString> + <ProviderName>System.Data.SqlClient</ProviderName> +</SerializableConnectionString> + Data Source=SQL2016DEV;Initial Catalog=MoonPro_FluxData;Persist Security Info=True;User ID=sa;Password=keyhammer16;TrustServerCertificate=True + \ No newline at end of file diff --git a/MapoDb/app.config b/MapoDb/app.config index 1b427616..02bee836 100644 --- a/MapoDb/app.config +++ b/MapoDb/app.config @@ -1,109 +1,110 @@  - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MapoSDK/Enums.cs b/MapoSDK/Enums.cs index 857bd5c8..32f05a29 100644 --- a/MapoSDK/Enums.cs +++ b/MapoSDK/Enums.cs @@ -265,6 +265,7 @@ namespace MapoSDK /// Imposta Articolo su PLC ///
setArt, + /// /// Imposta Articolo IN MODALITA' NUMERICA su PLC /// diff --git a/MapoSDK/dataConf.cs b/MapoSDK/dataConf.cs index a7f68619..94551b4a 100644 --- a/MapoSDK/dataConf.cs +++ b/MapoSDK/dataConf.cs @@ -67,7 +67,6 @@ namespace MapoSDK ///
public string value { get; set; } = ""; - /// /// Decodifica per tipoMem = BitMap: /// Array di valori assegnati ai singoli bit diff --git a/MapoSDK/dataConfTSVC.cs b/MapoSDK/dataConfTSVC.cs index 932b5302..70d80d08 100644 --- a/MapoSDK/dataConfTSVC.cs +++ b/MapoSDK/dataConfTSVC.cs @@ -22,6 +22,22 @@ namespace MapoSDK /// public int period { get; set; } = 60; + /// + /// Indica se invio parametro abilitato (false = filtrato, no FluxLog send) + /// + public bool sendEnabled { get; set; } = true; + + /// + /// Valore della DeadBand per rilevare variazioni in valore assoluto, se nullo non impiegato + /// + public double? thresholdAbs { get; set; } = null; + + /// + /// Valore della DeadBand per rilevare variazioni in valore percentuale (5% = 0.05), se nullo non impiegato + /// + public double? thresholdPerc { get; set; } = null; + + #endregion Public Properties } } \ No newline at end of file