Sistemazione mancato consumo 54 in rientro 88 in finiti tramite update tab transizione eventi

update bug precedenti

#Fixed 1972

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@340 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2010-12-01 17:18:51 +00:00
parent 998646276b
commit f1b0bfb9ab
36 changed files with 984 additions and 627 deletions
+4 -4
View File
@@ -99,10 +99,10 @@
<add key="maxBarplotLargh" value="1000"/>
<!--Setup urls stampa reports-->
<add key="urlReporting" value="http://{0}/ReportServer?/{1}/{2}&amp;rs:Command=Render&amp;rc:Parameters=true&amp;rc:Toolbar=true&amp;CodLista={3}{4}" />
<!-- NB: "/" == "%2f" -->
<add key="reportingServerAddress" value="srv-gmw01" />
<add key="reportDir" value="MAGAZZINO%2fGMW" />
<add key="urlReporting" value="http://{0}/ReportServer?/{1}/{2}&amp;rs:Command=Render&amp;rc:Parameters=true&amp;rc:Toolbar=true&amp;CodListaPrel={3}{4}" />
<add key="reportingServerAddress" value="srv-dev01" />
<add key="reportDir" value="MAGAZZINO/GMW" />
<add key="reportName" value="Lista_di_Prelievo" />
<add key="reportOpzPdf" value="&amp;rs:Format=PDF" />
+1 -1
View File
@@ -215,7 +215,7 @@ namespace GMW.WebUserControls
// controllo che sia valido x fare l'operazione
if (IdxCellaTo > 0)
{
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, IdxCellaTo);
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, IdxCellaTo, true);
}
azzeraPostUpdate();
if (eh_nuovoValore != null)
+1 -1
View File
@@ -109,7 +109,7 @@ namespace GMW.WebUserControls
// controllo che sia valido x fare l'operazione
if (IdxCellaTo > 0)
{
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, IdxCellaTo);
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, IdxCellaTo, true);
}
azzeraPostUpdate();
if (eh_nuovoValore != null)
+4 -4
View File
@@ -18,8 +18,8 @@
<tr>
<td>
<div style="text-align: right; width: 737px; margin-left: auto; margin-right: auto;">
<img id="MapAmbivere" src="images/flusso.png" usemap="#MapAmbivere"
style="border:none 0px white;" width="737" height="514" alt="" />
<img id="MapAmbivere" src="images/flusso.png" usemap="#MapAmbivere" style="border: none 0px white;"
width="737" height="514" alt="" />
<map id="_MapAmbivere" name="MapAmbivere">
<area shape="rect" coords="28,0,130,62" href="StatoMag.aspx" alt="Mag 56, MP" title="" />
<area shape="rect" coords="58,80,100,125" href="Menu.aspx"" " alt="Tara" title="" />
@@ -39,10 +39,10 @@
title="" />
<area shape="rect" coords="613,296,715,359" href="StatoMag.aspx" alt="Mag 54, Celle"
title="" />
<area shape="rect" coords="287,183,378,237" href="jumper.aspx?nextPage=GestDelibere.aspx&CodTipoDelib_sel=DelibWipPre"
<area shape="rect" coords="291,99,370,145" href="jumper.aspx?nextPage=GestDelibere.aspx&CodTipoDelib_sel=DelibWipPre"
alt="Delibera spedizione terzista" title="Delibera spedizione terzista" />
<area shape="rect" coords="287,183,378,237" href="Menu.aspx" alt="Prelievo" prelievo="" />
<area shape="rect" coords="625,125,704,171" href="Menu.aspx" alt="Prelievo" title="" />
<area shape="rect" coords="291,99,370,145" href="Menu.aspx" alt="" title="Prelievo" />
<area shape="rect" coords="459,305,501,349" href="Menu.aspx" alt="Contapezzi" title="" />
<area shape="rect" coords="28,409,130,476" href="jumper.aspx?nextPage=GestDelibere.aspx&CodTipoDelib_sel=DelibFusi"
alt="Delibera fusi" title="Delibera fusi" />
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 307 KiB

+4 -4
View File
@@ -44,10 +44,10 @@
<add key="maxBarplotLargh" value="1000"/>
<!--Setup urls stampa reports-->
<add key="urlReporting" value="http://{0}/ReportServer?/{1}/{2}&amp;rs:Command=Render&amp;rc:Parameters=true&amp;rc:Toolbar=true&amp;CodLista={3}{4}" />
<!-- NB: "/" == "%2f" -->
<add key="reportingServerAddress" value="srv-gmw01" />
<add key="reportDir" value="MAGAZZINO%2fGMW" />
<add key="urlReporting" value="http://{0}/ReportServer?/{1}/{2}&amp;rs:Command=Render&amp;rc:Parameters=true&amp;rc:Toolbar=true&amp;CodListaPrel={3}{4}" />
<add key="reportingServerAddress" value="srv-dev01" />
<add key="reportDir" value="MAGAZZINO/GMW" />
<add key="reportName" value="Lista_di_Prelievo" />
<add key="reportOpzPdf" value="&amp;rs:Format=PDF" />
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -58,7 +58,7 @@
<add key="appName" value="GMW_Term" />
<add key="SiteName" value="Ambivere"/>
<add key="mainRev" value="1.0" />
<add key="minRev" value="330" />
<add key="minRev" value="335" />
<add key="copyRight" value="SteamWare © 2010" />
<add key="_allowForceUser" value="true" />
<add key="_safePages" value="jumper.aspx#unauthorized.aspx#allegati.aspx#forceUser.aspx#login.aspx#test.aspx#istruzioni.aspx#Test.aspx" />
@@ -259,7 +259,7 @@ namespace GMW_Term.WebUserControls
// cerco id della cella...
int idxCella = MagClass.magazzino.IdxCellaByCodCella(_CodCS, valoreScanUdc);
// salva le info facendo caricamento
MagClass.magazzino.spostaUDC(_CodCS, _UDC, idxCella);
MagClass.magazzino.spostaUDC(_CodCS, _UDC, idxCella, true);
if (setCellaPiena)
{
MagClass.magazzino.taCelle.stp_celle_updPiena(idxCella, true);
@@ -279,7 +279,7 @@ namespace GMW_Term.WebUserControls
int idxCellaFrom = MagClass.magazzino.taDettUDC.getByFullUdc(_UDC, _CodCS)[0].IdxCella;
int idxCellaTo = MagClass.magazzino.IdxCellaByCodCella(_CodCS, valoreScanUdc);
// salva le info facendo caricamento
MagClass.magazzino.spostaUDC(_CodCS, _UDC, idxCellaTo);
MagClass.magazzino.spostaUDC(_CodCS, _UDC, idxCellaTo, true);
// dopo aver spostato UDC sistemo eventuali Righe di Prelievo x lo stesso UDC pending...
MagClass.magazzino.taRigheListePrelievo.stp_RLP_sbloccaNonPrelevate("ND", _UDC); // metto "ND" perché voglio sbloccare tutti gli impieghi di quell'UDC
// la cella di partenza la indico come disponibile (comunque ho tolto un UDC...)
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -7,7 +7,7 @@
<add key="appName" value="GMW_Term"/>
<add key="SiteName" value="Ambivere"/>
<add key="mainRev" value="1.0"/>
<add key="minRev" value="330"/>
<add key="minRev" value="335"/>
<add key="copyRight" value="SteamWare © 2010"/>
<add key="_allowForceUser" value="true" />
<add key="_safePages" value="jumper.aspx#unauthorized.aspx#allegati.aspx#forceUser.aspx#login.aspx#test.aspx#istruzioni.aspx#Test.aspx"/>
Binary file not shown.
@@ -331,7 +331,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:GMW_Term"
"ProductCode" = "8:{7CB4D0AA-04F4-4DA1-941D-30C26B52991B}"
"PackageCode" = "8:{9A7250B6-67C7-4C48-9370-65636E65C7C9}"
"PackageCode" = "8:{7AF4125C-4DA7-49FD-A2DD-FC8934CFCFC3}"
"UpgradeCode" = "8:{B348C50D-8DAD-4430-AEF0-60800C94CB78}"
"RestartWWWService" = "11:TRUE"
"RemovePreviousVersions" = "11:TRUE"
@@ -810,7 +810,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9C1BA08A590A44EC9515C0F91AD50A1D"
{
"SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Release\\SetDirectoryPermission.exe"
"SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Debug\\SetDirectoryPermission.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A89965CB827F476CB8D496FFFC9653DF"
@@ -838,7 +838,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_B0271B832DBE45F0B50639E61DAE3CF4"
{
"SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Release\\IISConsoleVB.exe"
"SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Debug\\IISConsoleVB.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A89965CB827F476CB8D496FFFC9653DF"
+4 -4
View File
@@ -14,7 +14,7 @@ namespace GMW_WS
/// <summary>
/// WebService per gestione sw bilance
/// </summary>
[WebService(Namespace = "http://www.steamware.net/", Description = "Web Services che funziona da collettore di tutte le richieste delle applicazioni per le bilance integrate a <b>GMW</b> v.1.0.330")]
[WebService(Namespace = "http://www.steamware.net/", Description = "Web Services che funziona da collettore di tutte le richieste delle applicazioni per le bilance integrate a <b>GMW</b> v.1.0.335")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class bilance : System.Web.Services.WebService
@@ -1060,7 +1060,7 @@ namespace GMW_WS
}
try
{
answ = MagClass.magazzino.spostaUDC(CodCs, UDC_reqTrim, idxCellaTo);
answ = MagClass.magazzino.spostaUDC(CodCs, UDC_reqTrim, idxCellaTo, true);
}
catch
{ }
@@ -1109,7 +1109,7 @@ namespace GMW_WS
}
try
{
answ = MagClass.magazzino.spostaUDC(CodCs, UDC_reqTrim, idxCellaTo);
answ = MagClass.magazzino.spostaUDC(CodCs, UDC_reqTrim, idxCellaTo, true);
}
catch
{ }
@@ -1153,7 +1153,7 @@ namespace GMW_WS
try
{
MagClass.magazzino.spostaUDC(CodCs, UDC_reqTrim, idxCellaTo);
MagClass.magazzino.spostaUDC(CodCs, UDC_reqTrim, idxCellaTo, true);
answ = true;
}
catch
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8 -1
View File
@@ -16958,6 +16958,7 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella =
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxCellaTo", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@resetRLP", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -17287,7 +17288,7 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella =
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_spostaUdc(string CodCS, string UDC, global::System.Nullable<int> IdxCellaTo) {
public virtual int stp_spostaUdc(string CodCS, string UDC, global::System.Nullable<int> IdxCellaTo, global::System.Nullable<bool> resetRLP) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7];
if ((CodCS == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
@@ -17307,6 +17308,12 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella =
else {
command.Parameters[3].Value = global::System.DBNull.Value;
}
if ((resetRLP.HasValue == true)) {
command.Parameters[4].Value = ((bool)(resetRLP.Value));
}
else {
command.Parameters[4].Value = global::System.DBNull.Value;
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -4,11 +4,11 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="45" ViewPortY="471" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="45" ViewPortY="149" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:ElencoCartellini" ZOrder="2" X="79" Y="230" Height="552" Width="250" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="368" />
<Shape ID="DesignTable:ElencoCartellini" ZOrder="3" X="79" Y="230" Height="552" Width="250" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="368" />
<Shape ID="DesignTable:AnagMag" ZOrder="8" X="1008" Y="389" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:PosizioneUdcCorrente" ZOrder="5" X="409" Y="544" Height="286" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:PosizioneUdcCorrente" ZOrder="1" X="409" Y="544" Height="286" Width="245" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:PosizioneUdcStorico" ZOrder="34" X="412" Y="310" Height="168" Width="257" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:Blocchi" ZOrder="29" X="1015" Y="660" Height="325" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="181" />
<Shape ID="DesignTable:Celle" ZOrder="21" X="712" Y="420" Height="438" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
@@ -20,7 +20,7 @@
<Shape ID="DesignTable:V_DettMagPart" ZOrder="10" X="1027" Y="998" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TipoListaPrelievo" ZOrder="18" X="735" Y="891" Height="172" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="15" X="83" Y="846" Height="257" Width="247" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="130" />
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="1" X="430" Y="879" Height="381" Width="231" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="2" X="430" Y="879" Height="381" Width="231" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:v_righeListePrelievoPosizione" ZOrder="16" X="400" Y="1301" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
<Shape ID="DesignTable:v_particolariEsponenteFigura" ZOrder="24" X="1042" Y="1386" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:AnagPosizioni" ZOrder="20" X="375" Y="103" Height="153" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
@@ -28,8 +28,8 @@
<Shape ID="DesignTable:V_MagazziniLogiciOverview" ZOrder="11" X="730" Y="1426" Height="267" Width="217" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
<Shape ID="DesignTable:RapQual" ZOrder="9" X="1071" Y="1633" Height="400" Width="236" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="292" />
<Shape ID="DesignTable:v_posizioniDelibere" ZOrder="7" X="107" Y="1701" Height="134" Width="257" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:v_RapQualSunto" ZOrder="4" X="498" Y="1731" Height="267" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
<Shape ID="DesignTable:AnagParticolari" ZOrder="3" X="765" Y="1768" Height="210" Width="234" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
<Shape ID="DesignTable:v_RapQualSunto" ZOrder="5" X="498" Y="1731" Height="267" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
<Shape ID="DesignTable:AnagParticolari" ZOrder="4" X="765" Y="1768" Height="210" Width="234" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
</Shapes>
<Connectors>
<Connector ID="DesignRelation:FK_PosizioneUdcCorrente_ElencoCartellini" ZOrder="35" LineWidth="11">
@@ -75,7 +75,7 @@
<Y>687</Y>
</Point>
<Point>
<X>709</X>
<X>654</X>
<Y>687</Y>
</Point>
</RoutePoints>
+10 -6
View File
@@ -186,13 +186,14 @@ namespace GMW_data
/// <param name="CodCS">Codice company/sito</param>
/// <param name="UDC">Codice UDC</param>
/// <param name="IdxCellaTo">Cella di destinazione</param>
/// <param name="resetRLP">indica se sia richiesto resettare le Righe Liste Prelievo con lo spostsamento</param>
/// <returns>esito comando</returns>
public bool spostaUDC(string CodCS, string UDC, int IdxCellaTo)
public bool spostaUDC(string CodCS, string UDC, int IdxCellaTo, bool resetRLP)
{
bool answ = false;
try
{
taPosUdcCorr.stp_spostaUdc(CodCS, UDC, IdxCellaTo);
taPosUdcCorr.stp_spostaUdc(CodCS, UDC, IdxCellaTo, resetRLP);
// cerco nuova posizione...
if (taPosUdcCorr.getByCellaUdc(UDC, IdxCellaTo).Rows.Count > 0)
{
@@ -879,7 +880,7 @@ namespace GMW_data
// ricavo il codice UDC...
string _UDC = row.UDC;
// sposto UDC
spostaUDC(CodCS, _UDC, idxCellaTo);
spostaUDC(CodCS, _UDC, idxCellaTo, false);
// dopo aver spostato UDC sistemo eventuali Righe di Prelievo x lo stesso UDC pending...
magazzino.taRigheListePrelievo.stp_RLP_sbloccaNonPrelevate(CodLista, _UDC);
}
@@ -1005,10 +1006,13 @@ namespace GMW_data
// sposto nella PRIMA cella di destinazione associata l'UDC
if (idxCellaTo > 0)
{
spostaUDC(CodCS, UDC, idxCellaTo);
spostaUDC(CodCS, UDC, idxCellaTo, false);
}
if (fatto)
{
// dopo aver scaricato UDC sistemo eventuali Righe di Prelievo x lo stesso pending...
magazzino.taRigheListePrelievo.stp_RLP_sbloccaNonPrelevate(CodLista, UDC);
}
// dopo aver scaricato UDC sistemo eventuali Righe di Prelievo x lo stesso pending...
magazzino.taRigheListePrelievo.stp_RLP_sbloccaNonPrelevate(CodLista, UDC);
}
// segna come scaricata la lista prelievo
taElencoListePrelievo.updateStato(CodSoggetto, CodLista, (int)statoLista.scaricata);
+345
View File
@@ -130,6 +130,351 @@ commit
go
set xact_abort on
go
begin transaction
go
set ANSI_NULLS on
go
/***************************************
* STORED stp_ParticolariOverview
*
* elenco di overview sull'impiego dei particolari (dettaglio a "maglie larghe")
*
* Steamware, S.E.L.
* mod: 2010.05.31
*
****************************************/
alter PROCEDURE stp_ParticolariOverview
(
@searchVal VARCHAR(50),
@CodCS VARCHAR(2)
)
AS
SELECT RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare, ISNULL(COUNT(dbo.ElencoCartellini.UDC), 0) AS NumUDC,
ISNULL(SUM(dbo.ElencoCartellini.Qta), 0) AS TotQta, ISNULL(COUNT(dbo.PosizioneUdcCorrente.IdxCella), 0) AS NumInMag
FROM RilPro.AnagParticolari LEFT OUTER JOIN
dbo.ElencoCartellini ON RilPro.AnagParticolari.Particolare = dbo.ElencoCartellini.Particolare LEFT OUTER JOIN
dbo.PosizioneUdcCorrente ON dbo.ElencoCartellini.UDC = dbo.PosizioneUdcCorrente.UDC
WHERE RilPro.AnagParticolari.CodCS = @CodCS AND RilPro.AnagParticolari.Particolare = @searchVal
AND ElencoCartellini.IdxPosizione >= 0 -- vincolo posizioni mag attive
GROUP BY RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare
RETURN
go
/***************************************
* STORED stp_ParticolariOverviewLike
*
* elenco di overview sull'impiego dei particolari (dettaglio a "maglie larghe") - modalità LIKE
*
* Steamware, S.E.L.
* mod: 2010.05.31
*
****************************************/
alter PROCEDURE stp_ParticolariOverviewLike
(
@searchVal VARCHAR(50),
@CodCS VARCHAR(2)
)
AS
SELECT RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare, ISNULL(COUNT(ElencoCartellini.UDC), 0) AS NumUDC,
SUM(ISNULL(ElencoCartellini.Qta, 0)) AS TotQta, ISNULL(COUNT(PosizioneUdcCorrente.IdxCella), 0) AS NumInMag
FROM RilPro.AnagParticolari LEFT OUTER JOIN
ElencoCartellini ON RilPro.AnagParticolari.Particolare = ElencoCartellini.Particolare LEFT OUTER JOIN
PosizioneUdcCorrente ON ElencoCartellini.UDC = PosizioneUdcCorrente.UDC
WHERE (RilPro.AnagParticolari.CodCS = @CodCS)
AND ((RilPro.AnagParticolari.Particolare LIKE '%' + @searchVal + '%') OR (RilPro.AnagParticolari.DescParticolare LIKE '%' + @searchVal + '%'))
AND ElencoCartellini.IdxPosizione >= 0 -- vincolo posizioni mag attive
GROUP BY RilPro.AnagParticolari.Particolare, RilPro.AnagParticolari.DescParticolare
RETURN
go
commit
go
set xact_abort on
go
begin transaction
go
set ANSI_NULLS on
go
/***************************************
* STORED stp_paretoDettMagByParticolare
*
* restituisce elenco giacenze a magazzino in logica pareto (quantità) per un dato particolare
*
* Steamware, S.E.L.
* mod: 2010.06.04
*
****************************************/
alter PROCEDURE stp_paretoDettMagByParticolare
(
@CodCS VARCHAR(2),
@Particolare VARCHAR(20)
)
AS
SELECT TOP (100) PERCENT am.CodCS, am.CodMag, am.DescMag, b.IdxBlocco, b.CodBlocco, ec.Particolare,
ec.Esponente, COUNT(puc.UDC) AS NumUDC, ISNULL(MIN(puc.DataRif),
GETDATE()) AS Oldest, ISNULL(MAX(puc.DataRif), GETDATE()) AS Newest, SUM(ec.Qta) AS QtaTotPz,
asp.DescStato, ec.IdxPosizione AS CodMagLog
FROM AnagMag am INNER JOIN
Blocchi b ON am.CodMag = b.CodMag AND am.CodCS = b.CodCS INNER JOIN
Celle c INNER JOIN
ElencoCartellini ec LEFT OUTER JOIN
PosizioneUdcCorrente puc ON ec.UDC = puc.UDC ON c.IdxCella = puc.IdxCella ON
b.IdxBlocco = c.IdxBlocco INNER JOIN
AnagStatiProdotto asp ON ec.CodStato = asp.CodStato
WHERE (c.Attiva = 1) AND (am.CodCS = @CodCS) AND (ec.Particolare = @Particolare)
GROUP BY am.CodCS, am.CodMag, am.DescMag, b.IdxBlocco, b.CodBlocco, b.NumX, b.NumY, b.NumZ,
ec.Particolare, ec.Esponente, ec.IdxPosizione, asp.DescStato
ORDER BY QtaTotPz DESC
RETURN
go
commit
go
set xact_abort on
go
begin transaction
go
set ANSI_NULLS on
go
/***************************************
* STORED stp_spostaUdc
*
* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica
*
* Steamware, S.E.L.
* mod: 2010.06.11
*
****************************************/
alter PROCEDURE stp_spostaUdc
(
@CodCS VARCHAR(2),
@UDC VARCHAR(50),
@IdxCellaTo INT
)
AS
BEGIN TRAN
-- DICHIARAZIONI iniziali variabili
DECLARE @IdxCellaFrom INT
DECLARE @capienza INT
DECLARE @numUdc INT
-- controllo cella di partenza
SET @IdxCellaFrom = (SELECT IdxCella FROM PosizioneUdcCorrente WHERE UDC = @UDC)
-- controllo se la cella di dest vada indicata come piena
SET @capienza = (
SELECT tc.Capienza
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
WHERE c.IdxCella = @IdxCellaFrom
)
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaFrom)
-- se capienza raggiunta aggiorno...
IF(@numUdc -1 < @capienza)
BEGIN
EXEC stp_celle_updPiena @IdxCellaFrom, 0
END
-- cancello posizione occupata
DELETE
FROM PosizioneUdcCorrente
WHERE UDC = @UDC
-- cancello eventuali righe liste di prelievo FUSI per l'UDC
DELETE FROM RigheListePrelievo
WHERE UDC = @UDC AND CodLista IN (
SELECT CodLista FROM ElencoListePrelievo
WHERE CodTipoLista='01-PreFus'
)
-- creo una nuova posizione per l'UDC
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif)
VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE())
-- controllo se la cella di dest vada indicata come piena
SET @capienza = (
SELECT tc.Capienza
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
WHERE c.IdxCella = @IdxCellaTo
)
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaTo)
-- se capienza raggiunta aggiorno...
IF(@numUdc >= @capienza)
BEGIN
EXEC stp_celle_updPiena @IdxCellaTo, 1
END
COMMIT TRAN
RETURN
go
commit
go
set xact_abort on
go
begin transaction
go
DELETE FROM dbo.TabTranPosizEventi WHERE CodEvento=N'UDC_RIEN' and IdxPosizione=88
go
commit transaction
go
set xact_abort on
go
begin transaction
go
INSERT INTO dbo.AnagTipoEvento
VALUES (N'UDC_RIEN54', N'Rientro UDC da 88 a 54')
INSERT INTO dbo.AnagTipoEvento
VALUES (N'UDC_RIEN84', N'Rientro UDC da 88 a 84')
DELETE FROM dbo.AnagTipoEvento WHERE CodEvento=N'UDC_RIEN'
go
commit transaction
go
set xact_abort on
go
begin transaction
go
INSERT INTO dbo.TabTranPosizEventi
VALUES (N'UDC_RIEN54', 88, 54, 1)
INSERT INTO dbo.TabTranPosizEventi
VALUES (N'UDC_RIEN84', 88, 84, 1)
go
commit transaction
go
set xact_abort on
go
begin transaction
go
set ANSI_NULLS on
go
/***************************************
* STORED stp_spostaUdc
*
* sposta un UDC, salvandone la posizione precedente (se esiste) nella tab storica
*
* Steamware, S.E.L.
* mod: 2010.06.11
*
****************************************/
alter PROCEDURE stp_spostaUdc
(
@CodCS VARCHAR(2),
@UDC VARCHAR(50),
@IdxCellaTo INT,
@resetRLP BIT
)
AS
BEGIN TRAN
-- DICHIARAZIONI iniziali variabili
DECLARE @IdxCellaFrom INT
DECLARE @capienza INT
DECLARE @numUdc INT
-- controllo cella di partenza
SET @IdxCellaFrom = (SELECT IdxCella FROM PosizioneUdcCorrente WHERE UDC = @UDC)
-- controllo se la cella di dest vada indicata come piena
SET @capienza = (
SELECT tc.Capienza
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
WHERE c.IdxCella = @IdxCellaFrom
)
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaFrom)
-- se capienza raggiunta aggiorno...
IF(@numUdc -1 < @capienza)
BEGIN
EXEC stp_celle_updPiena @IdxCellaFrom, 0
END
-- cancello posizione occupata
DELETE
FROM PosizioneUdcCorrente
WHERE UDC = @UDC
-- SE RICHIESTO cancello eventuali righe liste di prelievo FUSI per l'UDC
IF(@resetRLP = 1)
BEGIN
DELETE FROM RigheListePrelievo
WHERE UDC = @UDC AND CodLista IN (
SELECT CodLista FROM ElencoListePrelievo
WHERE CodTipoLista='01-PreFus'
)
END
-- creo una nuova posizione per l'UDC
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif)
VALUES(@UDC, @IdxCellaTo, @CodCS, GETDATE())
-- controllo se la cella di dest vada indicata come piena
SET @capienza = (
SELECT tc.Capienza
FROM TipoCella TC INNER JOIN Celle c ON TC.IdxTipoCella=c.IdxTipoCella
WHERE c.IdxCella = @IdxCellaTo
)
SET @numUdc = (SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE IdxCella = @IdxCellaTo)
-- se capienza raggiunta aggiorno...
IF(@numUdc >= @capienza)
BEGIN
EXEC stp_celle_updPiena @IdxCellaTo, 1
END
COMMIT TRAN
RETURN
go
commit
go
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.