Merge branch 'develop'
This commit is contained in:
@@ -48,4 +48,7 @@ Projects/WebGIM/GIM_site/obj/*
|
||||
/Projects/WebGIM/GIM_data/obj/SomaschiniUSA/*
|
||||
!/Projects/WebGIM/GIM_data/obj/SomaschiniUSA/Package/*
|
||||
/Projects/WebGIM/GIM_data/obj/SomaschiniUSA/Package/PackageTmp/*
|
||||
/Projects/WebGIM/GIM_data/obj/*
|
||||
|
||||
|
||||
Projects/GimDB/GimDB.dbmdl
|
||||
@@ -0,0 +1,828 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<Name>GimDB</Name>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>4.1</ProjectVersion>
|
||||
<ProjectGuid>{a3141577-5116-4ffb-8c3e-557644ca98e0}</ProjectGuid>
|
||||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql110DatabaseSchemaProvider</DSP>
|
||||
<OutputType>Database</OutputType>
|
||||
<RootPath>
|
||||
</RootPath>
|
||||
<RootNamespace>GimDB</RootNamespace>
|
||||
<AssemblyName>GimDB</AssemblyName>
|
||||
<ModelCollation>1033,CI</ModelCollation>
|
||||
<DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
|
||||
<DeployToDatabase>True</DeployToDatabase>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetLanguage>CS</TargetLanguage>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<SqlServerVerification>False</SqlServerVerification>
|
||||
<IncludeCompositeObjects>True</IncludeCompositeObjects>
|
||||
<TargetDatabaseSet>True</TargetDatabaseSet>
|
||||
<DefaultCollation>Latin1_General_CI_AS</DefaultCollation>
|
||||
<AnsiNulls>False</AnsiNulls>
|
||||
<QuotedIdentifier>False</QuotedIdentifier>
|
||||
<Containment>None</Containment>
|
||||
<IsNestedTriggersOn>True</IsNestedTriggersOn>
|
||||
<IsTransformNoiseWordsOn>False</IsTransformNoiseWordsOn>
|
||||
<TwoDigitYearCutoff>2049</TwoDigitYearCutoff>
|
||||
<NonTransactedFileStreamAccess>OFF</NonTransactedFileStreamAccess>
|
||||
<TargetRecoveryTimePeriod>0</TargetRecoveryTimePeriod>
|
||||
<TargetRecoveryTimeUnit>SECONDS</TargetRecoveryTimeUnit>
|
||||
<IsChangeTrackingOn>False</IsChangeTrackingOn>
|
||||
<IsChangeTrackingAutoCleanupOn>True</IsChangeTrackingAutoCleanupOn>
|
||||
<ChangeTrackingRetentionPeriod>2</ChangeTrackingRetentionPeriod>
|
||||
<ChangeTrackingRetentionUnit>Days</ChangeTrackingRetentionUnit>
|
||||
<IsEncryptionOn>False</IsEncryptionOn>
|
||||
<IsBrokerPriorityHonored>False</IsBrokerPriorityHonored>
|
||||
<Trustworthy>False</Trustworthy>
|
||||
<AutoUpdateStatisticsAsynchronously>False</AutoUpdateStatisticsAsynchronously>
|
||||
<PageVerify>CHECKSUM</PageVerify>
|
||||
<ServiceBrokerOption>DisableBroker</ServiceBrokerOption>
|
||||
<DateCorrelationOptimizationOn>False</DateCorrelationOptimizationOn>
|
||||
<Parameterization>SIMPLE</Parameterization>
|
||||
<AllowSnapshotIsolation>False</AllowSnapshotIsolation>
|
||||
<ReadCommittedSnapshot>False</ReadCommittedSnapshot>
|
||||
<VardecimalStorageFormatOn>True</VardecimalStorageFormatOn>
|
||||
<SupplementalLoggingOn>False</SupplementalLoggingOn>
|
||||
<CompatibilityMode>90</CompatibilityMode>
|
||||
<AnsiNullDefault>False</AnsiNullDefault>
|
||||
<AnsiPadding>False</AnsiPadding>
|
||||
<AnsiWarnings>False</AnsiWarnings>
|
||||
<ArithAbort>False</ArithAbort>
|
||||
<ConcatNullYieldsNull>False</ConcatNullYieldsNull>
|
||||
<NumericRoundAbort>False</NumericRoundAbort>
|
||||
<RecursiveTriggersEnabled>False</RecursiveTriggersEnabled>
|
||||
<DatabaseChaining>False</DatabaseChaining>
|
||||
<DatabaseState>ONLINE</DatabaseState>
|
||||
<CloseCursorOnCommitEnabled>False</CloseCursorOnCommitEnabled>
|
||||
<DefaultCursor>GLOBAL</DefaultCursor>
|
||||
<AutoClose>False</AutoClose>
|
||||
<AutoCreateStatistics>True</AutoCreateStatistics>
|
||||
<AutoShrink>False</AutoShrink>
|
||||
<AutoUpdateStatistics>True</AutoUpdateStatistics>
|
||||
<TornPageDetection>False</TornPageDetection>
|
||||
<DatabaseAccess>MULTI_USER</DatabaseAccess>
|
||||
<Recovery>SIMPLE</Recovery>
|
||||
<EnableFullTextSearch>False</EnableFullTextSearch>
|
||||
<DefaultFilegroup>PRIMARY</DefaultFilegroup>
|
||||
<CreateProjectFromDatabaseCompleted>True</CreateProjectFromDatabaseCompleted>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
|
||||
<!-- Default to the v11.0 targets path if the targets file for the current VS version is not found -->
|
||||
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists>
|
||||
<VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'IIS01|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
|
||||
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties" />
|
||||
<Folder Include="dbo\" />
|
||||
<Folder Include="dbo\Tables\" />
|
||||
<Folder Include="dbo\Views\" />
|
||||
<Folder Include="dwh\" />
|
||||
<Folder Include="dwh\Views\" />
|
||||
<Folder Include="export\" />
|
||||
<Folder Include="export\Views\" />
|
||||
<Folder Include="Security\" />
|
||||
<Folder Include="dbo\Functions\" />
|
||||
<Folder Include="dbo\Stored Procedures\" />
|
||||
<Folder Include="voc\" />
|
||||
<Folder Include="voc\Stored Procedures\" />
|
||||
<Folder Include="som_ita\" />
|
||||
<Folder Include="som_ita\Tables\" />
|
||||
<Folder Include="import\" />
|
||||
<Folder Include="import\Stored Procedures\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Build Include="dbo\Tables\AnagTipoGuasto.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\InterventiMtz.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagFrequenze.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagLocazioni.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagItems.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\tmp_importaMacchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\CDC.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagEventi.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\FUNZIONE.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagStati.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\Lingue.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\Tra_Ev2Stati.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\MODULO.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\UTENTE.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\Vocabolario.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagPeriodi.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\DIRITTI.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\CalendFesteFerie.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagTipoRisorsa.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\FiltroImpianti.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\FiltroMacchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\FiltroStati.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagCausali.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagrOperMtz.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\InterventoOpMtz.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\Permessi.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\Permessi2Funzione.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\LogUpdateDb.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\ImpiegoRisorse.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagAmbitoGuasto.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagClasseTurno.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagImpianti.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagTurni.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagSemafori.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\OreAperturaSettTurni.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\OreChiusuraSett.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagPriorita.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\OreAperturaSett.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\ListValues.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagMacchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\Macchine2FamMacchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\MtzProgrammata.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagFamMacchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\MtzProgPending.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selFreq.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_reportSemestraleFix.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dwh\Views\VDWH_ElencoInterventi.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_mtzProgExp.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dwh\Views\VDWH_AnagStati.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dwh\Views\VDWH_DettaglioInterv_OLD.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dwh\Views\VDWH_IntervOperatori.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selStato.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_vocabolario.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selPeriodiTrad.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_interventiErogati.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_datiMTBFMTTR.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selUtentiAll.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selUtentiShort.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selUtentiShortAD.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selFam.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_mtzProgPendingExp.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selOperMtz.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selPrior.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selAmbiti.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selCausaliMacchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selTipoGuasto.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_intervExp.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selAnTipoRis.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selSemafori.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_risorseImpiegate.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="export\Views\v_allData.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dwh\Views\VDWH_ImpiegoRisorse.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selImpianti.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selMacchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_macchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selListVal.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_selFamMacc.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_elencoImpiantiMacchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_elencoIntervFilt.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Functions\f_fixCR.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Functions\f_padLeft.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Functions\rightDivision.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Functions\f_dateOnly.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Functions\f_diffOreLavorative.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_MtzProg_delete.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\spt_AD_delete.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_vscm_getByConditio.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_vscm_getByConditioAndCurr.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_vie_getByPeriodoSearch.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_updateIntervento.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_updateInterventoFull.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_elencoIntMTBF_MTTR.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\clonaDirittiUser.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\clonaDirittiUserModulo.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_insNewLemma.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="voc\Stored Procedures\stp_getByLingua.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="voc\Stored Procedures\stp_getByLinguaLemmaLike.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="voc\Stored Procedures\stp_insNewLemma.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="voc\Stored Procedures\stp_updateQuery.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="voc\Stored Procedures\stp_upsertLemma.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="voc\Stored Procedures\stp_voUpdateLemmiReport.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_ATR_insert.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_ATR_delete.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_ATR_update.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_caricaUpdateMAcchine.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_ImpRis_delete.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_ImpRis_update.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_ImpRis_insert.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_IndiciAndShrink.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_elencoIntByIntervDate.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_elencoIntByIntervDateUserFilt.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_elencoIntByIntervDateUserFilt_fermaPrev.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_elencoIntMTBF_MTTR_fermaPrev.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_insRichiesta.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_setPresaInCarico.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_ImpRis_getByNumMtz.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_procStatEv.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_elencoIntByIntervDateUserFiltExtended.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_oreEquivalenti.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_clonaImpianto.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_listValues_getValidValuesTrad.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_listValues_getValidValuesFilt.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_spostaMacchina.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_listValues_getValidValues.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\sp_clonaMacchina.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_listValues_getDistTable.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_MtzProg_duplica.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_listValues_getByTable.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_MtzProg_update.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_MtzProg_getByKey.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_MtzProg_insert.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="Security\dwh.sql" />
|
||||
<Build Include="Security\export.sql" />
|
||||
<Build Include="Security\voc.sql" />
|
||||
<Build Include="dbo\Tables\MovMagRic.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\MagRic.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="som_ita\Tables\tmp_ImportRic_A.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="som_ita\Tables\tmp_ImportRic_B.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="Security\som_ita.sql" />
|
||||
<Build Include="dbo\Views\v_StatoMag.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_movMagPend.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_StatoMag_update.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_StatoMag_insert.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_StatoMag_delete.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AnLoc_updateQuery.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AnLoc_insertQuery.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AnLoc_deleteQuery.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="Security\RoleMemberships.sql" />
|
||||
<Build Include="dbo\Tables\Tag2Macc.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\Tag2Item.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\SinonimiTag.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Tables\AnagTags.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Views\v_MovMagExpl.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_StatoMag_getByIdxMacchina.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_StatoMag_getByDescr.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_SinTag_UpdateQuery.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_MovMag_update.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_MovMag_insert.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_MovMag_getByNumInt.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_MovMag_delete.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AnTag_updateQuery.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AnTag_insertQuery.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AnTag_getByKey.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AnTag_deleteQuery.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AnTag_avail4Item.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AnItems_getByTag.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_AM_getByTag.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="Security\steamware.sql" />
|
||||
<Build Include="Security\import.sql" />
|
||||
<Build Include="import\Stored Procedures\stp_importMagRic_step3.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="import\Stored Procedures\stp_importMagRic_step2.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="import\Stored Procedures\stp_importMagRic_step1.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_VSM_avail4Tag.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_T2M_getByTag.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_T2M_deleteByTag.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_T2I_getByTag.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
<Build Include="dbo\Stored Procedures\stp_T2I_getByIdxItem.sql">
|
||||
<AnsiNulls>On</AnsiNulls>
|
||||
<QuotedIdentifier>On</QuotedIdentifier>
|
||||
</Build>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LiveDb2File.scmp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -0,0 +1,76 @@
|
||||
19/11/2015 12:06:15 This log contains information about the import schema operation into project 'GimDB' on computer 'W10-DESK-SAM' by user 'samuele'.
|
||||
19/11/2015 12:06:16 Import of database schema has started.
|
||||
19/11/2015 12:06:27 Gathering database options
|
||||
19/11/2015 12:06:27 Gathering users
|
||||
19/11/2015 12:06:27 Gathering roles
|
||||
19/11/2015 12:06:27 Gathering application roles
|
||||
19/11/2015 12:06:27 Gathering role memberships
|
||||
19/11/2015 12:06:27 Gathering filegroups
|
||||
19/11/2015 12:06:27 Gathering full-text catalogs
|
||||
19/11/2015 12:06:27 Gathering assemblies
|
||||
19/11/2015 12:06:27 Gathering certificates
|
||||
19/11/2015 12:06:27 Gathering asymmetric keys
|
||||
19/11/2015 12:06:27 Gathering symmetric keys
|
||||
19/11/2015 12:06:27 Gathering encrypted symmetric keys
|
||||
19/11/2015 12:06:27 Gathering schemas
|
||||
19/11/2015 12:06:27 Gathering XML schema collections
|
||||
19/11/2015 12:06:27 Gathering user-defined data types
|
||||
19/11/2015 12:06:27 Gathering user-defined types
|
||||
19/11/2015 12:06:27 Gathering table types
|
||||
19/11/2015 12:06:27 Gathering unique keys for table types
|
||||
19/11/2015 12:06:27 Gathering primary keys for table types
|
||||
19/11/2015 12:06:27 Gathering check constraints for table types
|
||||
19/11/2015 12:06:27 Gathering default constraints for table types
|
||||
19/11/2015 12:06:27 Gathering partition functions
|
||||
19/11/2015 12:06:27 Gathering partition schemes
|
||||
19/11/2015 12:06:27 Gathering functions
|
||||
19/11/2015 12:06:27 Gathering encrypted functions
|
||||
19/11/2015 12:06:27 Gathering aggregates
|
||||
19/11/2015 12:06:27 Gathering procedures
|
||||
19/11/2015 12:06:27 Gathering encrypted procedures
|
||||
19/11/2015 12:06:27 Gathering tables
|
||||
19/11/2015 12:06:27 Gathering primary keys
|
||||
19/11/2015 12:06:27 Gathering unique constraints
|
||||
19/11/2015 12:06:27 Gathering foreign keys
|
||||
19/11/2015 12:06:27 Gathering default constraints
|
||||
19/11/2015 12:06:27 Gathering check constraints
|
||||
19/11/2015 12:06:27 Gathering views
|
||||
19/11/2015 12:06:27 Gathering encrypted views
|
||||
19/11/2015 12:06:27 Gathering indexes
|
||||
19/11/2015 12:06:27 Gathering statistics
|
||||
19/11/2015 12:06:27 Gathering full-text index stoplists
|
||||
19/11/2015 12:06:27 Gathering search property lists
|
||||
19/11/2015 12:06:27 Gathering search properties
|
||||
19/11/2015 12:06:27 Gathering full-text indexes
|
||||
19/11/2015 12:06:27 Gathering column store indexes
|
||||
19/11/2015 12:06:27 Gathering spatial indexes
|
||||
19/11/2015 12:06:27 Gathering XML indexes
|
||||
19/11/2015 12:06:27 Gathering Selective XML indexes
|
||||
19/11/2015 12:06:27 Gathering encrypted triggers
|
||||
19/11/2015 12:06:27 Gathering triggers
|
||||
19/11/2015 12:06:27 Gathering encrypted and clr ddl triggers
|
||||
19/11/2015 12:06:27 Gathering ddl triggers
|
||||
19/11/2015 12:06:27 Gathering synonyms
|
||||
19/11/2015 12:06:27 Gathering defaults
|
||||
19/11/2015 12:06:27 Gathering data constraint uddt bindings
|
||||
19/11/2015 12:06:27 Gathering rules
|
||||
19/11/2015 12:06:27 Gathering data constraint uddt bindings
|
||||
19/11/2015 12:06:27 Gathering message types
|
||||
19/11/2015 12:06:27 Gathering queues
|
||||
19/11/2015 12:06:27 Gathering contracts
|
||||
19/11/2015 12:06:27 Gathering services
|
||||
19/11/2015 12:06:27 Gathering event notifications
|
||||
19/11/2015 12:06:27 Gathering remote service bindings
|
||||
19/11/2015 12:06:27 Gathering broker priorities
|
||||
19/11/2015 12:06:27 Gathering signatures
|
||||
19/11/2015 12:06:27 Gathering data compression options
|
||||
19/11/2015 12:06:27 Gathering sequence types
|
||||
19/11/2015 12:06:27 Gathering extended properties
|
||||
19/11/2015 12:06:27 Gathering credentials
|
||||
19/11/2015 12:06:27 Gathering logins
|
||||
19/11/2015 12:06:27 Gathering server audits
|
||||
19/11/2015 12:06:28 Scanning project for duplicate elements
|
||||
19/11/2015 12:06:29 Finished duplicate element processing
|
||||
19/11/2015 12:06:32 Finished importing database.
|
||||
19/11/2015 12:06:32 A summary of the import was saved to the following location: C:\Users\samuele.STEAMWAREWIN\Documents\Visual Studio 2015\Projects\WebGIM\Projects\GimDB\Import Schema Logs\GimDB_20151119110615.log
|
||||
19/11/2015 12:06:32 Click Finish to continue...
|
||||
@@ -0,0 +1,414 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SchemaComparison>
|
||||
<Version>10</Version>
|
||||
<SourceModelProvider>
|
||||
<ConnectionBasedModelProvider>
|
||||
<ConnectionString>Data Source=SQL-STEAM\SQL2012;Initial Catalog=GIM;Persist Security Info=True;User ID=sa;Pooling=False</ConnectionString>
|
||||
</ConnectionBasedModelProvider>
|
||||
</SourceModelProvider>
|
||||
<TargetModelProvider>
|
||||
<ProjectBasedModelProvider>
|
||||
<ProjectGuid>{a3141577-5116-4ffb-8c3e-557644ca98e0}</ProjectGuid>
|
||||
<Name>GimDB</Name>
|
||||
</ProjectBasedModelProvider>
|
||||
</TargetModelProvider>
|
||||
<SchemaCompareSettingsService>
|
||||
<SchemaCompareSettingsService>
|
||||
<PropertyElementName>
|
||||
<Name>Version</Name>
|
||||
<Value>1</Value>
|
||||
</PropertyElementName>
|
||||
</SchemaCompareSettingsService>
|
||||
<ConfigurationOptionsElement>
|
||||
<PropertyElementName>
|
||||
<Name>PlanGenerationType</Name>
|
||||
<Value>SqlDeploymentOptions</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>AllowExistingModelErrors</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>AllowIncompatiblePlatform</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>BackupDatabaseBeforeChanges</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>BlockOnPossibleDataLoss</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>BlockWhenDriftDetected</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>CompareUsingTargetCollation</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>CommentOutSetVarDeclarations</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>CreateNewDatabase</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DeployDatabaseInSingleUserMode</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DisableAndReenableDdlTriggers</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DoNotAlterChangeDataCaptureObjects</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DoNotAlterReplicatedObjects</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropConstraintsNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropDmlTriggersNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropExtendedPropertiesNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropIndexesNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropPermissionsNotInSource</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropObjectsNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropRoleMembersNotInSource</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>DropStatisticsNotInSource</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>GenerateSmartDefaults</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDdlTriggerOrder</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDdlTriggerState</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreObjectPlacementOnPartitionScheme</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreAuthorizer</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDefaultSchema</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreRouteLifetime</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreCryptographicProviderFilePath</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreComments</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreWhitespace</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreKeywordCasing</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreSemicolonBetweenStatements</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnorePartitionSchemes</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreWithNocheckOnCheckConstraints</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreWithNocheckOnForeignKeys</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreIdentitySeed</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreIncrement</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFillFactor</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreIndexPadding</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreColumnCollation</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreLockHintsOnIndexes</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreTableOptions</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreIndexOptions</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDmlTriggerOrder</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreDmlTriggerState</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreAnsiNulls</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreQuotedIdentifiers</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreUserSettingsObjects</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFilegroupPlacement</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFullTextCatalogFilePath</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFileAndLogFilePath</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreLoginSids</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreNotForReplication</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IgnoreFileSize</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IncludeCompositeObjects</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>IncludeTransactionalScripts</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>NoAlterStatementsToChangeCLRTypes</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>PopulateFilesOnFileGroups</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>RegisterDataTierApplication</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptDatabaseCollation</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptDatabaseCompatibility</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptDatabaseOptions</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptDeployStateChecks</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptFileSize</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptNewConstraintValidation</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>ScriptRefreshModule</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>TargetDatabaseName</Name>
|
||||
<Value>GimDB</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>TargetConnectionString</Name>
|
||||
<Value>Integrated Security=True;Pooling=False;Connect Timeout=30</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>TreatVerificationErrorsAsWarnings</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>UnmodifiableObjectWarnings</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>VerifyCollationCompatibility</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>VerifyDeployment</Name>
|
||||
<Value>True</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>RunDeploymentPlanExecutors</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>AllowDropBlockingAssemblies</Name>
|
||||
<Value>False</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDatabaseOptions</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlErrorMessage</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlLogin</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlServerRoleMembership</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlLinkedServer</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlLinkedServerLogin</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlFile</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlServerDdlTrigger</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlMasterKey</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlCredential</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlRoute</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlEventNotification</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlEndpoint</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDatabaseAuditSpecification</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlServerAudit</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlServerAuditSpecification</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlCryptographicProvider</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlDatabaseEncryptionKey</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlEventSession</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlUserDefinedServerRole</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
<PropertyElementName>
|
||||
<Name>Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlAssemblyFile</Name>
|
||||
<Value>ExcludedType</Value>
|
||||
</PropertyElementName>
|
||||
</ConfigurationOptionsElement>
|
||||
</SchemaCompareSettingsService>
|
||||
<SchemaCompareViewSettings>
|
||||
<GroupBy>2</GroupBy>
|
||||
<ZoomLevel>100</ZoomLevel>
|
||||
<Filter>Equals_Objects,Not_Supported_Deploy</Filter>
|
||||
</SchemaCompareViewSettings>
|
||||
</SchemaComparison>
|
||||
@@ -0,0 +1,6 @@
|
||||
ALTER ROLE [db_owner] ADD MEMBER [steamware];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
CREATE SCHEMA [dwh]
|
||||
AUTHORIZATION [dbo];
|
||||
|
||||
|
||||
GO
|
||||
EXECUTE sp_addextendedproperty @name = N'Description', @value = N'Schema x data wharehouse', @level0type = N'SCHEMA', @level0name = N'dwh';
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
CREATE SCHEMA [export]
|
||||
AUTHORIZATION [dbo];
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
CREATE SCHEMA [import]
|
||||
AUTHORIZATION [dbo];
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
CREATE SCHEMA [som_ita]
|
||||
AUTHORIZATION [dbo];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE USER [steamware];
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
CREATE SCHEMA [voc]
|
||||
AUTHORIZATION [dbo];
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
|
||||
/***********************************************************************************
|
||||
* FUNCTION f_dateOnly
|
||||
*
|
||||
* restituisce solo la parte data di un campo datetime (ovvero a mezzanotte...)
|
||||
*
|
||||
***********************************************************************************/
|
||||
create FUNCTION f_dateOnly
|
||||
(
|
||||
@dateIn DATETIME
|
||||
)
|
||||
RETURNS DATETIME
|
||||
AS
|
||||
BEGIN
|
||||
RETURN dateadd(dd, -datediff(dd, @dateIn, 1), 1)
|
||||
END
|
||||
@@ -0,0 +1,64 @@
|
||||
|
||||
/***********************************************************************************
|
||||
* FUNCTION f_diffOreLavorative
|
||||
*
|
||||
* calcola le effettive ore lavorative sottraendo chiusure x festività o aperture programmate
|
||||
*
|
||||
***********************************************************************************/
|
||||
create FUNCTION f_diffOreLavorative
|
||||
(
|
||||
@dataFrom DATETIME,
|
||||
@dataTo DATETIME,
|
||||
@idxMacchina INT -- per ora non lo considero poiché non ci sono calendari diversi x macchina...
|
||||
)
|
||||
RETURNS FLOAT
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- dichiarazioni variabili
|
||||
DECLARE @oreTot AS FLOAT
|
||||
DECLARE @oreOff AS FLOAT
|
||||
DECLARE @tmp_dates TABLE (DateValue DATETIME, h INT)
|
||||
SET @oreTot = 0
|
||||
|
||||
-- controllo date coerenti
|
||||
IF(@dataTo > @dataFrom)
|
||||
BEGIN
|
||||
-- calcolo totale "raw" delle ore
|
||||
SET @oreTot = CAST(ISNULL(DATEDIFF(minute, @dataFrom, @dataTo), 0) AS float) / 60;
|
||||
-- definisco tabella cte ricorsiva
|
||||
WITH mycte AS
|
||||
(
|
||||
SELECT CAST(dbo.f_dateOnly(DATEADD(dd,1,@dataFROM)) AS DATETIME) DateValue
|
||||
UNION ALL
|
||||
SELECT DateValue + 1
|
||||
FROM mycte
|
||||
WHERE DateValue + 1 < dbo.f_dateOnly(@dataTo)
|
||||
)
|
||||
-- carico nella tab temporanea i sabati e le domeniche...
|
||||
INSERT into @tmp_dates(DateValue, h)
|
||||
SELECT *, CASE ((DATEPART(dw, DateValue) + @@DATEFIRST) % 7) WHEN 0 THEN 16 ELSE 24 END AS h
|
||||
FROM mycte
|
||||
WHERE ((DATEPART(dw, DateValue) + @@DATEFIRST) % 7) IN (0,1)
|
||||
OPTION (MAXRECURSION 0)
|
||||
-- carico le festività per le date NON ancora presenti
|
||||
insert into @tmp_dates(DateValue, h)
|
||||
select data as DateValue, 24 as h--, descrizione
|
||||
from CalendFesteFerie
|
||||
where data between @dataFrom and @dataTo and data not in (select distinct DateValue from @tmp_dates)
|
||||
-- aggiorno sabati/domenica che fossero festivi (ipotesi che hfest > h sab/dom...
|
||||
UPDATE @tmp_dates
|
||||
SET h=24
|
||||
WHERE DateValue in (SELECT data FROM CalendFesteFerie WHERE data between @dataFrom and @dataTo)
|
||||
|
||||
-- calcolo INFINE le ore off!
|
||||
SET @oreOff = (SELECT ISNULL(SUM(h),0) FROM @tmp_dates)
|
||||
END
|
||||
-- setto le nuove ore totali... se ho un numero di ore > delle fermate le sottraggo per evitare ore engative...
|
||||
IF(@oreTot > @oreOff)
|
||||
BEGIN
|
||||
SET @oreTot = @oreTot - @oreOff
|
||||
END
|
||||
|
||||
RETURN @oreTot
|
||||
END
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
/***********************************************************************************
|
||||
* FUNCTION f_fixCR
|
||||
*
|
||||
* restituisce una stringa in cui ritorni/andate a capo sono sostituiti con "-"
|
||||
*
|
||||
***********************************************************************************/
|
||||
CREATE FUNCTION [dbo].[f_fixCR] (@string VARCHAR(MAX))
|
||||
RETURNS VARCHAR(MAX) AS
|
||||
BEGIN
|
||||
|
||||
RETURN REPLACE(REPLACE(REPLACE(@string, CHAR(13), '-'), CHAR(10), '-'), CHAR(9), '-')
|
||||
|
||||
END
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/***********************************************************************************
|
||||
* FUNCTION f_padLeft
|
||||
*
|
||||
* restituisce una stringa con padding del carattere desiderato per la lunghezza totale desiderata
|
||||
*
|
||||
***********************************************************************************/
|
||||
CREATE FUNCTION f_padLeft (@string VARCHAR(255), @desired_length INTEGER, @pad_character CHAR(1))
|
||||
RETURNS VARCHAR(255) AS
|
||||
BEGIN
|
||||
|
||||
-- Prefix the required number of spaces to bulk up the string and then replace the spaces with the desired character
|
||||
RETURN CASE
|
||||
WHEN LEN(@string) < @desired_length
|
||||
THEN REPLACE(SPACE(@desired_length - LEN(@string)), ' ', @pad_character) + @string
|
||||
ELSE @string
|
||||
END
|
||||
|
||||
END
|
||||
@@ -0,0 +1,29 @@
|
||||
/***********************************************************************************
|
||||
* FUNCTION rightDivision
|
||||
*
|
||||
* calcola la divisione altrimenti mostra errore -1 se dividendo/divisore < 0
|
||||
*
|
||||
***********************************************************************************/
|
||||
CREATE FUNCTION rightDivision
|
||||
(
|
||||
@dividendo float,
|
||||
@divisore float
|
||||
)
|
||||
RETURNS float
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
declare @errore as int
|
||||
declare @risultato as float
|
||||
|
||||
set @errore =0
|
||||
|
||||
set @errore = case when (isnull(@dividendo,0))<=0 then 1 end
|
||||
|
||||
set @errore = case when (isnull(@divisore,0)) <=0 then 1 end
|
||||
|
||||
set @risultato= case when (@errore=1) then -1 else @dividendo/@divisore end
|
||||
|
||||
RETURN @risultato
|
||||
|
||||
END
|
||||
@@ -0,0 +1,14 @@
|
||||
create PROCEDURE clonaDirittiUser
|
||||
(
|
||||
@userOrig varchar(20),
|
||||
@userDest varchar(20)
|
||||
)
|
||||
AS
|
||||
|
||||
INSERT INTO DIRITTI
|
||||
(USER_NAME, COD_CDC, COD_MODULO, COD_FUNZIONE)
|
||||
SELECT @userDest AS USER_NAME, COD_CDC, COD_MODULO, COD_FUNZIONE
|
||||
FROM DIRITTI AS DIRITTI_1
|
||||
WHERE (USER_NAME = @userOrig)
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,15 @@
|
||||
create PROCEDURE clonaDirittiUserModulo
|
||||
(
|
||||
@userOrig varchar(20),
|
||||
@userDest varchar(20),
|
||||
@codModulo varchar(31)
|
||||
)
|
||||
AS
|
||||
|
||||
INSERT INTO DIRITTI
|
||||
(USER_NAME, COD_CDC, COD_MODULO, COD_FUNZIONE)
|
||||
SELECT @userDest AS USER_NAME, COD_CDC, COD_MODULO, COD_FUNZIONE
|
||||
FROM DIRITTI AS DIRITTI_1
|
||||
WHERE (USER_NAME = @userOrig) AND (COD_MODULO=@codModulo)
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,48 @@
|
||||
-- =============================================
|
||||
-- Author: Marco Salvi
|
||||
-- Create date: 11/03/2009
|
||||
-- Description: Stored procedure per ricostruire gli indici e fare lo shrink su un db
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[sp_IndiciAndShrink]
|
||||
(
|
||||
@databaseName sysname
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
-- elimino eventuale tab temporanea preesistente
|
||||
IF (SELECT COUNT(*) FROM TEMPDB..SYSOBJECTS WHERE NAME = '##TMP_nomiTabelle') > 0
|
||||
BEGIN
|
||||
DROP TABLE ##TMP_nomiTabelle
|
||||
END
|
||||
|
||||
-- enumero le tab del db in una tab temporanea
|
||||
SELECT IDENT = IDENTITY (INT,1,1), name
|
||||
INTO ##TMP_nomiTabelle
|
||||
FROM sys.Tables
|
||||
|
||||
-- eseguo reindicizzazione
|
||||
DECLARE @VAR1 INT
|
||||
SET @VAR1 = 1
|
||||
WHILE @VAR1 < = ( SELECT COUNT(*) FROM ##TMP_nomiTabelle)
|
||||
BEGIN
|
||||
|
||||
DECLARE @OBJECTNAME VARCHAR(256)
|
||||
|
||||
-- carico il nome della tab i-esima
|
||||
SELECT @OBJECTNAME = name
|
||||
FROM ##TMP_nomiTabelle
|
||||
WHERE [IDENT] = @VAR1
|
||||
|
||||
-- rebuild indice
|
||||
DBCC DBREINDEX(@OBJECTNAME)
|
||||
|
||||
-- incremento
|
||||
SET @VAR1 = @VAR1 + 1
|
||||
|
||||
END
|
||||
|
||||
--shrink del db
|
||||
DBCC SHRINKDATABASE (@databaseName)
|
||||
|
||||
END
|
||||
@@ -0,0 +1,79 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_caricaUpdateMAcchine
|
||||
* carica impianti/macchien da tab temporanea
|
||||
*
|
||||
* modif.: S.E.L. - 2015.02.04
|
||||
**************************************/
|
||||
CREATE PROCEDURE sp_caricaUpdateMAcchine
|
||||
AS
|
||||
|
||||
SET XACT_ABORT ON;
|
||||
|
||||
DECLARE @Id AS INT = 0;
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
-- reset idx tabelle
|
||||
SELECT @Id = ISNULL(MAX(idxImpianto),0) FROM dbo.AnagImpianti
|
||||
DBCC CHECKIDENT ('AnagImpianti', RESEED, @Id);
|
||||
|
||||
SELECT @Id = ISNULL(MAX(idxMacchina),0) FROM dbo.AnagMacchine
|
||||
DBCC CHECKIDENT ('AnagMacchine', RESEED, @Id);
|
||||
|
||||
SELECT @Id = ISNULL(MAX(idxFamMacchine),0) FROM dbo.AnagFamMacchine
|
||||
DBCC CHECKIDENT ('AnagFamMacchine', RESEED, @Id);
|
||||
|
||||
-- cerco se ci sono nuovi impianti e lo carico
|
||||
INSERT INTO dbo.AnagImpianti(codImpianto, nomeImpianto, tipoImpianto, funzDal, funzAl)
|
||||
SELECT 'IT' + dbo.f_padLeft(ROW_NUMBER() OVER (ORDER BY reparto), 2,'0') as codImpianto,
|
||||
reparto as nomeImpianto,
|
||||
'Reparto' as tipoImpianto,
|
||||
CONVERT(DATETIME, '01-01-'+CAST(MIN(anno) AS NVARCHAR(4)), 110) as funzDal, '9999-12-31' as funzAl
|
||||
FROM tmp_importaMacchine tmp
|
||||
LEFT OUTER JOIN AnagImpianti ai ON tmp.reparto = ai.nomeImpianto
|
||||
WHERE ai.codImpianto IS NULL
|
||||
GROUP BY reparto
|
||||
|
||||
-- carico famiglie nuove e le carico
|
||||
INSERT INTO dbo.AnagFamMacchine
|
||||
SELECT DISTINCT Gruppo FROM dbo.tmp_importaMacchine AS i
|
||||
LEFT JOIN dbo.AnagFamMacchine AS f ON RTRIM(i.Gruppo) = RTRIM(f.nomeFamMacch)
|
||||
WHERE f.nomeFamMacch IS NULL
|
||||
|
||||
-- cerco se ci sono nuove macchine e le carico
|
||||
INSERT INTO dbo.AnagMacchine
|
||||
(codMacchina, nomeMacchina, modello, funzDal, idxImpianto, funzAl, kgPeso, kwConsumo, anno, matricola)
|
||||
SELECT ISNULL(i.idGest, N'--') AS codMacchina,
|
||||
ISNULL(i.denominazione, N'nd') AS nomeMacchina,
|
||||
ISNULL(i.costruttore, N'nd') AS modello,
|
||||
CAST(CAST(ISNULL(i.anno, 1900) AS varchar) + '-01-01 12:00:00' AS datetime) AS funzDal,
|
||||
AnagImpianti.idxImpianto,
|
||||
CAST('9999-12-31' AS datetime) AS fine,
|
||||
1 AS kg,
|
||||
1 AS kw,
|
||||
ISNULL(i.anno, 1900) AS anno,
|
||||
i.matricola
|
||||
FROM dbo.tmp_importaMacchine AS i
|
||||
INNER JOIN AnagImpianti ON i.reparto = AnagImpianti.nomeImpianto
|
||||
LEFT JOIN dbo.AnagMacchine AS am ON i.idGest = am.codMacchina
|
||||
WHERE am.codMacchina IS NULL -- solo nuove
|
||||
|
||||
-- carico Macchine2FamMacchine - solo x macchine nuove ( NON faccio update )
|
||||
INSERT INTO dbo.Macchine2FamMacchine
|
||||
SELECT m.idxMacchina, f.idxFamMacchine FROM dbo.AnagMacchine AS m
|
||||
INNER JOIN dbo.tmp_importaMacchine AS i ON m.codMacchina = i.idGest
|
||||
INNER JOIN dbo.AnagFamMacchine AS f ON i.Gruppo = f.nomeFamMacch
|
||||
LEFT JOIN dbo.Macchine2FamMacchine AS m2f ON m.idxMacchina = m2f.idxMacchina
|
||||
WHERE m2f.idxMacchina IS NULL
|
||||
|
||||
/* Test
|
||||
SELECT * FROM tmp_importaMacchine
|
||||
SELECT * FROM AnagFamMacchine
|
||||
SELECT * FROM AnagMacchine
|
||||
SELECT * FROM AnagImpianti
|
||||
SELECT * FROM dbo.Macchine2FamMacchine
|
||||
*/
|
||||
|
||||
COMMIT
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,23 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_clonaImpianto
|
||||
* Clona i dati dell'impianto indicato
|
||||
*
|
||||
* modif.: S.E.L. - 2009.01.14
|
||||
**************************************/
|
||||
CREATE PROCEDURE dbo.sp_clonaImpianto
|
||||
(
|
||||
@idxImpianto int
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN tran
|
||||
|
||||
INSERT INTO AnagImpianti
|
||||
(codImpianto, nomeImpianto, tipoImpianto, funzDal, funzAl)
|
||||
SELECT codImpianto + '-clone' AS Expr1, nomeImpianto + '-clone' AS Expr2, tipoImpianto, funzDal, funzAl
|
||||
FROM AnagImpianti AS AnagImpianti_1
|
||||
WHERE (idxImpianto = @idxImpianto)
|
||||
|
||||
COMMIT tran
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,23 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_clonaMacchina
|
||||
* Clona i dati della macchina indicata
|
||||
*
|
||||
* modif.: S.E.L. - 2009.01.14
|
||||
**************************************/
|
||||
CREATE PROCEDURE dbo.sp_clonaMacchina
|
||||
(
|
||||
@idxMacchina int
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN tran
|
||||
|
||||
INSERT INTO AnagMacchine
|
||||
(idxImpianto, codMacchina, nomeMacchina, modello, anno, kgPeso, kwConsumo, funzDal, funzAl)
|
||||
SELECT idxImpianto, codMacchina + '-clone' AS Expr1, nomeMacchina + '-clone' AS Expr2, modello, anno, kgPeso, kwConsumo, funzDal, funzAl
|
||||
FROM AnagMacchine AS AnagMacchine_1
|
||||
WHERE (idxMacchina = @idxMacchina)
|
||||
|
||||
COMMIT tran
|
||||
|
||||
RETURN
|
||||
+2
-20
@@ -1,12 +1,4 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_elencoIntMTBF_MTTR
|
||||
* Restituisce elenco degli interventi x fare il calcolo MTBF/MTTR FILTRANDO per:
|
||||
@@ -16,7 +8,7 @@ go
|
||||
*
|
||||
* modif.: S.E.L. - 2010.05.11
|
||||
**************************************/
|
||||
alter PROCEDURE sp_elencoIntMTBF_MTTR
|
||||
CREATE PROCEDURE sp_elencoIntMTBF_MTTR
|
||||
(
|
||||
@inizio DATETIME,
|
||||
@fine DATETIME,
|
||||
@@ -55,13 +47,3 @@ AS
|
||||
GROUP BY AnagImpianti.codImpianto, AnagMacchine.codMacchina, AnagImpianti.nomeImpianto, AnagMacchine.nomeMacchina
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(8, GETDATE())
|
||||
GO
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_insRichiesta
|
||||
* Inserisce nuova richiesta di intervento
|
||||
*
|
||||
* modif.: S.E.L. - 2009.02.20
|
||||
**************************************/
|
||||
CREATE PROCEDURE sp_insRichiesta
|
||||
(
|
||||
@richiesta datetime,
|
||||
@dataLav datetime,
|
||||
@turnoLav int,
|
||||
@matr varchar(10),
|
||||
@guasto datetime,
|
||||
@idxAmbito int,
|
||||
@idxPriorita int,
|
||||
@isFermo bit,
|
||||
@idxTipo int,
|
||||
@idxImpianto int,
|
||||
@idxMacchina int,
|
||||
@descrizione varchar(2500),
|
||||
@idxCausale int,
|
||||
@scheduled bit,
|
||||
@numIntMtz int output
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN tran
|
||||
|
||||
INSERT INTO InterventiMtz
|
||||
(richiesta, dataLav, turnoLav, matr, guasto, idxAmbito, idxPriorita, isFermo, idxTipo, idxImpianto, idxMacchina, descrizione, idxStato, idxCausale, scheduled)
|
||||
VALUES (@richiesta,@dataLav,@turnoLav,@matr,@guasto,@idxAmbito,@idxPriorita,@isFermo,@idxTipo,@idxImpianto,@idxMacchina,@descrizione,
|
||||
1,@idxCausale,@scheduled)
|
||||
|
||||
/*************************************
|
||||
* salvo idx del nuovo record
|
||||
**************************************/
|
||||
SET @numIntMtz = SCOPE_IDENTITY()
|
||||
|
||||
COMMIT tran
|
||||
|
||||
RETURN (@numIntMtz)
|
||||
@@ -0,0 +1,47 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_procStatEv
|
||||
* esegue la chiamata d processing x stati in base all'attuale stato ed all'evento associato
|
||||
*
|
||||
* modif.: S.E.L.
|
||||
* il: 2009.01.22
|
||||
**************************************/
|
||||
CREATE PROCEDURE sp_procStatEv
|
||||
(
|
||||
@numIntMtz INT,
|
||||
@idxEvento INT,
|
||||
@idxStatoNew INT OUTPUT
|
||||
)
|
||||
|
||||
AS
|
||||
-- chiamo la query di update, che cerca una riga nella tab transizioni x lo stato e l'evento richiesti e se li trova esegue update del ciclo...
|
||||
|
||||
DECLARE @currIdxStato AS INT
|
||||
DECLARE @procedere AS INT
|
||||
|
||||
BEGIN TRAN
|
||||
-- calcolo stato corrente del ciclo...
|
||||
SET @currIdxStato = ISNULL((SELECT idxStato
|
||||
FROM InterventiMtz
|
||||
WHERE (numIntMtz = @numIntMtz)),0)
|
||||
|
||||
-- cerco transizione da stato ed evento associati...
|
||||
SET @procedere = ISNULL((SELECT COUNT(*) FROM Tra_Ev2Stati WHERE idxEvento=@idxEvento AND idxStato=@currIdxStato),0)
|
||||
|
||||
-- se trovo eseguo transizione...
|
||||
IF(@procedere >0)
|
||||
BEGIN
|
||||
UPDATE InterventiMtz
|
||||
SET idxStato = Tra_Ev2Stati.nextIdxStato
|
||||
FROM InterventiMtz INNER JOIN
|
||||
Tra_Ev2Stati ON InterventiMtz.idxStato = Tra_Ev2Stati.idxStato
|
||||
WHERE (InterventiMtz.numIntMtz = @numIntMtz) AND (Tra_Ev2Stati.idxEvento = @idxEvento)
|
||||
END
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
-- calcolo lo stato nuovo...
|
||||
SET @idxStatoNew = ISNULL((SELECT idxStato
|
||||
FROM InterventiMtz
|
||||
WHERE (numIntMtz = @numIntMtz)),0)
|
||||
|
||||
RETURN (@idxStatoNew)
|
||||
@@ -0,0 +1,24 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_setPresaInCarico
|
||||
* indica la richiesta come presa in carico con data/ora attuale del server
|
||||
*
|
||||
* modif.: S.E.L. - 2009.01.22
|
||||
**************************************/
|
||||
CREATE PROCEDURE dbo.sp_setPresaInCarico
|
||||
(
|
||||
@numIntMtz INT,
|
||||
@idxStatoNew INT OUTPUT
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN tran
|
||||
-- inserisco data presa in carico
|
||||
UPDATE InterventiMtz
|
||||
SET presaInCarico = GETDATE()
|
||||
WHERE (numIntMtz = @numIntMtz)
|
||||
|
||||
-- aggiorno da machcian a stati...
|
||||
exec sp_procStatEv @numIntMtz, 1, @idxStatoNew
|
||||
COMMIT tran
|
||||
|
||||
RETURN (@idxStatoNew)
|
||||
@@ -0,0 +1,18 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_spostaMacchina
|
||||
* Sposta la macchina all'impianto indicato
|
||||
*
|
||||
* modif.: S.E.L. - 2009.01.14
|
||||
**************************************/
|
||||
CREATE PROCEDURE dbo.sp_spostaMacchina
|
||||
(
|
||||
@idxMacchina int,
|
||||
@idxImpiantoTo int
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE AnagMacchine
|
||||
SET idxImpianto = @idxImpiantoTo
|
||||
WHERE (idxMacchina = @idxMacchina)
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,22 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_updateIntervento
|
||||
* aggiorna i dati dell'intervento compilati dalla manutenzione
|
||||
*
|
||||
* modif.: S.E.L. - 2009.01.28
|
||||
**************************************/
|
||||
CREATE PROCEDURE dbo.sp_updateIntervento
|
||||
(
|
||||
@Original_numIntMtz INT,
|
||||
@idxStato INT,
|
||||
@inizioIntervento DATETIME,
|
||||
@fineIntervento DATETIME,
|
||||
@isPreventivabile BIT,
|
||||
@descrizioneIntervento NVARCHAR(2500)
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE InterventiMtz
|
||||
SET inizioIntervento = @inizioIntervento, fineIntervento = @fineIntervento, descrizioneIntervento = @descrizioneIntervento, isPreventivabile = @isPreventivabile, idxStato = @idxStato
|
||||
WHERE (numIntMtz = @Original_numIntMtz)
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,35 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE sp_updateInterventoFull
|
||||
* aggiorna TUTTI i dati dell'intervento
|
||||
*
|
||||
* modif.: S.E.L. - 2009.02.20
|
||||
**************************************/
|
||||
CREATE PROCEDURE sp_updateInterventoFull
|
||||
(
|
||||
@Original_numIntMtz INT,
|
||||
@idxStato INT,
|
||||
@inizioIntervento DATETIME,
|
||||
@fineIntervento DATETIME,
|
||||
@isPreventivabile BIT,
|
||||
@descrizioneIntervento NVARCHAR(2500),
|
||||
@matr NVARCHAR(50),
|
||||
@guasto DATETIME,
|
||||
@isFermo BIT,
|
||||
@idxImpianto INT,
|
||||
@idxMacchina INT,
|
||||
@idxAmbito INT,
|
||||
@idxPriorita INT,
|
||||
@descrizione NVARCHAR(2500),
|
||||
@idxTipo INT,
|
||||
@idxCausale int,
|
||||
@presaInCarico DATETIME
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE InterventiMtz
|
||||
SET inizioIntervento = @inizioIntervento, fineIntervento = @fineIntervento, descrizioneIntervento = @descrizioneIntervento, isPreventivabile = @isPreventivabile,
|
||||
idxStato = @idxStato, matr = @matr, guasto = @guasto, idxAmbito = @idxAmbito, idxPriorita = @idxPriorita, isFermo = @isFermo, idxTipo = @idxTipo,
|
||||
idxImpianto = @idxImpianto, idxMacchina = @idxMacchina, descrizione = @descrizione, presaInCarico = @presaInCarico, idxCausale = @idxCausale
|
||||
WHERE (numIntMtz = @Original_numIntMtz)
|
||||
|
||||
RETURN
|
||||
+2
-25
@@ -1,19 +1,10 @@
|
||||
set xact_abort on;
|
||||
go
|
||||
|
||||
begin transaction;
|
||||
go
|
||||
|
||||
set ANSI_NULLS on;
|
||||
go
|
||||
|
||||
/*************************************
|
||||
/*************************************
|
||||
* STORED PROCEDURE spt_AD_delete
|
||||
* elimina la macchina (da famiglia macchina e anagMacchina) SE non ah record associati
|
||||
*
|
||||
* modif.: S.E.L. - 2013.12.06
|
||||
**************************************/
|
||||
create PROCEDURE spt_AD_delete
|
||||
CREATE PROCEDURE spt_AD_delete
|
||||
(
|
||||
@Original_idxMacchina int
|
||||
)
|
||||
@@ -47,17 +38,3 @@ BEGIN tran
|
||||
COMMIT tran
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit;
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- registro versione...
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(227, GETDATE())
|
||||
GO
|
||||
SELECT * FROM LogUpdateDb ORDER BY versione DESC
|
||||
GO
|
||||
@@ -0,0 +1,21 @@
|
||||
-- =============================================
|
||||
-- Author: S.E.L.
|
||||
-- Create date: 2015.11.24
|
||||
-- Description: Recupero
|
||||
-- =============================================
|
||||
CREATE PROCEDURE stp_AM_getByTag
|
||||
(
|
||||
@TagCode NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN tran
|
||||
SET NOCOUNT ON;
|
||||
|
||||
-- Insert statements for procedure here
|
||||
SELECT am.*
|
||||
FROM AnagMacchine am
|
||||
INNER JOIN Tag2Macc t2m ON t2m.idxMacchina = am.idxMacchina
|
||||
WHERE t2m.TagCode=@TagCode
|
||||
|
||||
COMMIT tran
|
||||
@@ -0,0 +1,19 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_ATR_delete
|
||||
*
|
||||
* elimina record anagrafica tipo risorse
|
||||
*
|
||||
* mod : 17/03/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_ATR_delete
|
||||
(
|
||||
@Original_CodRisorsa NVARCHAR(10)
|
||||
)
|
||||
AS
|
||||
|
||||
DELETE
|
||||
FROM AnagTipoRisorsa
|
||||
WHERE CodRisorsa = @Original_CodRisorsa
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,22 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_ATR_insert
|
||||
*
|
||||
* crea record anagrafica tipo risorse
|
||||
*
|
||||
* mod : 17/03/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_ATR_insert
|
||||
(
|
||||
@CodRisorsa NVARCHAR(10),
|
||||
@UM NVARCHAR(10),
|
||||
@DescrRisorsa NVARCHAR(50),
|
||||
@Valuta NVARCHAR(5)
|
||||
)
|
||||
AS
|
||||
|
||||
INSERT INTO AnagTipoRisorsa (CodRisorsa, UM, DescrRisorsa, Valuta)
|
||||
VALUES (@CodRisorsa, @UM, @DescrRisorsa, @Valuta)
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,26 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_ATR_update
|
||||
*
|
||||
* aggiorna record anagrafica tipo risorse
|
||||
*
|
||||
* mod : 17/03/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_ATR_update
|
||||
(
|
||||
@Original_CodRisorsa NVARCHAR(10),
|
||||
@CodRisorsa NVARCHAR(10),
|
||||
@UM NVARCHAR(10),
|
||||
@DescrRisorsa NVARCHAR(50),
|
||||
@Valuta NVARCHAR(5)
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE AnagTipoRisorsa
|
||||
SET CodRisorsa = @CodRisorsa
|
||||
, UM = @UM
|
||||
, DescrRisorsa = @DescrRisorsa
|
||||
, Valuta = @Valuta
|
||||
WHERE CodRisorsa = @Original_CodRisorsa
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,20 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_AnItems_getByTag
|
||||
*
|
||||
* tag - items da tag
|
||||
*
|
||||
* mod : 24/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_AnItems_getByTag
|
||||
(
|
||||
@TagCode nvarchar(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SET NOCOUNT ON;
|
||||
|
||||
SELECT ai.*
|
||||
FROM AnagItems ai
|
||||
INNER JOIN Tag2Item t2i ON ai.idxItem=t2i.idxItem
|
||||
WHERE t2i.TagCode = @TagCode
|
||||
@@ -0,0 +1,7 @@
|
||||
CREATE PROCEDURE [dbo].stp_AnLoc_deleteQuery
|
||||
(
|
||||
@Original_CodLocazione nvarchar(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
DELETE FROM [dbo].[AnagLocazioni] WHERE (([CodLocazione] = @Original_CodLocazione))
|
||||
@@ -0,0 +1,16 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_AnLoc_insertQuery
|
||||
*
|
||||
* inserisce record
|
||||
*
|
||||
* mod : 19/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_AnLoc_insertQuery]
|
||||
(
|
||||
@CodLocazione nvarchar(50),
|
||||
@Descrizione nvarchar(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
INSERT INTO [dbo].[AnagLocazioni] ([CodLocazione], [Descrizione]) VALUES (@CodLocazione, @Descrizione)
|
||||
@@ -0,0 +1,17 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_AnLoc_updateQuery
|
||||
*
|
||||
* update record
|
||||
*
|
||||
* mod : 19/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_AnLoc_updateQuery]
|
||||
(
|
||||
@CodLocazione nvarchar(50),
|
||||
@Descrizione nvarchar(50),
|
||||
@Original_CodLocazione nvarchar(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
UPDATE [dbo].[AnagLocazioni] SET [CodLocazione] = @CodLocazione, [Descrizione] = @Descrizione WHERE (([CodLocazione] = @Original_CodLocazione))
|
||||
@@ -0,0 +1,25 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_AnTag_avail4Item
|
||||
*
|
||||
* elenco tags x item (non assegnati di già...)
|
||||
*
|
||||
* mod : 23/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_AnTag_avail4Item (
|
||||
@idxItem INT
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
BEGIN tran
|
||||
|
||||
SELECT at.*
|
||||
FROM AnagTags at
|
||||
WHERE TagCode NOT IN
|
||||
(
|
||||
SELECT TagCode
|
||||
FROM Tag2Item t2i
|
||||
WHERE t2i.idxItem = @idxItem
|
||||
)
|
||||
|
||||
COMMIT tran
|
||||
@@ -0,0 +1,39 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_AnTag_deleteQuery
|
||||
*
|
||||
* elimina record
|
||||
*
|
||||
* mod : 19/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_AnTag_deleteQuery]
|
||||
(
|
||||
@Original_TagCode nvarchar(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
|
||||
BEGIN tran
|
||||
|
||||
-- elimino connessione a item
|
||||
DELETE
|
||||
FROM Tag2Item
|
||||
WHERE TagCode = @Original_TagCode
|
||||
|
||||
-- elimino connessione a macchine
|
||||
DELETE
|
||||
FROM Tag2Macc
|
||||
WHERE TagCode = @Original_TagCode
|
||||
|
||||
-- elimino connessione sinonimi
|
||||
DELETE
|
||||
FROM SinonimiTag
|
||||
WHERE TagCode = @Original_TagCode
|
||||
OR TagCodeOrig = @Original_TagCode
|
||||
|
||||
-- elimino tag
|
||||
DELETE
|
||||
FROM AnagTags
|
||||
WHERE TagCode = @Original_TagCode
|
||||
|
||||
COMMIT tran
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_AnTag_getByKey
|
||||
*
|
||||
* recupero record da key
|
||||
*
|
||||
* mod : 26/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_AnTag_getByKey (
|
||||
@TagCode NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
|
||||
-- aggiorno VERO tag...
|
||||
SELECT *
|
||||
FROM AnagTags
|
||||
WHERE TagCode = @TagCode
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_AnTag_insertQuery
|
||||
*
|
||||
* inserisce record
|
||||
*
|
||||
* mod : 19/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_AnTag_insertQuery] (
|
||||
@TagCode NVARCHAR(50)
|
||||
,@Class NVARCHAR(50)
|
||||
,@TagDescr NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
|
||||
BEGIN tran
|
||||
-- inserisco etichette
|
||||
INSERT INTO AnagTags (TagCode,Class,TagDescr)
|
||||
VALUES (@TagCode,@Class,@TagDescr)
|
||||
|
||||
--inserisco sinonimo "loop" sul termine
|
||||
INSERT INTO SinonimiTag(TagCodeOrig, TagCode)
|
||||
VALUES (@TagCode, @TagCode)
|
||||
|
||||
COMMIT tran
|
||||
@@ -0,0 +1,45 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_AnTag_updateQuery
|
||||
*
|
||||
* update record
|
||||
*
|
||||
* mod : 19/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_AnTag_updateQuery] (
|
||||
@TagCode NVARCHAR(50)
|
||||
,@Class NVARCHAR(50)
|
||||
,@TagDescr NVARCHAR(50)
|
||||
,@Original_TagCode NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
BEGIN tran
|
||||
-- per sicurezza se nulli i valori li rendo vuoti...
|
||||
SELECT @TagCode = ISNULL(@TagCode, @Original_TagCode)
|
||||
SELECT @Class = ISNULL(@Class, '')
|
||||
SELECT @TagDescr = ISNULL(@TagDescr, '')
|
||||
|
||||
-- aggiorno "in cascata" la ricodifica dei tags SE modificato tag...
|
||||
IF(@TagCode <> @Original_TagCode)
|
||||
BEGIN
|
||||
-- aggiorno DESTINAZIONI
|
||||
UPDATE SinonimiTag
|
||||
SET TagCode = @TagCode
|
||||
WHERE TagCode = @Original_TagCode
|
||||
|
||||
-- aggiorno ORIGINI
|
||||
UPDATE SinonimiTag
|
||||
SET TagCodeOrig = @TagCode
|
||||
WHERE TagCodeOrig = @Original_TagCode
|
||||
END
|
||||
|
||||
-- aggiorno VERO tag...
|
||||
UPDATE AnagTags
|
||||
SET TagCode = @TagCode
|
||||
,Class = @Class
|
||||
,TagDescr = @TagDescr
|
||||
WHERE TagCode = @Original_TagCode
|
||||
|
||||
COMMIT tran
|
||||
@@ -0,0 +1,19 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_ImpRis_delete
|
||||
*
|
||||
* elimina record impiego risorse
|
||||
*
|
||||
* mod : 17/03/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
create PROCEDURE stp_ImpRis_delete
|
||||
(
|
||||
@Original_idxImpiego INT
|
||||
)
|
||||
AS
|
||||
|
||||
DELETE
|
||||
FROM ImpiegoRisorse
|
||||
WHERE idxImpiego = @Original_idxImpiego
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,23 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_ImpRis_getByNumMtz
|
||||
*
|
||||
* elenco record impiego risorse x intervento
|
||||
*
|
||||
* mod : 18/03/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
create PROCEDURE stp_ImpRis_getByNumMtz
|
||||
(
|
||||
@numIntMtz INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM ImpiegoRisorse
|
||||
WHERE numIntMtz = @numIntMtz
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_ImpRis_insert
|
||||
*
|
||||
* insert record impiego risorse
|
||||
*
|
||||
* mod : 17/03/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_ImpRis_insert
|
||||
(
|
||||
@CodRisorsa NVARCHAR(10)
|
||||
, @numIntMtz INT
|
||||
, @QtaRisorsa DECIMAL(18, 6)
|
||||
, @CostoUnit DECIMAL(18, 6)
|
||||
, @Note NVARCHAR(MAX)
|
||||
)
|
||||
AS
|
||||
|
||||
INSERT INTO ImpiegoRisorse(CodRisorsa, numIntMtz, QtaRisorsa, CostoUnit, Note)
|
||||
VALUES (@CodRisorsa, @numIntMtz, @QtaRisorsa, @CostoUnit, @Note)
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,28 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_ImpRis_update
|
||||
*
|
||||
* update record impiego risorse
|
||||
*
|
||||
* mod : 17/03/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_ImpRis_update
|
||||
(
|
||||
@Original_idxImpiego INT
|
||||
, @CodRisorsa NVARCHAR(10)
|
||||
, @numIntMtz INT
|
||||
, @QtaRisorsa DECIMAL(18, 6)
|
||||
, @CostoUnit DECIMAL(18, 6)
|
||||
, @Note NVARCHAR(MAX)
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE ImpiegoRisorse
|
||||
SET CodRisorsa = @CodRisorsa
|
||||
, numIntMtz = @numIntMtz
|
||||
, QtaRisorsa = @QtaRisorsa
|
||||
, CostoUnit = @CostoUnit
|
||||
, Note = @Note
|
||||
WHERE idxImpiego = @Original_idxImpiego
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,24 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_MovMag_update
|
||||
*
|
||||
* elimina record movimenti magazzino (SE non scaricato)
|
||||
*
|
||||
* mod : 27/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_MovMag_delete
|
||||
(
|
||||
@Original_idxItem INT = 0
|
||||
, @Original_numIntMtz INT
|
||||
, @Original_dtMov DATETIME
|
||||
)
|
||||
AS
|
||||
|
||||
DELETE
|
||||
FROM MovMagRic
|
||||
WHERE idxItem = @Original_idxItem
|
||||
AND numIntMtz = @Original_numIntMtz
|
||||
AND dtMov = @Original_dtMov
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,21 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_MovMag_getByNumInt
|
||||
*
|
||||
* update record movimenti magazzino
|
||||
*
|
||||
* mod : 27/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_MovMag_getByNumInt]
|
||||
(
|
||||
@numIntMtz INT
|
||||
)
|
||||
AS
|
||||
|
||||
-- cerco da intervento
|
||||
SELECT *
|
||||
FROM v_MovMagExpl vmm
|
||||
WHERE numIntMtz = @numIntMtz
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,29 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_MovMag_insert
|
||||
*
|
||||
* insert record movimenti magazzino
|
||||
*
|
||||
* mod : 27/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_MovMag_insert]
|
||||
(
|
||||
@idxItem INT = 0
|
||||
, @numIntMtz INT
|
||||
, @Qta INT
|
||||
)
|
||||
AS
|
||||
|
||||
BEGIN tran
|
||||
-- calcolo macchina...
|
||||
DECLARE @idxMacchina INT = 0
|
||||
|
||||
SELECT @idxMacchina = idxMacchina
|
||||
FROM InterventiMtz
|
||||
WHERE numIntMtz = @numIntMtz
|
||||
|
||||
INSERT INTO MovMagRic(idxItem,numIntMtz,dtMov,Qta,idxMacchina)
|
||||
VALUES(@idxItem,@numIntMtz,GETDATE(),@Qta,@idxMacchina)
|
||||
|
||||
COMMIT tran
|
||||
RETURN
|
||||
@@ -0,0 +1,25 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_MovMag_update
|
||||
*
|
||||
* update record movimenti magazzino
|
||||
*
|
||||
* mod : 27/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_MovMag_update]
|
||||
(
|
||||
@Original_idxItem INT = 0
|
||||
, @Original_numIntMtz INT
|
||||
, @Original_dtMov DATETIME
|
||||
, @Qta INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE MovMagRic
|
||||
SET Qta = ISNULL(@Qta,0)
|
||||
WHERE idxItem = @Original_idxItem
|
||||
AND numIntMtz = @Original_numIntMtz
|
||||
AND dtMov = @Original_dtMov
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,17 @@
|
||||
/*********************************************************************************
|
||||
* STORED stp_MtzProg_delete
|
||||
*
|
||||
* delete riga MtzProg
|
||||
*
|
||||
**********************************************************************************/
|
||||
create PROCEDURE dbo.stp_MtzProg_delete
|
||||
(
|
||||
@Original_idxIntPro INT
|
||||
)
|
||||
AS
|
||||
|
||||
DELETE
|
||||
FROM MtzProgrammata
|
||||
WHERE idxIntPro = @Original_idxIntPro
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,31 @@
|
||||
-- =============================================
|
||||
-- Author: S.E.Locatelli
|
||||
-- Create date: 2012-08-24
|
||||
-- Description: duplicazione interventi Mtz programmata tra macchine, con possibilità CANCELLAZIONE vecchi
|
||||
-- =============================================
|
||||
create PROCEDURE [dbo].[stp_MtzProg_duplica]
|
||||
(
|
||||
@idxMacchinaFrom INT = 0,
|
||||
@idxMacchinaTo INT = 0,
|
||||
@mantainOld BIT = 0
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
BEGIN tran
|
||||
|
||||
-- in primis cancello vecchi interventi programmati SE @mantainOld = 0
|
||||
IF (@mantainOld=0)
|
||||
BEGIN
|
||||
DELETE FROM MtzProgrammata WHERE idxMacchina = @idxMacchinaTo
|
||||
END
|
||||
|
||||
-- poi inserisco nuovi interventi
|
||||
INSERT INTO MtzProgrammata(idxMacchina, inizio, codFrequenza, cadenza, descrizione, idxPriorita, isFermo, idxTipo)
|
||||
SELECT @idxMacchinaTo AS idxMacchina, inizio, codFrequenza, cadenza, descrizione, idxPriorita, isFermo, idxTipo
|
||||
FROM MtzProgrammata
|
||||
WHERE idxMacchina = @idxMacchinaFrom
|
||||
|
||||
COMMIT tran
|
||||
END
|
||||
@@ -0,0 +1,17 @@
|
||||
/*********************************************************************************
|
||||
* STORED stp_MtzProg_getByKey
|
||||
*
|
||||
* restituisce riga MtzProg
|
||||
*
|
||||
**********************************************************************************/
|
||||
CREATE PROCEDURE dbo.stp_MtzProg_getByKey
|
||||
(
|
||||
@idxIntPro INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM MtzProgrammata
|
||||
WHERE idxIntPro = @idxIntPro
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,24 @@
|
||||
/*********************************************************************************
|
||||
* STORED stp_MtzProg_insert
|
||||
*
|
||||
* insert riga MtzProg
|
||||
*
|
||||
**********************************************************************************/
|
||||
create PROCEDURE dbo.stp_MtzProg_insert
|
||||
(
|
||||
@idxMacchina INT,
|
||||
@inizio DATETIME,
|
||||
@codFrequenza NCHAR(2),
|
||||
@cadenza INT,
|
||||
@descrizione NVARCHAR(2500),
|
||||
@idxPriorita INT,
|
||||
@isFermo BIT,
|
||||
@idxTipo INT
|
||||
)
|
||||
AS
|
||||
|
||||
INSERT INTO MtzProgrammata
|
||||
(idxMacchina, inizio, codFrequenza, cadenza, descrizione, idxPriorita, isFermo, idxTipo)
|
||||
VALUES (@idxMacchina,@inizio,@codFrequenza,@cadenza,@descrizione,@idxPriorita,@isFermo,@idxTipo)
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,30 @@
|
||||
/*********************************************************************************
|
||||
* STORED stp_MtzProg_update
|
||||
*
|
||||
* aggiorna riga MtzProg
|
||||
*
|
||||
**********************************************************************************/
|
||||
CREATE PROCEDURE dbo.stp_MtzProg_update
|
||||
(
|
||||
@idxIntPro INT,
|
||||
@inizio DATETIME,
|
||||
@codFrequenza NCHAR(2),
|
||||
@cadenza INT,
|
||||
@descrizione NVARCHAR(2500),
|
||||
@idxPriorita INT,
|
||||
@isFermo BIT,
|
||||
@idxTipo INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE MtzProgrammata
|
||||
SET inizio = @inizio,
|
||||
codFrequenza= @codFrequenza,
|
||||
cadenza = @cadenza,
|
||||
descrizione = @descrizione,
|
||||
idxPriorita = @idxPriorita,
|
||||
isFermo = @isFermo,
|
||||
idxTipo = @idxTipo
|
||||
WHERE idxIntPro = @idxIntPro
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,49 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_SinTag_UpdateQuery
|
||||
*
|
||||
* update recordmerge come sinonimo del TagCordOrig (che sparisce) verso TagCode
|
||||
*
|
||||
* - ricodifica associazione verso item
|
||||
* - ricodifica associazione verso macchine
|
||||
* - crea record in tab sinonimi
|
||||
* - elimina record in tab item
|
||||
*
|
||||
* mod : 23/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_SinTag_UpdateQuery]
|
||||
(
|
||||
@Original_TagCodeOrig nvarchar(50),
|
||||
@TagCode nvarchar(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
|
||||
|
||||
|
||||
BEGIN tran
|
||||
|
||||
-- step 1: ricodifica associazione verso ITEMS
|
||||
UPDATE Tag2Item
|
||||
SET TagCode = @TagCode
|
||||
WHERE TagCode = @Original_TagCodeOrig
|
||||
|
||||
|
||||
-- step 2: ricodifica associazione verso MACCHINE
|
||||
UPDATE Tag2Macc
|
||||
SET TagCode = @TagCode
|
||||
WHERE TagCode = @Original_TagCodeOrig
|
||||
-- step 3: creo record sinonimi (FARE CON MERGE?!?)
|
||||
UPDATE SinonimiTag
|
||||
SET TagCode = @TagCode
|
||||
WHERE ((TagCodeOrig = @Original_TagCodeOrig)) OR ((TagCode = @Original_TagCodeOrig))
|
||||
|
||||
--INSERT INTO SinonimiTag (TagCodeOrig, TagCode)
|
||||
--VALUES (@Original_TagCodeOrig, @TagCode)
|
||||
|
||||
-- step 4: elimino ITEMS
|
||||
DELETE
|
||||
FROM AnagTags
|
||||
WHERE TagCode = @Original_TagCodeOrig
|
||||
|
||||
COMMIT Tran
|
||||
@@ -0,0 +1,26 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_StatoMag_delete
|
||||
*
|
||||
* elimina record magazzino (item + giacenza...)
|
||||
*
|
||||
* mod : 19/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_StatoMag_delete
|
||||
(
|
||||
@Original_idxItem INT = 0
|
||||
)
|
||||
AS
|
||||
|
||||
|
||||
BEGIN tran
|
||||
|
||||
DELETE FROM MagRic
|
||||
WHERE idxItem = @Original_idxItem
|
||||
|
||||
DELETE FROM AnagItems
|
||||
WHERE idxItem = @Original_idxItem
|
||||
|
||||
COMMIT tran
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,20 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_StatoMag_getByDescr
|
||||
*
|
||||
* recupera record data descrizione
|
||||
*
|
||||
* mod : 19/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_StatoMag_getByDescr]
|
||||
(
|
||||
@Descrizione NVARCHAR(250)
|
||||
)
|
||||
AS
|
||||
|
||||
-- cerco da descrizione
|
||||
SELECT *
|
||||
FROM v_StatoMag
|
||||
WHERE Descrizione = @Descrizione
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,23 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_StatoMag_getByIdxMacchina
|
||||
*
|
||||
* recupera record items assegnati alla macchina
|
||||
*
|
||||
* mod : 27/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_StatoMag_getByIdxMacchina
|
||||
(
|
||||
@idxMacchina INT
|
||||
)
|
||||
AS
|
||||
|
||||
-- cerco da idxMacchina -> etichette -> items
|
||||
SELECT vsm.*
|
||||
FROM Tag2Item t2i
|
||||
INNER JOIN Tag2Macc t2m ON t2i.TagCode = t2m.TagCode
|
||||
INNER JOIN v_statoMag vsm ON vsm.idxItem = t2i.idxItem
|
||||
WHERE t2m.idxMacchina = @idxMacchina
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,41 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_StatoMag_insert
|
||||
*
|
||||
* insert record magazzino (inserisce item + giacenza in mag...)
|
||||
*
|
||||
* mod : 19/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_StatoMag_insert]
|
||||
(
|
||||
@Descrizione NVARCHAR(250)
|
||||
, @NomeCostruttore NVARCHAR(250)
|
||||
, @CodCostruttore NVARCHAR(250)
|
||||
, @CodInterno NVARCHAR(50)
|
||||
, @QtaMin INT
|
||||
, @QtaLotto INT
|
||||
, @Valore DECIMAL(18, 6)
|
||||
, @Giacenza INT
|
||||
, @CodLocazione NVARCHAR(50)
|
||||
, @Note NVARCHAR(MAX)
|
||||
)
|
||||
AS
|
||||
|
||||
|
||||
BEGIN tran
|
||||
|
||||
DECLARE @idxItem INT = 0
|
||||
-- creo nuovo ITEM
|
||||
INSERT INTO dbo.AnagItems (Descrizione, NomeCostruttore, CodCostruttore, CodInterno, QtaMin, QtaLotto, Valore)
|
||||
VALUES (@Descrizione, @NomeCostruttore, @CodCostruttore, @CodInterno, @QtaMin, @QtaLotto, @Valore)
|
||||
|
||||
-- recupero IDX
|
||||
SELECT @idxItem = SCOPE_IDENTITY()
|
||||
|
||||
-- creo record giacenza
|
||||
INSERT INTO MagRic (idxItem,CodLocazione,Giacenza,Note,dtLastUpd)
|
||||
VALUES (@idxItem, @CodLocazione, @Giacenza, @Note, GETDATE())
|
||||
|
||||
COMMIT tran
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,53 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_StatoMag_update
|
||||
*
|
||||
* update record magazzino (item + giacenza...)
|
||||
*
|
||||
* mod : 19/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_StatoMag_update]
|
||||
(
|
||||
@Original_idxItem INT = 0
|
||||
, @Famiglia NVARCHAR(250)
|
||||
, @Descrizione NVARCHAR(250)
|
||||
, @NomeCostruttore NVARCHAR(250)
|
||||
, @CodCostruttore NVARCHAR(250)
|
||||
, @CodInterno NVARCHAR(50)
|
||||
, @QtaMin INT
|
||||
, @QtaLotto INT
|
||||
, @Valore DECIMAL(18, 6)
|
||||
, @CodLocazione NVARCHAR(50)
|
||||
, @Note NVARCHAR(MAX)
|
||||
)
|
||||
AS
|
||||
|
||||
|
||||
BEGIN tran
|
||||
|
||||
|
||||
-- update ITEM
|
||||
UPDATE AnagItems
|
||||
SET Famiglia = ISNULL(@Famiglia,'')
|
||||
,Descrizione = ISNULL(@Descrizione,'')
|
||||
,NomeCostruttore = ISNULL(@NomeCostruttore,'')
|
||||
,CodCostruttore = ISNULL(@CodCostruttore,'')
|
||||
,CodInterno = ISNULL(@CodInterno,'')
|
||||
,QtaMin = ISNULL(@QtaMin,'')
|
||||
,QtaLotto = ISNULL(@QtaLotto,'')
|
||||
,Valore = ISNULL(@Valore,'')
|
||||
WHERE idxItem = @Original_idxItem
|
||||
|
||||
INSERT INTO dbo.AnagItems (Descrizione, NomeCostruttore, CodCostruttore, CodInterno, QtaMin, QtaLotto, Valore)
|
||||
VALUES (@Descrizione, @NomeCostruttore, @CodCostruttore, @CodInterno, @QtaMin, @QtaLotto, @Valore)
|
||||
|
||||
-- update record giacenza
|
||||
UPDATE dbo.MagRic
|
||||
SET CodLocazione = ISNULL(@CodLocazione,'')
|
||||
,Note = ISNULL(@Note,'')
|
||||
,dtLastUpd = GETDATE()
|
||||
WHERE idxItem = @Original_idxItem
|
||||
|
||||
COMMIT tran
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_T2I_getByIdxItem
|
||||
*
|
||||
* tag da items
|
||||
*
|
||||
* mod : 24/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_T2I_getByIdxItem
|
||||
(
|
||||
@idxItem INT
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON;
|
||||
SELECT idxItem, TagCode FROM dbo.Tag2Item
|
||||
WHERE idxItem=@idxItem
|
||||
@@ -0,0 +1,16 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_T2I_getByTag
|
||||
*
|
||||
* tag - items da tag
|
||||
*
|
||||
* mod : 24/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_T2I_getByTag
|
||||
(
|
||||
@TagCode nvarchar(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON;
|
||||
SELECT idxItem, TagCode FROM dbo.Tag2Item
|
||||
WHERE TagCode=@TagCode
|
||||
@@ -0,0 +1,19 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_T2M_deleteByTag
|
||||
*
|
||||
* elimina record macchine2tags
|
||||
*
|
||||
* mod : 24/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_T2M_deleteByTag
|
||||
(
|
||||
@Original_TagCode NVARCHAR(50)
|
||||
,@Original_idxMacchina INT
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON;
|
||||
DELETE
|
||||
FROM Tag2Macc
|
||||
WHERE TagCode = @Original_TagCode
|
||||
AND idxMacchina = @Original_idxMacchina
|
||||
@@ -0,0 +1,16 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_T2I_getByIdxItem
|
||||
*
|
||||
* tag macchine da tags
|
||||
*
|
||||
* mod : 24/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_T2M_getByTag
|
||||
(
|
||||
@TagCode nvarchar(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON;
|
||||
SELECT TagCode, idxMacchina FROM dbo.Tag2Macc
|
||||
WHERE TagCode=@TagCode
|
||||
@@ -0,0 +1,26 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_VSM_avail4Tag
|
||||
*
|
||||
* elenco macchine associabili x TAG (non assegnate di già...)
|
||||
*
|
||||
* mod : 24/11/2015
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_VSM_avail4Tag
|
||||
(
|
||||
@TagCode nvarchar(50)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT OFF;
|
||||
BEGIN tran
|
||||
|
||||
SELECT am.*
|
||||
FROM v_selMacchine am
|
||||
WHERE value NOT IN
|
||||
(
|
||||
SELECT idxMacchina
|
||||
FROM Tag2Macc t2m
|
||||
WHERE t2m.TagCode = @TagCode
|
||||
)
|
||||
|
||||
COMMIT tran
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_elencoIntByIntervDate
|
||||
* Recupera elenco interventi a partire dalle date inizio/fine di ricerca
|
||||
*
|
||||
* modif.: S.E.L. - 2010.01.25
|
||||
**************************************/
|
||||
create PROCEDURE stp_elencoIntByIntervDate
|
||||
(
|
||||
@inizio DATETIME,
|
||||
@fine DATETIME
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT codImpianto, codMacchina, descrCausale, descrizione, descrizioneIntervento, durataMtz, durataOff, fineIntervento, guasto, idxImpianto, idxMacchina, idxStato,
|
||||
inizioIntervento, minErogati, nomeImpianto, nomeMacchina, numIntMtz, richiesta, isFermo, scheduled
|
||||
FROM v_elencoIntervFilt
|
||||
WHERE (richiesta BETWEEN @inizio AND @fine)
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_elencoIntByIntervDateUserFilt
|
||||
* Recupera elenco interventi a partire dalle date inizio/fine di ricerca e dall'username ed i relativi filtri di ricerca salvati
|
||||
*
|
||||
* modif.: S.E.L. - 2010.01.25
|
||||
**************************************/
|
||||
create PROCEDURE stp_elencoIntByIntervDateUserFilt
|
||||
(
|
||||
@inizio DATETIME,
|
||||
@fine DATETIME,
|
||||
@username VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT v_elencoIntervFilt.codImpianto, v_elencoIntervFilt.codMacchina, v_elencoIntervFilt.descrCausale, v_elencoIntervFilt.descrizione,
|
||||
v_elencoIntervFilt.descrizioneIntervento, v_elencoIntervFilt.durataMtz, v_elencoIntervFilt.durataOff, v_elencoIntervFilt.fineIntervento, v_elencoIntervFilt.guasto,
|
||||
v_elencoIntervFilt.idxImpianto, v_elencoIntervFilt.idxMacchina, v_elencoIntervFilt.idxStato, v_elencoIntervFilt.inizioIntervento, v_elencoIntervFilt.minErogati,
|
||||
v_elencoIntervFilt.nomeImpianto, v_elencoIntervFilt.nomeMacchina, v_elencoIntervFilt.numIntMtz, v_elencoIntervFilt.richiesta, v_elencoIntervFilt.isFermo,
|
||||
v_elencoIntervFilt.scheduled
|
||||
FROM v_elencoIntervFilt INNER JOIN
|
||||
FiltroImpianti ON v_elencoIntervFilt.idxImpianto = FiltroImpianti.idxImpianto INNER JOIN
|
||||
FiltroMacchine ON v_elencoIntervFilt.idxMacchina = FiltroMacchine.idxMacchina INNER JOIN
|
||||
FiltroStati ON v_elencoIntervFilt.idxStato = FiltroStati.idxStato
|
||||
WHERE (v_elencoIntervFilt.richiesta BETWEEN @inizio AND @fine) AND (FiltroStati.username = @username) AND (FiltroMacchine.username = @username) AND
|
||||
(FiltroImpianti.username = @username)
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_elencoIntByIntervDateUserFiltExtended
|
||||
* Recupera elenco interventi a partire dalle date inizio/fine di ricerca e dall'username ed i relativi filtri di ricerca salvati
|
||||
*
|
||||
* Versione estesa x stampa con Totale Importo Materiali e Ore Operatori Esterni
|
||||
* NOTE : Le Ore Operatori Esterni sono TUTTE quelle con UM = MIN ( minuti )
|
||||
*
|
||||
* Steamware
|
||||
* modif. 2015.10.29
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_elencoIntByIntervDateUserFiltExtended]
|
||||
(
|
||||
@inizio DATETIME
|
||||
,@fine DATETIME
|
||||
,@username VARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT
|
||||
IntervFilt.codImpianto
|
||||
,IntervFilt.codMacchina
|
||||
,IntervFilt.descrCausale
|
||||
,IntervFilt.descrizione
|
||||
,IntervFilt.descrizioneIntervento
|
||||
,IntervFilt.durataMtz
|
||||
,IntervFilt.durataOff
|
||||
,IntervFilt.fineIntervento
|
||||
,IntervFilt.guasto
|
||||
,IntervFilt.idxImpianto
|
||||
,IntervFilt.idxMacchina
|
||||
,IntervFilt.idxStato
|
||||
,IntervFilt.inizioIntervento
|
||||
,IntervFilt.minErogati
|
||||
,IntervFilt.nomeImpianto
|
||||
,IntervFilt.nomeMacchina
|
||||
,IntervFilt.numIntMtz
|
||||
,IntervFilt.richiesta
|
||||
,IntervFilt.isFermo
|
||||
,IntervFilt.scheduled
|
||||
-- estraggo TOTALE importo della Risorsa MAT ( Materiali )
|
||||
,( SELECT ISNULL(SUM(TotImport),0) FROM dbo.ImpiegoRisorse AS RisMAT
|
||||
WHERE CodRisorsa = 'MAT' AND RisMAT.numIntMtz = IntervFilt.numIntMtz ) AS totImpMat
|
||||
|
||||
-- estraggo TOTALE Quantità della ORE operatori Esterni - presupposto che tutte causali con UM = ORE siano di opearori esterni
|
||||
,( SELECT ISNULL(SUM(QtaRisorsa),0) FROM dbo.ImpiegoRisorse AS RisMAT
|
||||
INNER JOIN dbo.AnagTipoRisorsa AS AnagRis
|
||||
ON RisMAT.CodRisorsa = AnagRis.CodRisorsa
|
||||
WHERE AnagRis.UM = 'MIN' AND RisMAT.numIntMtz = IntervFilt.numIntMtz ) / 60 AS totQtaHR
|
||||
|
||||
FROM v_elencoIntervFilt AS IntervFilt
|
||||
INNER JOIN FiltroImpianti
|
||||
ON IntervFilt.idxImpianto = FiltroImpianti.idxImpianto
|
||||
INNER JOIN FiltroMacchine
|
||||
ON IntervFilt.idxMacchina = FiltroMacchine.idxMacchina
|
||||
INNER JOIN FiltroStati
|
||||
ON IntervFilt.idxStato = FiltroStati.idxStato
|
||||
|
||||
WHERE (IntervFilt.richiesta BETWEEN @inizio AND @fine)
|
||||
AND (FiltroStati.username = @username)
|
||||
AND (FiltroMacchine.username = @username)
|
||||
AND (FiltroImpianti.username = @username)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_elencoIntByIntervDateUserFilt
|
||||
* Recupera elenco interventi a partire dalle date inizio/fine di ricerca e dall'username ed i relativi filtri di ricerca salvati
|
||||
* e con rispetto filtro x int a macchian ferma o di mtz preventiva
|
||||
*
|
||||
* modif.: S.E.L. - 2010.01.25
|
||||
**************************************/
|
||||
create PROCEDURE stp_elencoIntByIntervDateUserFilt_fermaPrev
|
||||
(
|
||||
@inizio DATETIME,
|
||||
@fine DATETIME,
|
||||
@username VARCHAR(50),
|
||||
@soloMaccFerma BIT,
|
||||
@includiPreventiva BIT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT v_elencoIntervFilt.codImpianto, v_elencoIntervFilt.codMacchina, v_elencoIntervFilt.descrCausale, v_elencoIntervFilt.descrizione,
|
||||
v_elencoIntervFilt.descrizioneIntervento, v_elencoIntervFilt.durataMtz, v_elencoIntervFilt.durataOff, v_elencoIntervFilt.fineIntervento,
|
||||
v_elencoIntervFilt.guasto, v_elencoIntervFilt.idxImpianto, v_elencoIntervFilt.idxMacchina, v_elencoIntervFilt.idxStato,
|
||||
v_elencoIntervFilt.inizioIntervento, v_elencoIntervFilt.minErogati, v_elencoIntervFilt.nomeImpianto, v_elencoIntervFilt.nomeMacchina,
|
||||
v_elencoIntervFilt.numIntMtz, v_elencoIntervFilt.richiesta, v_elencoIntervFilt.isFermo, v_elencoIntervFilt.scheduled
|
||||
FROM v_elencoIntervFilt INNER JOIN
|
||||
FiltroImpianti ON v_elencoIntervFilt.idxImpianto = FiltroImpianti.idxImpianto INNER JOIN
|
||||
FiltroMacchine ON v_elencoIntervFilt.idxMacchina = FiltroMacchine.idxMacchina INNER JOIN
|
||||
FiltroStati ON v_elencoIntervFilt.idxStato = FiltroStati.idxStato
|
||||
WHERE (v_elencoIntervFilt.richiesta BETWEEN @inizio AND @fine) AND (FiltroStati.username = @username)
|
||||
AND (FiltroMacchine.username = @username) AND (FiltroImpianti.username = @username)
|
||||
AND (v_elencoIntervFilt.isFermo = case @soloMaccFerma when 1 then 1 else v_elencoIntervFilt.isFermo end)
|
||||
AND (v_elencoIntervFilt.scheduled = case @includiPreventiva when 0 then 0 else v_elencoIntervFilt.scheduled end)
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_elencoIntMTBF_MTTR_fermaPrev
|
||||
* Restituisce elenco degli interventi x fare il calcolo MTBF/MTTR FILTRANDO per:
|
||||
* - idxStati
|
||||
* - idxImpianto
|
||||
* - idxMacchina
|
||||
* - solo ferma
|
||||
* - inclusione preventiva
|
||||
*
|
||||
* modif.: S.E.L. - 2010.05.11
|
||||
**************************************/
|
||||
CREATE PROCEDURE stp_elencoIntMTBF_MTTR_fermaPrev
|
||||
(
|
||||
@inizio DATETIME,
|
||||
@fine DATETIME,
|
||||
@username VARCHAR(100),
|
||||
@soloMaccFerma BIT,
|
||||
@includiPreventiva BIT
|
||||
)
|
||||
AS
|
||||
|
||||
|
||||
-- inizio con il creare la vista che mi serve x selezionare gli interventi filtrati dall'utente (per poterli escludere-includere)
|
||||
WITH ElencoInt AS (
|
||||
SELECT v_elencoIntervFilt.*
|
||||
FROM FiltroImpianti INNER JOIN FiltroMacchine INNER JOIN v_elencoIntervFilt INNER JOIN
|
||||
FiltroStati ON v_elencoIntervFilt.idxStato = FiltroStati.idxStato ON FiltroMacchine.idxMacchina = v_elencoIntervFilt.idxMacchina
|
||||
ON FiltroImpianti.idxImpianto = v_elencoIntervFilt.idxImpianto
|
||||
WHERE (v_elencoIntervFilt.richiesta BETWEEN @inizio AND @fine) AND (FiltroStati.username = @username)
|
||||
AND (FiltroMacchine.username = @username) AND (FiltroImpianti.username = @username)
|
||||
AND (v_elencoIntervFilt.isFermo = CASE @soloMaccFerma WHEN 1 THEN 1 ELSE v_elencoIntervFilt.isFermo END)
|
||||
AND (v_elencoIntervFilt.scheduled = CASE @includiPreventiva WHEN 0 THEN 0 ELSE v_elencoIntervFilt.scheduled END))
|
||||
|
||||
|
||||
-- seleziono gli interventi DAVVERO erogati
|
||||
SELECT COUNT(ElencoInt.numIntMtz) AS numInterventi, SUM(ElencoInt.durataMtz) AS totOreMtz,
|
||||
SUM(ElencoInt.durataOff) AS totOreOfficina, ElencoInt.codImpianto, ElencoInt.codMacchina,
|
||||
ElencoInt.nomeImpianto, ElencoInt.nomeMacchina
|
||||
FROM ElencoInt
|
||||
GROUP BY ElencoInt.codImpianto, ElencoInt.codMacchina, ElencoInt.nomeImpianto, ElencoInt.nomeMacchina
|
||||
|
||||
UNION
|
||||
|
||||
-- seleziono gli impianti che NON hanno ricevuto interventi ma comunque scelti dall'utente...
|
||||
SELECT 0 AS numInterventi, 0 AS totOreMtz, 0 AS totOreOfficina, AnagImpianti.codImpianto, AnagMacchine.codMacchina, AnagImpianti.nomeImpianto,
|
||||
AnagMacchine.nomeMacchina
|
||||
FROM FiltroMacchine INNER JOIN
|
||||
AnagMacchine ON FiltroMacchine.idxMacchina = AnagMacchine.idxMacchina INNER JOIN
|
||||
AnagImpianti ON AnagMacchine.idxImpianto = AnagImpianti.idxImpianto LEFT OUTER JOIN
|
||||
ElencoInt ON FiltroMacchine.idxMacchina = ElencoInt.idxMacchina
|
||||
WHERE (ElencoInt.numIntMtz IS NULL)
|
||||
GROUP BY AnagImpianti.codImpianto, AnagMacchine.codMacchina, AnagImpianti.nomeImpianto, AnagMacchine.nomeMacchina
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,30 @@
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_insNewLemma
|
||||
*
|
||||
* elimina record anagrafica classe prodotto
|
||||
*
|
||||
* mod : 14/05/2012
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
create PROCEDURE stp_insNewLemma
|
||||
(
|
||||
@lemma NVARCHAR(50),
|
||||
@traduzione NVARCHAR(500)
|
||||
)
|
||||
AS
|
||||
|
||||
-- elimino se c'era già...
|
||||
DELETE
|
||||
FROM Vocabolario
|
||||
WHERE lemma = @lemma
|
||||
|
||||
-- inserisco x tutte le lingue attive...
|
||||
INSERT INTO Vocabolario
|
||||
SELECT lingua, @lemma, @traduzione
|
||||
FROM Lingue
|
||||
|
||||
SELECT *
|
||||
FROM Vocabolario
|
||||
WHERE lemma = @lemma
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
/***************************************
|
||||
* STORED stp_listValues_getByTable
|
||||
*
|
||||
* ottiene elenco campi data Table
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2014.08.04
|
||||
*
|
||||
****************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_listValues_getByTable]
|
||||
(
|
||||
@TableName NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT *
|
||||
FROM ListValues
|
||||
WHERE TableName = @TableName
|
||||
ORDER BY FieldName, ordinal
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
/***************************************
|
||||
* STORED stp_listValues_getDistTable
|
||||
*
|
||||
* ottiene elenco TableName
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2015.02.25
|
||||
*
|
||||
****************************************/
|
||||
create PROCEDURE [dbo].[stp_listValues_getDistTable]
|
||||
|
||||
AS
|
||||
|
||||
SELECT DISTINCT TableName
|
||||
, '-' AS FieldName
|
||||
, '-' AS value
|
||||
, '-' AS label
|
||||
, 0 AS ordinal
|
||||
FROM ListValues
|
||||
ORDER BY TableName
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
-- =============================================
|
||||
-- STORED stp_getValidValues
|
||||
--
|
||||
-- Author: S.E.L.
|
||||
-- Create date: 2011.05.26
|
||||
-- Description: gestione selezione dati parametrici
|
||||
-- =============================================
|
||||
create PROCEDURE [dbo].[stp_listValues_getValidValues]
|
||||
(
|
||||
@TableName NVARCHAR(50),
|
||||
@FieldName NVARCHAR(50)
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
SELECT value, label
|
||||
FROM ListValues
|
||||
WHERE TableName = @TableName
|
||||
AND FieldName = @FieldName
|
||||
ORDER BY ordinal
|
||||
END
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
-- =============================================
|
||||
-- STORED stp_getValidValuesFilt
|
||||
--
|
||||
-- Author: S.E.L.
|
||||
-- Create date: 2011.05.26
|
||||
-- Description: gestione selezione dati parametrici
|
||||
-- con filtro su valore con LIKE
|
||||
-- =============================================
|
||||
create PROCEDURE [dbo].[stp_listValues_getValidValuesFilt]
|
||||
(
|
||||
@TableName NVARCHAR(50),
|
||||
@FieldName NVARCHAR(50),
|
||||
@valueLike NVARCHAR(10)
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
SELECT value, label
|
||||
FROM ListValues
|
||||
WHERE TableName = @TableName
|
||||
AND FieldName = @FieldName
|
||||
AND value LIKE @valueLike +'%'
|
||||
ORDER BY ordinal
|
||||
END
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
-- =============================================
|
||||
-- STORED stp_getValidValues
|
||||
--
|
||||
-- Author: S.E.L.
|
||||
-- Create date: 2015.09.15
|
||||
-- Description: gestione selezione dati parametrici tradotti
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[stp_listValues_getValidValuesTrad]
|
||||
(
|
||||
@TableName NVARCHAR(50),
|
||||
@FieldName NVARCHAR(50),
|
||||
@Lingua NVARCHAR(3)
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
SELECT lv.value, ISNULL(v.Traduzione, lv.TableName+lv.FieldName+lv.value) AS label
|
||||
FROM ListValues lv LEFT OUTER JOIN Vocabolario v
|
||||
ON lv.TableName+lv.FieldName+lv.value = v.Lemma
|
||||
AND v.Lingua = @Lingua
|
||||
WHERE lv.TableName = @TableName
|
||||
AND lv.FieldName = @FieldName
|
||||
ORDER BY lv.ordinal
|
||||
END
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_oreEquivalenti
|
||||
* calcola le ore di apertura equivalenti x una data macchina e periodo
|
||||
*
|
||||
* modif.: S.E.L. - 2011.06.29
|
||||
**************************************/
|
||||
create PROCEDURE stp_oreEquivalenti
|
||||
(
|
||||
@dataFrom DATETIME,
|
||||
@dataTo DATETIME,
|
||||
@idxMacchina INT
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT dbo.f_diffOreLavorative(@dataFrom, @dataTo, @idxMacchina) AS apertura
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,110 @@
|
||||
|
||||
-- =============================================
|
||||
-- Author: <Author,,Name>
|
||||
-- Create date: <Create Date,,>
|
||||
-- Description: <Description,,>
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[stp_vie_getByPeriodoSearch] (
|
||||
@inizio DATETIME
|
||||
,@fine DATETIME
|
||||
,@search NVARCHAR(50) = ''
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||
-- interfering with SELECT statements.
|
||||
SET NOCOUNT ON;
|
||||
|
||||
IF (
|
||||
ISNULL (@search,'') = '' OR ISNULL (@search,'') = '*'
|
||||
)
|
||||
BEGIN
|
||||
-- Insert statements for procedure here
|
||||
SELECT DescrStato
|
||||
,codImpianto
|
||||
,codMacchina
|
||||
,dataLav
|
||||
,descrAmbitoGuasto
|
||||
,descrCausale
|
||||
,descrPriorita
|
||||
,descrTipo
|
||||
,descrizione
|
||||
,descrizioneIntervento
|
||||
,fineIntervento
|
||||
,guasto
|
||||
,idxAmbito
|
||||
,idxCausale
|
||||
,idxImpianto
|
||||
,idxMacchina
|
||||
,idxPriorita
|
||||
,idxStato
|
||||
,idxTipo
|
||||
,inizioIntervento
|
||||
,isFermo
|
||||
,isPreventivabile
|
||||
,matr
|
||||
,nomeImpianto
|
||||
,nomeMacchina
|
||||
,numIntMtz
|
||||
,presaInCarico
|
||||
,richiesta
|
||||
,turnoLav
|
||||
FROM v_intervExp
|
||||
WHERE (
|
||||
richiesta BETWEEN @inizio
|
||||
AND @fine
|
||||
)
|
||||
ORDER BY numIntMtz DESC
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
SELECT DescrStato
|
||||
,codImpianto
|
||||
,codMacchina
|
||||
,dataLav
|
||||
,descrAmbitoGuasto
|
||||
,descrCausale
|
||||
,descrPriorita
|
||||
,descrTipo
|
||||
,descrizione
|
||||
,descrizioneIntervento
|
||||
,fineIntervento
|
||||
,guasto
|
||||
,idxAmbito
|
||||
,idxCausale
|
||||
,idxImpianto
|
||||
,idxMacchina
|
||||
,idxPriorita
|
||||
,idxStato
|
||||
,idxTipo
|
||||
,inizioIntervento
|
||||
,isFermo
|
||||
,isPreventivabile
|
||||
,matr
|
||||
,nomeImpianto
|
||||
,nomeMacchina
|
||||
,numIntMtz
|
||||
,presaInCarico
|
||||
,richiesta
|
||||
,turnoLav
|
||||
FROM v_intervExp
|
||||
WHERE (
|
||||
richiesta BETWEEN @inizio
|
||||
AND @fine
|
||||
)
|
||||
AND (
|
||||
CONVERT(varchar(50),numIntMtz) LIKE '%' + @search + '%'
|
||||
OR codImpianto LIKE '%' + @search + '%'
|
||||
OR nomeImpianto LIKE '%' + @search + '%'
|
||||
OR codMacchina LIKE '%' + @search + '%'
|
||||
OR nomeMacchina LIKE '%' + @search + '%'
|
||||
OR descrizione LIKE '%' + @search + '%'
|
||||
OR descrAmbitoGuasto LIKE '%' + @search + '%'
|
||||
OR descrCausale LIKE '%' + @search + '%'
|
||||
OR descrizioneIntervento LIKE '%' + @search + '%'
|
||||
OR descrPriorita LIKE '%' + @search + '%'
|
||||
OR DescrStato LIKE '%' + @search + '%'
|
||||
)
|
||||
ORDER BY numIntMtz DESC
|
||||
END
|
||||
END
|
||||
@@ -0,0 +1,17 @@
|
||||
-- =============================================
|
||||
-- Author: S.E.Locatelli
|
||||
-- Create date: 2013.12.27
|
||||
-- Description: ricerca causali by conditio
|
||||
-- =============================================
|
||||
create PROCEDURE stp_vscm_getByConditio
|
||||
(
|
||||
@conditio INT = 0
|
||||
)
|
||||
AS
|
||||
|
||||
SELECT value, label, conditio
|
||||
FROM v_selCausaliMacchine
|
||||
WHERE (conditio = @conditio)
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,35 @@
|
||||
-- =============================================
|
||||
-- Author: S.E.Locatelli
|
||||
-- Create date: 2013.12.27
|
||||
-- Description: ricerca causali by conditio + valore corrente (x storico)
|
||||
-- =============================================
|
||||
CREATE PROCEDURE stp_vscm_getByConditioAndCurr
|
||||
(
|
||||
@conditio INT = 0,
|
||||
@currVal INT = 0
|
||||
)
|
||||
AS
|
||||
DECLARE @trovati INT = 0
|
||||
|
||||
SELECT @trovati = COUNT(*) FROM v_selCausaliMacchine WHERE value=@currVal AND conditio = @conditio
|
||||
-- controllo se c'è valore ok così...
|
||||
IF @trovati=1
|
||||
BEGIN
|
||||
SELECT value, label, conditio
|
||||
FROM v_selCausaliMacchine
|
||||
WHERE (conditio = @conditio)
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
SELECT @currVal as value, '--- ### ---' as label, @conditio as conditio
|
||||
|
||||
UNION
|
||||
|
||||
SELECT value, label, conditio
|
||||
FROM v_selCausaliMacchine
|
||||
WHERE (conditio = @conditio)
|
||||
END
|
||||
|
||||
|
||||
|
||||
RETURN
|
||||
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE [dbo].[AnagAmbitoGuasto] (
|
||||
[idxAmbito] INT IDENTITY (1, 1) NOT NULL,
|
||||
[descrAmbitoGuasto] NVARCHAR (50) NULL,
|
||||
CONSTRAINT [PK_AnagAmbitoGuasto] PRIMARY KEY CLUSTERED ([idxAmbito] ASC)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE [dbo].[AnagCausali] (
|
||||
[idxCausale] INT IDENTITY (1, 1) NOT NULL,
|
||||
[idxFamMacchine] INT NOT NULL,
|
||||
[descrCausale] NVARCHAR (50) NULL,
|
||||
[attiva] BIT CONSTRAINT [DF_AnagCausali_attiva] DEFAULT ((1)) NULL,
|
||||
CONSTRAINT [PK_AnagCausali] PRIMARY KEY CLUSTERED ([idxCausale] ASC),
|
||||
CONSTRAINT [FK_AnagCausali_AnagFamMacchine] FOREIGN KEY ([idxFamMacchine]) REFERENCES [dbo].[AnagFamMacchine] ([idxFamMacchine]) ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE [dbo].[AnagClasseTurno] (
|
||||
[CodClasseTurno] NVARCHAR (50) NOT NULL,
|
||||
[Descrizione] NVARCHAR (50) NULL,
|
||||
[hSettStd] INT NULL,
|
||||
CONSTRAINT [PK_AnagClasseTurno] PRIMARY KEY CLUSTERED ([CodClasseTurno] ASC)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE [dbo].[AnagEventi] (
|
||||
[idxEvento] INT NOT NULL,
|
||||
[DescrEvento] NVARCHAR (50) NULL,
|
||||
CONSTRAINT [PK_AnagEventi] PRIMARY KEY CLUSTERED ([idxEvento] ASC)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE [dbo].[AnagFamMacchine] (
|
||||
[idxFamMacchine] INT IDENTITY (1, 1) NOT NULL,
|
||||
[nomeFamMacch] NVARCHAR (50) NULL,
|
||||
CONSTRAINT [PK_AnagFamMacchine] PRIMARY KEY CLUSTERED ([idxFamMacchine] ASC)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE [dbo].[AnagFrequenze] (
|
||||
[codFrequenza] NCHAR (2) NOT NULL,
|
||||
[frequenza] NVARCHAR (50) NULL,
|
||||
CONSTRAINT [PK_AnagFrequenze] PRIMARY KEY CLUSTERED ([codFrequenza] ASC)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE [dbo].[AnagImpianti] (
|
||||
[idxImpianto] INT IDENTITY (1, 1) NOT NULL,
|
||||
[codImpianto] NVARCHAR (50) NULL,
|
||||
[nomeImpianto] NVARCHAR (50) NULL,
|
||||
[tipoImpianto] NVARCHAR (50) NULL,
|
||||
[funzDal] DATETIME NULL,
|
||||
[funzAl] DATETIME NULL,
|
||||
CONSTRAINT [PK_AnagImpianti] PRIMARY KEY CLUSTERED ([idxImpianto] ASC)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
CREATE TABLE [dbo].[AnagItems] (
|
||||
[idxItem] INT IDENTITY (1, 1) NOT NULL,
|
||||
[Famiglia] NVARCHAR (50) CONSTRAINT [DF_AnagItems_Famiglia] DEFAULT ('') NOT NULL,
|
||||
[Descrizione] NVARCHAR (250) CONSTRAINT [DF_AnagItems_Descrizione] DEFAULT ('') NOT NULL,
|
||||
[NomeCostruttore] NVARCHAR (250) CONSTRAINT [DF_AnagItems_NomeCostruttore] DEFAULT ('') NOT NULL,
|
||||
[CodCostruttore] NVARCHAR (250) CONSTRAINT [DF_AnagItems_CodCostruttore] DEFAULT ('') NOT NULL,
|
||||
[CodInterno] NVARCHAR (50) CONSTRAINT [DF_AnagItems_CodInterno] DEFAULT ('') NOT NULL,
|
||||
[QtaMin] INT CONSTRAINT [DF_AnagItems_QtaMin] DEFAULT ((0)) NOT NULL,
|
||||
[QtaLotto] INT CONSTRAINT [DF_AnagItems_QtaLotto] DEFAULT ((1)) NOT NULL,
|
||||
[Valore] DECIMAL (18, 6) CONSTRAINT [DF_AnagItems_Valore] DEFAULT ((0)) NOT NULL,
|
||||
CONSTRAINT [PK_AnagItems] PRIMARY KEY CLUSTERED ([idxItem] ASC)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'valore unitario item', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'AnagItems', @level2type = N'COLUMN', @level2name = N'Valore';
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE [dbo].[AnagLocazioni] (
|
||||
[CodLocazione] NVARCHAR (50) CONSTRAINT [DF_AnagLocazioni_CodLocazione] DEFAULT ('') NOT NULL,
|
||||
[Descrizione] NVARCHAR (50) NULL,
|
||||
CONSTRAINT [PK_AnagLocazioni] PRIMARY KEY CLUSTERED ([CodLocazione] ASC)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
CREATE TABLE [dbo].[AnagMacchine] (
|
||||
[idxMacchina] INT IDENTITY (1, 1) NOT NULL,
|
||||
[idxImpianto] INT NULL,
|
||||
[codMacchina] NVARCHAR (50) NULL,
|
||||
[nomeMacchina] NVARCHAR (250) NULL,
|
||||
[modello] NVARCHAR (250) NULL,
|
||||
[matricola] NVARCHAR (50) NULL,
|
||||
[anno] INT NULL,
|
||||
[kgPeso] FLOAT (53) CONSTRAINT [DF_AnagMacchine_kgPeso] DEFAULT ((0)) NOT NULL,
|
||||
[kwConsumo] FLOAT (53) CONSTRAINT [DF_AnagMacchine_kwConsumo] DEFAULT ((0)) NOT NULL,
|
||||
[funzDal] DATETIME NULL,
|
||||
[funzAl] DATETIME NULL,
|
||||
CONSTRAINT [PK_AnagMacchine] PRIMARY KEY CLUSTERED ([idxMacchina] ASC),
|
||||
CONSTRAINT [FK_AnagMacchine_AnagImpianti] FOREIGN KEY ([idxImpianto]) REFERENCES [dbo].[AnagImpianti] ([idxImpianto]) ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
|
||||
GO
|
||||
|
||||
CREATE TRIGGER updateAssociazioneFamMacchine
|
||||
ON dbo.AnagMacchine
|
||||
FOR INSERT
|
||||
AS
|
||||
|
||||
-- aggiungo le eventuali "macchine orfane" alla fam macchine di base (1 = TUTTE)
|
||||
INSERT INTO Macchine2FamMacchine(idxMacchina, idxFamMacchine)
|
||||
(
|
||||
SELECT am.idxMacchina, 1 FROM anagMacchine am LEFT OUTER JOIN macchine2FamMacchine m2f
|
||||
ON am.idxMacchina=m2f.idxMacchina
|
||||
WHERE m2f.idxmacchina IS NULL
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE [dbo].[AnagPeriodi] (
|
||||
[codPeriodo] NVARCHAR (20) NOT NULL,
|
||||
[lemmaPeriodo] NVARCHAR (50) NULL,
|
||||
CONSTRAINT [PK_AnagPeriodi] PRIMARY KEY CLUSTERED ([codPeriodo] ASC)
|
||||
);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user