Update mappatura store splitODL e autoStart ODL

This commit is contained in:
Samuele Locatelli
2021-06-18 19:07:41 +02:00
parent 0eac106e8c
commit 2ca66abf2a
4 changed files with 881 additions and 780 deletions
+29 -11
View File
@@ -255,6 +255,25 @@ FROM v_ODL_exp ORDER BY IdxODL DESC</CommandText>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_ODL_AutoStart" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="autoStart" Modifier="Public" Name="autoStart" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy16" UserSourceName="autoStart">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_ODL_AutoStart</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@idxODL" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@MatrOpr" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@IdxMacchina" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@TCRichAttr" Precision="18" ProviderType="Decimal" Scale="8" Size="9" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@PzPallet" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="NVarChar" Scale="0" Size="2500" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@StartNewOdl" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@QtyRich" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@KeyRichiesta" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_ODL_clearSetup" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="clearSetup" Modifier="Public" Name="clearSetup" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="clearSetup">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
@@ -537,7 +556,6 @@ FROM v_ODL_exp ORDER BY IdxODL DESC</CommandText>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="NVarChar" Scale="0" Size="2500" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@StartNewOdl" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@QtyRich" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@KeyRichiesta" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
@@ -2947,7 +2965,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="MappaStatoExpl" msprop:Generator_TableClassName="MappaStatoExplDataTable" msprop:Generator_TableVarName="tableMappaStatoExpl" msprop:Generator_RowChangedName="MappaStatoExplRowChanged" msprop:Generator_TablePropName="MappaStatoExpl" msprop:Generator_RowDeletingName="MappaStatoExplRowDeleting" msprop:Generator_RowChangingName="MappaStatoExplRowChanging" msprop:Generator_RowEvHandlerName="MappaStatoExplRowChangeEventHandler" msprop:Generator_RowDeletedName="MappaStatoExplRowDeleted" msprop:Generator_RowClassName="MappaStatoExplRow" msprop:Generator_UserTableName="MappaStatoExpl" msprop:Generator_RowEvArgName="MappaStatoExplRowChangeEvent">
<xs:element name="MappaStatoExpl" msprop:Generator_TableClassName="MappaStatoExplDataTable" msprop:Generator_TableVarName="tableMappaStatoExpl" msprop:Generator_TablePropName="MappaStatoExpl" msprop:Generator_RowDeletingName="MappaStatoExplRowDeleting" msprop:Generator_RowChangingName="MappaStatoExplRowChanging" msprop:Generator_RowEvHandlerName="MappaStatoExplRowChangeEventHandler" msprop:Generator_RowDeletedName="MappaStatoExplRowDeleted" msprop:Generator_UserTableName="MappaStatoExpl" msprop:Generator_RowChangedName="MappaStatoExplRowChanged" msprop:Generator_RowEvArgName="MappaStatoExplRowChangeEvent" msprop:Generator_RowClassName="MappaStatoExplRow">
<xs:complexType>
<xs:sequence>
<xs:element name="RowNum" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnRowNum" msprop:Generator_ColumnPropNameInRow="RowNum" msprop:Generator_ColumnPropNameInTable="RowNumColumn" msprop:Generator_UserColumnName="RowNum" type="xs:int" />
@@ -3028,7 +3046,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ResProdDett_splitODL" msprop:Generator_TableClassName="ResProdDett_splitODLDataTable" msprop:Generator_TableVarName="tableResProdDett_splitODL" msprop:Generator_RowChangedName="ResProdDett_splitODLRowChanged" msprop:Generator_TablePropName="ResProdDett_splitODL" msprop:Generator_RowDeletingName="ResProdDett_splitODLRowDeleting" msprop:Generator_RowChangingName="ResProdDett_splitODLRowChanging" msprop:Generator_RowEvHandlerName="ResProdDett_splitODLRowChangeEventHandler" msprop:Generator_RowDeletedName="ResProdDett_splitODLRowDeleted" msprop:Generator_RowClassName="ResProdDett_splitODLRow" msprop:Generator_UserTableName="ResProdDett_splitODL" msprop:Generator_RowEvArgName="ResProdDett_splitODLRowChangeEvent">
<xs:element name="ResProdDett_splitODL" msprop:Generator_TableClassName="ResProdDett_splitODLDataTable" msprop:Generator_TableVarName="tableResProdDett_splitODL" msprop:Generator_TablePropName="ResProdDett_splitODL" msprop:Generator_RowDeletingName="ResProdDett_splitODLRowDeleting" msprop:Generator_RowChangingName="ResProdDett_splitODLRowChanging" msprop:Generator_RowEvHandlerName="ResProdDett_splitODLRowChangeEventHandler" msprop:Generator_RowDeletedName="ResProdDett_splitODLRowDeleted" msprop:Generator_UserTableName="ResProdDett_splitODL" msprop:Generator_RowChangedName="ResProdDett_splitODLRowChanged" msprop:Generator_RowEvArgName="ResProdDett_splitODLRowChangeEvent" msprop:Generator_RowClassName="ResProdDett_splitODLRow">
<xs:complexType>
<xs:sequence>
<xs:element name="IdxODL" msprop:Generator_ColumnVarNameInTable="columnIdxODL" msprop:Generator_ColumnPropNameInRow="IdxODL" msprop:Generator_ColumnPropNameInTable="IdxODLColumn" msprop:Generator_UserColumnName="IdxODL" type="xs:int" minOccurs="0" />
@@ -3040,7 +3058,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ResProdDett_splitGG" msprop:Generator_TableClassName="ResProdDett_splitGGDataTable" msprop:Generator_TableVarName="tableResProdDett_splitGG" msprop:Generator_RowChangedName="ResProdDett_splitGGRowChanged" msprop:Generator_TablePropName="ResProdDett_splitGG" msprop:Generator_RowDeletingName="ResProdDett_splitGGRowDeleting" msprop:Generator_RowChangingName="ResProdDett_splitGGRowChanging" msprop:Generator_RowEvHandlerName="ResProdDett_splitGGRowChangeEventHandler" msprop:Generator_RowDeletedName="ResProdDett_splitGGRowDeleted" msprop:Generator_RowClassName="ResProdDett_splitGGRow" msprop:Generator_UserTableName="ResProdDett_splitGG" msprop:Generator_RowEvArgName="ResProdDett_splitGGRowChangeEvent">
<xs:element name="ResProdDett_splitGG" msprop:Generator_TableClassName="ResProdDett_splitGGDataTable" msprop:Generator_TableVarName="tableResProdDett_splitGG" msprop:Generator_TablePropName="ResProdDett_splitGG" msprop:Generator_RowDeletingName="ResProdDett_splitGGRowDeleting" msprop:Generator_RowChangingName="ResProdDett_splitGGRowChanging" msprop:Generator_RowEvHandlerName="ResProdDett_splitGGRowChangeEventHandler" msprop:Generator_RowDeletedName="ResProdDett_splitGGRowDeleted" msprop:Generator_UserTableName="ResProdDett_splitGG" msprop:Generator_RowChangedName="ResProdDett_splitGGRowChanged" msprop:Generator_RowEvArgName="ResProdDett_splitGGRowChangeEvent" msprop:Generator_RowClassName="ResProdDett_splitGGRow">
<xs:complexType>
<xs:sequence>
<xs:element name="Data" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnData" msprop:Generator_ColumnPropNameInRow="Data" msprop:Generator_ColumnPropNameInTable="DataColumn" msprop:Generator_UserColumnName="Data" type="xs:dateTime" minOccurs="0" />
@@ -3065,7 +3083,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ResProdTot" msprop:Generator_TableClassName="ResProdTotDataTable" msprop:Generator_TableVarName="tableResProdTot" msprop:Generator_TablePropName="ResProdTot" msprop:Generator_RowDeletingName="ResProdTotRowDeleting" msprop:Generator_RowChangingName="ResProdTotRowChanging" msprop:Generator_RowEvHandlerName="ResProdTotRowChangeEventHandler" msprop:Generator_RowDeletedName="ResProdTotRowDeleted" msprop:Generator_UserTableName="ResProdTot" msprop:Generator_RowChangedName="ResProdTotRowChanged" msprop:Generator_RowEvArgName="ResProdTotRowChangeEvent" msprop:Generator_RowClassName="ResProdTotRow">
<xs:element name="ResProdTot" msprop:Generator_TableClassName="ResProdTotDataTable" msprop:Generator_TableVarName="tableResProdTot" msprop:Generator_RowChangedName="ResProdTotRowChanged" msprop:Generator_TablePropName="ResProdTot" msprop:Generator_RowDeletingName="ResProdTotRowDeleting" msprop:Generator_RowChangingName="ResProdTotRowChanging" msprop:Generator_RowEvHandlerName="ResProdTotRowChangeEventHandler" msprop:Generator_RowDeletedName="ResProdTotRowDeleted" msprop:Generator_RowClassName="ResProdTotRow" msprop:Generator_UserTableName="ResProdTot" msprop:Generator_RowEvArgName="ResProdTotRowChangeEvent">
<xs:complexType>
<xs:sequence>
<xs:element name="Nome" msprop:Generator_ColumnVarNameInTable="columnNome" msprop:Generator_ColumnPropNameInRow="Nome" msprop:Generator_ColumnPropNameInTable="NomeColumn" msprop:Generator_UserColumnName="Nome">
@@ -3103,7 +3121,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="RegistroControlli" msprop:Generator_TableClassName="RegistroControlliDataTable" msprop:Generator_TableVarName="tableRegistroControlli" msprop:Generator_RowChangedName="RegistroControlliRowChanged" msprop:Generator_TablePropName="RegistroControlli" msprop:Generator_RowDeletingName="RegistroControlliRowDeleting" msprop:Generator_RowChangingName="RegistroControlliRowChanging" msprop:Generator_RowEvHandlerName="RegistroControlliRowChangeEventHandler" msprop:Generator_RowDeletedName="RegistroControlliRowDeleted" msprop:Generator_RowClassName="RegistroControlliRow" msprop:Generator_UserTableName="RegistroControlli" msprop:Generator_RowEvArgName="RegistroControlliRowChangeEvent">
<xs:element name="RegistroControlli" msprop:Generator_TableClassName="RegistroControlliDataTable" msprop:Generator_TableVarName="tableRegistroControlli" msprop:Generator_TablePropName="RegistroControlli" msprop:Generator_RowDeletingName="RegistroControlliRowDeleting" msprop:Generator_RowChangingName="RegistroControlliRowChanging" msprop:Generator_RowEvHandlerName="RegistroControlliRowChangeEventHandler" msprop:Generator_RowDeletedName="RegistroControlliRowDeleted" msprop:Generator_UserTableName="RegistroControlli" msprop:Generator_RowChangedName="RegistroControlliRowChanged" msprop:Generator_RowEvArgName="RegistroControlliRowChangeEvent" msprop:Generator_RowClassName="RegistroControlliRow">
<xs:complexType>
<xs:sequence>
<xs:element name="IdxControllo" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnIdxControllo" msprop:Generator_ColumnPropNameInRow="IdxControllo" msprop:Generator_ColumnPropNameInTable="IdxControlloColumn" msprop:Generator_UserColumnName="IdxControllo" type="xs:int" />
@@ -3142,7 +3160,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="RegistroScarti" msprop:Generator_TableClassName="RegistroScartiDataTable" msprop:Generator_TableVarName="tableRegistroScarti" msprop:Generator_RowChangedName="RegistroScartiRowChanged" msprop:Generator_TablePropName="RegistroScarti" msprop:Generator_RowDeletingName="RegistroScartiRowDeleting" msprop:Generator_RowChangingName="RegistroScartiRowChanging" msprop:Generator_RowEvHandlerName="RegistroScartiRowChangeEventHandler" msprop:Generator_RowDeletedName="RegistroScartiRowDeleted" msprop:Generator_RowClassName="RegistroScartiRow" msprop:Generator_UserTableName="RegistroScarti" msprop:Generator_RowEvArgName="RegistroScartiRowChangeEvent">
<xs:element name="RegistroScarti" msprop:Generator_TableClassName="RegistroScartiDataTable" msprop:Generator_TableVarName="tableRegistroScarti" msprop:Generator_TablePropName="RegistroScarti" msprop:Generator_RowDeletingName="RegistroScartiRowDeleting" msprop:Generator_RowChangingName="RegistroScartiRowChanging" msprop:Generator_RowEvHandlerName="RegistroScartiRowChangeEventHandler" msprop:Generator_RowDeletedName="RegistroScartiRowDeleted" msprop:Generator_UserTableName="RegistroScarti" msprop:Generator_RowChangedName="RegistroScartiRowChanged" msprop:Generator_RowEvArgName="RegistroScartiRowChangeEvent" msprop:Generator_RowClassName="RegistroScartiRow">
<xs:complexType>
<xs:sequence>
<xs:element name="IdxMacchina" msprop:Generator_ColumnVarNameInTable="columnIdxMacchina" msprop:Generator_ColumnPropNameInRow="IdxMacchina" msprop:Generator_ColumnPropNameInTable="IdxMacchinaColumn" msprop:Generator_UserColumnName="IdxMacchina">
@@ -3208,7 +3226,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PromesseODL" msprop:Generator_TableClassName="PromesseODLDataTable" msprop:Generator_TableVarName="tablePromesseODL" msprop:Generator_TablePropName="PromesseODL" msprop:Generator_RowDeletingName="PromesseODLRowDeleting" msprop:Generator_RowChangingName="PromesseODLRowChanging" msprop:Generator_RowEvHandlerName="PromesseODLRowChangeEventHandler" msprop:Generator_RowDeletedName="PromesseODLRowDeleted" msprop:Generator_UserTableName="PromesseODL" msprop:Generator_RowChangedName="PromesseODLRowChanged" msprop:Generator_RowEvArgName="PromesseODLRowChangeEvent" msprop:Generator_RowClassName="PromesseODLRow">
<xs:element name="PromesseODL" msprop:Generator_TableClassName="PromesseODLDataTable" msprop:Generator_TableVarName="tablePromesseODL" msprop:Generator_RowChangedName="PromesseODLRowChanged" msprop:Generator_TablePropName="PromesseODL" msprop:Generator_RowDeletingName="PromesseODLRowDeleting" msprop:Generator_RowChangingName="PromesseODLRowChanging" msprop:Generator_RowEvHandlerName="PromesseODLRowChangeEventHandler" msprop:Generator_RowDeletedName="PromesseODLRowDeleted" msprop:Generator_RowClassName="PromesseODLRow" msprop:Generator_UserTableName="PromesseODL" msprop:Generator_RowEvArgName="PromesseODLRowChangeEvent">
<xs:complexType>
<xs:sequence>
<xs:element name="idxPromessa" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnidxPromessa" msprop:Generator_ColumnPropNameInRow="idxPromessa" msprop:Generator_ColumnPropNameInTable="idxPromessaColumn" msprop:Generator_UserColumnName="idxPromessa" type="xs:int" />
@@ -3285,7 +3303,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ElencoConfermeProd" msprop:Generator_TableClassName="ElencoConfermeProdDataTable" msprop:Generator_TableVarName="tableElencoConfermeProd" msprop:Generator_TablePropName="ElencoConfermeProd" msprop:Generator_RowDeletingName="ElencoConfermeProdRowDeleting" msprop:Generator_RowChangingName="ElencoConfermeProdRowChanging" msprop:Generator_RowEvHandlerName="ElencoConfermeProdRowChangeEventHandler" msprop:Generator_RowDeletedName="ElencoConfermeProdRowDeleted" msprop:Generator_UserTableName="ElencoConfermeProd" msprop:Generator_RowChangedName="ElencoConfermeProdRowChanged" msprop:Generator_RowEvArgName="ElencoConfermeProdRowChangeEvent" msprop:Generator_RowClassName="ElencoConfermeProdRow">
<xs:element name="ElencoConfermeProd" msprop:Generator_TableClassName="ElencoConfermeProdDataTable" msprop:Generator_TableVarName="tableElencoConfermeProd" msprop:Generator_RowChangedName="ElencoConfermeProdRowChanged" msprop:Generator_TablePropName="ElencoConfermeProd" msprop:Generator_RowDeletingName="ElencoConfermeProdRowDeleting" msprop:Generator_RowChangingName="ElencoConfermeProdRowChanging" msprop:Generator_RowEvHandlerName="ElencoConfermeProdRowChangeEventHandler" msprop:Generator_RowDeletedName="ElencoConfermeProdRowDeleted" msprop:Generator_RowClassName="ElencoConfermeProdRow" msprop:Generator_UserTableName="ElencoConfermeProd" msprop:Generator_RowEvArgName="ElencoConfermeProdRowChangeEvent">
<xs:complexType>
<xs:sequence>
<xs:element name="DataOraConf" msprop:Generator_ColumnVarNameInTable="columnDataOraConf" msprop:Generator_ColumnPropNameInRow="DataOraConf" msprop:Generator_ColumnPropNameInTable="DataOraConfColumn" msprop:Generator_UserColumnName="DataOraConf" type="xs:dateTime" />
@@ -3320,7 +3338,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="StatoProd" msprop:Generator_TableClassName="StatoProdDataTable" msprop:Generator_TableVarName="tableStatoProd" msprop:Generator_RowChangedName="StatoProdRowChanged" msprop:Generator_TablePropName="StatoProd" msprop:Generator_RowDeletingName="StatoProdRowDeleting" msprop:Generator_RowChangingName="StatoProdRowChanging" msprop:Generator_RowEvHandlerName="StatoProdRowChangeEventHandler" msprop:Generator_RowDeletedName="StatoProdRowDeleted" msprop:Generator_RowClassName="StatoProdRow" msprop:Generator_UserTableName="StatoProd" msprop:Generator_RowEvArgName="StatoProdRowChangeEvent">
<xs:element name="StatoProd" msprop:Generator_TableClassName="StatoProdDataTable" msprop:Generator_TableVarName="tableStatoProd" msprop:Generator_TablePropName="StatoProd" msprop:Generator_RowDeletingName="StatoProdRowDeleting" msprop:Generator_RowChangingName="StatoProdRowChanging" msprop:Generator_RowEvHandlerName="StatoProdRowChangeEventHandler" msprop:Generator_RowDeletedName="StatoProdRowDeleted" msprop:Generator_UserTableName="StatoProd" msprop:Generator_RowChangedName="StatoProdRowChanged" msprop:Generator_RowEvArgName="StatoProdRowChangeEvent" msprop:Generator_RowClassName="StatoProdRow">
<xs:complexType>
<xs:sequence>
<xs:element name="idxMacchina" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnidxMacchina" msprop:Generator_ColumnPropNameInRow="idxMacchina" msprop:Generator_ColumnPropNameInTable="idxMacchinaColumn" msprop:Generator_UserColumnName="idxMacchina" minOccurs="0">
@@ -3342,7 +3360,7 @@ SELECT IdxMacchina, IdxMacchinaSlave FROM Macchine2Slave WHERE (IdxMacchina = @I
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Macchine2Slave" msprop:Generator_TableClassName="Macchine2SlaveDataTable" msprop:Generator_TableVarName="tableMacchine2Slave" msprop:Generator_RowChangedName="Macchine2SlaveRowChanged" msprop:Generator_TablePropName="Macchine2Slave" msprop:Generator_RowDeletingName="Macchine2SlaveRowDeleting" msprop:Generator_RowChangingName="Macchine2SlaveRowChanging" msprop:Generator_RowEvHandlerName="Macchine2SlaveRowChangeEventHandler" msprop:Generator_RowDeletedName="Macchine2SlaveRowDeleted" msprop:Generator_RowClassName="Macchine2SlaveRow" msprop:Generator_UserTableName="Macchine2Slave" msprop:Generator_RowEvArgName="Macchine2SlaveRowChangeEvent">
<xs:element name="Macchine2Slave" msprop:Generator_TableClassName="Macchine2SlaveDataTable" msprop:Generator_TableVarName="tableMacchine2Slave" msprop:Generator_TablePropName="Macchine2Slave" msprop:Generator_RowDeletingName="Macchine2SlaveRowDeleting" msprop:Generator_RowChangingName="Macchine2SlaveRowChanging" msprop:Generator_RowEvHandlerName="Macchine2SlaveRowChangeEventHandler" msprop:Generator_RowDeletedName="Macchine2SlaveRowDeleted" msprop:Generator_UserTableName="Macchine2Slave" msprop:Generator_RowChangedName="Macchine2SlaveRowChanged" msprop:Generator_RowEvArgName="Macchine2SlaveRowChangeEvent" msprop:Generator_RowClassName="Macchine2SlaveRow">
<xs:complexType>
<xs:sequence>
<xs:element name="IdxMacchina" msprop:Generator_ColumnVarNameInTable="columnIdxMacchina" msprop:Generator_ColumnPropNameInRow="IdxMacchina" msprop:Generator_ColumnPropNameInTable="IdxMacchinaColumn" msprop:Generator_UserColumnName="IdxMacchina">
+1 -1
View File
@@ -4,7 +4,7 @@
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="-10" ViewPortY="29" 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="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:TempiCicloRilevati" ZOrder="15" X="20" Y="81" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:ODL" ZOrder="1" X="588" Y="452" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
+695 -612
View File
File diff suppressed because it is too large Load Diff
+156 -156
View File
@@ -975,6 +975,162 @@ namespace MapoDb
return answTab;
}
/// <summary>
/// Effettua split ODL
/// </summary>
/// <param name="idxMacchina">macchina</param>
/// <param name="doConfirm">effettuare conferma qty</param>
/// <param name="qtyFromLast">imposta la qty prox ODL da ODL che si chiude</param>
/// <param name="roundStep">STEP x cui arrotondare la quantità prox ODL (corrente come riferimento)</param>
/// <param name="keyRichiesta">Cod ext da associare all'ODL</param>
/// <returns></returns>
public string AutoStartOdl(string idxMacchina, bool doConfirm, bool qtyFromLast, int roundStep = 100, string keyRichiesta = "")
{
string answ = "KO";
// verifico NON CI SIA un veto a NUOVI split... 2 min di default...
string redKey = vetoSplitOdlMaccHash(idxMacchina);
string rawData = memLayer.ML.getRSV(redKey);
if (string.IsNullOrEmpty(rawData))
{
// registro VETO x altri split... 5 minuti
memLayer.ML.setRSV(redKey, $"Inizio SPLIT-ODL {DateTime.Now}", 300);
// calcolo la qta da gestire
int qtyConf = 0;
int qtyNew = 0;
if (doConfirm)
{
DS_ProdTempi.stp_PzProd_getByMacchinaRow rigaProd;
try
{
rigaProd = taPzProd2conf.GetData(idxMacchina)[0];
qtyConf = rigaProd.pezziNonConfermati;
// calcolo nuovi pezzi da confermare
if (qtyFromLast)
{
roundStep = roundStep == 0 ? 1 : roundStep;
double ratio = (double)qtyConf / roundStep;
qtyNew = (int)Math.Round(Math.Ceiling(ratio) * roundStep, 0);
}
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore recupero pezzi da confermare per la macchina {0}{1}{2}", idxMacchina, Environment.NewLine, exc), tipoLog.ERROR);
}
}
// proseguo
DS_ProdTempi.ODLDataTable currData = null;
DateTime adesso = DateTime.Now;
// chiamo metodo redis/db...
try
{
// recupero ODL corrente
currData = currODLRowTab(idxMacchina);
if (currData.Count > 0)
{
// registro un evento di inizio attrezzaggio (idxTipoEv = 2)
int idxEvento = 2;
logger.lg.scriviLog($"Invio evento ODL-SPLIT per macchina {idxMacchina}, evento {idxEvento}, articolo {currData[0].CodArticolo}, qty confermata {qtyConf}, nuova qty {qtyNew}", tipoLog.INFO);
inputComandoMapo resCmd = scriviRigaEventoBarcode(idxMacchina, idxEvento, currData[0].CodArticolo, "ODL-SPLIT", 0, "", adesso, adesso);
if (doConfirm)
{
// attendo 100 msec
Thread.Sleep(100);
adesso = DateTime.Now;
// chiamo conferma produzione...
try
{
string chiamata = confRett ? "confermaProdMacchinaFull" : "confermaProdMacchina";
logger.lg.scriviLog($"Chiamata a {chiamata} con parametri {currData[0].IdxMacchina} |{MatrOpr} | {DateTime.Now.AddDays(-10)} | {DateTime.Now} | {qtyConf} | 0 | 1 | {DateTime.Now} | false", tipoLog.INFO);
string idxMacchinaSel = currData[0].IdxMacchina;
bool fatto = false;
if (confRett)
{
// confermo al netto dei pezzi lasciati...
fatto = confermaProdMacchinaFull(idxMacchinaSel, memLayer.ML.CRI("modoConfProd"), qtyConf, 0, 0, adesso);
}
else
{
fatto = confermaProdMacchina(idxMacchinaSel, memLayer.ML.CRI("modoConfProd"), qtyConf, 0, adesso);
}
if (!fatto)
{
logger.lg.scriviLog($"ERRORE in chiamata {chiamata}", tipoLog.ERROR);
}
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in ConfermaProduzione{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
// attendo 100 msec
Thread.Sleep(100);
// chiamo splitOdl
MapoDbObj.taODL.autoStart(currData[0].IdxODL, 0, idxMacchina, currData[0].TCRichAttr, currData[0].PzPallet, $"Nuovo ODL da forceSplitOdl", true, qtyNew, keyRichiesta);
// elimino eventuale ODL precedente...
string rKey = memLayer.ML.redHash($"ODL:{idxMacchina}");
memLayer.ML.setRSV(rKey, "");
// ricalcola ODL macchina
var newOdl = currODL(idxMacchina, true);
// attendo 1000 msec
Thread.Sleep(1000);
adesso = DateTime.Now;
// registro fine ODL (idxTipoEv = 1)
idxEvento = 1;
logger.lg.scriviLog($"Invio evento FINE ODL-SPLIT per macchina {idxMacchina}, evento {idxEvento}, articolo {currData[0].CodArticolo}", tipoLog.INFO);
resCmd = scriviRigaEventoBarcode(idxMacchina, idxEvento, currData[0].CodArticolo, "ODL-START");
// invio eventi setup a macchina....
string setArtVal = $"{currData[0].CodArticolo}";
string setPzCommVal = $"{qtyNew}";
string setCommVal = $"ODL{newOdl}";
if (!string.IsNullOrEmpty(keyRichiesta))
{
setCommVal = $"{keyRichiesta} ODL{newOdl}";
}
try
{
// invio task caricamento dati ODL
addTask4Machine(idxMacchina, taskType.setArt, setArtVal);
addTask4Machine(idxMacchina, taskType.setPzComm, setPzCommVal);
addTask4Machine(idxMacchina, taskType.setComm, setCommVal);
}
catch
{ }
// chiamo refresh MSE
taMSE.forceRecalc(0, idxMacchina);
// resetto stato macchina...
memLayer.ML.redDelKey(currStatoMaccHash(idxMacchina));
answ = "OK";
logger.lg.scriviLog($"Effettuato reset e ricalcoli x split ODL per macchina {idxMacchina}", tipoLog.INFO);
// se è una master richiamo fix x child...
if (isMaster(idxMacchina))
{
taODL.fixMachineSlave(idxMacchina, 30, 1);
// ciclo su ogni slave la gestione reinvio pezzi -->calcolo gli slave...
var slaveList = taM2S.getByMaster(idxMacchina);
foreach (var machine in slaveList)
{
// invio task caricamento dati ODL
addTask4Machine(machine.IdxMacchinaSlave, taskType.setArt, setArtVal);
addTask4Machine(machine.IdxMacchinaSlave, taskType.setPzComm, setPzCommVal);
addTask4Machine(machine.IdxMacchinaSlave, taskType.setComm, setCommVal);
}
}
}
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in forceSplitOdl{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
else
{
logger.lg.scriviLog($"VETO ATTIVO | Richiesto forceSplitOdl per impianto {idxMacchina} | impossibile procedere");
}
return answ;
}
/// <summary>
/// controlla se da il segnale di "microstato" deriva un evento da generare - modalità OFFLINE
/// </summary>
@@ -1533,162 +1689,6 @@ namespace MapoDb
return fatto;
}
/// <summary>
/// Effettua split ODL
/// </summary>
/// <param name="idxMacchina">macchina</param>
/// <param name="doConfirm">effettuare conferma qty</param>
/// <param name="qtyFromLast">imposta la qty prox ODL da ODL che si chiude</param>
/// <param name="roundStep">STEP x cui arrotondare la quantità prox ODL (corrente come riferimento)</param>
/// <param name="keyRichiesta">Cod ext da associare all'ODL</param>
/// <returns></returns>
public string forceSplitOdl(string idxMacchina, bool doConfirm, bool qtyFromLast, int roundStep = 100, string keyRichiesta = "")
{
string answ = "KO";
// verifico NON CI SIA un veto a NUOVI split... 2 min di default...
string redKey = vetoSplitOdlMaccHash(idxMacchina);
string rawData = memLayer.ML.getRSV(redKey);
if (string.IsNullOrEmpty(rawData))
{
// registro VETO x altri split... 5 minuti
memLayer.ML.setRSV(redKey, $"Inizio SPLIT-ODL {DateTime.Now}", 300);
// calcolo la qta da gestire
int qtyConf = 0;
int qtyNew = 0;
if (doConfirm)
{
DS_ProdTempi.stp_PzProd_getByMacchinaRow rigaProd;
try
{
rigaProd = taPzProd2conf.GetData(idxMacchina)[0];
qtyConf = rigaProd.pezziNonConfermati;
// calcolo nuovi pezzi da confermare
if (qtyFromLast)
{
roundStep = roundStep == 0 ? 1 : roundStep;
double ratio = (double)qtyConf / roundStep;
qtyNew = (int)Math.Round(Math.Ceiling(ratio) * roundStep, 0);
}
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore recupero pezzi da confermare per la macchina {0}{1}{2}", idxMacchina, Environment.NewLine, exc), tipoLog.ERROR);
}
}
// proseguo
DS_ProdTempi.ODLDataTable currData = null;
DateTime adesso = DateTime.Now;
// chiamo metodo redis/db...
try
{
// recupero ODL corrente
currData = currODLRowTab(idxMacchina);
if (currData.Count > 0)
{
// registro un evento di inizio attrezzaggio (idxTipoEv = 2)
int idxEvento = 2;
logger.lg.scriviLog($"Invio evento ODL-SPLIT per macchina {idxMacchina}, evento {idxEvento}, articolo {currData[0].CodArticolo}, qty confermata {qtyConf}, nuova qty {qtyNew}", tipoLog.INFO);
inputComandoMapo resCmd = scriviRigaEventoBarcode(idxMacchina, idxEvento, currData[0].CodArticolo, "ODL-SPLIT", 0, "", adesso, adesso);
if (doConfirm)
{
// attendo 100 msec
Thread.Sleep(100);
adesso = DateTime.Now;
// chiamo conferma produzione...
try
{
string chiamata = confRett ? "confermaProdMacchinaFull" : "confermaProdMacchina";
logger.lg.scriviLog($"Chiamata a {chiamata} con parametri {currData[0].IdxMacchina} |{MatrOpr} | {DateTime.Now.AddDays(-10)} | {DateTime.Now} | {qtyConf} | 0 | 1 | {DateTime.Now} | false", tipoLog.INFO);
string idxMacchinaSel = currData[0].IdxMacchina;
bool fatto = false;
if (confRett)
{
// confermo al netto dei pezzi lasciati...
fatto = confermaProdMacchinaFull(idxMacchinaSel, memLayer.ML.CRI("modoConfProd"), qtyConf, 0, 0, adesso);
}
else
{
fatto = confermaProdMacchina(idxMacchinaSel, memLayer.ML.CRI("modoConfProd"), qtyConf, 0, adesso);
}
if (!fatto)
{
logger.lg.scriviLog($"ERRORE in chiamata {chiamata}", tipoLog.ERROR);
}
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in ConfermaProduzione{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
// attendo 100 msec
Thread.Sleep(100);
// chiamo splitOdl
MapoDbObj.taODL.splitODL(currData[0].IdxODL, 0, idxMacchina, currData[0].TCRichAttr, currData[0].PzPallet, $"Nuovo ODL da forceSplitOdl", true, qtyNew, keyRichiesta);
// elimino eventuale ODL precedente...
string rKey = memLayer.ML.redHash($"ODL:{idxMacchina}");
memLayer.ML.setRSV(rKey, "");
// ricalcola ODL macchina
var newOdl = currODL(idxMacchina, true);
// attendo 1000 msec
Thread.Sleep(1000);
adesso = DateTime.Now;
// registro fine ODL (idxTipoEv = 1)
idxEvento = 1;
logger.lg.scriviLog($"Invio evento FINE ODL-SPLIT per macchina {idxMacchina}, evento {idxEvento}, articolo {currData[0].CodArticolo}", tipoLog.INFO);
resCmd = scriviRigaEventoBarcode(idxMacchina, idxEvento, currData[0].CodArticolo, "ODL-START");
// invio eventi setup a macchina....
string setArtVal = $"{currData[0].CodArticolo}";
string setPzCommVal = $"{qtyNew}";
string setCommVal = $"ODL{newOdl}";
if (!string.IsNullOrEmpty(keyRichiesta))
{
setCommVal = $"{keyRichiesta} ODL{newOdl}";
}
try
{
// invio task caricamento dati ODL
addTask4Machine(idxMacchina, taskType.setArt, setArtVal);
addTask4Machine(idxMacchina, taskType.setPzComm, setPzCommVal);
addTask4Machine(idxMacchina, taskType.setComm, setCommVal);
}
catch
{ }
// chiamo refresh MSE
taMSE.forceRecalc(0, idxMacchina);
// resetto stato macchina...
memLayer.ML.redDelKey(currStatoMaccHash(idxMacchina));
answ = "OK";
logger.lg.scriviLog($"Effettuato reset e ricalcoli x split ODL per macchina {idxMacchina}", tipoLog.INFO);
// se è una master richiamo fix x child...
if (isMaster(idxMacchina))
{
taODL.fixMachineSlave(idxMacchina, 30, 1);
// ciclo su ogni slave la gestione reinvio pezzi -->calcolo gli slave...
var slaveList = taM2S.getByMaster(idxMacchina);
foreach (var machine in slaveList)
{
// invio task caricamento dati ODL
addTask4Machine(machine.IdxMacchinaSlave, taskType.setArt, setArtVal);
addTask4Machine(machine.IdxMacchinaSlave, taskType.setPzComm, setPzCommVal);
addTask4Machine(machine.IdxMacchinaSlave, taskType.setComm, setCommVal);
}
}
}
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in forceSplitOdl{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
else
{
logger.lg.scriviLog($"VETO ATTIVO | Richiesto forceSplitOdl per impianto {idxMacchina} | impossibile procedere");
}
return answ;
}
/// <summary>
/// GET elenco parametri correnti x IOB
/// </summary>