diff --git a/GMW/GMW/Web.config b/GMW/GMW/Web.config index 94b8de8d..3b4ffa7c 100644 --- a/GMW/GMW/Web.config +++ b/GMW/GMW/Web.config @@ -95,6 +95,7 @@ + diff --git a/GMW/GMW/WebUserControls/mod_statoMag.ascx.cs b/GMW/GMW/WebUserControls/mod_statoMag.ascx.cs index ac35bda8..71fa32ad 100644 --- a/GMW/GMW/WebUserControls/mod_statoMag.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_statoMag.ascx.cs @@ -119,7 +119,7 @@ namespace GMW.WebUserControls /// /// larghezza max in pixel della barra + lunga tra quelle da plottare /// - protected int larghPixel = 150; + protected int larghPixel = memLayer.ML.confReadInt("maxBarplotLargh"); /// /// carico le tabelle @@ -192,7 +192,7 @@ namespace GMW.WebUserControls } catch { - maxNumCelle = 1; + maxNumCelle = 100; } } else @@ -205,9 +205,9 @@ namespace GMW.WebUserControls } catch { - maxNumCelle = 1; + maxNumCelle = 100; } - } + } grView.DataBind(); } /// diff --git a/GMW/GMW/WebUserControls/mod_statoMagLogico.ascx b/GMW/GMW/WebUserControls/mod_statoMagLogico.ascx index 73c4039e..cf4d76aa 100644 --- a/GMW/GMW/WebUserControls/mod_statoMagLogico.ascx +++ b/GMW/GMW/WebUserControls/mod_statoMagLogico.ascx @@ -58,7 +58,7 @@ + resolution="1" />
diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 2e0836dc..ccc9f993 100644 Binary files a/GMW/GMW/bin/GMW.dll and b/GMW/GMW/bin/GMW.dll differ diff --git a/GMW/GMW/bin/GMW_data.dll b/GMW/GMW/bin/GMW_data.dll index a96b7e22..d4c4385b 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/mazzAppSettings.config b/GMW/GMW/mazzAppSettings.config index 5c30efa9..74a6499a 100644 --- a/GMW/GMW/mazzAppSettings.config +++ b/GMW/GMW/mazzAppSettings.config @@ -40,6 +40,7 @@ + diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index 2e0836dc..3f6d4bc3 100644 Binary files a/GMW/GMW/obj/Debug/GMW.dll and b/GMW/GMW/obj/Debug/GMW.dll differ diff --git a/GMW/GMW/obj/Release/GMW.dll b/GMW/GMW/obj/Release/GMW.dll index 38192694..ccc9f993 100644 Binary files a/GMW/GMW/obj/Release/GMW.dll and b/GMW/GMW/obj/Release/GMW.dll differ diff --git a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache index de03c433..0a7f5deb 100644 Binary files a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_Term/Web.config b/GMW/GMW_Term/Web.config index bbd2b4c5..d2c2d29a 100644 --- a/GMW/GMW_Term/Web.config +++ b/GMW/GMW_Term/Web.config @@ -58,7 +58,7 @@ - + diff --git a/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.cs b/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.cs index 3188c445..efdd34ae 100644 --- a/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.cs +++ b/GMW/GMW_Term/WebUserControls/mod_btnUdc.ascx.cs @@ -219,13 +219,21 @@ namespace GMW_Term.WebUserControls ///
private void setupBtn() { + bool consumato = false; bool posizAssegn = false; bool udcPieno = false; DS_magazzino.v_UdcDetailRow rigaUdc; try { rigaUdc = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0]; - posizAssegn = (rigaUdc.CodCella != ""); + consumato = (rigaUdc.IdxPosizione < 0); + } + catch + { } + try + { + rigaUdc = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0]; + posizAssegn = (rigaUdc.CodCella.Length > 4); } catch { } @@ -236,8 +244,8 @@ namespace GMW_Term.WebUserControls } catch { } - // abilito rettifica, deposita e sposta SOLO SE contiene dei particolari... - if (udcPieno) + // abilito rettifica, deposita e sposta SOLO SE contiene dei particolari E NON E' STATO CONSUMATO... + if (udcPieno && !consumato) { // in base a che sia in una posizione magazzino o meno scelgo che buttons abilitare if (posizAssegn) @@ -258,8 +266,9 @@ namespace GMW_Term.WebUserControls btnSposta.Visible = false; btnRettifica.Visible = false; } - // button preleva abilitato SOLO SE c'è una lista di prelievo attiva per l'utente e per il particolare corrente... e se l'UDC non è stato prelevato - if (_CodLista != "" && (_PartLdP == _PartUdc) && _UdcDisp) + // button preleva abilitato SOLO SE NON CONSUMATO E SE c'è una lista di prelievo attiva per l'utente e per il particolare corrente... + // e se l'UDC non è stato prelevato... + if (_CodLista != "" && (_PartLdP == _PartUdc) && _UdcDisp && !consumato) { btnPreleva.Visible = true; } @@ -276,17 +285,25 @@ namespace GMW_Term.WebUserControls ///
private void setupBtnDelibere() { - string codTipoDelibera = ""; + bool consumato = false; DS_magazzino.v_UdcDetailRow rigaUdc; try + { + rigaUdc = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0]; + consumato = (rigaUdc.IdxPosizione < 0); + } + catch + { } + string codTipoDelibera = ""; + try { rigaUdc = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0]; codTipoDelibera = MagClass.magazzino.taPosizDelib.getByIdxPosizione(rigaUdc.IdxPosizione)[0].CodTipoDelibera; } catch { } - // se la posizione prevede una delibera mostro il relativo pulsante... - if (codTipoDelibera != "") + // se NON CONSUMATO e la posizione prevede una delibera mostro il relativo pulsante... + if (!consumato && codTipoDelibera != "") { switch (codTipoDelibera) //!!!OCCHIO HARD CODED!!! { diff --git a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx index 53f98479..f72c5880 100644 --- a/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx +++ b/GMW/GMW_Term/WebUserControls/mod_execUdc.ascx @@ -5,74 +5,222 @@ -
- UDC: - -
- Particolare: - -
- - DisegnoGrezzo: - -
- Esponente: - - Qta: - -
- CodMag: - - CodBlocco: - -
- CodCella: - -
- X: - - Y: - - Z: - +
+
+
+ UDC: +
+
+ + +
+
+
+
+ Particolare: +
+
+ + +
+
+
+ + +
+
+
+ DisegnoGrezzo: +
+
+ + +
+
+
+
+ Esponente: +
+
+ + +
+
+
+
+ +
+
+ Qta: +
+
+
+
+
+ CodMag: +
+
+ + +
+
+
+
+ + + +
+
+ CodBlocco: +
+
+
+
+
+ CodCella: +
+
+ + +
+
+
+
+
+ X: +
+
+ + +
+
+ Y: +
+
+ + +
+
+ Z: +
+
+ + +
+
+
-
-
-
-
+
+
+
+
-
- UDC: - -
- Particolare: - -
- - DisegnoGrezzo: - -
- Esponente: - - Qta: - -
- CodMag: - - CodBlocco: -
- CodCella: - -
- X: - - Y: - - Z: - +
+
+
+ UDC: +
+
+ + +
+
+
+
+ Particolare: +
+
+ + +
+
+
+ + +
+
+
+ DisegnoGrezzo: +
+
+ + +
+
+
+
+ Esponente: +
+
+ + +
+
+
+
+ + +
+
+ Qta: +
+
+
+
+ CodMag: +
+
+ + +
+
+
+
+ + + +
+
+ CodBlocco: +
+
+
+
+ CodCella: +
+
+ + +
+
+
+
+
+ X: +
+
+ + +
+
+ Y: +
+
+ + +
+
+ Z: +
+
+ + +
+
+
@@ -89,4 +237,4 @@ - \ No newline at end of file + diff --git a/GMW/GMW_Term/bin/GMW_Term.dll b/GMW/GMW_Term/bin/GMW_Term.dll index b564a69f..6cd84509 100644 Binary files a/GMW/GMW_Term/bin/GMW_Term.dll and b/GMW/GMW_Term/bin/GMW_Term.dll differ diff --git a/GMW/GMW_Term/bin/GMW_data.dll b/GMW/GMW_Term/bin/GMW_data.dll index 5294e4ed..da7f9f0b 100644 Binary files a/GMW/GMW_Term/bin/GMW_data.dll and b/GMW/GMW_Term/bin/GMW_data.dll differ diff --git a/GMW/GMW_Term/mazzAppSettings.config b/GMW/GMW_Term/mazzAppSettings.config index be117b2b..b4fed3bc 100644 --- a/GMW/GMW_Term/mazzAppSettings.config +++ b/GMW/GMW_Term/mazzAppSettings.config @@ -7,7 +7,7 @@ - + @@ -41,7 +41,7 @@ - + diff --git a/GMW/GMW_Term/obj/Debug/GMW_Term.dll b/GMW/GMW_Term/obj/Debug/GMW_Term.dll index b564a69f..9113d441 100644 Binary files a/GMW/GMW_Term/obj/Debug/GMW_Term.dll and b/GMW/GMW_Term/obj/Debug/GMW_Term.dll differ diff --git a/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache index 34a116ca..80591cf1 100644 Binary files a/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_Term_installer/GMW_Term_installer.vdproj b/GMW/GMW_Term_installer/GMW_Term_installer.vdproj index ef655366..558463ea 100644 --- a/GMW/GMW_Term_installer/GMW_Term_installer.vdproj +++ b/GMW/GMW_Term_installer/GMW_Term_installer.vdproj @@ -330,14 +330,14 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:GMW_Term" - "ProductCode" = "8:{22ABD4C2-E7F8-4775-AC84-B4BA37E3679A}" - "PackageCode" = "8:{365F187C-45DF-4340-924A-7C52F39D7D91}" + "ProductCode" = "8:{CCFA8747-6598-4A2D-8CE2-147C5F05DA5C}" + "PackageCode" = "8:{4918A1A6-A703-4E70-B9DD-100E1E5F648A}" "UpgradeCode" = "8:{B348C50D-8DAD-4430-AEF0-60800C94CB78}" "RestartWWWService" = "11:TRUE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.0.280" + "ProductVersion" = "8:1.0.286" "Manufacturer" = "8:SteamWare s.r.l." "ARPHELPTELEPHONE" = "8:+39-035460560" "ARPHELPLINK" = "8:http://www.steamware.net" @@ -810,7 +810,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9C1BA08A590A44EC9515C0F91AD50A1D" { - "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Debug\\SetDirectoryPermission.exe" + "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Release\\SetDirectoryPermission.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_A89965CB827F476CB8D496FFFC9653DF" @@ -838,7 +838,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_B0271B832DBE45F0B50639E61DAE3CF4" { - "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Debug\\IISConsoleVB.exe" + "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Release\\IISConsoleVB.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_A89965CB827F476CB8D496FFFC9653DF" diff --git a/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi b/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi index a68ea256..fb04b656 100644 Binary files a/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi and b/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi differ diff --git a/GMW/GMW_data/SqlScripts/GMW_00285.sql b/GMW/GMW_data/SqlScripts/GMW_00285.sql index 8272d09e..624c7748 100644 --- a/GMW/GMW_data/SqlScripts/GMW_00285.sql +++ b/GMW/GMW_data/SqlScripts/GMW_00285.sql @@ -225,12 +225,601 @@ go commit go +set xact_abort on +go + +begin transaction +go + +INSERT INTO dbo.TabTranPosizEventi + VALUES (N'MagPreFus', 84, 84) +go + +commit transaction +go + + + +drop table AS400_BatchMovimenti +go +set xact_abort on +go + +begin transaction +go + +create table AS400_BatchMovimenti( + IdxBatch int not null identity constraint PK_AS400_BatchMovimenti primary key, + DataIns datetime not null, + CodEvento nvarchar(10) not null, + Particolare nvarchar(15) not null, + UDC nvarchar(50) not null, + CodMagAS nvarchar(50) not null, + Quantita decimal(10,2) not null, + DataBatch datetime, + DataVerifica datetime +) +go + +alter table AS400_BatchMovimenti add + constraint FK_AS400_BatchMovimenti_AS400_MagCont foreign key(CodMagAS) references AS400_MagCont(CodMagAS) on update cascade, + constraint FK_AS400_BatchMovimenti_AnagTipoEvento foreign key(CodEvento) references AnagTipoEvento(CodEvento) on update cascade +go + +exec sp_addextendedproperty 'MS_Description', 'dataora inserimento in coda caricamento', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataIns' +go + +exec sp_addextendedproperty 'MS_Description', 'NON MODIFICARE: nel codice si usano questi campi x chiamate...', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'CodEvento' +go + +exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataBatch' +go + +exec sp_addextendedproperty 'MS_Description', N'dataora in cui è stato verificato il caricamento su AS', 'SCHEMA', 'dbo', 'TABLE', 'AS400_BatchMovimenti', 'COLUMN', 'DataVerifica' +go + +commit +go + + + + + + +drop table RigheListePrelievo_AS +go + + + +create table RigheListePrelievo_AS( + IdxRiga int not null identity constraint PK_RigheListePrelievo_AS primary key, + CodLista nvarchar(12) not null, + UDC nvarchar(50) not null, + Qta decimal(10,2) not null, + Proposto bit, + Prelevato bit +) +go + + +drop table ElencoListePrelievo_AS +go + + +set xact_abort on +go + +begin transaction +go + +create table ElencoListePrelievo_AS( + CodLista nvarchar(12) not null constraint PK_ElencoListePrelievo_AS primary key, + CodTipoLista nvarchar(10) not null, + CodCS nchar(2) not null, + DataCreaz datetime not null, + CodCliente nvarchar(6), + RagSociale nvarchar(35), + CodSoggetto nchar(17) not null, + Particolare nvarchar(15) not null, + DescParticolare nvarchar(30), + DisegnoGrezzo nvarchar(30), + Esponente nvarchar(6), + Figura nvarchar(4), + CodImballo nvarchar(15), + QtaTot decimal(10,2) not null, + CodStatoLista int not null constraint DF_ElencoListePrelievo_AS_CodStatoLista default (1), + Destinatario nvarchar(50), + DataBatch datetime, + DataVerifica datetime +) +go + +exec sp_addextendedproperty 'MS_Description', 'dataora di caricamento batch verso AS', 'SCHEMA', 'dbo', 'TABLE', 'ElencoListePrelievo_AS', 'COLUMN', 'DataBatch' +go + +exec sp_addextendedproperty 'MS_Description', N'dataora in cui è stato verificato il caricamento su AS', 'SCHEMA', 'dbo', 'TABLE', 'ElencoListePrelievo_AS', 'COLUMN', 'DataVerifica' +go + +commit +go + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +create VIEW v_datiPackingList +AS +SELECT dbo.RigheListePrelievo_AS.IdxRiga, dbo.ElencoCartellini.UDC, dbo.ElencoListePrelievo_AS.Particolare, dbo.ElencoCartellini.CodImballo, + CAST(RIGHT(dbo.RigheListePrelievo_AS.UDC, 6) AS INT) AS matrUdc, CASE WHEN (dbo.ElencoListePrelievo_AS.CodTipoLista = '03-TerWip') + THEN 'FO' ELSE 'CL' END AS tipo, dbo.ElencoListePrelievo_AS.Destinatario, dbo.ElencoCartellini.Qta, + dbo.ElencoCartellini.PesoTot - dbo.ElencoCartellini.Tara AS PesoNetto, dbo.ElencoCartellini.PesoTot, 'B' AS Stato, GETDATE() AS data, + dbo.ElencoListePrelievo_AS.DataBatch +FROM dbo.ElencoListePrelievo_AS INNER JOIN + dbo.RigheListePrelievo_AS ON dbo.ElencoListePrelievo_AS.CodLista = dbo.RigheListePrelievo_AS.CodLista INNER JOIN + dbo.ElencoCartellini ON dbo.RigheListePrelievo_AS.UDC = dbo.ElencoCartellini.UDC +WHERE (dbo.ElencoListePrelievo_AS.DataBatch IS NULL) +go + +exec sp_addextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00] +Begin DesignProperties = + Begin PaneConfigurations = + Begin PaneConfiguration = 0 + NumPanes = 4 + Configuration = "(H (1[40] 4[20] 2[20] 3) )" + End + Begin PaneConfiguration = 1 + NumPanes = 3 + Configuration = "(H (1 [50] 4 [25] 3))" + End + Begin PaneConfiguration = 2 + NumPanes = 3 + Configuration = "(H (1 [50] 2 [25] 3))" + End + Begin PaneConfiguration = 3 + NumPanes = 3 + Configuration = "(H (4 [30] 2 [40] 3))" + End + Begin PaneConfiguration = 4 + NumPanes = 2 + Configuration = "(H (1 [56] 3))" + End + Begin PaneConfiguration = 5 + NumPanes = 2 + Configuration = "(H (2 [66] 3))" + End + Begin PaneConfiguration = 6 + NumPanes = 2 + Configuration = "(H (4 [50] 3))" + End + Begin PaneConfiguration = 7 + NumPanes = 1 + Configuration = "(V (3))" + End + Begin PaneConfiguration = 8 + NumPanes = 3 + Configuration = "(H (1[56] 4[18] 2) )" + End + Begin PaneConfiguration = 9 + NumPanes = 2 + Configuration = "(H (1 [75] 4))" + End + Begin PaneConfiguration = 10 + NumPanes = 2 + Configuration = "(H (1[66] 2) )" + End + Begin PaneConfiguration = 11 + NumPanes = 2 + Configuration = "(H (4 [60] 2))" + End + Begin PaneConfiguration = 12 + NumPanes = 1 + Configuration = "(H (1) )" + End + Begin PaneConfiguration = 13 + NumPanes = 1 + Configuration = "(V (4))" + End + Begin PaneConfiguration = 14 + NumPanes = 1 + Configuration = "(V (2))" + End + ActivePaneConfig = 0 + End + Begin DiagramPane = + Begin Origin = + Top = 0 + Left = 0 + End + Begin Tables = + Begin Table = "ElencoCartellini" + Begin Extent = + Top = 14 + Left = 658 + Bottom = 376 + Right = 828 + End + DisplayFlags = 280 + TopColumn = 0 + End + Begin Table = "ElencoListePrelievo_AS" + Begin Extent = + Top = 6 + Left = 38 + Bottom = 367 + Right = 208 + End + DisplayFlags = 280 + TopColumn = 0 + End + Begin Table = "RigheListePrelievo_AS" + Begin Extent = + Top = 5 + Left = 353 + Bottom = 200 + Right = 523 + End + DisplayFlags = 280 + TopColumn = 0 + End + End + End + Begin SQLPane = + End + Begin DataPane = + Begin ParameterDefaults = "" + End + Begin ColumnWidths = 14 + Width = 284 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + End + End + Begin CriteriaPane = + Begin ColumnWidths = 11 + Column = 1440 + Alias = 900 + Table = 1170 + Output = 720 + Append = 1400 + NewValue = 1170 + SortType = 1350 + SortOrder = 1410 + GroupBy = 1350 + Filter = 1350 + Or = 1350 + Or = 1350 + Or = 1350 + End + End +End +', 'SCHEMA', 'dbo', 'VIEW', 'v_datiPackingList' +go + +exec sp_addextendedproperty 'MS_DiagramPaneCount', 1, 'SCHEMA', 'dbo', 'VIEW', 'v_datiPackingList' +go + +commit +go + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_consumaMP +* +* Salva il movimento di consumo dell'UDC di MP indicato +* +* Steamware, S.E.L. +* mod: 2010.10.12 +* +****************************************/ +alter PROCEDURE BatchQueue.stp_consumaMP +( + @XRPQLN INT, --è il num rap qualità + @XNRETI NVARCHAR(10), -- è il numUdc prog + @XDTPRO INT, -- data 8 cifre aaaammgg + @XTRPRO NVARCHAR(5), -- turno + @XDESMT NVARCHAR(3), -- destinatario int/terzista + @XCDTER NVARCHAR(6) -- cod terzista +) +AS + -- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!! + + DECLARE @SQL AS NVARCHAR(1000) + + -- Faccio chiamata su AS400 + + SET @SQL = N' OPENQUERY( P65220DC, ''UPDATE MAZZT_DTV3.XOGIX00F' + SET @SQL = @SQL + 'SET XDTPRO = ' + CAST(@XDTPRO AS NVARCHAR(8)) + ', XTRPRO = ' + @XTRPRO + SET @SQL = @SQL + ', XDESMT = ''' + @XDESMT +''', XMATSC=''S'' , XCDTER = ''' + @XCDTER + ''' ' + SET @SQL = @SQL + 'WHERE XRPQLN =' + CAST(@XRPQLN AS NVARCHAR(20)) + ' AND XNRETI = ' + @XNRETI + ''' )' + + EXEC sp_executesql @SQL + +RETURN +go + +commit +go + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*stp_processaCodaMovimMag +* STORED stp_processaCodaConsumoMP +* +* Processa la coda dei movimenti di magazzino e chiama procedura x salvataggio dato su AS400 +* +* Steamware, S.E.L. +* mod: 2010.10.15 +* +****************************************/ +create PROCEDURE BatchQueue.stp_processaCodaMovimMag +AS + -- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!! + + -- campi x cursore e valorizzazione riga a riga + DECLARE @IdxRiga INT + DECLARE @CodStab CHAR(2) + DECLARE @UDC NVARCHAR(15) + DECLARE @Particolare NVARCHAR(15) + DECLARE @CodImb NVARCHAR(15) + DECLARE @Matr INT + DECLARE @Tipo NVARCHAR(2) + DECLARE @Dest NVARCHAR(10) + DECLARE @Qta INT + DECLARE @PesoNet NUMERIC(7,3) + DECLARE @PesoLor NUMERIC(7,3) + DECLARE @Stato CHAR(1) + DECLARE @Data NVARCHAR(8) + -- variabile x composizioen query + DECLARE @SqlCode NVARCHAR(1000) + -- faccio una query con un cursore x processare tutte le righe da inviare ad AS400.. + DECLARE RigaPackList CURSOR FOR + SELECT IdxRiga FROM v_datiPackingList + + -- setto il codice stabilimento da inviare ad AS... VERIFICARE!!! + SET @CodStab = '05' + + -- inizio cursore! + OPEN RigaPackList + FETCH NEXT FROM RigaPackList + INTO @IdxRiga + WHILE @@FETCH_STATUS = 0 + BEGIN + -- controllo ci sia la riga + IF (SELECT COUNT(IdxRiga) FROM v_datiPackingList WHERE IdxRiga = @IdxRiga) > 0 + BEGIN + -- carico valori che mi servono + SELECT @Particolare=pl.Particolare, @UDC=UDC, @CodImb=pl.CodImballo, @Matr = pl.matrUdc, @Tipo=pl.tipo, @Dest=pl.Destinatario, + @Qta=ABS(pl.Qta), @PesoNet=pl.PesoNetto, @PesoLor=pl.PesoTot, @Stato=pl.Stato, @Data=dbo.dateToAsFormat(pl.data) + FROM v_datiPackingList pl + WHERE IdxRiga = @IdxRiga + + -- compongo testo x exec + SET @SqlCode = N'EXEC BatchQueue.stp_registraPackList ' + @CodStab + ' ' + @UDC + ' ' + @Particolare + ' ' + @CodImb + ' ' + CAST(@Matr AS NVARCHAR(8)) + ' ' + @Tipo + ' ' + @Dest + ' ' + CAST(@Qta AS NVARCHAR(8)) + ' ' + CAST(@PesoNet AS NVARCHAR(8)) + ' ' + CAST(@PesoLor AS NVARCHAR(8)) + ' ' + @Stato + ' ' + @Data + -- lo mostro + print '%' + LTRIM(RTRIM(@SqlCode)) + '%' + + -- !!! TESTARE !!! + /* + -- chiamo la stored ed eseguo invio + EXEC sp_executesql @SqlCode -- decommentare se va bene... + + -- registro la data del movimento BATCH + UPDATE AS400_BatchMovimenti SET DataBatch = GETDATE() WHERE IdxRiga = @IdxRiga + */ + + FETCH NEXT FROM RigaPackList INTO @IdxRiga + END + END + CLOSE RigaPackList + DEALLOCATE RigaPackList + + +RETURN +go + +/*************************************** +* STORED stp_registraMovMag +* +* Salva il movimento di magazzino indicato +* +* Steamware, S.E.L. +* mod: 2010.10.15 +* +****************************************/ +create PROCEDURE BatchQueue.stp_registraMovMag +( + @NOMUS NVARCHAR(50), -- è il nome utente + @CDCAU NVARCHAR(2), -- è la causale del movimento + @CDPAR NVARCHAR(15), -- codice particolare + @CDMAG NVARCHAR(2), -- codice magazzino + @QTMOV INT, -- quantità movimento + @DAMOV NVARCHAR(8), -- data 8 cifre aaaammgg + @RIFFO NVARCHAR(8) -- cod UDC compresso +) +AS + -- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!! + + DECLARE @SQL AS NVARCHAR(1000) + + -- Faccio chiamata su AS400 + SET @SQL = N' OPENQUERY( P65220DC, ''INSERT INTO MAZZT_DTV3.MWMV200F VALUES ' + SET @SQL = @SQL + @NOMUS + ', ' + @CDCAU + ', ' + @CDPAR + ', ' + @CDMAG + ', ' + SET @SQL = @SQL + CAST(@QTMOV AS NVARCHAR(8)) + ', ' + @DAMOV + ', ' + @RIFFO + ''' )' + + EXEC sp_executesql @SQL + +RETURN +go + +/*************************************** +* STORED stp_registraPackList +* +* Salva i dati di packing list indicati +* +* Steamware, S.E.L. +* mod: 2010.10.15 +* +****************************************/ +create PROCEDURE BatchQueue.stp_registraPackList +( + @PLREPA NVARCHAR(2), -- è il codice reparto/stabilimento (05 pressofusione) + @PLCART NVARCHAR(15), -- UDC + @PLARTI NVARCHAR(15), -- cod articolo + @PLCONT NVARCHAR(15), -- cod contenitore + @PLMATR INT, -- matricola contenitore (solo cifre finali INT) + @PLTPAN CHAR(2), -- tipo anagrafico CLiente / FOrnitore-terzista + @PLCDAN NVARCHAR(6), -- cod terzista / cliente + @PLQTA INT, -- quantità + @PLPNET NUMERIC(7, 3), -- peso netto + @PLPLOR NUMERIC(7, 3), -- peso lordo + @PLSTAT CHAR(1), -- stato "P" predisposto per packing list, "B" bolla stampata + @PLDTEN INT -- data entrata merce, data di carico dell'UDC 8 cifre aaaammgg +) +AS + -- BOZZA DA VERIFICARE E COMPLETARE A CURA MAZZUCCONI!!! + + DECLARE @SQL AS NVARCHAR(1000) + + -- Faccio chiamata su AS400 + SET @SQL = N' OPENQUERY( P65220DC, ''INSERT INTO MAZZT_DTV3.PACKL00F VALUES ' + SET @SQL = @SQL + @PLREPA + ', ' + @PLCART + ', ' + @PLARTI + ', ' + @PLCONT + ', ' + SET @SQL = @SQL + CAST(@PLMATR AS NVARCHAR(5)) + ', ' + @PLTPAN + ', ' + @PLCDAN + ', ' + CAST(@PLQTA AS NVARCHAR(10)) + ', ' + SET @SQL = @SQL + CAST(@PLPNET AS NVARCHAR(10)) + ', ' + CAST(@PLPLOR AS NVARCHAR(10)) + ', ' + @PLSTAT + ', ' + SET @SQL = @SQL + CAST(@PLDTEN AS NVARCHAR(8)) + ''' )' + + EXEC sp_executesql @SQL + +RETURN +go + +commit +go + + +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_ParticolariOverview +* +* restituisce solo la riga con il num max di celle DI UN DATO magazzino +* +* Steamware, S.E.L. +* mod: 2010.06.02 +* +****************************************/ +alter PROCEDURE stp_magazzinoOverviewByMag_maxCelle +( + @CodCS VARCHAR(2), + @CodMag VARCHAR(50) +) +AS + + +WITH cte_celle AS( + SELECT b.CodBlocco, c.IdxTipoCella, COUNT(c.IdxCella) * t.Capienza AS numCelle + FROM Celle AS c INNER JOIN + Blocchi AS b ON c.IdxBlocco = b.IdxBlocco INNER JOIN + TipoCella AS t ON c.IdxTipoCella = t.IdxTipoCella + WHERE (b.CodCS = @CodCS) AND (b.CodMag = @CodMag) + GROUP BY b.CodBlocco, c.IdxTipoCella, t.Capienza +) + + + SELECT TOP (1) AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, b.IdxBlocco, b.CodBlocco, + ISNULL(c.numCelle,ISNULL(b.NumX * b.NumY * b.NumZ,1)) AS TotCelle, + 0 AS CelleAttive, 0 AS CelleOccupate, 0 AS CelleLibere, GETDATE() AS Oldest, GETDATE() AS Newest + FROM AnagMag INNER JOIN Blocchi b ON AnagMag.CodMag = b.CodMag AND AnagMag.CodCS = b.CodCS INNER JOIN cte_celle c ON c.CodBlocco = b.CodBlocco + WHERE (AnagMag.CodCS = @CodCS) AND AnagMag.CodMag = @CodMag + ORDER BY TotCelle DESC +RETURN +go + +/*************************************** +* STORED stp_ParticolariOverview +* +* restituisce solo la riga con il num max di celle +* +* Steamware, S.E.L. +* mod: 2010.06.02 +* +****************************************/ +alter PROCEDURE stp_magazzinoOverview_maxCelle +( + @CodCS VARCHAR(2) +) +AS + +WITH cte_celle AS( + SELECT b.CodBlocco, c.IdxTipoCella, COUNT(c.IdxCella) * t.Capienza AS numCelle + FROM Celle AS c INNER JOIN + Blocchi AS b ON c.IdxBlocco = b.IdxBlocco INNER JOIN + TipoCella AS t ON c.IdxTipoCella = t.IdxTipoCella + WHERE (b.CodCS = @CodCS) + GROUP BY b.CodBlocco, c.IdxTipoCella, t.Capienza +) + + + SELECT TOP (1) AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, b.IdxBlocco, b.CodBlocco, + ISNULL(c.numCelle,ISNULL(b.NumX * b.NumY * b.NumZ,1)) AS TotCelle, + 0 AS CelleAttive, 0 AS CelleOccupate, 0 AS CelleLibere, GETDATE() AS Oldest, GETDATE() AS Newest + FROM AnagMag INNER JOIN Blocchi b ON AnagMag.CodMag = b.CodMag AND AnagMag.CodCS = b.CodCS INNER JOIN cte_celle c ON c.CodBlocco = b.CodBlocco + WHERE (AnagMag.CodCS = @CodCS) + ORDER BY TotCelle DESC + +RETURN +go + +commit +go + + -- registro versione... diff --git a/GMW/GMW_data/bin/Release/GMW_data.dll b/GMW/GMW_data/bin/Release/GMW_data.dll index eb7f9a75..da7f9f0b 100644 Binary files a/GMW/GMW_data/bin/Release/GMW_data.dll and b/GMW/GMW_data/bin/Release/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Release/GMW_data.dll b/GMW/GMW_data/obj/Release/GMW_data.dll index eb7f9a75..da7f9f0b 100644 Binary files a/GMW/GMW_data/obj/Release/GMW_data.dll and b/GMW/GMW_data/obj/Release/GMW_data.dll differ diff --git a/GMW/GMW_installer/GMW_installer.vdproj b/GMW/GMW_installer/GMW_installer.vdproj index 4208c730..0608e718 100644 --- a/GMW/GMW_installer/GMW_installer.vdproj +++ b/GMW/GMW_installer/GMW_installer.vdproj @@ -350,7 +350,7 @@ "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:GMW" "ProductCode" = "8:{D7F7C2FF-375F-4F53-B83A-C4BEFE85D278}" - "PackageCode" = "8:{B2E39CB5-0CFF-467C-A4FC-E5CDD00CE2BD}" + "PackageCode" = "8:{0CAA1CA8-DF44-4E0F-A00E-114EC66ABD0C}" "UpgradeCode" = "8:{C9BC0732-DC92-4336-BAC9-A05A5D2A97C0}" "RestartWWWService" = "11:TRUE" "RemovePreviousVersions" = "11:TRUE" @@ -829,7 +829,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_4FD0E5B75A7F47B79080EC0983BE6583" { - "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Debug\\SetDirectoryPermission.exe" + "SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Release\\SetDirectoryPermission.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_5606017201AE45B480A8ABD8B8D68264" @@ -857,7 +857,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_8BDD7AA9D46A46EC80880F83F13C902E" { - "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Debug\\IISConsoleVB.exe" + "SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Release\\IISConsoleVB.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_5606017201AE45B480A8ABD8B8D68264" diff --git a/GMW/GMW_installer/Release/GMW_installer.msi b/GMW/GMW_installer/Release/GMW_installer.msi index 404b45e3..b924f888 100644 Binary files a/GMW/GMW_installer/Release/GMW_installer.msi and b/GMW/GMW_installer/Release/GMW_installer.msi differ