Merge branch 'master' into feature/RefactoringGestioneColli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
# Conflicts: # .idea/structuralSearch.xml # docker/tomcat/conf/integry/ems_settings.json # ems-core/src/main/java/it/integry/common/var/CommonConstants.java # ems-core/src/main/java/it/integry/ems/migration/model/Migration_20251205111526.java # ems-core/src/main/java/it/integry/ems/rules/completing/DocumentCheckRules.java # ems-core/src/main/java/it/integry/ems/user/service/UserCacheService.java # ems-core/src/main/java/it/integry/ems_model/entity/Azienda.java # ems-core/src/main/java/it/integry/ems_model/utility/UtilityException.java # ems-engine/src/main/java/it/integry/ems/customizations/production/service/ToscaProductionService.java # ems-engine/src/main/java/it/integry/ems/document/service/DocumentiDirettiService.java # ems-engine/src/main/java/it/integry/ems/logistic/Import/service/EuritmoImportService.java # ems-engine/src/main/java/it/integry/ems/logistic/controller/LogisticController.java # ems-engine/src/main/java/it/integry/ems/logistic/service/LogisticService.java # ems-engine/src/main/java/it/integry/ems/logistic/service/SmartLogisticService.java # ems-engine/src/main/java/it/integry/ems/product/importaz/service/ImportListiniAcquistoService.java # ems-engine/src/main/java/it/integry/ems/retail/wms/Utility/WMSUtility.java # ems-engine/src/main/java/it/integry/ems/retail/wms/generic/controller/WMSGenericController.java # ems-engine/src/main/java/it/integry/ems/retail/wms/generic/dto/MvwSitArtUdcDetInventarioDTO.java # ems-engine/src/main/java/it/integry/ems/retail/wms/generic/service/WMSGenericService.java # ems-engine/src/main/java/it/integry/ems/retail/wms/lavorazione/service/WMSLavorazioneService.java # ems-engine/src/main/java/it/integry/ems/system/controller/SystemController.java
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="LocalDate passato a SimpleDate" />
|
||||
<option name="myName" value="LocalDate Checks" />
|
||||
<inspection_tool class="2b489e84-a2d7-30b2-9eff-e1ae310a3021" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
<inspection_tool class="3ba9f580-3fdd-3896-b2c5-a57a36bbdc46" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
<inspection_tool class="68d10b55-8d01-38ad-9579-a3dca4cd32a8" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" />
|
||||
<inspection_tool class="731e1524-8144-3953-9fa9-9ef0eb4affb5" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
<inspection_tool class="AbstractBeanReferencesInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AccessStaticViaInstance" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ActionIsNotPreviewFriendly" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ActionPresentationInstantiatedInCtor" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AddExplicitTargetToParameterAnnotation" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AddOperatorModifier" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="AmbiguousNonLocalJump" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
@@ -44,6 +49,7 @@
|
||||
<inspection_tool class="AnonymousHasLambdaAlternative" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AnonymousInnerClass" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="AopLanguageInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ApplicationServiceAsStaticFinalFieldOrProperty" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ArgNamesErrorsInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ArgNamesWarningsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AroundAdviceStyleInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -69,6 +75,8 @@
|
||||
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,java.lang.foreign.Arena,ofAuto,java.lang.foreign.Arena,global,com.annimon.stream.Stream,of" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="BadExpressionStatementJS" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="BatchJobDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="BatchXmlDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="BigDecimalLegacyMethod" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="BigDecimalMethodWithoutRoundingCalled" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="BintrayPublishingPlugin" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -143,12 +151,18 @@
|
||||
<inspection_tool class="CollectionAddedToSelf" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CommaExpressionJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CommentedOutCode" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CompanionObjectInExtension" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComparatorCombinators" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComparatorMethodParameterNotUsed" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComparatorResultComparison" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComparisonOfShortAndChar" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComparisonToNaN" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComplexRedundantLet" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComponentNotRegistered" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="CHECK_ACTIONS" value="true" />
|
||||
<option name="IGNORE_NON_PUBLIC" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ComponentRegistrationProblems" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ComposeErroneousRelation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComposeMissingKeys" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ComposeUnknownKeys" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
@@ -229,6 +243,7 @@
|
||||
<inspection_tool class="CssUnresolvedClassInComposesRule" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssUnresolvedCustomProperty" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssUnusedSymbol" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CsvValidation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CustomRegExpInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CyclicJobDependency" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="DanglingJavadoc" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -253,9 +268,11 @@
|
||||
<inspection_tool class="DeprecatedIsStillUsed" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DeprecatedLombok" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DeprecatedMavenDependency" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DeprecatedStaplerJellyCustomTagAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="Deprecation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DestructuringWrongName" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DevContainerIdeSettings" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="DevKitPropertiesMessageValidation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DevcontainerFolder" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="DialogTitleCapitalization" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DiamondCanBeReplacedWithExplicitTypeArguments" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
@@ -349,6 +366,7 @@
|
||||
</inspection_tool>
|
||||
<inspection_tool class="EmptySynchronizedStatement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="EmptyTryBlock" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="EmptyWebServiceClass" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="EndlessStream" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="EnhancedSwitchBackwardMigration" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="EnhancedSwitchMigration" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -376,11 +394,13 @@
|
||||
<inspection_tool class="ExpressionMayBeFactorized" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="ExtendsAnnotation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ExtendsObject" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ExtensionRegisteredAsServiceOrComponent" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ExternalizableWithoutPublicNoArgConstructor" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ExtractMethodRecommender" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FallThroughInSwitchStatementJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FieldCanBeLocal" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FieldMayBeFinal" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FileEqualsUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FillPermitsList" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="FilterIsInstanceCallWithClassLiteralArgument" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FilterIsInstanceResultIsAlwaysEmpty" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -403,6 +423,7 @@
|
||||
<inspection_tool class="ForLoopReplaceableByWhile" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="m_ignoreLoopsWithoutConditions" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ForbiddenInSuspectContextMethod" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ForeignDelegate" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ForwardCompatibility" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FrequentlyUsedInheritorInspection" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
@@ -578,16 +599,20 @@
|
||||
<option name="FLAG_EXPLICIT_CONVERSION" value="true" />
|
||||
<option name="IGNORE_NODESET_TO_BOOLEAN_VIA_STRING" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ImplicitlyExposedWebServiceMethods" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IncompatibleMask" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IncompatibleMaskJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IncompleteDestructuring" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="InconsistentCommentForJavaParameter" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InconsistentResourceBundle" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="InconsistentTextBlockIndent" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IncorrectCancellationExceptionHandling" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="IncorrectDateTimeFormat" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IncorrectHttpHeaderInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IncorrectMessageFormat" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IncorrectParentDisposable" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IncorrectPluginDslStructure" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="IncorrectServiceRetrieving" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="IndexOfReplaceableByContains" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IndexZeroUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InfiniteLoopJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -600,19 +625,24 @@
|
||||
<inspection_tool class="InjectionValueTypeInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="InnerClassMayBeStatic" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InsertLiteralUnderscores" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="InspectionDescriptionNotFoundInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="InspectionUsingGrayColors" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InstantiatingObjectToGetClassObject" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InstantiationOfUtilityClass" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IntegerDivisionInFloatingPointContext" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IntegerMultiplicationImplicitCastToLong" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="ignoreNonOverflowingCompileTimeConstants" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="IntentionDescriptionNotFoundInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="InterfaceMethodClashesWithObject" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IntroduceWhenSubject" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InvalidComparatorMethodReference" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InvalidIconSrc" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IterableUsedAsVararg" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="IteratorHasNextCallsIteratorNext" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JBoss" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="JCenterRepository" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JComponentDataProvider" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSAccessibilityCheck" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSAnnotator" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="JSArrowFunctionBracesCanBeRemoved" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
@@ -727,6 +757,7 @@
|
||||
<inspection_tool class="JavadocReference" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="JavaeeApplicationDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="JdkProxiedBeanTypeInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="Jexl" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="JoinDeclarationAndAssignment" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JoinDeclarationAndAssignmentJava" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="JpaAttributeMemberSignatureInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
@@ -763,6 +794,7 @@
|
||||
<inspection_tool class="JvmCoverageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="KDocUnresolvedReference" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="KarmaConfigFile" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="KeymapXmlDom" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinAmbiguousActuals" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinConstantConditions" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinDoubleNegation" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
@@ -770,6 +802,8 @@
|
||||
<inspection_tool class="KotlinInvalidBundleOrProperty" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinMavenPluginPhase" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinNoActualForExpect" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinObjectExtensionRegistration" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinObjectRegisteredAsExtension" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinOptionsToCompilerOptions" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinRedundantOverride" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="KotlinTestJUnit" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -795,15 +829,21 @@
|
||||
<option name="CHECK_NON_ANNOTATED_REFERENCES" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="LateinitVarOverridesLateinitVar" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LeakableMapKey" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LengthOneStringsInConcatenation" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="LessResolvedByNameOnly" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LessUnresolvedMixin" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LessUnresolvedVariable" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LiftReturnOrAssignment" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LightServiceMigrationCode" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LightServiceMigrationXML" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LightServiceMustBeFinal" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="LimitedScopeInnerClass" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="LiquibaseXmlUnresolvedProperty" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ListIndexOfReplaceableByContains" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ListRemoveInLoop" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ListenerImplementationMustNotBeDisposable" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="LiveTemplateI18n" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LocalVariableName" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LogStatementNotGuardedByLogCondition" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WEAK WARNING" enabled_by_default="false">
|
||||
@@ -877,6 +917,7 @@
|
||||
<inspection_tool class="MicronautDataRepositoryMethodReturnType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MigrateFromJavaLangIo" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="MigrateToJavaLangIo" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="MigrateToOptControl" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MimeType" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="MinMaxValuesInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MismatchedArrayReadWrite" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -892,9 +933,12 @@
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="MismatchedJavadocCode" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MismatchedLightServiceLevelAndCtor" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MismatchedStringBuilderQueryUpdate" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MismatchedStringCase" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MisorderedAssertEqualsArguments" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MissingAccessibleContext" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MissingActionUpdateThread" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MissingAspectjAutoproxyInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MissingDeprecatedAnnotationOnScheduledForRemovalApi" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="MissingFinalNewline" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
@@ -902,6 +946,7 @@
|
||||
<option name="ignoreObjectMethods" value="true" />
|
||||
<option name="ignoreAnonymousClassMethods" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="MissingRecentApi" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="MissingSerialAnnotation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MissortedModifiers" enabled="false" level="INFORMATION" enabled_by_default="false">
|
||||
<option name="m_requireAnnotationsFirst" value="true" />
|
||||
@@ -945,8 +990,10 @@
|
||||
<inspection_tool class="NodeCoreCodingAssistance" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NonAsciiCharacters" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NonAtomicOperationOnVolatileField" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NonDefaultConstructor" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="NonExtendableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NonFinalFieldInEnum" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NonJaxWsWebServices" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NonSerializableWithSerialVersionUIDField" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NonStrictComparisonCanBeEquality" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NotNullFieldNotInitialized" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -980,6 +1027,7 @@
|
||||
<inspection_tool class="ObviousNullCheck" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OctalLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OneToOneWithLazy" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OneWayWebMethod" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="OnlyOneElementUsed" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OpenRewriteYamlRecipe" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="OptionalAssignedToNull" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -994,6 +1042,7 @@
|
||||
<inspection_tool class="OverflowingLoopIndex" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OverrideOnly" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OverwrittenKey" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PSScriptAnalyzer" enabled="false" level="SERVER PROBLEM" enabled_by_default="false" />
|
||||
<inspection_tool class="PackageDirectoryMismatch" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PackageInfoWithoutPackage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PackageJsonMismatchedDependency" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -1010,6 +1059,12 @@
|
||||
<inspection_tool class="PatternVariablesCanBeReplacedWithCast" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="PbDuplicatedImports" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PgSelectFromProcedureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PluginXmlCapitalization" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PluginXmlDynamicPlugin" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PluginXmlExtensionRegistration" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PluginXmlI18n" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PluginXmlPluginLogo" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PluginXmlValidity" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="PointcutMethodStyleInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PointlessArithmeticExpression" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="m_ignoreExpressionsContainingConstants" value="true" />
|
||||
@@ -1027,22 +1082,27 @@
|
||||
<inspection_tool class="PostCssCustomSelector" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="PostCssMediaRange" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="PostCssUnresolvedModuleValueReference" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="PostfixTemplateDescriptionNotFound" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="PreferCurrentCoroutineContextToCoroutineContext" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PresentationAnnotation" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="PreviewFeature" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PrimitiveArrayArgumentToVariableArgMethod" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PrivatePropertyName" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PropertyName" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ProtectedInFinal" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ProtectedMemberInFinalClass" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PsiElementConcatenation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PublicField" enabled="false" level="INFORMATION" enabled_by_default="false">
|
||||
<option name="ignoreEnums" value="false" />
|
||||
<option name="ignorableAnnotations">
|
||||
<value />
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PublicTestExtensionFunction" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="QsPrivateBeanMembersInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="QsProperties" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="QsYaml" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="QuickFixGetFamilyNameViolation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RawUseOfParameterizedType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ReactiveStreamsNullableInLambdaInTransform" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ReactiveStreamsPublisherImplementation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -1189,6 +1249,7 @@
|
||||
<inspection_tool class="ReplaceWithIgnoreCaseEquals" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ReplaceWithJavadoc" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="ReplaceWithOperatorAssignment" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RequiredArtifactTypeInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="RequiredAttributes" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myAdditionalRequiredHtmlAttributes" value="" />
|
||||
</inspection_tool>
|
||||
@@ -1203,11 +1264,31 @@
|
||||
<inspection_tool class="RunBlocking" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RunBlockingInSuspendFunction" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SSBasedInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<searchConfiguration name="Date equals LocalDate inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
|
||||
<constraint name="__context__" within="" contains="" />
|
||||
<constraint name="d1" nameOfExprType="java\.util\.Date" within="" contains="" />
|
||||
<constraint name="d2" nameOfExprType="java\.time\.LocalDate" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
<searchConfiguration name="Date equals LocalDateTime inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
|
||||
<constraint name="__context__" within="" contains="" />
|
||||
<constraint name="d1" nameOfExprType="java\.util\.Date" within="" contains="" />
|
||||
<constraint name="d2" nameOfExprType="java\.time\.LocalDateTime" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
<searchConfiguration name="LocalDate equals Date inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
|
||||
<constraint name="__context__" within="" contains="" />
|
||||
<constraint name="d1" nameOfExprType="java\.time\.LocalDate" within="" contains="" />
|
||||
<constraint name="d2" nameOfExprType="java\.util\.Date" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
<searchConfiguration name="LocalDate passato a SimpleDateFormat" text="$formatter$.format($date$)" recursive="true" caseInsensitive="true" type="JAVA" pattern_context="default">
|
||||
<constraint name="__context__" within="" contains="" />
|
||||
<constraint name="formatter" nameOfExprType="java\.text\.SimpleDateFormat" within="" contains="" />
|
||||
<constraint name="date" nameOfExprType="java\.time\.LocalDate" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
<searchConfiguration name="LocalDateTime equals Date inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
|
||||
<constraint name="__context__" within="" contains="" />
|
||||
<constraint name="d1" nameOfExprType="java\.time\.LocalDateTime" within="" contains="" />
|
||||
<constraint name="d2" nameOfExprType="java\.util\.Date" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SafeCastWithReturn" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SafeVarargsDetector" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -1242,6 +1323,7 @@
|
||||
<inspection_tool class="SimplifiableCallChain" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SimplifiableConditionalExpression" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SimplifiableIfStatement" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="SimplifiableServiceRetrieving" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SimplifyAssertNotNull" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="SimplifyBooleanWithConstants" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SimplifyCollector" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -1391,7 +1473,9 @@
|
||||
<inspection_tool class="SqlUnusedSubqueryItemInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlUnusedVariableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlWithoutWhereInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="StatefulEp" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="StaticImportCanBeUsed" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="StaticInitializationInExtensions" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="StaticInitializerReferencesSubClass" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="StaticMethodImportLombok" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="StreamToLoop" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
@@ -1477,6 +1561,7 @@
|
||||
<inspection_tool class="ThymeleafMessagesResolveInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ThymeleafVariablesResolveInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ToArrayCallWithZeroLengthArrayArgument" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TokenSetInParserDefinition" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TomlUnresolvedReference" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TooBroadScope" enabled="false" level="INFORMATION" enabled_by_default="false">
|
||||
<option name="m_allowConstructorAsInitializer" value="false" />
|
||||
@@ -1513,8 +1598,10 @@
|
||||
<inspection_tool class="TypeScriptUnresolvedReference" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptValidateGenericTypes" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptValidateTypes" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UElementAsPsi" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UNCHECKED_WARNING" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UNUSED_IMPORT" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UastHintedVisitorAdapterHints" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UastIncorrectHttpHeaderInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UastIncorrectMimeTypeInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UnaryPlus" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -1524,8 +1611,10 @@
|
||||
<inspection_tool class="UndefinedJob" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UndefinedParamsPresent" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UndefinedStage" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UndesirableClassUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnfinishedStepVerifier" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnhandledExceptionInJSP" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnknownIdInMetaInformation" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UnknownLanguage" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessarilyQualifiedInnerClassAccess" enabled="false" level="INFORMATION" enabled_by_default="false">
|
||||
<option name="ignoreReferencesNeedingImport" value="false" />
|
||||
@@ -1585,10 +1674,14 @@
|
||||
<inspection_tool class="UnreachableCatch" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnreachableCodeJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnresolvedMessageChannel" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnresolvedPluginConfigReference" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UnresolvedPropertyKey" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UnresolvedReference" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UnresolvedRestParam" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UnsafeReturnStatementVisitor" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnsafeVfsRecursion" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnsatisfiedRange" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnspecifiedActionsPlace" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnsupportedCharacter" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnsupportedChronoFieldUnitCall" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -1615,12 +1708,20 @@
|
||||
<inspection_tool class="UsagesOfObsoleteApi" enabled="false" level="TEXT ATTRIBUTES" enabled_by_default="false" />
|
||||
<inspection_tool class="UseBulkOperation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UseCompareMethod" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UseDPIAwareBorders" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UseDPIAwareInsets" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UseExpressionBody" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="UseHashCodeMethodInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UseJBColor" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UsePlatformProcessAwaitExit" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UsePluginIdEquals" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UsePrimitiveTypes" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UsePropertyAccessSyntax" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UseVirtualFileEquals" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UselessCallOnCollection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UselessCallOnNotNull" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UtilSchemaInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ValidExternallyBoundObject" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="VarargParameter" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="VariableInitializerIsRedundant" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="VariableNeverRead" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
@@ -1640,6 +1741,7 @@
|
||||
<inspection_tool class="VulnerableCodeUsages" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="VulnerableLibrariesGlobal" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="VulnerableLibrariesLocal" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WSReferenceInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="WadlDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="WaitWhileHoldingTwoLocks" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WebProperties" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
@@ -1651,11 +1753,15 @@
|
||||
<option name="ignoreNonEmtpyLoops" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="WithStatementJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WorkspaceEntityMutableField" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WorkspaceImplAbsent" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WorkspaceImplObsolete" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WrapUnaryOperator" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WrapperTypeMayBePrimitive" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WriteOnlyObject" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WrongPackageStatement" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="WrongPropertyKeyValueDelimiter" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WsdlHighlightingInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlDefaultAttributeValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlDeprecatedElement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlDuplicatedId" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
@@ -1677,6 +1783,21 @@
|
||||
<inspection_tool class="YAMLSchemaValidation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="YAMLUnresolvedAlias" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="YAMLUnusedAnchor" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="checkReturnValue" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="checkedExceptions" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpa.jpb.model.DataClassEqualsAndHashCodeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.CompositeIdClassSerializable" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.ConverterSpecifiedIncorrectlyInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.DuplicateVersionAnnotationInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.EntityIdMissingInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.IncompatibleTableAnnotationInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.LombokDataInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.LombokEqualsAndHashCodeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.LombokToStringIncludeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.LombokToStringInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.NoArgsConstructorInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="com.intellij.jpb.UnsupportedTypeWithoutConverterInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="d539a2c0-2ebf-35d7-921f-25a581173971" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
<inspection_tool class="dependsOnMethodTestNG" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="groupsTestNG" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="groups">
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="PROJECT_PROFILE" value="LocalDate Checks" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
10
.idea/structuralSearch.xml
generated
10
.idea/structuralSearch.xml
generated
@@ -16,5 +16,15 @@
|
||||
<constraint name="d1" nameOfExprType="java\.util\.Date" within="" contains="" />
|
||||
<constraint name="d2" nameOfExprType="java\.time\.LocalDate" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
<searchConfiguration name="java.util.Date equals LocalDateTime inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
|
||||
<constraint name="__context__" within="" contains="" />
|
||||
<constraint name="d1" nameOfExprType="java\.util\.Date" within="" contains="" />
|
||||
<constraint name="d2" nameOfExprType="java\.time\.LocalDateTime" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
<searchConfiguration name="LocalDateTime equals java.util.Date inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
|
||||
<constraint name="__context__" within="" contains="" />
|
||||
<constraint name="d1" nameOfExprType="java\.time\.LocalDateTime" within="" contains="" />
|
||||
<constraint name="d2" nameOfExprType="java\.util\.Date" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
</component>
|
||||
</project>
|
||||
@@ -211,6 +211,36 @@
|
||||
"encryptedDbPsw": true,
|
||||
"internalDb": true
|
||||
},
|
||||
{
|
||||
"profileName": "PAPARELLAD",
|
||||
"connectionType": "MSSQL",
|
||||
"dbName": "PAPARELLAD",
|
||||
"username": "sa",
|
||||
"password": "sZ",
|
||||
"host": "192.168.2.214",
|
||||
"encryptedDbPsw": true,
|
||||
"internalDb": true
|
||||
},
|
||||
{
|
||||
"profileName": "PAPARELLAP",
|
||||
"connectionType": "MSSQL",
|
||||
"dbName": "PAPARELLAP",
|
||||
"username": "sa",
|
||||
"password": "sZ",
|
||||
"host": "192.168.2.214",
|
||||
"encryptedDbPsw": true,
|
||||
"internalDb": true
|
||||
},
|
||||
{
|
||||
"profileName": "PAPARELLAPIETRO",
|
||||
"connectionType": "MSSQL",
|
||||
"dbName": "PAPARELLAPIETRO",
|
||||
"username": "sa",
|
||||
"password": "sZ",
|
||||
"host": "192.168.2.214",
|
||||
"encryptedDbPsw": true,
|
||||
"internalDb": true
|
||||
},
|
||||
{
|
||||
"profileName" : "FOLLIESGROUP",
|
||||
"connectionType" : "MSSQL",
|
||||
@@ -673,10 +703,10 @@
|
||||
"internalDb": false
|
||||
},
|
||||
{
|
||||
"profileName": "ROSSOGARGANO",
|
||||
"profileName": "Aida",
|
||||
"connectionType": "MSSQL",
|
||||
"dbName": "RossoGargano",
|
||||
"username": "SA",
|
||||
"dbName": "aida",
|
||||
"username": "sa",
|
||||
"password" : "sZ",
|
||||
"host" : "192.168.2.220",
|
||||
"encryptedDbPsw" : true,
|
||||
@@ -705,7 +735,7 @@
|
||||
"dbName" : "frudis",
|
||||
"username" : "SA",
|
||||
"password" : "sZ",
|
||||
"host" : "192.168.2.214",
|
||||
"host": "192.168.2.220",
|
||||
"encryptedDbPsw" : true,
|
||||
"internalDb" : true
|
||||
}, {
|
||||
@@ -773,6 +803,26 @@
|
||||
"encryptedDbPsw": true,
|
||||
"internalDb": true
|
||||
},
|
||||
{
|
||||
"profileName": "COSMAPACK",
|
||||
"connectionType": "MSSQL",
|
||||
"dbName": "COSMINT",
|
||||
"username": "sa",
|
||||
"password": "sZ",
|
||||
"host": "192.168.2.220",
|
||||
"encryptedDbPsw": true,
|
||||
"internalDb": true
|
||||
},
|
||||
{
|
||||
"profileName": "Aida",
|
||||
"connectionType": "MSSQL",
|
||||
"dbName": "aida",
|
||||
"username": "sa",
|
||||
"password": "sZ",
|
||||
"host": "192.168.2.220",
|
||||
"encryptedDbPsw": true,
|
||||
"internalDb": true
|
||||
},
|
||||
{
|
||||
"profileName" : "VETTA",
|
||||
"connectionType" : "MSSQL",
|
||||
|
||||
@@ -50,6 +50,8 @@ public class CommonConstants {
|
||||
|
||||
public static final DateTimeFormatter DATE_YMD_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATE_FORMAT_YMD_SLASHED)
|
||||
.withZone(ZoneId.systemDefault());
|
||||
public static final DateTimeFormatter DATETIME_YMD_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATETIME_FORMAT_YMD)
|
||||
.withZone(ZoneId.systemDefault());
|
||||
public static final DateTimeFormatter DATE_YMD_DASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATE_FORMAT_YMD_DASHED)
|
||||
.withZone(ZoneId.systemDefault());
|
||||
public static final DateTimeFormatter DATETIME_YMD_DASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATETIME_FORMAT_YMD)
|
||||
|
||||
@@ -793,9 +793,8 @@ public class EmsController {
|
||||
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_STB_EMAIL_CONTENT, method = RequestMethod.GET)
|
||||
public byte[] downloadStbEmailContent(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam Integer idEmail) throws Exception {
|
||||
public ResponseEntity<byte[]> downloadStbEmailContent(@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam Integer idEmail) throws Exception {
|
||||
StbEmailContent stbEmailContent = new StbEmailContent();
|
||||
stbEmailContent.setIdEmail(idEmail);
|
||||
stbEmailContent.setOperation(OperationType.SELECT_OBJECT);
|
||||
@@ -803,11 +802,7 @@ public class EmsController {
|
||||
stbEmailContent = entityProcessor.processEntity(stbEmailContent, multiDBTransactionManager);
|
||||
|
||||
if (stbEmailContent != null) {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename("email.eml").build().toString());
|
||||
|
||||
byte[] byteArr = null;
|
||||
byte[] byteArr;
|
||||
|
||||
String pattern = "[^\\x00-\\x7F]";
|
||||
Pattern pat = Pattern.compile(pattern);
|
||||
@@ -819,13 +814,18 @@ public class EmsController {
|
||||
byteArr = Base64.decodeBase64(stbEmailContent.getEmailContent());
|
||||
}
|
||||
|
||||
response.setContentLength(byteArr != null ? byteArr.length : 0);
|
||||
return byteArr;
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
||||
.contentLength(byteArr != null ? byteArr.length : 0)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename("email.eml")
|
||||
.build()
|
||||
.toString())
|
||||
.body(byteArr);
|
||||
}
|
||||
|
||||
response.sendError(404, "Allegato non trovato");
|
||||
return null;
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_DOC_PDF, method = RequestMethod.GET)
|
||||
@@ -884,12 +884,13 @@ public class EmsController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_ORD_PDF, method = RequestMethod.GET)
|
||||
public byte[] downloadDtbOrdPdf(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String gestione,
|
||||
@RequestParam String dataOrd,
|
||||
@RequestParam Integer numOrd,
|
||||
@RequestParam Integer versione) throws Exception {
|
||||
public ResponseEntity<byte[]> downloadDtbOrdPdf(
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String gestione,
|
||||
@RequestParam String dataOrd,
|
||||
@RequestParam Integer numOrd,
|
||||
@RequestParam Integer versione) throws Exception {
|
||||
|
||||
DtbOrdPdf dtbOrdPdf = new DtbOrdPdf();
|
||||
dtbOrdPdf.setGestione(gestione);
|
||||
dtbOrdPdf.setDataOrd(UtilityString.parseLocalDate(dataOrd));
|
||||
@@ -900,17 +901,20 @@ public class EmsController {
|
||||
dtbOrdPdf = entityProcessor.processEntity(dtbOrdPdf, multiDBTransactionManager);
|
||||
|
||||
if (dtbOrdPdf != null) {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename(dtbOrdPdf.getFilename()).build().toString());
|
||||
|
||||
byte[] byteArr = dtbOrdPdf.getFilecontentByteArr(true);
|
||||
response.setContentLength(byteArr != null ? byteArr.length : 0);
|
||||
return byteArr;
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.APPLICATION_PDF)
|
||||
.contentLength(byteArr != null ? byteArr.length : 0)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename(ContentDisposition.attachment().filename(dtbOrdPdf.getFilename()).build().toString())
|
||||
.build()
|
||||
.toString())
|
||||
.body(byteArr);
|
||||
}
|
||||
|
||||
response.sendError(404, "Allegato non trovato");
|
||||
return null;
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_UPLOAD_STB_FILE_ATTACHMENT, method = RequestMethod.POST)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.ems.exception;
|
||||
|
||||
public class InvalidCustomerDbException extends RuntimeException {
|
||||
public InvalidCustomerDbException(String dbName) {
|
||||
super("Invalid customer database name: " + dbName + ". Please check your ems_settings.json");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.ems.exception;
|
||||
|
||||
public class InvalidDbNameException extends RuntimeException {
|
||||
public InvalidDbNameException(String dbName) {
|
||||
super("Invalid database name: " + dbName + ". Please check your ems_settings.json");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.ems.exception;
|
||||
|
||||
public class InvalidProfileDbException extends RuntimeException {
|
||||
public InvalidProfileDbException(String profileDb) {
|
||||
super("Invalid profile db: " + profileDb + ". Please check your ems_settings.json");
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package it.integry.ems.file_formatter.txt;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import it.integry.ems_model.annotation.DtoField;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -10,6 +11,7 @@ import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -76,8 +78,16 @@ public class TxtMapper<T> {
|
||||
|
||||
if (ignorePosition)
|
||||
stringBuilder.append(value).append(fieldsSplitChar);
|
||||
else
|
||||
else {
|
||||
if ( stringBuilder.length() > 0 && stringBuilder.length() < dtoField.startPosition() ) {
|
||||
int numChar = dtoField.startPosition() - stringBuilder.length();
|
||||
for (int i = 0; i < numChar; i++) {
|
||||
stringBuilder.append(fieldsSplitChar);
|
||||
}
|
||||
|
||||
}
|
||||
stringBuilder.insert(dtoField.startPosition(), value).append(fieldsSplitChar);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
@@ -208,6 +218,8 @@ public class TxtMapper<T> {
|
||||
if (value != null) {
|
||||
if (!UtilityString.isNullOrEmpty(dtoField.format()) && value instanceof Date) {
|
||||
value = new SimpleDateFormat(dtoField.format()).format(value);
|
||||
} else if (!UtilityString.isNullOrEmpty(dtoField.format()) && value instanceof LocalDate) {
|
||||
value = UtilityLocalDate.formatDate((LocalDate) value, dtoField.format() );
|
||||
} else if (!UtilityString.isNullOrEmpty(dtoField.formula()) && value instanceof BigDecimal) {
|
||||
value = ((BigDecimal) value).setScale(dtoField.scale(), RoundingMode.HALF_DOWN);
|
||||
String formula = dtoField.formula().replaceAll("this", value.toString());
|
||||
|
||||
@@ -71,7 +71,8 @@ public enum IntegryCustomer {
|
||||
Gramm(IntegryCustomerDB.Gramm_Gramm,
|
||||
IntegryCustomerDB.Gramm_PrimeOlive,
|
||||
IntegryCustomerDB.Gramm_ProveStage,
|
||||
IntegryCustomerDB.Gramm_2MHolding),
|
||||
IntegryCustomerDB.Gramm_2MHolding,
|
||||
IntegryCustomerDB.Gramm_GrammUsa),
|
||||
Idrotecnica(IntegryCustomerDB.Idrotecnica_Idrotecnica),
|
||||
Igood(IntegryCustomerDB.Igood_Aida,
|
||||
IntegryCustomerDB.Igood_Igood,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package it.integry.ems.migration._base;
|
||||
|
||||
import it.integry.ems.exception.InvalidCustomerDbException;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -96,6 +97,7 @@ public enum IntegryCustomerDB {
|
||||
Gramm_PrimeOlive("primeolive"),
|
||||
Gramm_ProveStage("grammprovestage"),
|
||||
Gramm_2MHolding("dueemme"),
|
||||
Gramm_GrammUsa("gramm_usa"),
|
||||
|
||||
|
||||
Idrotecnica_Idrotecnica("idrotecnica"),
|
||||
@@ -234,6 +236,6 @@ public enum IntegryCustomerDB {
|
||||
|
||||
return Arrays.stream(values()).filter(x -> x.getValue().equalsIgnoreCase(value))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
.orElseThrow(() -> new InvalidCustomerDbException(value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ public class Migration_20251114163222 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
executeStatement("ALTER TABLE vtb_dest ADD data_mod DATETIME");
|
||||
executeStatement("ALTER TABLE ptb_pros ADD data_mod DATETIME");
|
||||
executeStatement("ALTER TABLE ptb_pros_rif ADD data_mod DATETIME");
|
||||
|
||||
@@ -10,6 +10,8 @@ public class Migration_20251117100418 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
createOrUpdateProcedure("sp_moveTableToFileGroup", "CREATE PROCEDURE [dbo].[sp_moveTableToFileGroup] (@tableName varchar(max), @fileGroup varchar(max), @fileName varchar(max), @createFile varchar(1) = 'N')\n" +
|
||||
"AS\n" +
|
||||
|
||||
@@ -11,6 +11,9 @@ public class Migration_20251118172320 extends BaseMigration implements Migration
|
||||
return;
|
||||
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
createOrUpdateTrigger("tr_changeTipoRiep", "CREATE TRIGGER [dbo].[tr_changeTipoRiep]\n" +
|
||||
" ON [dbo].[ctb_cont]\n" +
|
||||
" INSTEAD OF update\n" +
|
||||
|
||||
@@ -10,6 +10,9 @@ public class Migration_20251119084719 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
executeStatement("alter table dtb_note_doc add flag_bio bit not null default 0");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ public class Migration_20251120123843 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
executeStatement("alter table gtb_anag alter column citta varchar(60)");
|
||||
|
||||
createOrUpdateFunction("IntToBase36", "CREATE FUNCTION dbo.IntToBase36(@n bigint)\n" +
|
||||
|
||||
@@ -10,6 +10,9 @@ public class Migration_20251120153047 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
executeStatement("alter table gtb_anag alter column rag_soc varchar(100)");
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ public class Migration_20251120181812 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
createOrUpdateView("cvw_tipi_pdc", "CREATE VIEW cvw_tipi_pdc AS\n" +
|
||||
"SELECT '1' AS codice, Upper('Attivo') descrizione, '1' as sezione\n" +
|
||||
|
||||
@@ -10,6 +10,8 @@ public class Migration_20251121150257 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
createOrUpdateFunction("getMaggiorazioneSpese", "CREATE FUNCTION [dbo].[getMaggiorazioneSpese](@dataValidita datetime, @codVlis varchar(5), @codSpes varchar(5)) \n" +
|
||||
"RETURNS TABLE AS \n" +
|
||||
|
||||
@@ -10,6 +10,9 @@ public class Migration_20251124135552 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
createOrUpdateFunction("getGrigliaAcquisto","CREATE FUNCTION [dbo].[getGrigliaAcquisto] (@dataValidita datetime, @codAlis varchar(5), @codMdep varchar(5), @codArtFor varchar(25), @codMart varchar(15)) RETURNS TABLE AS\n" +
|
||||
"return\n" +
|
||||
"SELECT *\n" +
|
||||
|
||||
@@ -10,6 +10,9 @@ public class Migration_20251124164630 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
createOrUpdateFunction("getMaterialiDistinta",
|
||||
"CREATE FUNCTION [dbo].[getMaterialiDistinta](@codProd VARCHAR(15), @explodeSemilavorati BIT)\n" +
|
||||
" RETURNS TABLE\n" +
|
||||
|
||||
@@ -10,6 +10,9 @@ public class Migration_20251125095325 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
createOrUpdateFunction("getMaterialiDistinta",
|
||||
"CREATE FUNCTION [dbo].[getMaterialiDistinta](@codProd VARCHAR(15), @explodeSemilavorati BIT)\n" +
|
||||
" RETURNS TABLE\n" +
|
||||
|
||||
@@ -10,6 +10,9 @@ public class Migration_20251125105713 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
|
||||
createOrUpdateProcedure("MRP_UpdateQtaImpProx", "CREATE Procedure [dbo].[MRP_UpdateQtaImpProx](@elencoArticoli varchar(max) = null)\n" +
|
||||
"AS \n" +
|
||||
|
||||
@@ -12,6 +12,9 @@ public class Migration_20251127104634 extends BaseMigration implements Migration
|
||||
return;
|
||||
if (!isCustomer(IntegryCustomer.Biolevante)) return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
createOrUpdateFunction("f_pp_consuntivo_prod_tracc", "CREATE function [dbo].[f_pp_consuntivo_prod_tracc] (@as_codProdParent varchar(15), @as_partitaMagParent varchar(20), @ac_qtaProdParent numeric(20,5), @as_codProd varchar(15), @as_partitaMag varchar(20), @ac_qtaProd numeric(20, 5), @ai_livello integer, @as_item_id varchar(255), @ai_idRiga integer) \n" +
|
||||
"RETURNS @dettCosti TABLE(livello integer, \n" +
|
||||
" item_id varchar(255),\n" +
|
||||
|
||||
@@ -15,6 +15,9 @@ public class Migration_20251127114735 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
executeStatement(
|
||||
"exec DropForeignKey 'mtb_aart', 'mtb_marchio_linea'",
|
||||
"exec DropForeignKey 'mtb_aart', 'mtb_marchio_slinea'",
|
||||
|
||||
@@ -10,6 +10,9 @@ public class Migration_20251128153854 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
executeStatement("update stb_menu set flag_attivo = 'N' where cod_opz in ('mg077', 'mg078', 'mg079', 'mg080')");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ public class Migration_20251128190648 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Carelli_Winact)) {
|
||||
dropTable("crl_amac_manutenzioni_files");
|
||||
dropTable("ctb_amac_manutenzioni");
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251201090147 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("alter table ctb_cont add flag_attivo bit not null default 1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251201105344 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isDMS())
|
||||
return;
|
||||
|
||||
createOrUpdateTrigger("tr_changeTipoRiep", "CREATE TRIGGER [dbo].[tr_changeTipoRiep]\n" +
|
||||
" ON [dbo].[ctb_cont]\n" +
|
||||
" INSTEAD OF update\n" +
|
||||
"AS\n" +
|
||||
"BEGIN\n" +
|
||||
"\tSET NOCOUNT ON;\n" +
|
||||
"\tdeclare @cnt int = 0\n" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
"\tif Update(tipo_riep ) \n" +
|
||||
"\tbegin\n" +
|
||||
"\t\tSELECT @cnt = COUNT(*) from ctb_movr inner join inserted on ctb_movr.cod_ccon = inserted.cod_ccon and \n" +
|
||||
"\t\t( (inserted.tipo_riep is null and ctb_movr.cod_anag is not null ) or (inserted.tipo_riep is null and ctb_movr.cod_anag is null ) )\n" +
|
||||
"\tend\n" +
|
||||
"\t \n" +
|
||||
"\t \n" +
|
||||
" IF @cnt > 0\n" +
|
||||
" BEGIN\n" +
|
||||
" THROW 50002, 'Update non consentito: esistono movimenti collegati.', 1;\n" +
|
||||
" RETURN;\n" +
|
||||
" END\n" +
|
||||
"\t\n" +
|
||||
"\tupdate ctb_cont \n" +
|
||||
"\tset cod_cmas = inserted.cod_cmas,\n" +
|
||||
"\t\tcod_cgrp = inserted.cod_cgrp,\n" +
|
||||
"\t\tdescrizione = inserted.descrizione,\n" +
|
||||
"\t\ttipo_riep = inserted.tipo_riep,\n" +
|
||||
"\t\tsaldo_att = inserted.saldo_att,\n" +
|
||||
"\t\tflag_cont_analit = inserted.flag_cont_analit,\n" +
|
||||
"\t\tcod_biva = inserted.cod_biva,\n" +
|
||||
"\t\tcod_jfas = inserted.cod_jfas,\n" +
|
||||
"\t\tcod_csct = inserted.cod_csct,\n" +
|
||||
"\t\tflag_risconto = inserted.flag_risconto,\n" +
|
||||
"\t\tperc_ded = inserted.perc_ded,\n" +
|
||||
"\t\tdiacod = inserted.diacod,\n" +
|
||||
"\t\tdata_ins = inserted.data_ins,\n" +
|
||||
"\t\tdata_mod = inserted.data_mod,\n" +
|
||||
"\t\tflag_attivo = inserted.flag_attivo\n" +
|
||||
"\tfrom ctb_cont inner join inserted on ctb_cont.cod_ccon = inserted.cod_ccon\n" +
|
||||
"\n" +
|
||||
"END");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251201124048 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'");
|
||||
createSetup("PICKING", "ACCETTAZIONE_BOLLA", "FLAG_ENABLE_MARK_RECEIVED", "N",
|
||||
"Abilita il tasto nell'avanti elenco per poter settare a true il campo merce_ricevuta in wdtb_doct", false, "SI_NO", false, false,
|
||||
false, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'");
|
||||
|
||||
if (isCustomer(IntegryCustomer.Carelli)) {
|
||||
updateSetupValue("PICKING", "ACCETTAZIONE_BOLLA", "FLAG_ENABLE_MARK_RECEIVED", "S");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251201164935 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup("W_DDOCU_TAB_RC", "SETUP", "LOG_PICKING", "N",
|
||||
"Se impostato a S viene salvato un file di log su ogni singola postazione, un file al giorno, con il log dei passaggi nella fase di picking)", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251202094633 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
if (!isCustomerDb(IntegryCustomerDB.Dulciar_Dulciar))
|
||||
return;
|
||||
|
||||
executeStatement("update stb_gest_setup set value = 'S' where gest_name = 'DTB_ORDT' and key_section in ('NUOVA_PROCEDURA','DISABLE_TRIGGER_ORDL')");
|
||||
executeStatement("update stb_gest_sync set syncronize = 'R' where gest_name like 'lord%'");
|
||||
executeStatement("update stb_gest_sync set syncronize = 'R' where gest_name like 'pord%'");
|
||||
executeStatement("insert into stb_abil \n" +
|
||||
"select case when gest_name = 'lordi' then 'LG081' else 'AG031' end , user_name, 'S', case when gest_name = 'lordi' then 'lordi_tab' else 'pordi_tab' end from stb_abil \n" +
|
||||
"where gest_name in ('lordi','pordi') and case when gest_name = 'lordi' then 'LG081' else 'AG031' end + user_name not in (select cod_opz + user_name from stb_abil where cod_opz in ('LG081','AG031'))");
|
||||
executeStatement("update stb_abil set flag_abil = 'N' where gest_name in ('lordi','pordi')");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251202140350 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup("w_cmovi_rc", "SETUP", "PRINT_QUIETANZA", "S",
|
||||
"chiede e fa stampare la lettera di quietanza", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
|
||||
|
||||
if(isCustomer(IntegryCustomer.Carelli))
|
||||
updateSetupValue("w_cmovi_rc", "SETUP", "PRINT_QUIETANZA", "N");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251202161223 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createOrUpdateView("cvw_saldo_scad", "CREATE VIEW dbo.cvw_saldo_scad\n" +
|
||||
" WITH SCHEMABINDING\n" +
|
||||
" AS\n" +
|
||||
" SELECT ctb_scad.tipo_anag,\n" +
|
||||
" ctb_scad.cod_anag,\n" +
|
||||
" ctb_scad.anno_part,\n" +
|
||||
" ctb_scad.ser_doc,\n" +
|
||||
" ctb_scad.num_doc,\n" +
|
||||
" SUM(ctb_scad.imp_dare) AS dare_scad,\n" +
|
||||
" SUM(ctb_scad.imp_avere) AS avere_scad,\n" +
|
||||
" COUNT_BIG(*) AS id\n" +
|
||||
" FROM dbo.ctb_scad\n" +
|
||||
" GROUP BY ctb_scad.tipo_anag,\n" +
|
||||
" ctb_scad.cod_anag,\n" +
|
||||
" ctb_scad.anno_part,\n" +
|
||||
" ctb_scad.ser_doc,\n" +
|
||||
" ctb_scad.num_doc");
|
||||
executeStatement("CREATE UNIQUE CLUSTERED INDEX ix_cvw_saldo_scad\n" +
|
||||
" ON dbo.cvw_saldo_scad (\n" +
|
||||
" tipo_anag,\n" +
|
||||
" cod_anag,\n" +
|
||||
" anno_part,\n" +
|
||||
" ser_doc,\n" +
|
||||
" num_doc\n" +
|
||||
" );");
|
||||
|
||||
createOrUpdateView("cvw_saldo_part",
|
||||
"CREATE VIEW dbo.cvw_saldo_part\n" +
|
||||
" WITH SCHEMABINDING\n" +
|
||||
"AS\n" +
|
||||
"SELECT ctb_part.tipo_anag,\n" +
|
||||
" ctb_part.cod_anag,\n" +
|
||||
" ctb_part.anno_part,\n" +
|
||||
" ctb_part.ser_doc,\n" +
|
||||
" ctb_part.num_doc,\n" +
|
||||
" SUM(ctb_parr.imp_dare * ctb_part.cambio_divi_cont / ctb_parr.cambio_divi_cont) AS dare_part,\n" +
|
||||
" SUM(ctb_parr.imp_avere * ctb_part.cambio_divi_cont / ctb_parr.cambio_divi_cont) AS avere_part,\n" +
|
||||
" COUNT_BIG(*) AS id\n" +
|
||||
"FROM dbo.ctb_part\n" +
|
||||
" INNER JOIN dbo.ctb_parr\n" +
|
||||
" ON ctb_part.tipo_anag = ctb_parr.tipo_anag AND ctb_part.cod_anag = ctb_parr.cod_anag AND\n" +
|
||||
" ctb_part.anno_part = ctb_parr.anno_part AND ctb_part.ser_doc = ctb_parr.ser_doc AND\n" +
|
||||
" ctb_part.num_doc = ctb_parr.num_doc\n" +
|
||||
"GROUP BY ctb_part.tipo_anag, ctb_part.cod_anag, ctb_part.anno_part, ctb_part.ser_doc, ctb_part.num_doc");
|
||||
executeStatement("CREATE UNIQUE CLUSTERED INDEX ix_cvw_saldo_part\n" +
|
||||
" ON dbo.cvw_saldo_part (\n" +
|
||||
" tipo_anag,\n" +
|
||||
" cod_anag,\n" +
|
||||
" anno_part,\n" +
|
||||
" ser_doc,\n" +
|
||||
" num_doc\n" +
|
||||
" );");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251203085140 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if(isCustomer(IntegryCustomer.RossoGargano))
|
||||
updateSetupValue("w_cmovi_rc", "SETUP", "PRINT_QUIETANZA", "N");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251203121227 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
createOrUpdateFunction("f_AggiungiGiorniScad", "CREATE FUNCTION [dbo].[f_AggiungiGiorniScad](@dataIniz DateTime, @giorni int, @ls_dataRif varchar(20)) \n" +
|
||||
"RETURNS dateTime\n" +
|
||||
" begin\n" +
|
||||
"\n" +
|
||||
" declare @ldt_dataInizCalc dateTime\n" +
|
||||
" DECLARE @mesi INT = @giorni / 30;\n" +
|
||||
"\n" +
|
||||
" SELECT @ldt_dataInizCalc = \n" +
|
||||
" CASE WHEN (@giorni % 30) > 0 OR left(@ls_dataRif, 12) = 'DATA FATTURA' THEN \n" +
|
||||
" DATEADD(Day, @giorni , @dataIniz )\n" +
|
||||
" ELSE\n" +
|
||||
" CASE WHEN @ls_dataRif = 'FINE MESE' AND @giorni = 30 AND Datepart(month, @dataIniz) = 1\n" +
|
||||
" THEN\n" +
|
||||
" dbo.f_getLastDayOfMonth(Convert(datetime, Cast(Year(@dataIniz) as varchar) + '/02/01' ))\n" +
|
||||
" ELSE\n" +
|
||||
" CASE WHEN (@giorni % 30) = 0 AND @ls_dataRif = 'FINE MESE' AND Datepart(month, @dataIniz) = 12\n" +
|
||||
" THEN\n" +
|
||||
" dbo.f_getLastDayOfMonth(DATEADD(Month, @mesi , @dataIniz ))\n" +
|
||||
" ELSE\n" +
|
||||
" dbo.f_getLastDayOfMonth(DATEADD(Day, @giorni , @dataIniz ))\n" +
|
||||
" END \n" +
|
||||
" END\n" +
|
||||
" END\n" +
|
||||
" return (@ldt_dataInizCalc)\n" +
|
||||
" end;");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251203165544 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("exec dbo.DropPrimaryKey 'azienda'\n",
|
||||
"alter table azienda add id tinyint not null default 1;\n",
|
||||
"alter table azienda add constraint pk_azienda primary key (id);\n",
|
||||
"alter table azienda add constraint chk_id_azienda CHECK (id = 1)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251204131327 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("alter table mtb_aart_desc Add descrizione_html text",
|
||||
"alter table mtb_aart_equi add flag_equi_anag BIT not null DEFAULT 0"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251205101442 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("alter table srl_activity_type_user add activity_default bit not null default 0;\n",
|
||||
"CREATE UNIQUE INDEX ux_srl_activity_type_user_default\n" +
|
||||
"ON srl_activity_type_user (user_name, flag_tipologia)\n" +
|
||||
"WHERE activity_default = 1;");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ public class Migration_20251205111526 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
createOrUpdateView("mvw_sitart_udc_det_inventario","CREATE VIEW [dbo].[mvw_sitart_udc_det_inventario] AS\n" +
|
||||
"WITH baseMtbColr AS (SELECT c,\n" +
|
||||
"\n" +
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251205130201 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if ( !existsColumn("mtb_depo", "data_iniz_vent" ))
|
||||
executeStatement("ALTER TABLE mtb_depo ADD data_iniz_vent datetime");
|
||||
|
||||
if ( !existsColumn("mtb_depo", "data_fine_vent" ))
|
||||
executeStatement("ALTER TABLE mtb_depo ADD data_fine_vent datetime");
|
||||
|
||||
if ( !existsColumn("ctb_movi", "ventilazione" ))
|
||||
executeStatement("ALTER TABLE ctb_movi ADD ventilazione bit not null default 1");
|
||||
|
||||
if (isCustomer(IntegryCustomer.CapelliMonelli) && isCustomerDb(IntegryCustomerDB.Gramm_GrammUsa)) {
|
||||
executeStatement(
|
||||
"CREATE TABLE [oltb_operregi_log] (data_file DATETIME, prog_file INT, cod_CUA VARCHAR (16), ID_depo NUMERIC (10, 0), num_operaz INT, data_operaz DATETIME, id_err INT, error_text VARCHAR (MAX), tipo_errore INT)",
|
||||
"ALTER TABLE [atb_offt] ADD flag_tipo_off INT",
|
||||
"ALTER TABLE [ctb_varbeni] ADD num_cmov INT",
|
||||
"CREATE TABLE [mtb_list_costo_lisa_data] (id BIGINT, listino VARCHAR (5), data_rif DATETIME, cod_mart VARCHAR (15), cod_art_for VARCHAR (25), cod_promo VARCHAR (10), costo_lisa DECIMAL (20, 5))",
|
||||
"ALTER TABLE [atb_tipi] ADD socio_aziendale BIT",
|
||||
"ALTER TABLE [dtb_dif_bolle] ADD targa VARCHAR (20), posti_pallet INT",
|
||||
"CREATE TABLE [oltb_categorie] (cod_ocat VARCHAR (5), categoria VARCHAR (80))",
|
||||
"ALTER TABLE [ctb_movi] ADD ventilazione BIT",
|
||||
"CREATE TABLE [oltb_macroaree] (Cod_omar VARCHAR (5), acronimo VARCHAR (5), macro_area VARCHAR (80), flag_ObbligOrigSpec VARCHAR (1), flag_DopIgp VARCHAR (1))",
|
||||
"ALTER TABLE [dtb_ord_steps] ADD posizione_out VARCHAR (MAX)",
|
||||
"CREATE TABLE [oltb_origspec] (cod_omar VARCHAR (5), cod_oorspec VARCHAR (5), acronimo VARCHAR (5), origine_spec VARCHAR (80))"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251205154053 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("DELETE FROM STB_GEST_SETUP WHERE GEST_NAME LIKE '%DOCUMENTI DI VENDITA'");
|
||||
|
||||
createSetup("EXPORT_DOCUMENTI VENDITA", "MD", "ATTIVO", "N",
|
||||
"Inserire S/N per attivare/disattivare il tipo di importazione", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("EXPORT_DOCUMENTI VENDITA", "MD", "EMAIL_FOR_LOG", null,
|
||||
"Inserire il file l'indirizzo email per inviare il log dell'importazione", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("EXPORT_DOCUMENTI VENDITA", "MD", "GG_CANC_FILE", null,
|
||||
"Giorni per la cancellazione dei file dalla cartella di appoggio", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("EXPORT_DOCUMENTI VENDITA", "MD", "IMPORT_REST", "S",
|
||||
"Inserire S/N per attivare/disattivare il salvataggio con i servizi REST", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("EXPORT_DOCUMENTI VENDITA", "MD", "PATH_FILE", null,
|
||||
"Directory dove vengono salvati i file temporanei, se non è configurata i file saranno salvati in c:\\mlSetupWS\\TEMP_EXPORT", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
|
||||
if (!isCustomer(IntegryCustomer.Sardinya)) return;
|
||||
|
||||
updateSetupValue("EXPORT_DOCUMENTI VENDITA", "MD", "ATTIVO", "S",
|
||||
"Inserire S/N per attivare/disattivare il tipo di importazione", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,16 +8,14 @@ import it.integry.ems_model.entity.DtbDocr;
|
||||
import it.integry.ems_model.entity.DtbDoct;
|
||||
import it.integry.ems_model.entity.NtbDoct;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityHashMap;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import it.integry.ems_model.utility.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -26,7 +24,6 @@ import static it.integry.ems.rules.completing.QueryRules.getSingleValue;
|
||||
|
||||
public class DocumentCheckRules {
|
||||
private static void checkDataMov(LocalDate dataCmov, DtbDoct entity, Connection conn) throws Exception {
|
||||
|
||||
// ACQUISIZIONE DATI AZIENDA
|
||||
final Azienda defaultAzienda = Azienda.getDefaultAzienda(conn);
|
||||
Integer annoAtt = defaultAzienda.getAnnoAttuale();
|
||||
|
||||
@@ -191,6 +191,12 @@ public class OrdineLavorazioneDTO {
|
||||
@JsonProperty("qtaProd")
|
||||
@JsonSerialize
|
||||
private BigDecimal qtaProd;
|
||||
|
||||
@SqlField(value = "qta_ord")
|
||||
@JsonProperty("qtaOrd")
|
||||
@JsonSerialize
|
||||
private BigDecimal qtaOrd;
|
||||
|
||||
@SqlField(value = "qta_lav")
|
||||
@JsonProperty("qtaLav")
|
||||
@JsonSerialize
|
||||
@@ -731,6 +737,15 @@ public class OrdineLavorazioneDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaOrd() {
|
||||
return qtaOrd;
|
||||
}
|
||||
|
||||
public OrdineLavorazioneDTO setQtaOrd(BigDecimal qtaOrd) {
|
||||
this.qtaOrd = qtaOrd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaLav() {
|
||||
return qtaLav;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,8 @@ public class ProductionOrderDataHandlerService {
|
||||
" jtb_comt.cod_jcom,\n" +
|
||||
" jtb_comt.descrizione as descrizione_commessa,\n" +
|
||||
" jl.id_lotto,\n" +
|
||||
" dtb_ordt.qta_prod as qta_ord \n" +
|
||||
" mtb_aart.qta_cnf,\n" +
|
||||
" ordl.qta_prod AS qta_ord\n" +
|
||||
"FROM dtb_ordt\n" +
|
||||
" INNER JOIN dtb_ordt ordl ON dtb_ordt.gestione = ordl.gestione_rif\n" +
|
||||
" AND dtb_ordt.data_ord = ordl.data_ord_rif\n" +
|
||||
|
||||
@@ -3,6 +3,8 @@ package it.integry.ems.settings.Model;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import it.integry.ems.exception.InvalidDbNameException;
|
||||
import it.integry.ems.exception.InvalidProfileDbException;
|
||||
import it.integry.ems.expansion.ObservableArrayList;
|
||||
import it.integry.ems.expansion.ObservableField;
|
||||
import it.integry.ems.settings.SettingsHelper;
|
||||
@@ -199,7 +201,7 @@ public class SettingsModel implements InitializingBean {
|
||||
.filter(x -> x.getDbName().equalsIgnoreCase(dbName))
|
||||
.map(AvailableConnectionModel::getProfileName)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
.orElseThrow(() -> new InvalidDbNameException(dbName));
|
||||
|
||||
return profileDb;
|
||||
}
|
||||
@@ -209,7 +211,7 @@ public class SettingsModel implements InitializingBean {
|
||||
.filter(x -> x.getProfileName().equalsIgnoreCase(profileDb))
|
||||
.map(AvailableConnectionModel::getDbName)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
.orElseThrow(() -> new InvalidProfileDbException(profileDb));
|
||||
|
||||
return dbName;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class UserCacheService {
|
||||
}
|
||||
|
||||
List<WtbDepo> availableDepoList = entityCacheComponent.getCachedEntitiesList(customerDB, WtbDepo.ENTITY,
|
||||
y -> x.getUsername().equalsIgnoreCase(y.getUserName())
|
||||
y -> userDTO.getUsername().equalsIgnoreCase(y.getUserName())
|
||||
);
|
||||
userDTO.setAvailableDepoList(availableDepoList);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.kie.api.definition.type.PropertyReactive;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
|
||||
@Master
|
||||
@@ -34,6 +34,9 @@ public class Azienda extends EntityBase {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@PK
|
||||
@SqlField(value = "id", nullable = false)
|
||||
private Short id;
|
||||
|
||||
@SqlField(value = "nome_ditta", maxLength = 40, nullable = false)
|
||||
private String nomeDitta;
|
||||
|
||||
@@ -86,10 +89,10 @@ public class Azienda extends EntityBase {
|
||||
private String ribaRSocBreve;
|
||||
|
||||
@SqlField(value = "data_iniz_msg")
|
||||
private Date dataInizMsg;
|
||||
private LocalDate dataInizMsg;
|
||||
|
||||
@SqlField(value = "data_fine_msg")
|
||||
private Date dataFineMsg;
|
||||
private LocalDate dataFineMsg;
|
||||
|
||||
@SqlField(value = "messaggio_doc", maxLength = 130)
|
||||
private String messaggioDoc;
|
||||
@@ -98,10 +101,10 @@ public class Azienda extends EntityBase {
|
||||
private String liquidazioniIva;
|
||||
|
||||
@SqlField(value = "last_upg_db")
|
||||
private Date lastUpgDb;
|
||||
private LocalDate lastUpgDb;
|
||||
|
||||
@SqlField(value = "data_upd_sw", nullable = false)
|
||||
private Date dataUpdSw;
|
||||
private LocalDateTime dataUpdSw;
|
||||
|
||||
@SqlField(value = "logo_file", maxLength = 128)
|
||||
private String logoFile;
|
||||
@@ -167,7 +170,7 @@ public class Azienda extends EntityBase {
|
||||
private String persFisicaSesso;
|
||||
|
||||
@SqlField(value = "pers_fisica_data_nascita")
|
||||
private Date persFisicaDataNascita;
|
||||
private LocalDate persFisicaDataNascita;
|
||||
|
||||
@SqlField(value = "pers_fisica_comune_nascita", maxLength = 30)
|
||||
private String persFisicaComuneNascita;
|
||||
@@ -275,11 +278,26 @@ public class Azienda extends EntityBase {
|
||||
private String rapprLegaleComuneNascita;
|
||||
|
||||
@SqlField(value = "rappr_legale_data_nascita")
|
||||
private Date rapprLegaleDataNascita;
|
||||
private LocalDate rapprLegaleDataNascita;
|
||||
|
||||
@SqlField(value = "rappr_legale_prov_nascita", maxLength = 2)
|
||||
private String rapprLegaleProvNascita;
|
||||
|
||||
@SqlField(value = "rappr_legale", maxLength = 255)
|
||||
private String rapprLegale;
|
||||
|
||||
@SqlField(value = "flag_fatt_ele", maxLength = 1)
|
||||
private String flagFattEle;
|
||||
|
||||
@SqlField(value = "cod_fda", maxLength = 20)
|
||||
private String codFda;
|
||||
|
||||
@SqlField(value = "cod_fce")
|
||||
private Integer codFce;
|
||||
|
||||
@SqlField(value = "cod_lucid", maxLength = 20)
|
||||
private String codLucid;
|
||||
|
||||
@SqlField(value = "giorno_iniz_anno_fisc", nullable = false)
|
||||
private Integer giornoInizAnnoFisc;
|
||||
|
||||
@@ -289,6 +307,9 @@ public class Azienda extends EntityBase {
|
||||
@SqlField(value = "flag_regime_speciale_iva", maxLength = 1, nullable = false, defaultObjectValue = "N")
|
||||
private String flagRegimeSpecialeIva;
|
||||
|
||||
@SqlField(value = "cod_cuc", maxLength = 10)
|
||||
private String codCuc;
|
||||
|
||||
@JsonIgnore
|
||||
@SqlField(value = "jwt_secret_key", maxLength = -1)
|
||||
private String jwtSecretKey;
|
||||
@@ -311,260 +332,322 @@ public class Azienda extends EntityBase {
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowDTO(conn, sql, Azienda.class);
|
||||
}
|
||||
|
||||
public String getApplicationName() {
|
||||
return applicationName;
|
||||
}
|
||||
|
||||
public ApplicationName getApplicationNameEnum() {
|
||||
return ApplicationName.valueOf(getApplicationName());
|
||||
}
|
||||
|
||||
public void setApplicationName(String applicationName) {
|
||||
this.applicationName = applicationName;
|
||||
}
|
||||
|
||||
public Short getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Azienda setId(Short id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNomeDitta() {
|
||||
return nomeDitta;
|
||||
}
|
||||
|
||||
public void setNomeDitta(String nomeDitta) {
|
||||
public Azienda setNomeDitta(String nomeDitta) {
|
||||
this.nomeDitta = nomeDitta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIndirizzo() {
|
||||
return indirizzo;
|
||||
}
|
||||
|
||||
public void setIndirizzo(String indirizzo) {
|
||||
public Azienda setIndirizzo(String indirizzo) {
|
||||
this.indirizzo = indirizzo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCap() {
|
||||
return cap;
|
||||
}
|
||||
|
||||
public void setCap(String cap) {
|
||||
public Azienda setCap(String cap) {
|
||||
this.cap = cap;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCitta() {
|
||||
return citta;
|
||||
}
|
||||
|
||||
public void setCitta(String citta) {
|
||||
public Azienda setCitta(String citta) {
|
||||
this.citta = citta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProv() {
|
||||
return prov;
|
||||
}
|
||||
|
||||
public void setProv(String prov) {
|
||||
public Azienda setProv(String prov) {
|
||||
this.prov = prov;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartIva() {
|
||||
return partIva;
|
||||
}
|
||||
|
||||
public void setPartIva(String partIva) {
|
||||
public Azienda setPartIva(String partIva) {
|
||||
this.partIva = partIva;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNumTel() {
|
||||
return numTel;
|
||||
}
|
||||
|
||||
public void setNumTel(String numTel) {
|
||||
public Azienda setNumTel(String numTel) {
|
||||
this.numTel = numTel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNumFax() {
|
||||
return numFax;
|
||||
}
|
||||
|
||||
public void setNumFax(String numFax) {
|
||||
public Azienda setNumFax(String numFax) {
|
||||
this.numFax = numFax;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String geteMail() {
|
||||
return eMail;
|
||||
}
|
||||
|
||||
public void seteMail(String eMail) {
|
||||
public Azienda seteMail(String eMail) {
|
||||
this.eMail = eMail;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getAnnoContab() {
|
||||
return annoContab;
|
||||
}
|
||||
|
||||
public void setAnnoContab(Integer annoContab) {
|
||||
public Azienda setAnnoContab(Integer annoContab) {
|
||||
this.annoContab = annoContab;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getAnnoMagaz() {
|
||||
return annoMagaz;
|
||||
}
|
||||
|
||||
public void setAnnoMagaz(Integer annoMagaz) {
|
||||
public Azienda setAnnoMagaz(Integer annoMagaz) {
|
||||
this.annoMagaz = annoMagaz;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getAnnoAttuale() {
|
||||
return annoAttuale;
|
||||
}
|
||||
|
||||
public void setAnnoAttuale(Integer annoAttuale) {
|
||||
public Azienda setAnnoAttuale(Integer annoAttuale) {
|
||||
this.annoAttuale = annoAttuale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LocalDate getUltDataGio() {
|
||||
return ultDataGio;
|
||||
}
|
||||
|
||||
public void setUltDataGio(LocalDate ultDataGio) {
|
||||
public Azienda setUltDataGio(LocalDate ultDataGio) {
|
||||
this.ultDataGio = ultDataGio;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getUltNumGio() {
|
||||
return ultNumGio;
|
||||
}
|
||||
|
||||
public void setUltNumGio(Integer ultNumGio) {
|
||||
public Azienda setUltNumGio(Integer ultNumGio) {
|
||||
this.ultNumGio = ultNumGio;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRibaRSoc1() {
|
||||
return ribaRSoc1;
|
||||
}
|
||||
|
||||
public void setRibaRSoc1(String ribaRSoc1) {
|
||||
public Azienda setRibaRSoc1(String ribaRSoc1) {
|
||||
this.ribaRSoc1 = ribaRSoc1;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRibaRSoc2() {
|
||||
return ribaRSoc2;
|
||||
}
|
||||
|
||||
public void setRibaRSoc2(String ribaRSoc2) {
|
||||
public Azienda setRibaRSoc2(String ribaRSoc2) {
|
||||
this.ribaRSoc2 = ribaRSoc2;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRibaRSocBreve() {
|
||||
return ribaRSocBreve;
|
||||
}
|
||||
|
||||
public void setRibaRSocBreve(String ribaRSocBreve) {
|
||||
public Azienda setRibaRSocBreve(String ribaRSocBreve) {
|
||||
this.ribaRSocBreve = ribaRSocBreve;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataInizMsg() {
|
||||
public LocalDate getDataInizMsg() {
|
||||
return dataInizMsg;
|
||||
}
|
||||
|
||||
public void setDataInizMsg(Date dataInizMsg) {
|
||||
public Azienda setDataInizMsg(LocalDate dataInizMsg) {
|
||||
this.dataInizMsg = dataInizMsg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataFineMsg() {
|
||||
public LocalDate getDataFineMsg() {
|
||||
return dataFineMsg;
|
||||
}
|
||||
|
||||
public void setDataFineMsg(Date dataFineMsg) {
|
||||
public Azienda setDataFineMsg(LocalDate dataFineMsg) {
|
||||
this.dataFineMsg = dataFineMsg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMessaggioDoc() {
|
||||
return messaggioDoc;
|
||||
}
|
||||
|
||||
public void setMessaggioDoc(String messaggioDoc) {
|
||||
public Azienda setMessaggioDoc(String messaggioDoc) {
|
||||
this.messaggioDoc = messaggioDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiquidazioniIva() {
|
||||
return liquidazioniIva;
|
||||
}
|
||||
|
||||
public void setLiquidazioniIva(String liquidazioniIva) {
|
||||
public Azienda setLiquidazioniIva(String liquidazioniIva) {
|
||||
this.liquidazioniIva = liquidazioniIva;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getLastUpgDb() {
|
||||
public LocalDate getLastUpgDb() {
|
||||
return lastUpgDb;
|
||||
}
|
||||
|
||||
public void setLastUpgDb(Date lastUpgDb) {
|
||||
public Azienda setLastUpgDb(LocalDate lastUpgDb) {
|
||||
this.lastUpgDb = lastUpgDb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LocalDateTime getDataUpdSw() {
|
||||
return dataUpdSw;
|
||||
}
|
||||
|
||||
public Azienda setDataUpdSw(LocalDateTime dataUpdSw) {
|
||||
this.dataUpdSw = dataUpdSw;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLogoFile() {
|
||||
return logoFile;
|
||||
}
|
||||
|
||||
public void setLogoFile(String logoFile) {
|
||||
public Azienda setLogoFile(String logoFile) {
|
||||
this.logoFile = logoFile;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLogoB64() {
|
||||
return logoB64;
|
||||
}
|
||||
|
||||
public void setLogoB64(String logoB64) {
|
||||
public Azienda setLogoB64(String logoB64) {
|
||||
this.logoB64 = logoB64;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getUltDareAv() {
|
||||
return ultDareAv;
|
||||
}
|
||||
|
||||
public void setUltDareAv(BigDecimal ultDareAv) {
|
||||
public Azienda setUltDareAv(BigDecimal ultDareAv) {
|
||||
this.ultDareAv = ultDareAv;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSollTop() {
|
||||
return sollTop;
|
||||
}
|
||||
|
||||
public void setSollTop(Integer sollTop) {
|
||||
public Azienda setSollTop(Integer sollTop) {
|
||||
this.sollTop = sollTop;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSollLeft() {
|
||||
return sollLeft;
|
||||
}
|
||||
|
||||
public void setSollLeft(Integer sollLeft) {
|
||||
public Azienda setSollLeft(Integer sollLeft) {
|
||||
this.sollLeft = sollLeft;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getGgUtili() {
|
||||
return ggUtili;
|
||||
}
|
||||
|
||||
public void setGgUtili(Integer ggUtili) {
|
||||
public Azienda setGgUtili(Integer ggUtili) {
|
||||
this.ggUtili = ggUtili;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodSia() {
|
||||
return codSia;
|
||||
}
|
||||
|
||||
public void setCodSia(String codSia) {
|
||||
public Azienda setCodSia(String codSia) {
|
||||
this.codSia = codSia;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagFattDiff() {
|
||||
return flagFattDiff;
|
||||
}
|
||||
|
||||
public void setFlagFattDiff(String flagFattDiff) {
|
||||
public Azienda setFlagFattDiff(String flagFattDiff) {
|
||||
this.flagFattDiff = flagFattDiff;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSollHeadPersonal() {
|
||||
return sollHeadPersonal;
|
||||
}
|
||||
|
||||
public void setSollHeadPersonal(String sollHeadPersonal) {
|
||||
public Azienda setSollHeadPersonal(String sollHeadPersonal) {
|
||||
this.sollHeadPersonal = sollHeadPersonal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLastUpgSp() {
|
||||
return lastUpgSp;
|
||||
}
|
||||
|
||||
public void setLastUpgSp(String lastUpgSp) {
|
||||
public Azienda setLastUpgSp(String lastUpgSp) {
|
||||
this.lastUpgSp = lastUpgSp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLastUpgDbMenu() {
|
||||
@@ -580,352 +663,445 @@ public class Azienda extends EntityBase {
|
||||
return sitoWeb;
|
||||
}
|
||||
|
||||
public void setSitoWeb(String sitoWeb) {
|
||||
public Azienda setSitoWeb(String sitoWeb) {
|
||||
this.sitoWeb = sitoWeb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getCapitaleSoc() {
|
||||
return capitaleSoc;
|
||||
}
|
||||
|
||||
public void setCapitaleSoc(BigDecimal capitaleSoc) {
|
||||
public Azienda setCapitaleSoc(BigDecimal capitaleSoc) {
|
||||
this.capitaleSoc = capitaleSoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCciaa() {
|
||||
return cciaa;
|
||||
}
|
||||
|
||||
public void setCciaa(String cciaa) {
|
||||
public Azienda setCciaa(String cciaa) {
|
||||
this.cciaa = cciaa;
|
||||
}
|
||||
|
||||
public String getCodRuop() {
|
||||
return codRuop;
|
||||
}
|
||||
|
||||
public void setCodRuop(String codRuop) {
|
||||
this.codRuop = codRuop;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIscRegImp() {
|
||||
return iscRegImp;
|
||||
}
|
||||
|
||||
public void setIscRegImp(String iscRegImp) {
|
||||
public Azienda setIscRegImp(String iscRegImp) {
|
||||
this.iscRegImp = iscRegImp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRagSocMod() {
|
||||
return ragSocMod;
|
||||
}
|
||||
|
||||
public void setRagSocMod(String ragSocMod) {
|
||||
public Azienda setRagSocMod(String ragSocMod) {
|
||||
this.ragSocMod = ragSocMod;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPrefissoEan() {
|
||||
return prefissoEan;
|
||||
}
|
||||
|
||||
public void setPrefissoEan(String prefissoEan) {
|
||||
public Azienda setPrefissoEan(String prefissoEan) {
|
||||
this.prefissoEan = prefissoEan;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodFiscale() {
|
||||
return codFiscale;
|
||||
}
|
||||
|
||||
public void setCodFiscale(String codFiscale) {
|
||||
public Azienda setCodFiscale(String codFiscale) {
|
||||
this.codFiscale = codFiscale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPersFisicaCognome() {
|
||||
return persFisicaCognome;
|
||||
}
|
||||
|
||||
public void setPersFisicaCognome(String persFisicaCognome) {
|
||||
public Azienda setPersFisicaCognome(String persFisicaCognome) {
|
||||
this.persFisicaCognome = persFisicaCognome;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPersFisicaNome() {
|
||||
return persFisicaNome;
|
||||
}
|
||||
|
||||
public void setPersFisicaNome(String persFisicaNome) {
|
||||
public Azienda setPersFisicaNome(String persFisicaNome) {
|
||||
this.persFisicaNome = persFisicaNome;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPersFisicaSesso() {
|
||||
return persFisicaSesso;
|
||||
}
|
||||
|
||||
public void setPersFisicaSesso(String persFisicaSesso) {
|
||||
public Azienda setPersFisicaSesso(String persFisicaSesso) {
|
||||
this.persFisicaSesso = persFisicaSesso;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getPersFisicaDataNascita() {
|
||||
public LocalDate getPersFisicaDataNascita() {
|
||||
return persFisicaDataNascita;
|
||||
}
|
||||
|
||||
public void setPersFisicaDataNascita(Date persFisicaDataNascita) {
|
||||
public Azienda setPersFisicaDataNascita(LocalDate persFisicaDataNascita) {
|
||||
this.persFisicaDataNascita = persFisicaDataNascita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPersFisicaComuneNascita() {
|
||||
return persFisicaComuneNascita;
|
||||
}
|
||||
|
||||
public void setPersFisicaComuneNascita(String persFisicaComuneNascita) {
|
||||
public Azienda setPersFisicaComuneNascita(String persFisicaComuneNascita) {
|
||||
this.persFisicaComuneNascita = persFisicaComuneNascita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPersFisicaProvNascita() {
|
||||
return persFisicaProvNascita;
|
||||
}
|
||||
|
||||
public void setPersFisicaProvNascita(String persFisicaProvNascita) {
|
||||
public Azienda setPersFisicaProvNascita(String persFisicaProvNascita) {
|
||||
this.persFisicaProvNascita = persFisicaProvNascita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagPersFisica() {
|
||||
return flagPersFisica;
|
||||
}
|
||||
|
||||
public void setFlagPersFisica(String flagPersFisica) {
|
||||
public Azienda setFlagPersFisica(String flagPersFisica) {
|
||||
this.flagPersFisica = flagPersFisica;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPersFisicaCodFisc() {
|
||||
return persFisicaCodFisc;
|
||||
}
|
||||
|
||||
public void setPersFisicaCodFisc(String persFisicaCodFisc) {
|
||||
public Azienda setPersFisicaCodFisc(String persFisicaCodFisc) {
|
||||
this.persFisicaCodFisc = persFisicaCodFisc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRapprLegaleCodFisc() {
|
||||
return rapprLegaleCodFisc;
|
||||
}
|
||||
|
||||
public void setRapprLegaleCodFisc(String rapprLegaleCodFisc) {
|
||||
public Azienda setRapprLegaleCodFisc(String rapprLegaleCodFisc) {
|
||||
this.rapprLegaleCodFisc = rapprLegaleCodFisc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSedeAmm() {
|
||||
return sedeAmm;
|
||||
}
|
||||
|
||||
public void setSedeAmm(String sedeAmm) {
|
||||
public Azienda setSedeAmm(String sedeAmm) {
|
||||
this.sedeAmm = sedeAmm;
|
||||
}
|
||||
|
||||
public boolean isFlagSetIvaOmaggi() {
|
||||
return "S".equalsIgnoreCase(flagSetIvaOmaggi);
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagSetIvaOmaggi() {
|
||||
return flagSetIvaOmaggi;
|
||||
}
|
||||
|
||||
public void setFlagSetIvaOmaggi(String flagSetIvaOmaggi) {
|
||||
public boolean isFlagSetIvaOmaggi() {
|
||||
return flagSetIvaOmaggi.equalsIgnoreCase("S");
|
||||
}
|
||||
|
||||
public Azienda setFlagSetIvaOmaggi(String flagSetIvaOmaggi) {
|
||||
this.flagSetIvaOmaggi = flagSetIvaOmaggi;
|
||||
}
|
||||
|
||||
public String getApplicationName() {
|
||||
return applicationName;
|
||||
}
|
||||
|
||||
public ApplicationName getApplicationNameEnum() {
|
||||
return ApplicationName.valueOf(getApplicationName());
|
||||
}
|
||||
|
||||
public void setApplicationName(String applicationName) {
|
||||
this.applicationName = applicationName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagTipoFatturazione() {
|
||||
return flagTipoFatturazione;
|
||||
}
|
||||
|
||||
public void setFlagTipoFatturazione(String flagTipoFatturazione) {
|
||||
public Azienda setFlagTipoFatturazione(String flagTipoFatturazione) {
|
||||
this.flagTipoFatturazione = flagTipoFatturazione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTribunale() {
|
||||
return tribunale;
|
||||
}
|
||||
|
||||
public void setTribunale(String tribunale) {
|
||||
public Azienda setTribunale(String tribunale) {
|
||||
this.tribunale = tribunale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSettRitardoAnno() {
|
||||
return settRitardoAnno;
|
||||
}
|
||||
|
||||
public void setSettRitardoAnno(Integer settRitardoAnno) {
|
||||
public Azienda setSettRitardoAnno(Integer settRitardoAnno) {
|
||||
this.settRitardoAnno = settRitardoAnno;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDbDistributore() {
|
||||
return dbDistributore;
|
||||
}
|
||||
|
||||
public void setDbDistributore(String dbDistributore) {
|
||||
public Azienda setDbDistributore(String dbDistributore) {
|
||||
this.dbDistributore = dbDistributore;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodAteco() {
|
||||
return codAteco;
|
||||
}
|
||||
|
||||
public void setCodAteco(String codAteco) {
|
||||
public Azienda setCodAteco(String codAteco) {
|
||||
this.codAteco = codAteco;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLastUpgQc() {
|
||||
return lastUpgQc;
|
||||
}
|
||||
|
||||
public void setLastUpgQc(String lastUpgQc) {
|
||||
public Azienda setLastUpgQc(String lastUpgQc) {
|
||||
this.lastUpgQc = lastUpgQc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTipoAzienda() {
|
||||
return tipoAzienda;
|
||||
}
|
||||
|
||||
public void setTipoAzienda(String tipoAzienda) {
|
||||
public Azienda setTipoAzienda(String tipoAzienda) {
|
||||
this.tipoAzienda = tipoAzienda;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNazione() {
|
||||
return nazione;
|
||||
}
|
||||
|
||||
public void setNazione(String nazione) {
|
||||
public Azienda setNazione(String nazione) {
|
||||
this.nazione = nazione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodDiviContab() {
|
||||
return codDiviContab;
|
||||
}
|
||||
|
||||
public void setCodDiviContab(String codDiviContab) {
|
||||
public Azienda setCodDiviContab(String codDiviContab) {
|
||||
this.codDiviContab = codDiviContab;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodIvaOmaggi() {
|
||||
return codIvaOmaggi;
|
||||
}
|
||||
|
||||
public void setCodIvaOmaggi(String codIvaOmaggi) {
|
||||
public Azienda setCodIvaOmaggi(String codIvaOmaggi) {
|
||||
this.codIvaOmaggi = codIvaOmaggi;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodCconQuadra() {
|
||||
return codCconQuadra;
|
||||
}
|
||||
|
||||
public void setCodCconQuadra(String codCconQuadra) {
|
||||
public Azienda setCodCconQuadra(String codCconQuadra) {
|
||||
this.codCconQuadra = codCconQuadra;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodRuop() {
|
||||
return codRuop;
|
||||
}
|
||||
|
||||
public Azienda setCodRuop(String codRuop) {
|
||||
this.codRuop = codRuop;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getProgressivoSscc() {
|
||||
return progressivoSscc;
|
||||
}
|
||||
|
||||
public Azienda setProgressivoSscc(Long progressivoSscc) {
|
||||
this.progressivoSscc = progressivoSscc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodSdiDitta() {
|
||||
return codSdiDitta;
|
||||
}
|
||||
|
||||
public Azienda setCodSdiDitta(String codSdiDitta) {
|
||||
this.codSdiDitta = codSdiDitta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRegFisc() {
|
||||
return regFisc;
|
||||
}
|
||||
|
||||
public void setRegFisc(String regFisc) {
|
||||
public Azienda setRegFisc(String regFisc) {
|
||||
this.regFisc = regFisc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStatoLiquidazione() {
|
||||
return statoLiquidazione;
|
||||
}
|
||||
|
||||
public void setStatoLiquidazione(String statoLiquidazione) {
|
||||
public Azienda setStatoLiquidazione(String statoLiquidazione) {
|
||||
this.statoLiquidazione = statoLiquidazione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEmailSdi() {
|
||||
return emailSdi;
|
||||
}
|
||||
|
||||
public void setEmailSdi(String emailSdi) {
|
||||
public Azienda setEmailSdi(String emailSdi) {
|
||||
this.emailSdi = emailSdi;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFromEmailSdi() {
|
||||
return fromEmailSdi;
|
||||
}
|
||||
|
||||
public void setFromEmailSdi(String fromEmailSdi) {
|
||||
public Azienda setFromEmailSdi(String fromEmailSdi) {
|
||||
this.fromEmailSdi = fromEmailSdi;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIdCreditoreSepa() {
|
||||
return idCreditoreSepa;
|
||||
}
|
||||
|
||||
public void setIdCreditoreSepa(String idCreditoreSepa) {
|
||||
public Azienda setIdCreditoreSepa(String idCreditoreSepa) {
|
||||
this.idCreditoreSepa = idCreditoreSepa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMessaggioPrivacy() {
|
||||
return messaggioPrivacy;
|
||||
}
|
||||
|
||||
public void setMessaggioPrivacy(String messaggioPrivacy) {
|
||||
public Azienda setMessaggioPrivacy(String messaggioPrivacy) {
|
||||
this.messaggioPrivacy = messaggioPrivacy;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRapprLegaleNome() {
|
||||
return rapprLegaleNome;
|
||||
}
|
||||
|
||||
public void setRapprLegaleNome(String rapprLegaleNome) {
|
||||
public Azienda setRapprLegaleNome(String rapprLegaleNome) {
|
||||
this.rapprLegaleNome = rapprLegaleNome;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRapprLegaleCognome() {
|
||||
return rapprLegaleCognome;
|
||||
}
|
||||
|
||||
public void setRapprLegaleCognome(String rapprLegaleCognome) {
|
||||
public Azienda setRapprLegaleCognome(String rapprLegaleCognome) {
|
||||
this.rapprLegaleCognome = rapprLegaleCognome;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRapprLegaleSesso() {
|
||||
return rapprLegaleSesso;
|
||||
}
|
||||
|
||||
public void setRapprLegaleSesso(String rapprLegaleSesso) {
|
||||
public Azienda setRapprLegaleSesso(String rapprLegaleSesso) {
|
||||
this.rapprLegaleSesso = rapprLegaleSesso;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRapprLegaleComuneNascita() {
|
||||
return rapprLegaleComuneNascita;
|
||||
}
|
||||
|
||||
public void setRapprLegaleComuneNascita(String rapprLegaleComuneNascita) {
|
||||
public Azienda setRapprLegaleComuneNascita(String rapprLegaleComuneNascita) {
|
||||
this.rapprLegaleComuneNascita = rapprLegaleComuneNascita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getRapprLegaleDataNascita() {
|
||||
public LocalDate getRapprLegaleDataNascita() {
|
||||
return rapprLegaleDataNascita;
|
||||
}
|
||||
|
||||
public void setRapprLegaleDataNascita(Date rapprLegaleDataNascita) {
|
||||
public Azienda setRapprLegaleDataNascita(LocalDate rapprLegaleDataNascita) {
|
||||
this.rapprLegaleDataNascita = rapprLegaleDataNascita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRapprLegaleProvNascita() {
|
||||
return rapprLegaleProvNascita;
|
||||
}
|
||||
|
||||
public void setRapprLegaleProvNascita(String rapprLegaleProvNascita) {
|
||||
public Azienda setRapprLegaleProvNascita(String rapprLegaleProvNascita) {
|
||||
this.rapprLegaleProvNascita = rapprLegaleProvNascita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRapprLegale() {
|
||||
return rapprLegale;
|
||||
}
|
||||
|
||||
public Azienda setRapprLegale(String rapprLegale) {
|
||||
this.rapprLegale = rapprLegale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagFattEle() {
|
||||
return flagFattEle;
|
||||
}
|
||||
|
||||
public Azienda setFlagFattEle(String flagFattEle) {
|
||||
this.flagFattEle = flagFattEle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodFda() {
|
||||
return codFda;
|
||||
}
|
||||
|
||||
public Azienda setCodFda(String codFda) {
|
||||
this.codFda = codFda;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getCodFce() {
|
||||
return codFce;
|
||||
}
|
||||
|
||||
public Azienda setCodFce(Integer codFce) {
|
||||
this.codFce = codFce;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodLucid() {
|
||||
return codLucid;
|
||||
}
|
||||
|
||||
public Azienda setCodLucid(String codLucid) {
|
||||
this.codLucid = codLucid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getGiornoInizAnnoFisc() {
|
||||
@@ -964,30 +1140,12 @@ public class Azienda extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataUpdSw() {
|
||||
return dataUpdSw;
|
||||
public String getCodCuc() {
|
||||
return codCuc;
|
||||
}
|
||||
|
||||
public Azienda setDataUpdSw(Date dataUpdSw) {
|
||||
this.dataUpdSw = dataUpdSw;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getProgressivoSscc() {
|
||||
return progressivoSscc;
|
||||
}
|
||||
|
||||
public Azienda setProgressivoSscc(Long progressivoSscc) {
|
||||
this.progressivoSscc = progressivoSscc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodSdiDitta() {
|
||||
return codSdiDitta;
|
||||
}
|
||||
|
||||
public Azienda setCodSdiDitta(String codSdiDitta) {
|
||||
this.codSdiDitta = codSdiDitta;
|
||||
public Azienda setCodCuc(String codCuc) {
|
||||
this.codCuc = codCuc;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,9 @@ public class CtbCont extends EntityBase {
|
||||
@SqlField(value = "data_mod", defaultObjectValue = CommonConstants.TIMESTAMP)
|
||||
private Date dataMod;
|
||||
|
||||
@SqlField(value = "flag_attivo", nullable = false, defaultObjectValue = "1")
|
||||
private Boolean flagAttivo;
|
||||
|
||||
public CtbCont() {
|
||||
super(logger);
|
||||
}
|
||||
@@ -201,6 +204,15 @@ public class CtbCont extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getFlagAttivo() {
|
||||
return flagAttivo;
|
||||
}
|
||||
|
||||
public CtbCont setFlagAttivo(Boolean flagAttivo) {
|
||||
this.flagAttivo = flagAttivo;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteChilds() throws Exception {
|
||||
String sql = Query.format(
|
||||
|
||||
@@ -10,8 +10,8 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Master
|
||||
@@ -190,10 +190,10 @@ public class DtbTipi extends EntityBase {
|
||||
private String pathBanner;
|
||||
|
||||
@SqlField(value = "data_iniz_banner")
|
||||
private Date dataInizBanner;
|
||||
private LocalDate dataInizBanner;
|
||||
|
||||
@SqlField(value = "data_fine_banner")
|
||||
private Date dataFineBanner;
|
||||
private LocalDate dataFineBanner;
|
||||
|
||||
@SqlField(value = "flag_dest_obb", maxLength = 1, nullable = false, defaultObjectValue = "N")
|
||||
private String flagDestObb;
|
||||
@@ -747,20 +747,20 @@ public class DtbTipi extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataInizBanner() {
|
||||
public LocalDate getDataInizBanner() {
|
||||
return dataInizBanner;
|
||||
}
|
||||
|
||||
public DtbTipi setDataInizBanner(Date dataInizBanner) {
|
||||
public DtbTipi setDataInizBanner(LocalDate dataInizBanner) {
|
||||
this.dataInizBanner = dataInizBanner;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataFineBanner() {
|
||||
public LocalDate getDataFineBanner() {
|
||||
return dataFineBanner;
|
||||
}
|
||||
|
||||
public DtbTipi setDataFineBanner(Date dataFineBanner) {
|
||||
public DtbTipi setDataFineBanner(LocalDate dataFineBanner) {
|
||||
this.dataFineBanner = dataFineBanner;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -313,6 +313,15 @@ public class MtbAart extends EntityBase implements EquatableEntityInterface<MtbA
|
||||
@SqlField(value = "cod_mssfa", maxLength = 6)
|
||||
private String codMssfa;
|
||||
|
||||
@SqlField(value = "cod_linea", maxLength = 6)
|
||||
private String codLinea;
|
||||
|
||||
@SqlField(value = "cod_slinea", maxLength = 6)
|
||||
private String codSlinea;
|
||||
|
||||
@SqlField(value = "cod_sslinea", maxLength = 6)
|
||||
private String codSslinea;
|
||||
|
||||
@Priority(1)
|
||||
private MtbAartMarchio mtbAartMarchio;
|
||||
|
||||
@@ -351,6 +360,9 @@ public class MtbAart extends EntityBase implements EquatableEntityInterface<MtbA
|
||||
@EntityChild
|
||||
private List<MrlAartSchTecSet> mrlAartSchTecSet = new ArrayList<>();
|
||||
|
||||
@EntityChild
|
||||
private List<MtbAartColori> mtbAartColori = new ArrayList<>();
|
||||
|
||||
@Priority(101)
|
||||
List<JtbCicl> jtbCicl;
|
||||
|
||||
@@ -1275,6 +1287,15 @@ public class MtbAart extends EntityBase implements EquatableEntityInterface<MtbA
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbAartColori> getMtbAartColori() {
|
||||
return mtbAartColori;
|
||||
}
|
||||
|
||||
public MtbAart setMtbAartColori(List<MtbAartColori> mtbAartColori) {
|
||||
this.mtbAartColori = mtbAartColori;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbLisa> getMtbLisa() {
|
||||
return mtbLisa;
|
||||
}
|
||||
@@ -1328,6 +1349,33 @@ public class MtbAart extends EntityBase implements EquatableEntityInterface<MtbA
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodLinea() {
|
||||
return codLinea;
|
||||
}
|
||||
|
||||
public MtbAart setCodLinea(String codLinea) {
|
||||
this.codLinea = codLinea;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodSlinea() {
|
||||
return codSlinea;
|
||||
}
|
||||
|
||||
public MtbAart setCodSlinea(String codSlinea) {
|
||||
this.codSlinea = codSlinea;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodSslinea() {
|
||||
return codSslinea;
|
||||
}
|
||||
|
||||
public MtbAart setCodSslinea(String codSslinea) {
|
||||
this.codSslinea = codSslinea;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateChilds() throws Exception {
|
||||
insertChilds();
|
||||
@@ -1367,6 +1415,8 @@ public class MtbAart extends EntityBase implements EquatableEntityInterface<MtbA
|
||||
mtbAartLink.deleteAllEntities(connection, this);
|
||||
MrlAartSchTecSet mrlAartSchTecSet = new MrlAartSchTecSet();
|
||||
mrlAartSchTecSet.deleteAllEntities(connection, this);
|
||||
MtbAartColori mtbAartColori = new MtbAartColori();
|
||||
mtbAartColori.deleteAllEntities(connection, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,16 +5,18 @@ import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Objects;
|
||||
|
||||
@PropertyReactive
|
||||
@Table(MtbAartBarCode.ENTITY)
|
||||
@JsonTypeName(MtbAartBarCode.ENTITY)
|
||||
public class MtbAartBarCode extends EntityBase {
|
||||
public class MtbAartBarCode extends EntityBase implements EquatableEntityInterface<MtbAartBarCode> {
|
||||
|
||||
private final static Logger logger = LogManager.getLogger();
|
||||
|
||||
@@ -86,4 +88,31 @@ public class MtbAartBarCode extends EntityBase {
|
||||
this.tipoCodBarre = tipoCodBarre;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof MtbAartBarCode)) return false;
|
||||
MtbAartBarCode that = (MtbAartBarCode) o;
|
||||
return Objects.equals(getCodBarre(), that.getCodBarre()) && Objects.equals(getCodMart(), that.getCodMart()) && Objects.equals(getQtaCnf(), that.getQtaCnf()) && Objects.equals(getFlagPrimario(), that.getFlagPrimario()) && Objects.equals(getTipoCodBarre(), that.getTipoCodBarre());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodBarre(), getCodMart(), getQtaCnf(), getFlagPrimario(), getTipoCodBarre());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getCodBarre(), getCodMart());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbAartBarCode other) {
|
||||
if (this == other) return true;
|
||||
if (!(other instanceof MtbAartBarCode)) return false;
|
||||
MtbAartBarCode mtbAartBarCode = other;
|
||||
return Objects.equals(getCodBarre(), mtbAartBarCode.getCodBarre()) &&
|
||||
Objects.equals(getCodMart(), mtbAartBarCode.getCodMart());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,14 +6,17 @@ import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@PropertyReactive
|
||||
@Table(MtbAartCarat.ENTITY)
|
||||
@JsonTypeName(MtbAartCarat.ENTITY)
|
||||
public class MtbAartCarat extends EntityBase {
|
||||
public class MtbAartCarat extends EntityBase implements EquatableEntityInterface<MtbAartCarat> {
|
||||
|
||||
private final static Logger logger = LogManager.getLogger();
|
||||
|
||||
@@ -82,4 +85,31 @@ public class MtbAartCarat extends EntityBase {
|
||||
this.chkCompatibilita = chkCompatibilita;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof MtbAartCarat)) return false;
|
||||
MtbAartCarat that = (MtbAartCarat) o;
|
||||
return Objects.equals(getCodMart(), that.getCodMart()) && Objects.equals(getCarat(), that.getCarat()) && Objects.equals(getValCarat(), that.getValCarat()) && Objects.equals(getNote(), that.getNote()) && Objects.equals(getChkCompatibilita(), that.getChkCompatibilita());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodMart(), getCarat(), getValCarat(), getNote(), getChkCompatibilita());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getCodMart(), getCarat());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbAartCarat other) {
|
||||
if (this == other) return true;
|
||||
if (!(other instanceof MtbAartCarat)) return false;
|
||||
MtbAartCarat mtbAartBarCode = other;
|
||||
return Objects.equals(getCarat(), mtbAartBarCode.getCarat()) &&
|
||||
Objects.equals(getCodMart(), mtbAartBarCode.getCodMart());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.annotation.Master;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
import it.integry.ems_model.annotation.FK;
|
||||
|
||||
@Master()
|
||||
@PropertyReactive()
|
||||
@Table(value = MtbAartColori.ENTITY)
|
||||
@JsonTypeName(value = MtbAartColori.ENTITY)
|
||||
public class MtbAartColori extends EntityBase implements EquatableEntityInterface<MtbAartColori> {
|
||||
|
||||
public final static String ENTITY = "mtb_aart_colori";
|
||||
|
||||
private final static Long serialVersionUID = 1L;
|
||||
|
||||
private final static Logger logger = LogManager.getLogger();
|
||||
|
||||
public MtbAartColori() {
|
||||
super(logger);
|
||||
}
|
||||
|
||||
@PK()
|
||||
@SqlField(value = "cod_mart", maxLength = 15, nullable = false)
|
||||
@FK(tableName = MtbAart.ENTITY, columnName = "cod_mart")
|
||||
private String codMart;
|
||||
|
||||
@PK()
|
||||
@SqlField(value = "cod_col", maxLength = 6, nullable = false)
|
||||
@FK(tableName = MtbColori.ENTITY, columnName = "cod_col")
|
||||
private String codCol;
|
||||
|
||||
@SqlField(value = "cod_barre", maxLength = 25, nullable = true)
|
||||
private String codBarre;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public MtbAartColori setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodCol() {
|
||||
return codCol;
|
||||
}
|
||||
|
||||
public MtbAartColori setCodCol(String codCol) {
|
||||
this.codCol = codCol;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodBarre() {
|
||||
return codBarre;
|
||||
}
|
||||
|
||||
public MtbAartColori setCodBarre(String codBarre) {
|
||||
this.codBarre = codBarre;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof MtbAartColori)) return false;
|
||||
MtbAartColori that = (MtbAartColori) o;
|
||||
return Objects.equals(getCodMart(), that.getCodMart()) && Objects.equals(getCodCol(), that.getCodCol()) && Objects.equals(getCodBarre(), that.getCodBarre());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodMart(), getCodCol(), getCodBarre());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getCodMart(), getCodCol());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbAartColori other) {
|
||||
if (this == other) return true;
|
||||
if (!(other instanceof MtbAartColori)) return false;
|
||||
MtbAartColori mtbAartColori = other;
|
||||
return Objects.equals(getCodCol(), mtbAartColori.getCodCol()) &&
|
||||
Objects.equals(getCodMart(), mtbAartColori.getCodMart());
|
||||
}
|
||||
}
|
||||
@@ -6,15 +6,18 @@ import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@Master
|
||||
@PropertyReactive
|
||||
@Table(MtbAartEqui.ENTITY)
|
||||
@JsonTypeName(MtbAartEqui.ENTITY)
|
||||
public class MtbAartEqui extends EntityBase {
|
||||
public class MtbAartEqui extends EntityBase implements EquatableEntityInterface<MtbAartEqui> {
|
||||
|
||||
private final static Logger logger = LogManager.getLogger();
|
||||
|
||||
@@ -85,4 +88,29 @@ public class MtbAartEqui extends EntityBase {
|
||||
public void setDescrizioneEstera(String descrizioneEstera) {
|
||||
this.descrizioneEstera = descrizioneEstera;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof MtbAartEqui)) return false;
|
||||
MtbAartEqui that = (MtbAartEqui) o;
|
||||
return Objects.equals(getIdArtEqui(), that.getIdArtEqui()) && Objects.equals(getDescrizione(), that.getDescrizione()) && Objects.equals(getFlagEquiPrezzo(), that.getFlagEquiPrezzo()) && Objects.equals(getFlagEquiCosto(), that.getFlagEquiCosto()) && Objects.equals(getDescrizioneEstera(), that.getDescrizioneEstera());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getIdArtEqui(), getDescrizione(), getFlagEquiPrezzo(), getFlagEquiCosto(), getDescrizioneEstera());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getIdArtEqui());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbAartEqui other) {
|
||||
if (this == other) return true;
|
||||
if (!(other instanceof MtbAartEqui)) return false;
|
||||
MtbAartEqui mtbAartEqui = (MtbAartEqui) other;
|
||||
return Objects.equals(getIdArtEqui(), mtbAartEqui.getIdArtEqui());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.annotation.Master;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
@@ -16,7 +19,7 @@ import it.integry.ems_model.annotation.SqlField;
|
||||
@PropertyReactive()
|
||||
@Table(value = MtbAartLinea.ENTITY)
|
||||
@JsonTypeName(value = MtbAartLinea.ENTITY)
|
||||
public class MtbAartLinea extends EntityBase {
|
||||
public class MtbAartLinea extends EntityBase implements EquatableEntityInterface<MtbAartLinea> {
|
||||
|
||||
public final static String ENTITY = "mtb_aart_linea";
|
||||
|
||||
@@ -53,4 +56,28 @@ public class MtbAartLinea extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof MtbAartLinea)) return false;
|
||||
MtbAartLinea that = (MtbAartLinea) o;
|
||||
return Objects.equals(getCodLinea(), that.getCodLinea()) && Objects.equals(getDescrizione(), that.getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodLinea(), getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getCodLinea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbAartLinea other) {
|
||||
if (this == other) return true;
|
||||
if (!(other instanceof MtbAartLinea)) return false;
|
||||
MtbAartLinea mtbAartLinea = other;
|
||||
return Objects.equals(getCodLinea(), mtbAartLinea.getCodLinea());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,8 @@ public class MtbAartMarchio extends EntityBase implements EquatableEntityInterfa
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof MtbAartMarchio)) return false;
|
||||
MtbAartMarchio mtbAartMarchio = (MtbAartMarchio) o;
|
||||
return Objects.equals(getMarchio(), mtbAartMarchio.getMarchio()) && Objects.equals(getMarchio(), mtbAartMarchio.getMarchio());
|
||||
return Objects.equals(getMarchio(), mtbAartMarchio.getMarchio()) &&
|
||||
Objects.equals(getMarchio(), mtbAartMarchio.getMarchio());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.annotation.Master;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
@@ -16,7 +19,7 @@ import it.integry.ems_model.annotation.SqlField;
|
||||
@PropertyReactive()
|
||||
@Table(value = MtbAartSlinea.ENTITY)
|
||||
@JsonTypeName(value = MtbAartSlinea.ENTITY)
|
||||
public class MtbAartSlinea extends EntityBase {
|
||||
public class MtbAartSlinea extends EntityBase implements EquatableEntityInterface<MtbAartSlinea> {
|
||||
|
||||
public final static String ENTITY = "mtb_aart_slinea";
|
||||
|
||||
@@ -52,4 +55,29 @@ public class MtbAartSlinea extends EntityBase {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof MtbAartSlinea)) return false;
|
||||
MtbAartSlinea that = (MtbAartSlinea) o;
|
||||
return Objects.equals(getCodSlinea(), that.getCodSlinea()) && Objects.equals(getDescrizione(), that.getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodSlinea(), getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getCodSlinea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbAartSlinea other) {
|
||||
if (this == other) return true;
|
||||
if (!(other instanceof MtbAartSlinea)) return false;
|
||||
MtbAartSlinea mtbAartSlinea = other;
|
||||
return Objects.equals(getCodSlinea(), mtbAartSlinea.getCodSlinea());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.annotation.Master;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
|
||||
@Master()
|
||||
@PropertyReactive()
|
||||
@Table(value = MtbAartSslinea.ENTITY)
|
||||
@JsonTypeName(value = MtbAartSslinea.ENTITY)
|
||||
public class MtbAartSslinea extends EntityBase implements EquatableEntityInterface<MtbAartSslinea> {
|
||||
|
||||
public final static String ENTITY = "mtb_aart_sslinea";
|
||||
|
||||
private final static Long serialVersionUID = 1L;
|
||||
|
||||
private final static Logger logger = LogManager.getLogger();
|
||||
|
||||
public MtbAartSslinea() {
|
||||
super(logger);
|
||||
}
|
||||
|
||||
@PK()
|
||||
@SqlField(value = "cod_sslinea", maxLength = 6, nullable = false)
|
||||
private String codSslinea;
|
||||
|
||||
@SqlField(value = "descrizione", maxLength = 255, nullable = false)
|
||||
private String descrizione;
|
||||
|
||||
public String getCodSslinea() {
|
||||
return codSslinea;
|
||||
}
|
||||
|
||||
public MtbAartSslinea setCodSslinea(String codSslinea) {
|
||||
this.codSslinea = codSslinea;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public MtbAartSslinea setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof MtbAartSslinea)) return false;
|
||||
MtbAartSslinea that = (MtbAartSslinea) o;
|
||||
return Objects.equals(getCodSslinea(), that.getCodSslinea()) && Objects.equals(getDescrizione(), that.getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodSslinea(), getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbAartSslinea other) {
|
||||
if (this == other) return true;
|
||||
if (!(other instanceof MtbAartSslinea)) return false;
|
||||
MtbAartSslinea mtbAartSslinea = other;
|
||||
return Objects.equals(getCodSslinea(), mtbAartSslinea.getCodSslinea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getCodSslinea());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.annotation.Master;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
|
||||
@Master()
|
||||
@PropertyReactive()
|
||||
@Table(value = MtbColori.ENTITY)
|
||||
@JsonTypeName(value = MtbColori.ENTITY)
|
||||
public class MtbColori extends EntityBase implements EquatableEntityInterface<MtbColori> {
|
||||
|
||||
public final static String ENTITY = "mtb_colori";
|
||||
|
||||
private final static Long serialVersionUID = 1L;
|
||||
|
||||
private final static Logger logger = LogManager.getLogger();
|
||||
|
||||
public MtbColori() {
|
||||
super(logger);
|
||||
}
|
||||
|
||||
@PK()
|
||||
@SqlField(value = "cod_col", maxLength = 6, nullable = false)
|
||||
private String codCol;
|
||||
|
||||
@SqlField(value = "descrizione", maxLength = 255, nullable = false)
|
||||
private String descrizione;
|
||||
|
||||
public String getCodCol() {
|
||||
return codCol;
|
||||
}
|
||||
|
||||
public MtbColori setCodCol(String codCol) {
|
||||
this.codCol = codCol;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public MtbColori setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof MtbColori)) return false;
|
||||
MtbColori mtbColori = (MtbColori) o;
|
||||
return Objects.equals(getCodCol(), mtbColori.getCodCol()) && Objects.equals(getDescrizione(), mtbColori.getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodCol(), getDescrizione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(MtbColori other) {
|
||||
if (this == other) return true;
|
||||
if (!(other instanceof MtbColori)) return false;
|
||||
MtbColori mtbColori = other;
|
||||
return Objects.equals(getCodCol(), mtbColori.getCodCol());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCodeKey() {
|
||||
return Objects.hash(getCodCol(), getCodCol());
|
||||
}
|
||||
}
|
||||
@@ -56,32 +56,36 @@ public class MtbSfam extends EntityBase implements EquatableEntityInterface<MtbS
|
||||
return codMgrp;
|
||||
}
|
||||
|
||||
public void setCodMgrp(String codMgrp) {
|
||||
public MtbSfam setCodMgrp(String codMgrp) {
|
||||
this.codMgrp = codMgrp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMsgr() {
|
||||
return codMsgr;
|
||||
}
|
||||
|
||||
public void setCodMsgr(String codMsgr) {
|
||||
public MtbSfam setCodMsgr(String codMsgr) {
|
||||
this.codMsgr = codMsgr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMsfa() {
|
||||
return codMsfa;
|
||||
}
|
||||
|
||||
public void setCodMsfa(String codMsfa) {
|
||||
public MtbSfam setCodMsfa(String codMsfa) {
|
||||
this.codMsfa = codMsfa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String descrizione) {
|
||||
public MtbSfam setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbSsfam> getMtbSsfam() {
|
||||
|
||||
@@ -34,6 +34,9 @@ public class SrlActivityTypeUser extends EntityBase {
|
||||
@SqlField(value = "user_name", maxLength = 40, nullable = false)
|
||||
private String userName;
|
||||
|
||||
@SqlField(value = "activity_default", maxLength = 40, nullable = false)
|
||||
private Boolean activityDefault;
|
||||
|
||||
public SrlActivityTypeUser() {
|
||||
super(logger);
|
||||
}
|
||||
@@ -61,4 +64,13 @@ public class SrlActivityTypeUser extends EntityBase {
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public Boolean getActivityDefault() {
|
||||
return activityDefault;
|
||||
}
|
||||
|
||||
public SrlActivityTypeUser setActivityDefault(Boolean activityDefault) {
|
||||
this.activityDefault = activityDefault;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,6 +251,9 @@ public class WdtbDoct extends DtbBaseDocT {
|
||||
@SqlField(value = "cod_lingua", maxLength = 5)
|
||||
private String codLingua;
|
||||
|
||||
@SqlField(value = "merce_ricevuta", nullable = false, defaultObjectValue = "0")
|
||||
private Boolean merceRicevuta;
|
||||
|
||||
@JsonProperty
|
||||
private String partIva;
|
||||
|
||||
@@ -1026,6 +1029,15 @@ public class WdtbDoct extends DtbBaseDocT {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getMerceRicevuta() {
|
||||
return merceRicevuta;
|
||||
}
|
||||
|
||||
public WdtbDoct setMerceRicevuta(Boolean merceRicevuta) {
|
||||
this.merceRicevuta = merceRicevuta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartIva() {
|
||||
return partIva;
|
||||
}
|
||||
|
||||
@@ -8,11 +8,12 @@ public class UtilityException {
|
||||
|
||||
public static String convertExceptionToHumanReadableText(Exception e) {
|
||||
|
||||
String errorMessage = e.getMessage();;
|
||||
String errorMessage = e.getMessage();
|
||||
|
||||
int errorCode = -1;
|
||||
|
||||
if (e instanceof NullPointerException) {
|
||||
if(e.getStackTrace().length > 0)
|
||||
if (e.getStackTrace().length > 0)
|
||||
errorMessage = "Null value at " + e.getStackTrace()[0].toString();
|
||||
else errorMessage = "Empty stacktrace\n" + e;
|
||||
|
||||
@@ -39,15 +40,11 @@ public class UtilityException {
|
||||
message += entityException.getMessage() + "\n";
|
||||
}
|
||||
|
||||
String startMatch = "it.integry.rules.Rule_";
|
||||
String endMatch = "Eval";
|
||||
if (entityException.getInnerException().getMessage().startsWith(startMatch)) {
|
||||
isRuleException = true;
|
||||
String innerMessage = entityException.getInnerException().getMessage();
|
||||
String ruleName = innerMessage.substring(innerMessage.indexOf(startMatch) + startMatch.length(), innerMessage.indexOf(endMatch));
|
||||
if (isRuleException(message))
|
||||
message = removeRulePrefixFromExceptionMessage(message);
|
||||
|
||||
message += "\nRegola: " + ruleName;
|
||||
}
|
||||
if (isIntegryException(message))
|
||||
message = e.getMessage();
|
||||
|
||||
if (!isRuntimeException) {
|
||||
message += "\n(" + ((EntityException) e).getInnerException().getMessage() + ")";
|
||||
@@ -56,17 +53,15 @@ public class UtilityException {
|
||||
errorMessage = message;
|
||||
|
||||
} else if (e instanceof RuntimeException || e instanceof JRException) {
|
||||
String message = e.getCause() != null && e.getCause().getMessage() != null ? e.getCause().getMessage() : e.toString();
|
||||
String message = e.getCause() != null && e.getCause().getMessage() != null ?
|
||||
e.getCause().getMessage() :
|
||||
e.toString();
|
||||
|
||||
String startMatch = "it.integry.rules.Rule_";
|
||||
String endMatch = "Eval";
|
||||
if (isRuleException(message))
|
||||
message = removeRulePrefixFromExceptionMessage(message);
|
||||
|
||||
if (e.getMessage() != null && e.getMessage().startsWith(startMatch)) {
|
||||
String innerMessage = e.getMessage();
|
||||
String ruleName = innerMessage.substring(innerMessage.indexOf(startMatch) + startMatch.length(), innerMessage.indexOf(endMatch));
|
||||
|
||||
message += "\nRegola: " + ruleName;
|
||||
}
|
||||
if (isIntegryException(message))
|
||||
message = e.getMessage();
|
||||
|
||||
errorMessage = message;
|
||||
}
|
||||
@@ -74,4 +69,29 @@ public class UtilityException {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
private static boolean isRuleException(String exceptionMessage) {
|
||||
String startMatch = "it.integry.rules.Rule_";
|
||||
|
||||
return exceptionMessage != null && exceptionMessage.startsWith(startMatch);
|
||||
}
|
||||
|
||||
private static String removeRulePrefixFromExceptionMessage(String message) {
|
||||
String startMatch = "it.integry.rules.Rule_";
|
||||
String endMatch = "Eval";
|
||||
|
||||
if (isRuleException(message)) {
|
||||
final String innerMessage = message;
|
||||
String ruleName = innerMessage.substring(innerMessage.indexOf(startMatch) + startMatch.length(), innerMessage.indexOf(endMatch));
|
||||
|
||||
message += "\nRegola: " + ruleName;
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
private static boolean isIntegryException(String exceptionMessage) {
|
||||
String startMatch = "it.integry.ems";
|
||||
return exceptionMessage != null && exceptionMessage.startsWith(startMatch);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package it.integry.security.jwt;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.ExpiredJwtException;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems._context.ApplicationContextProvider;
|
||||
import it.integry.ems.response.ServiceRestResponse;
|
||||
@@ -77,7 +76,7 @@ public class JWTFilter extends GenericFilterBean {
|
||||
UsernamePasswordAuthenticationToken authenticationToken = accessTokenProvider.getAuthentication(profileDb, token);
|
||||
SecurityContextHolder.getContext().setAuthentication(authenticationToken);
|
||||
|
||||
logger.debug("Set Authentication to security context for '{}'.", authenticationToken.getName());
|
||||
logger.trace("Set Authentication to security context for '{}'.", authenticationToken.getName());
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
handleException(ex, httpServletRequest, httpServletResponse);
|
||||
|
||||
@@ -62,22 +62,22 @@ then
|
||||
modify ( $r ) { setCodAnag(codAnag) }
|
||||
end
|
||||
|
||||
rule "completeFlagEsportatoSoggettoSian"
|
||||
no-loop
|
||||
when
|
||||
eval(completeRulesEnabled)
|
||||
$r : OltbSoggetti(operation != OperationType.DELETE && codAnag != null && codSoggetto != null && flagEsportato == null)
|
||||
then
|
||||
String sql =
|
||||
"SELECT TOP 1 oltb_soggetti.flag_esportato " +
|
||||
" FROM oltb_soggetti "+
|
||||
" WHERE oltb_soggetti.cod_soggetto = " + UtilityDB.valueToString($r.getCodSoggetto()) +
|
||||
" ORDER BY oltb_soggetti.flag_esportato DESC";
|
||||
|
||||
Boolean flagEsportato = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||
flagEsportato = (flagEsportato==null?flagEsportato=false:flagEsportato);
|
||||
modify ( $r ) {
|
||||
setFlagEsportato(flagEsportato)
|
||||
}
|
||||
end
|
||||
//rule "completeFlagEsportatoSoggettoSian"
|
||||
//no-loop
|
||||
//when
|
||||
// eval(completeRulesEnabled)
|
||||
// $r : OltbSoggetti(operation != OperationType.DELETE && codAnag != null && codSoggetto != null && flagEsportato == null)
|
||||
//then
|
||||
// String sql =
|
||||
// "SELECT TOP 1 oltb_soggetti.flag_esportato " +
|
||||
// " FROM oltb_soggetti "+
|
||||
// " WHERE oltb_soggetti.cod_soggetto = " + UtilityDB.valueToString($r.getCodSoggetto()) +
|
||||
// " ORDER BY oltb_soggetti.flag_esportato DESC";
|
||||
//
|
||||
// Boolean flagEsportato = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||
// flagEsportato = (flagEsportato==null?flagEsportato=false:flagEsportato);
|
||||
// modify ( $r ) {
|
||||
// setFlagEsportato(flagEsportato)
|
||||
// }
|
||||
//end
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.http.ContentDisposition;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -321,35 +325,28 @@ public class EmsEngineController {
|
||||
return ServiceRestResponse.createPositiveResponse(orientations);
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_JTB_DISEGNI_FILES, method = RequestMethod.GET, produces = "application/octet-stream")
|
||||
public byte[] downloadJtbDisegniFiles(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String codDisegno,
|
||||
@RequestParam String fileName
|
||||
) throws IOException {
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_JTB_DISEGNI_FILES, method = RequestMethod.GET)
|
||||
public ResponseEntity<byte[]> downloadJtbDisegniFiles(@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String codDisegno,
|
||||
@RequestParam String fileName
|
||||
) throws Exception {
|
||||
JtbDisegniFiles jtbDisegniFiles = emsEngineService.downloadJtbDisegniFiles(codDisegno, fileName);
|
||||
|
||||
try {
|
||||
|
||||
JtbDisegniFiles jtbDisegniFiles = emsEngineService.downloadJtbDisegniFiles(codDisegno, fileName);
|
||||
if (jtbDisegniFiles == null) {
|
||||
throw new Exception("Disegno non trovato!");
|
||||
}
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
|
||||
|
||||
byte[] byteArr = Base64.decodeBase64(jtbDisegniFiles.getContent());
|
||||
String z = new String(byteArr, StandardCharsets.UTF_8);
|
||||
response.setContentLength(byteArr != null ? byteArr.length : 0);
|
||||
return byteArr;
|
||||
|
||||
} catch (Exception e) {
|
||||
response.sendError(404, "Allegato non trovato");
|
||||
if (jtbDisegniFiles == null) {
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
byte[] byteArr = Base64.decodeBase64(jtbDisegniFiles.getContent());
|
||||
|
||||
return null;
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
||||
.contentLength(byteArr != null ? byteArr.length : 0)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename(fileName)
|
||||
.build()
|
||||
.toString())
|
||||
.body(byteArr);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,6 +12,9 @@ public class ActivityTypeDTO {
|
||||
@SqlField(value = "flag_view_calendar")
|
||||
private boolean flagViewCalendar;
|
||||
|
||||
@SqlField(value = "activity_default")
|
||||
private boolean activityDefault;
|
||||
|
||||
public String getActivityTypeIdNext() {
|
||||
return activityTypeIdNext;
|
||||
}
|
||||
@@ -38,4 +41,13 @@ public class ActivityTypeDTO {
|
||||
this.flagViewCalendar = flagViewCalendar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isActivityDefault() {
|
||||
return activityDefault;
|
||||
}
|
||||
|
||||
public ActivityTypeDTO setActivityDefault(boolean activityDefault) {
|
||||
this.activityDefault = activityDefault;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1206,9 +1206,13 @@ public class ActivityService {
|
||||
}
|
||||
|
||||
public List<ActivityTypeDTO> getActivityType() throws Exception {
|
||||
String sql = "SELECT DISTINCT activity_type_id, flag_tipologia\n" +
|
||||
String sql = "SELECT DISTINCT srl_activity_type.activity_type_id, \n" +
|
||||
"srl_activity_type.flag_tipologia,\n" +
|
||||
"srl_activity_type_user.activity_default\n" +
|
||||
"FROM srl_activity_type\n" +
|
||||
"WHERE activity_type_id IN (SELECT srl_activity_type.activity_type_id\n" +
|
||||
"inner join srl_activity_type_user on srl_activity_type_user.activity_type_id = srl_activity_type.activity_type_id and \n" +
|
||||
" srl_activity_type_user.flag_tipologia = srl_activity_type.flag_tipologia\n" +
|
||||
"WHERE srl_activity_type.activity_type_id IN (SELECT srl_activity_type.activity_type_id\n" +
|
||||
" FROM srl_activity_type\n" +
|
||||
" INNER JOIN stb_activity_type ON srl_activity_type.activity_type_id_next =\n" +
|
||||
" stb_activity_type.activity_type_id\n" +
|
||||
@@ -1222,7 +1226,8 @@ public class ActivityService {
|
||||
" AND s.flag_attiva = 'S')\n" +
|
||||
" GROUP BY srl_activity_type.activity_type_id, srl_activity_type.flag_tipologia\n" +
|
||||
" HAVING COUNT(DISTINCT flag_tipologia_next) = 1) \n" +
|
||||
" AND flag_tipologia_next = 'A'";
|
||||
" AND flag_tipologia_next = 'A'\n" +
|
||||
" and srl_activity_type_user.user_name = " + UtilityDB.valueToString(requestDataDTO.getUsername());
|
||||
|
||||
return UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, ActivityTypeDTO.class);
|
||||
}
|
||||
|
||||
@@ -1326,7 +1326,7 @@ public class SteUPService {
|
||||
sourceDBSchema.connect();
|
||||
destDBSchema.connect();
|
||||
|
||||
String dbName = "BIOLEVANTE";
|
||||
String dbName = "LICOR";
|
||||
sourceDBSchema.useDatabase(dbName);
|
||||
|
||||
destDBSchema.useDatabase(profileDb);
|
||||
|
||||
@@ -6,7 +6,10 @@ import it.integry.ems.service.EntityProcessor;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems_model.entity.*;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.*;
|
||||
import it.integry.ems_model.utility.Query;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityHashMap;
|
||||
import it.integry.ems_model.utility.UtilityList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -15,8 +18,8 @@ import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -162,7 +165,7 @@ public class ToscaProductionService {
|
||||
String serColloPrev = ul.getSerCollo();
|
||||
Integer numColloPrev = ul.getNumCollo();
|
||||
|
||||
String barcodeUl = "U" + UtilityLocalDate.formatDate(ul.getDataCollo(), "yy") + String.format("%07d", numColloPrev) + serColloPrev;
|
||||
String barcodeUl = "U" + String.valueOf(ul.getDataCollo().getYear()).substring(2) + String.format("%07d", numColloPrev) + serColloPrev;
|
||||
|
||||
ul.setOperation(OperationType.SUBSTITUTE);
|
||||
ul.setOldPk(new HashMap<>());
|
||||
|
||||
@@ -50,6 +50,8 @@ import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.http.ContentDisposition;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
@@ -321,7 +323,7 @@ public class DocumentController {
|
||||
@RequestMapping(value = "generaCorrispettivi", method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse generaCorrispettivi(HttpServletRequest request,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration) throws Exception {
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration) throws Exception {
|
||||
List<EntityBase> entityList = generaCorrispettivi.generaCorrispettivi();
|
||||
return ServiceRestResponse.createEntityPositiveResponse(entityList);
|
||||
}
|
||||
@@ -528,9 +530,9 @@ public class DocumentController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_DOC_XML_FILECONTENT, method = RequestMethod.GET)
|
||||
public byte[] downloadDtbDocXmlFileContent(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String progSdi) throws Exception {
|
||||
public ResponseEntity<byte[]> downloadDtbDocXmlFileContent(
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String progSdi) throws Exception {
|
||||
DtbDocXml dtbDocXml = new DtbDocXml();
|
||||
dtbDocXml.setProgSdi(progSdi);
|
||||
dtbDocXml.setOperation(OperationType.SELECT_OBJECT);
|
||||
@@ -538,18 +540,20 @@ public class DocumentController {
|
||||
dtbDocXml = entityProcessor.processEntity(dtbDocXml, multiDBTransactionManager);
|
||||
|
||||
if (dtbDocXml != null) {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + dtbDocXml.getFilename() + "\"");
|
||||
|
||||
byte[] byteArr = Base64.decodeBase64(dtbDocXml.getFilecontent());
|
||||
response.setContentLength(byteArr != null ? byteArr.length : 0);
|
||||
|
||||
return byteArr;
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.APPLICATION_XML)
|
||||
.contentLength(byteArr != null ? byteArr.length : 0)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename(dtbDocXml.getFilename())
|
||||
.build()
|
||||
.toString())
|
||||
.body(byteArr);
|
||||
}
|
||||
|
||||
response.sendError(404, "Allegato non trovato");
|
||||
return null;
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_GET_DTB_DOC_XML_FILECONTENT_PDF_NAME, method = RequestMethod.GET)
|
||||
@@ -577,18 +581,16 @@ public class DocumentController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_DOC_XML_FILECONTENT_PDF, method = RequestMethod.GET)
|
||||
public byte[] downloadDtbDocXmlFileContentPdf(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String progSdi) throws Exception {
|
||||
public ResponseEntity<byte[]> downloadDtbDocXmlFileContentPdf(
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String progSdi) throws Exception {
|
||||
|
||||
DtbDocXml dtbDocXml = new DtbDocXml();
|
||||
dtbDocXml.setProgSdi(progSdi);
|
||||
dtbDocXml.setOperation(OperationType.SELECT_OBJECT);
|
||||
dtbDocXml = entityProcessor.processEntity(dtbDocXml, multiDBTransactionManager);
|
||||
|
||||
if (dtbDocXml != null) {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + dtbDocXml.getFileNamePdf() + "\"");
|
||||
|
||||
FpxToPdfDTO.FpxToPdfFile fpxToPdfFile = new FpxToPdfDTO.FpxToPdfFile();
|
||||
fpxToPdfFile.setFileContentBytes(Base64.decodeBase64(dtbDocXml.getFilecontent()));
|
||||
@@ -607,19 +609,25 @@ public class DocumentController {
|
||||
byteArr = resultFpxFiles.get(0).getFileContentBytes();
|
||||
}
|
||||
|
||||
//byte[] byteArr = Base64.decodeBase64(dtbDocXml.getFileContentPdf());
|
||||
response.setContentLength(byteArr != null ? byteArr.length : 0);
|
||||
return byteArr;
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.APPLICATION_PDF)
|
||||
.contentLength(byteArr != null ? byteArr.length : 0)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename(dtbDocXml.getFileNamePdf())
|
||||
.build()
|
||||
.toString())
|
||||
.body(byteArr);
|
||||
}
|
||||
|
||||
response.sendError(404, "Allegato non trovato");
|
||||
return null;
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_DOC_XML_PDF_ESITO, method = RequestMethod.GET)
|
||||
public byte[] downloadDtbDocXmlPdfEsito(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String progSdi) throws Exception {
|
||||
public ResponseEntity<byte[]> downloadDtbDocXmlPdfEsito(
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String progSdi) throws Exception {
|
||||
|
||||
DtbDocXml dtbDocXml = new DtbDocXml();
|
||||
dtbDocXml.setProgSdi(progSdi);
|
||||
dtbDocXml.setOperation(OperationType.SELECT_OBJECT);
|
||||
@@ -627,23 +635,27 @@ public class DocumentController {
|
||||
dtbDocXml = entityProcessor.processEntity(dtbDocXml, multiDBTransactionManager);
|
||||
|
||||
if (dtbDocXml != null) {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"esito.pdf\"");
|
||||
|
||||
byte[] byteArr = Base64.decodeBase64(dtbDocXml.getPdfEsito());
|
||||
response.setContentLength(byteArr != null ? byteArr.length : 0);
|
||||
return byteArr;
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.APPLICATION_PDF)
|
||||
.contentLength(byteArr != null ? byteArr.length : 0)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename(dtbDocXml.getFilename())
|
||||
.build()
|
||||
.toString())
|
||||
.body(byteArr);
|
||||
}
|
||||
|
||||
response.sendError(404, "Allegato non trovato");
|
||||
return null;
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_DOC_XML_ESITO, method = RequestMethod.GET)
|
||||
public byte[] downloadDtbDocXmlEsito(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String progSdi) throws Exception {
|
||||
public ResponseEntity<byte[]> downloadDtbDocXmlEsito(
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String progSdi) throws Exception {
|
||||
|
||||
DtbDocXml dtbDocXml = new DtbDocXml();
|
||||
dtbDocXml.setProgSdi(progSdi);
|
||||
dtbDocXml.setOperation(OperationType.SELECT_OBJECT);
|
||||
@@ -651,17 +663,20 @@ public class DocumentController {
|
||||
dtbDocXml = entityProcessor.processEntity(dtbDocXml, multiDBTransactionManager);
|
||||
|
||||
if (dtbDocXml != null) {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"esito.xml\"");
|
||||
|
||||
byte[] byteArr = Base64.decodeBase64(dtbDocXml.getXmlEsito());
|
||||
response.setContentLength(byteArr != null ? byteArr.length : 0);
|
||||
return byteArr;
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.APPLICATION_XML)
|
||||
.contentLength(byteArr != null ? byteArr.length : 0)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename("esito.xml")
|
||||
.build()
|
||||
.toString())
|
||||
.body(byteArr);
|
||||
}
|
||||
|
||||
response.sendError(404, "Allegato non trovato");
|
||||
return null;
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
|
||||
@@ -690,36 +705,34 @@ public class DocumentController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_STB_ACTIVITY_FILE_ATTACHMENT, method = RequestMethod.GET)
|
||||
public byte[] downloadStbActivityFileAttachment(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String id,
|
||||
@RequestParam String fileName,
|
||||
@RequestParam(defaultValue = "false") boolean requestThumbnail) {
|
||||
public ResponseEntity<byte[]> downloadStbActivityFileAttachment(@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||
@RequestParam String id,
|
||||
@RequestParam String fileName,
|
||||
@RequestParam(defaultValue = "false") boolean requestThumbnail) throws Exception {
|
||||
StbActivityFile stbActivityFile = new StbActivityFile()
|
||||
.setId(id)
|
||||
.setFileName(fileName);
|
||||
stbActivityFile.setOperation(OperationType.SELECT_OBJECT);
|
||||
|
||||
try {
|
||||
StbActivityFile stbActivityFile = new StbActivityFile()
|
||||
.setId(id)
|
||||
.setFileName(fileName);
|
||||
stbActivityFile.setOperation(OperationType.SELECT_OBJECT);
|
||||
stbActivityFile = entityProcessor.processEntity(stbActivityFile, multiDBTransactionManager);
|
||||
|
||||
stbActivityFile = entityProcessor.processEntity(stbActivityFile, multiDBTransactionManager);
|
||||
if (stbActivityFile != null) {
|
||||
byte[] byteArr = requestThumbnail && stbActivityFile.getThumbnail() != null ? stbActivityFile.getThumbnail() : stbActivityFile.getContent();
|
||||
|
||||
if (stbActivityFile != null) {
|
||||
byte[] byteArr = requestThumbnail && stbActivityFile.getThumbnail() != null ? stbActivityFile.getThumbnail() : stbActivityFile.getContent();
|
||||
MediaType mediaType = mimetypesFileTypeMap.getContentType(stbActivityFile.getFileName());
|
||||
|
||||
response.setContentType(mimetypesFileTypeMap.getContentType(stbActivityFile.getFileName()).toString());
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + stbActivityFile.getFileName() + "\"");
|
||||
response.setContentLength(byteArr != null ? byteArr.length : 0);
|
||||
return byteArr;
|
||||
}
|
||||
|
||||
response.sendError(404, "Allegato non trovato");
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
logger.error(request.getRequestURI(), e);
|
||||
return null;
|
||||
return ResponseEntity.ok()
|
||||
.contentType(mediaType)
|
||||
.contentLength(byteArr.length)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename(stbActivityFile.getFileName())
|
||||
.build()
|
||||
.toString())
|
||||
.body(byteArr);
|
||||
}
|
||||
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_STB_ACTIVITY_FILE_ATTACHMENT + "/{id}/{fileName}", method = RequestMethod.GET)
|
||||
@@ -761,9 +774,9 @@ public class DocumentController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/downloadPdfMinisterialeActive", method = RequestMethod.GET)
|
||||
public byte[] downloadPdfMinisterialeFromProgSDI(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam String progSdi,
|
||||
@RequestParam String type) throws Exception {
|
||||
public ResponseEntity<byte[]> downloadPdfMinisterialeFromProgSDI(
|
||||
@RequestParam String progSdi,
|
||||
@RequestParam String type) throws Exception {
|
||||
|
||||
FpxPDFTypeEnum fpxPDFType = FpxPDFTypeEnum.fromString(type);
|
||||
|
||||
@@ -773,18 +786,21 @@ public class DocumentController {
|
||||
dtbDocXml = entityProcessor.processEntity(dtbDocXml, multiDBTransactionManager);
|
||||
|
||||
if (dtbDocXml != null) {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + dtbDocXml.getFileNamePdf() + "\"");
|
||||
|
||||
byte[] fileContentPdf = documentService.generateFpxPDFMinisteriale(fpxPDFType, dtbDocXml.getFilename(), Base64.decodeBase64(dtbDocXml.getFilecontent()));
|
||||
|
||||
response.setContentLength(fileContentPdf != null ? fileContentPdf.length : 0);
|
||||
return fileContentPdf;
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.APPLICATION_PDF)
|
||||
.contentLength(fileContentPdf != null ? fileContentPdf.length : 0)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename(dtbDocXml.getFilename())
|
||||
.build()
|
||||
.toString())
|
||||
.body(fileContentPdf);
|
||||
|
||||
}
|
||||
|
||||
response.sendError(404, "Allegato non trovato");
|
||||
return null;
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
|
||||
@@ -833,9 +849,9 @@ public class DocumentController {
|
||||
|
||||
|
||||
@RequestMapping(value = "/downloadPdfMinisteriale", method = RequestMethod.GET)
|
||||
public byte[] downloadPdfMinisteriale(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam String idAttach,
|
||||
@RequestParam String type) throws Exception {
|
||||
public ResponseEntity<byte[]> downloadPdfMinisteriale(
|
||||
@RequestParam String idAttach,
|
||||
@RequestParam String type) throws Exception {
|
||||
|
||||
FpxPDFTypeEnum fpxPDFType = FpxPDFTypeEnum.fromString(type);
|
||||
|
||||
@@ -856,18 +872,21 @@ public class DocumentController {
|
||||
|
||||
stbFilesAttached = entityProcessor.processEntity(stbFilesAttached, multiDBTransactionManager);
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
|
||||
if (stbFilesAttached != null) {
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + stbFilesAttached.getFileName() + "\"");
|
||||
|
||||
byte[] fileContentPdf = documentService.generateFpxPDFMinisteriale(fpxPDFType, stbFilesAttached);
|
||||
return fileContentPdf;
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.contentType(MediaType.APPLICATION_PDF)
|
||||
.contentLength(fileContentPdf != null ? fileContentPdf.length : 0)
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
|
||||
.builder("attachment")
|
||||
.filename(stbFilesAttached.getFileName())
|
||||
.build()
|
||||
.toString())
|
||||
.body(fileContentPdf);
|
||||
}
|
||||
|
||||
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
|
||||
return null;
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_TRASFORMA_PREV, method = RequestMethod.POST)
|
||||
|
||||
@@ -121,6 +121,9 @@ public class DocumentiExporter extends BaseEntityExporter implements IEntityExpo
|
||||
ExportFromQuery expq = ContextLoader.getCurrentWebApplicationContext().getBean(ExportFromQuery.class);
|
||||
entityExportResponse = expq.export(username, type, format, whereCond);
|
||||
break;
|
||||
case MD:
|
||||
entityExportResponse = context.getBean(DocumentiMdExportService.class).export(type, format, whereCond, multiDBTransactionManager, anomalie);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +237,8 @@ public class DocumentiExporter extends BaseEntityExporter implements IEntityExpo
|
||||
INTESA("INTESA"),
|
||||
CSV("CSV"),
|
||||
EXCEL("EXCEL"),
|
||||
CHEP("CHEP");
|
||||
CHEP("CHEP"),
|
||||
MD("MD");
|
||||
|
||||
private String text;
|
||||
|
||||
|
||||
@@ -3,34 +3,44 @@ package it.integry.ems.document.export.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import it.integry.ems_model.annotation.DtoField;
|
||||
|
||||
public class MdRigheDTO {
|
||||
import java.math.BigDecimal;
|
||||
|
||||
private final String format = "20";
|
||||
@DtoField(startPosition = 1, maxLength = 7, format = format, fillChar = "0")
|
||||
public class MdRigheDTO {
|
||||
private final String format = "###0.00";
|
||||
|
||||
@DtoField(startPosition = 0, maxLength = 7, fillChar = " ")
|
||||
private String tipoRecord;
|
||||
|
||||
@JsonProperty (value = "cod_mart")
|
||||
@DtoField(startPosition = 8, maxLength = 15, fillChar = " ")
|
||||
@DtoField(startPosition = 7, maxLength = 15, fillChar = " ")
|
||||
private String codMart;
|
||||
|
||||
@JsonProperty (value = "descrizione")
|
||||
@DtoField(startPosition = 23, maxLength = 30, fillChar = " ")
|
||||
@DtoField(startPosition = 22, maxLength = 30, fillChar = " ")
|
||||
private String descrizione;
|
||||
|
||||
@JsonProperty (value = "unt_doc")
|
||||
@DtoField(startPosition = 53, maxLength = 2, fillChar = " ")
|
||||
@DtoField(startPosition = 52, maxLength = 2, fillChar = " ")
|
||||
private String untDoc;
|
||||
|
||||
@JsonProperty(value = "qta_doc")
|
||||
@DtoField(startPosition = 55, maxLength = 7, fillChar = "0")
|
||||
private Integer qtaDoc;
|
||||
@DtoField(startPosition = 54, maxLength = 7, fillChar = "0", scale = 2, showFloatPoint = false)
|
||||
private BigDecimal qtaDoc;
|
||||
|
||||
@JsonProperty(value = "prezzo_netto")
|
||||
@DtoField(startPosition = 62, maxLength = 9, fillChar = "0")
|
||||
private Integer prezzoNetto;
|
||||
@DtoField(startPosition = 61, maxLength = 9, fillChar = "0", scale = 3, showFloatPoint = false)
|
||||
private BigDecimal prezzoNetto;
|
||||
|
||||
@JsonProperty(value = "imponibile")
|
||||
@DtoField(startPosition = 71, maxLength = 13, fillChar = "0")
|
||||
private Integer imponibile;
|
||||
@JsonProperty(value = "cod_aliq")
|
||||
@DtoField(startPosition = 85, maxLength = 2, fillChar = " ")
|
||||
private String codAliq;
|
||||
@DtoField(startPosition = 70, maxLength = 13, fillChar = "0", scale = 7, showFloatPoint = false)
|
||||
private BigDecimal imponibile;
|
||||
|
||||
@JsonProperty(value = "perc_aliq")
|
||||
@DtoField(startPosition = 84, maxLength = 2, fillChar = " ")
|
||||
private Integer percAliq;
|
||||
|
||||
@JsonProperty(value = "tipo_cessione")
|
||||
@DtoField(startPosition = 87, maxLength = 1, fillChar = " ")
|
||||
@DtoField(startPosition = 86, maxLength = 1, fillChar = " ")
|
||||
private Integer tipoCessione;
|
||||
|
||||
public String getFormat() {
|
||||
@@ -73,39 +83,39 @@ public class MdRigheDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getQtaDoc() {
|
||||
public BigDecimal getQtaDoc() {
|
||||
return qtaDoc;
|
||||
}
|
||||
|
||||
public MdRigheDTO setQtaDoc(Integer qtaDoc) {
|
||||
public MdRigheDTO setQtaDoc(BigDecimal qtaDoc) {
|
||||
this.qtaDoc = qtaDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPrezzoNetto() {
|
||||
public BigDecimal getPrezzoNetto() {
|
||||
return prezzoNetto;
|
||||
}
|
||||
|
||||
public MdRigheDTO setPrezzoNetto(Integer prezzoNetto) {
|
||||
public MdRigheDTO setPrezzoNetto(BigDecimal prezzoNetto) {
|
||||
this.prezzoNetto = prezzoNetto;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getImponibile() {
|
||||
public BigDecimal getImponibile() {
|
||||
return imponibile;
|
||||
}
|
||||
|
||||
public MdRigheDTO setImponibile(Integer imponibile) {
|
||||
public MdRigheDTO setImponibile(BigDecimal imponibile) {
|
||||
this.imponibile = imponibile;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodAliq() {
|
||||
return codAliq;
|
||||
public Integer getPercAliq() {
|
||||
return percAliq;
|
||||
}
|
||||
|
||||
public MdRigheDTO setCodAliq(String codAliq) {
|
||||
this.codAliq = codAliq;
|
||||
public MdRigheDTO setPercAliq(Integer percAliq) {
|
||||
this.percAliq = percAliq;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,37 +3,35 @@ package it.integry.ems.document.export.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import it.integry.ems_model.annotation.DtoField;
|
||||
|
||||
import java.util.Date;
|
||||
import java.time.LocalDate;
|
||||
|
||||
|
||||
public class MdTestateDTO {
|
||||
private final String format = "10";
|
||||
private final String dateFormat = "yyMMdd";
|
||||
@DtoField(startPosition = 1, maxLength = 7, format = format, fillChar = "0")
|
||||
|
||||
@DtoField(startPosition = 0, maxLength = 7, fillChar = " ")
|
||||
private String tipoRecord;
|
||||
|
||||
@JsonProperty (value = "num_doc_val")
|
||||
@DtoField(startPosition = 8, maxLength = 6, fillChar = "0")
|
||||
@DtoField(startPosition = 7, maxLength = 6, fillChar = "0")
|
||||
private Integer numDocVal;
|
||||
|
||||
@JsonProperty (value = "data_doc_val")
|
||||
@DtoField(startPosition = 14, maxLength = 6, format = dateFormat, fillChar = " " )
|
||||
private Date dateDocVal;
|
||||
@DtoField(startPosition = 13, maxLength = 6, format = dateFormat, fillChar = " " )
|
||||
private LocalDate dateDocVal;
|
||||
|
||||
@JsonProperty (value = "num_doc")
|
||||
@DtoField(startPosition = 20, maxLength = 6, fillChar = " ")
|
||||
@DtoField(startPosition = 19, maxLength = 6, fillChar = " ")
|
||||
private Integer numDoc;
|
||||
|
||||
@JsonProperty (value = "data_doc")
|
||||
@DtoField(startPosition = 26, maxLength = 6, format = dateFormat, fillChar = " " )
|
||||
private Date dateDoc;
|
||||
@DtoField(startPosition = 25, maxLength = 6, format = dateFormat, fillChar = " " )
|
||||
private LocalDate dateDoc;
|
||||
|
||||
@JsonProperty (value = "cod_affiliazione")
|
||||
@DtoField(startPosition = 32, maxLength = 31, fillChar = " ")
|
||||
@DtoField(startPosition = 56, maxLength = 31, fillChar = " ")
|
||||
private String codAffiliazione;
|
||||
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
public String getDateFormat() {
|
||||
return dateFormat;
|
||||
}
|
||||
|
||||
public String getTipoRecord() {
|
||||
return tipoRecord;
|
||||
}
|
||||
@@ -52,11 +50,11 @@ public class MdTestateDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDateDocVal() {
|
||||
public LocalDate getDateDocVal() {
|
||||
return dateDocVal;
|
||||
}
|
||||
|
||||
public MdTestateDTO setDateDocVal(Date dateDocVal) {
|
||||
public MdTestateDTO setDateDocVal(LocalDate dateDocVal) {
|
||||
this.dateDocVal = dateDocVal;
|
||||
return this;
|
||||
}
|
||||
@@ -70,11 +68,11 @@ public class MdTestateDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDateDoc() {
|
||||
public LocalDate getDateDoc() {
|
||||
return dateDoc;
|
||||
}
|
||||
|
||||
public MdTestateDTO setDateDoc(Date dateDoc) {
|
||||
public MdTestateDTO setDateDoc(LocalDate dateDoc) {
|
||||
this.dateDoc = dateDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -355,11 +355,17 @@ public class DocumentiExportManagerService {
|
||||
} else {
|
||||
|
||||
if (userGroup.equalsIgnoreCase("Clienti")) {
|
||||
whereCondDoc = "wtb_users.user_name = " + UtilityDB.valueToString(user.getUserName()) + " AND " +
|
||||
" wtb_users.user_name = wtb_clie_dest.user_name AND " +
|
||||
" wtb_clie_dest.cod_anag = dtb_doct.cod_anag AND " +
|
||||
" wtb_clie_dest.cod_vdes = dtb_doct.cod_vdes ";
|
||||
tableNameCondDoc = ", wtb_users, wtb_clie_dest";
|
||||
whereCondDoc =
|
||||
"EXISTS (SELECT 1\n" +
|
||||
" FROM stb_user\n" +
|
||||
" INNER JOIN (SELECT user_name, cod_anag, CONVERT(VARCHAR(5), NULL) AS cod_vdes\n" +
|
||||
" FROM wtb_clie\n" +
|
||||
" UNION ALL\n" +
|
||||
" SELECT user_name, cod_anag, cod_vdes\n" +
|
||||
" FROM wtb_clie_dest) wtb_clie ON wtb_clie.user_name = stb_user.user_name\n" +
|
||||
" WHERE stb_user.user_name = " + UtilityDB.valueToString(user.getUserName()) + "\n" +
|
||||
" AND wtb_clie.cod_anag = dtb_doct.cod_anag\n" +
|
||||
" AND (wtb_clie.cod_vdes IS NULL OR wtb_clie.cod_vdes = ISNULL(dtb_doct.cod_vdes, '')))";
|
||||
} else if (userGroup.compareTo("AGENTI") == 0) {
|
||||
whereCondDoc = "dtb_doct.cod_vage = " + UtilityDB.valueToString(userCode);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
package it.integry.ems.document.export.service;
|
||||
|
||||
import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems.Import.dto.AnomalieDTO;
|
||||
import it.integry.ems.document.export.dto.MdRigheDTO;
|
||||
import it.integry.ems.document.export.dto.MdTestateDTO;
|
||||
import it.integry.ems.export.base.EntityExportResponse;
|
||||
import it.integry.ems.file_formatter.txt.TxtMapper;
|
||||
import it.integry.ems.response.FileItem;
|
||||
import it.integry.ems.service.EntityProcessor;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems_model.entity.Azienda;
|
||||
import it.integry.ems_model.service.SetupGest;
|
||||
import it.integry.ems_model.utility.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class DocumentiMdExportService {
|
||||
@Autowired
|
||||
private EntityProcessor entityProcessor;
|
||||
|
||||
public EntityExportResponse<List<FileItem>> export(String type, String format, String whereCond, MultiDBTransactionManager multiDBTransactionManager, List<AnomalieDTO> anomalie) throws Exception {
|
||||
String sql =
|
||||
"SELECT bolla.cod_anag,\n" +
|
||||
" bolla.cod_dtip,\n" +
|
||||
" bolla.data_doc,\n" +
|
||||
" bolla.ser_doc,\n" +
|
||||
" bolla.num_doc\n" +
|
||||
"FROM dtb_doct\n" +
|
||||
" INNER JOIN dtb_doct bolla ON dtb_doct.cod_anag = bolla.cod_anag AND dtb_doct.cod_dtip = bolla.cod_dtip_val AND\n" +
|
||||
" dtb_doct.data_doc = bolla.data_doc_val AND\n" +
|
||||
" dtb_doct.ser_doc = bolla.ser_doc_val AND\n" +
|
||||
" dtb_doct.num_doc = bolla.num_doc_val\n"+
|
||||
" INNER JOIN dtb_tipi ON bolla.cod_dtip = dtb_tipi.cod_dtip AND dtb_tipi.tipo_emissione = 'DIRETTA'";
|
||||
sql = UtilityDB.addwhereCond(sql, whereCond, true);
|
||||
|
||||
List<HashMap<String, Object>> datiDoc = UtilityDB.executeSimpleQuery(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
if (datiDoc == null || datiDoc.size() == 0)
|
||||
throw new Exception("Nessuno documento trovato");
|
||||
|
||||
String fileContent = "";
|
||||
for (HashMap<String, Object> d : datiDoc) {
|
||||
sql =
|
||||
Query.format(
|
||||
"SELECT dtb_doct.cod_dtip,\n" +
|
||||
" dtb_doct.data_doc,\n" +
|
||||
" dtb_doct.ser_doc,\n" +
|
||||
" dtb_doct.num_doc,\n" +
|
||||
" dtb_doct.cod_dtip_val,\n" +
|
||||
" dtb_doct.data_doc_val,\n" +
|
||||
" dtb_doct.ser_doc_val,\n" +
|
||||
" dtb_doct.num_doc_val,\n" +
|
||||
" dtb_doct.cod_vdes,\n" +
|
||||
" vtb_dest.cod_affiliazione,\n" +
|
||||
" dtb_doct.cod_divi,\n" +
|
||||
" dtb_doct.cod_anag,\n" +
|
||||
" dtb_doct.listino\n" +
|
||||
"FROM dtb_doct\n" +
|
||||
" LEFT OUTER JOIN vtb_dest ON dtb_doct.cod_anag = vtb_dest.cod_anag AND dtb_doct.cod_vdes = vtb_dest.cod_vdes\n" +
|
||||
"WHERE dtb_doct.cod_anag = %s AND \n" +
|
||||
" dtb_doct.cod_dtip = %s AND \n" +
|
||||
" dtb_doct.data_doc = %s AND \n" +
|
||||
" dtb_doct.ser_doc = %s AND \n" +
|
||||
" dtb_doct.num_doc = %s \n" +
|
||||
"ORDER BY cod_dtip_val, data_doc_val, ser_doc_val, num_doc_val, cod_dtip, data_doc, ser_doc, num_doc",
|
||||
d.get("cod_anag"),
|
||||
d.get("cod_dtip"),
|
||||
d.get("data_doc"),
|
||||
d.get("ser_doc"),
|
||||
d.get("num_doc"));
|
||||
|
||||
MdTestateDTO mdTestateDTO = UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(), sql, MdTestateDTO.class);
|
||||
|
||||
if (UtilityString.isNullOrEmpty(mdTestateDTO.getCodAffiliazione())) {
|
||||
anomalie.add(AnomalieDTO.error(String.format("Attenzione codice di affiliazione non trovato o destinatario non presente sul documento n. %s/%s del %s",
|
||||
d.get("ser_doc"), d.get("num_doc"), UtilityDate.formatDate((Date) d.get("data_doc"), "dd/MM/yyyy"))));
|
||||
}
|
||||
|
||||
mdTestateDTO.setTipoRecord("10");
|
||||
|
||||
sql =
|
||||
Query.format(
|
||||
"SELECT mtb_aart.descrizione,\n" +
|
||||
" dtb_docr.unt_doc,\n" +
|
||||
" dtb_docr.qta_doc,\n" +
|
||||
" dtb_docr.importo_riga / dtb_docr.qta_doc AS prezzo_netto,\n" +
|
||||
" dtb_docr.importo_riga as imponibile,\n" +
|
||||
" Cast(Round(ISNULL(gtb_aliq.perc_aliq, 0),0) as int) AS perc_aliq,\n" +
|
||||
" ISNULL(mtb_aart_anag.cod_mart_anag, dtb_docr.cod_mart) AS cod_mart,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN dtb_docr.sconto5 = 100 OR dtb_docr.sconto6 = 100 OR sconto7 = 100 OR sconto8 = 100 THEN 4\n" +
|
||||
" WHEN dtb_tipi.segno_val_scar = -1 THEN 2\n" +
|
||||
" ELSE 1 END AS tipo_cessione\n" +
|
||||
"FROM dtb_doct\n" +
|
||||
" INNER JOIN dtb_tipi ON dtb_doct.cod_dtip = dtb_tipi.cod_dtip\n" +
|
||||
" INNER JOIN dtb_docr ON dtb_doct.cod_anag = dtb_docr.cod_anag AND dtb_doct.cod_dtip = dtb_docr.cod_dtip AND\n" +
|
||||
" dtb_doct.data_doc = dtb_docr.data_doc AND dtb_doct.ser_doc = dtb_docr.ser_doc AND\n" +
|
||||
" dtb_doct.num_doc = dtb_docr.num_doc\n" +
|
||||
" INNER JOIN mtb_aart ON dtb_docr.cod_mart = mtb_aart.cod_mart\n" +
|
||||
" LEFT OUTER JOIN gtb_aliq ON dtb_docr.cod_aliq = gtb_aliq.cod_aliq\n" +
|
||||
"\n" +
|
||||
" LEFT OUTER JOIN mtb_aart_anag\n" +
|
||||
" ON mtb_aart.cod_mart = mtb_aart_anag.cod_mart AND mtb_aart_anag.cod_anag = dtb_doct.cod_forn_td\n" +
|
||||
"WHERE dtb_doct.cod_anag = %s\n" +
|
||||
" AND dtb_doct.cod_dtip = %s\n" +
|
||||
" AND dtb_doct.data_doc = %s\n" +
|
||||
" AND dtb_doct.ser_doc = %s\n" +
|
||||
" AND dtb_doct.num_doc = %s\n" +
|
||||
"ORDER BY id_riga",
|
||||
d.get("cod_anag"),
|
||||
d.get("cod_dtip"),
|
||||
d.get("data_doc"),
|
||||
d.get("ser_doc"),
|
||||
d.get("num_doc"));
|
||||
|
||||
List<MdRigheDTO> mdRighe = UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, MdRigheDTO.class);
|
||||
|
||||
mdRighe.stream().forEach(x->x.setTipoRecord("20"));
|
||||
|
||||
TxtMapper<MdTestateDTO> testataMapper = new TxtMapper<MdTestateDTO>()
|
||||
.setIgnorePosition(false);
|
||||
|
||||
String testata = testataMapper.serialize(mdTestateDTO);
|
||||
|
||||
TxtMapper<MdRigheDTO> righeMapper = new TxtMapper<MdRigheDTO>()
|
||||
.setIgnorePosition(false);
|
||||
String righe = righeMapper.serialize(mdRighe);
|
||||
fileContent += testata + CommonConstants.A_CAPO + righe + CommonConstants.A_CAPO;
|
||||
}
|
||||
|
||||
EntityExportResponse<List<FileItem>> entityExportResponse = new EntityExportResponse<>();
|
||||
entityExportResponse.setResponse(new ArrayList<>());
|
||||
String fileName = UtilityLocalDate.formatDate(LocalDateTime.now(), "yyyyMMddHHmmss")+ ".txt";
|
||||
FileItem mdFile = new FileItem(fileName, fileContent, "txt");
|
||||
entityExportResponse.getResponse().add(mdFile);
|
||||
|
||||
return entityExportResponse;
|
||||
}
|
||||
}
|
||||
@@ -533,7 +533,8 @@ public class EuritmoImportService {
|
||||
|
||||
if (checkForDuplicates) {
|
||||
if (checkColloDuplicato(mDBTransactionManager, colT.getRifOrd())) {
|
||||
throw new Exception(String.format("Collo L - Data %s - Num. %d già importato. Rif. %s", UtilityLocalDate.formatDate(colT.getDataCollo(), CommonConstants.DATE_FORMAT_DMY_SLASHED),
|
||||
throw new Exception(String.format("Collo L - Data %s - Num. %d già importato. Rif. %s",
|
||||
CommonConstants.DATE_DMY_SLASHED_FORMATTER.format(colT.getDataCollo()),
|
||||
colT.getNumCollo(), colT.getRifOrd()));
|
||||
}
|
||||
}
|
||||
@@ -582,7 +583,7 @@ public class EuritmoImportService {
|
||||
|
||||
if (checkForDuplicates) {
|
||||
if (checkColloDuplicato(mDBTransactionManager, result.getRifOrd())) {
|
||||
throw new Exception(String.format("Collo L - Data %s - Num. %d già importato. Rif. %s", UtilityLocalDate.formatDate(result.getDataCollo(), CommonConstants.DATE_FORMAT_DMY_SLASHED),
|
||||
throw new Exception(String.format("Collo L - Data %s - Num. %d già importato. Rif. %s", CommonConstants.DATE_DMY_SLASHED_FORMATTER.format(result.getDataCollo()),
|
||||
result.getNumCollo(), result.getRifOrd()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ public class ConSegnaService {
|
||||
|
||||
if (!elencoEmail.isEmpty()) {
|
||||
try {
|
||||
mailService.sendMail(null, null, elencoEmail, null, null, subject, msgText, false, new FileItem(dtbDocPdf.getFilename(), dtbDocPdf.getFilecontent()));
|
||||
mailService.sendMail(null, null, elencoEmail, null, null, subject, msgText, false, new FileItem(dtbDocPdf.getFilename(), dtbDocPdf.getFilecontentByteArr(false)));
|
||||
logger.info("[ConSegna] Mail inviata a {} con allegato {}", elencoEmail, dtbDocPdf.getFilename());
|
||||
} catch (Exception e) {
|
||||
logger.error("[ConSegna] Errore invio mail a {} con allegato {}: {}", elencoEmail, dtbDocPdf.getFilename(), e.getMessage());
|
||||
|
||||
@@ -47,7 +47,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.InetAddress;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
|
||||
@@ -172,7 +171,8 @@ public class LogisticController {
|
||||
List<PairsDTO> pairList = new ArrayList<PairsDTO>();
|
||||
|
||||
pairList.add(new PairsDTO("gestione", pack.getGestione()));
|
||||
pairList.add(new PairsDTO("data_collo", UtilityLocalDate.formatDate(pack.getDataCollo(), CommonConstants.DATETIME_FORMAT_YMD)));
|
||||
pairList.add(new PairsDTO("data_collo", CommonConstants.DATETIME_YMD_SLASHED_FORMATTER.
|
||||
format(pack.getDataCollo())));
|
||||
pairList.add(new PairsDTO("ser_collo", pack.getSerCollo()));
|
||||
pairList.add(new PairsDTO("num_collo", pack.getNumCollo().toString()));
|
||||
|
||||
@@ -233,31 +233,28 @@ public class LogisticController {
|
||||
ServiceRestResponse pkgPrintLabel(HttpServletRequest request,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||
@RequestParam String gestione,
|
||||
@RequestParam String dataCollo,
|
||||
@RequestParam LocalDate dataCollo,
|
||||
@RequestParam String serCollo,
|
||||
@RequestParam String numCollo,
|
||||
@RequestParam String printerName,
|
||||
@RequestParam int printQuantity,
|
||||
@RequestParam(required = false, defaultValue = "default") String reportName) {
|
||||
|
||||
Date dateCollo;
|
||||
HashMap<String, String> params = new HashMap<String, String>();
|
||||
|
||||
try {
|
||||
dateCollo = UtilityDate.RecognizeDate(dataCollo);
|
||||
|
||||
if (reportName.equalsIgnoreCase("default")) {
|
||||
reportName = logisticService.getReportNameColloFromSetupGest(gestione, dateCollo, serCollo, numCollo);
|
||||
reportName = logisticService.getReportNameColloFromSetupGest(gestione, dataCollo, serCollo, numCollo);
|
||||
}
|
||||
|
||||
if (reportName == null || reportName.equalsIgnoreCase("")) {
|
||||
throw new Exception("Non è stato definito alcun report name");
|
||||
}
|
||||
|
||||
SimpleDateFormat dateFormatFile = new SimpleDateFormat(CommonConstants.DATE_FORMAT_YMD_DASHED);
|
||||
|
||||
params.put("gestione", gestione);
|
||||
params.put("data_collo", dateFormatFile.format(dateCollo));
|
||||
params.put("data_collo", CommonConstants.DATE_YMD_SLASHED_FORMATTER.format(dataCollo));
|
||||
params.put("ser_collo", serCollo);
|
||||
params.put("num_collo", numCollo);
|
||||
|
||||
|
||||
@@ -603,13 +603,13 @@ public class LogisticService {
|
||||
}
|
||||
|
||||
|
||||
public String getReportNameColloFromSetupGest(String gestione, Date dataCollo, String serCollo, String numCollo) throws Exception {
|
||||
public String getReportNameColloFromSetupGest(String gestione, LocalDate dataCollo, String serCollo, String numCollo) throws Exception {
|
||||
String codAnag, ret = null;
|
||||
String sql = "SELECT cod_anag FROM mtb_colt " +
|
||||
" WHERE gestione = " + UtilityDB.valueToString(gestione) +
|
||||
" AND num_collo = " + UtilityDB.valueToString(numCollo) +
|
||||
" AND ser_collo = " + UtilityDB.valueToString(serCollo) +
|
||||
" AND data_collo = " + UtilityDB.valueDateToString(dataCollo, CommonConstants.DATE_FORMAT_YMD_DASHED);
|
||||
" AND data_collo = " + UtilityDB.valueToString(dataCollo);
|
||||
|
||||
PreparedStatement ps = multiDBTransactionManager.prepareStatement(sql);
|
||||
ResultSet rs = ps.executeQuery();
|
||||
@@ -1301,8 +1301,7 @@ public class LogisticService {
|
||||
List<PairsDTO> pairList = new ArrayList<PairsDTO>();
|
||||
|
||||
pairList.add(new PairsDTO("gestione", mtbColt.getGestione()));
|
||||
pairList.add(new PairsDTO("dataCollo",
|
||||
UtilityLocalDate.formatDate(mtbColt.getDataCollo(), CommonConstants.DATE_FORMAT_YMD_DASHED)));
|
||||
pairList.add(new PairsDTO("dataCollo", CommonConstants.DATE_YMD_DASHED_FORMATTER.format(mtbColt.getDataCollo())));
|
||||
pairList.add(new PairsDTO("serCollo", mtbColt.getSerCollo()));
|
||||
pairList.add(new PairsDTO("numCollo", mtbColt.getNumCollo()));
|
||||
pairList.add(new PairsDTO("barcode", "000" + "01" + UtilityLocalDate.formatDate(mtbColt.getDataCollo(), "ddMMyy") + mtbColt.getSerCollo()
|
||||
|
||||
@@ -35,7 +35,6 @@ import java.math.RoundingMode;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -485,7 +484,7 @@ public class SmartLogisticService {
|
||||
codVdes = mtbColt.getCodVdes();
|
||||
ColloDTO colloClie = new ColloDTO();
|
||||
colloClie.setGestione(mtbColt.getGestione());
|
||||
colloClie.setData_collo(UtilityLocalDate.formatDate(mtbColt.getDataCollo(), CommonConstants.DATETIME_FORMAT_YMD));
|
||||
colloClie.setData_collo(CommonConstants.DATETIME_YMD_SLASHED_FORMATTER.format(mtbColt.getDataCollo()));
|
||||
colloClie.setSer_collo(mtbColt.getSerCollo());
|
||||
colloClie.setNum_collo(mtbColt.getNumCollo());
|
||||
colloClie.setCod_anag(codClie);
|
||||
|
||||
@@ -173,6 +173,7 @@ public class CrmService {
|
||||
StbActivity newActivity = createNewActivity(
|
||||
createContact
|
||||
.getActivityRequest()
|
||||
.setCodAnag(codAnag)
|
||||
.setCodJcom(codJcom),
|
||||
new CRMCreateNewCommessaRequestDTO()
|
||||
.setCommessa(createContact.getCommessa()),
|
||||
@@ -334,6 +335,9 @@ public class CrmService {
|
||||
);
|
||||
HashMap<String, Object> ordineImportato = UtilityDB.executeSimpleQueryOnlyFirstRow(conn, sql);
|
||||
|
||||
if ((ordineImportato != null || ordineImportato.get("activity_id") != null) && completeOrder.getActivityId() == null)
|
||||
completeOrder.setActivityId(ordineImportato.get("activity_id").toString());
|
||||
|
||||
if ("S".equals(ordineImportato.get("flag_elaborato").toString()))
|
||||
throw new Exception("L'ordine risulta essere in gestione, pertanto non è più possibile modificarlo");
|
||||
|
||||
@@ -729,6 +733,7 @@ public class CrmService {
|
||||
.setUserName(userName)
|
||||
.setActivityDescription(activityDescription)
|
||||
.setUserCreator(requestDataDTO.getUsername())
|
||||
.setCodAnag(activityRequest.getCodAnag())
|
||||
.setCodJcom(activityRequest.getCodJcom())
|
||||
.setEstimatedTime(LocalDateTime.now());
|
||||
|
||||
|
||||
@@ -214,6 +214,7 @@ public class CRMUtility {
|
||||
notificationDate = EmsRestConstants.LOCAL_DATE_TIME_NULL;
|
||||
|
||||
return new StbActivity()
|
||||
.setActivityId(activityRequest.getActivityId())
|
||||
.setTipoAnag(activityRequest.getTipoAnag())
|
||||
.setCodAnag(activityRequest.getCodAnag())
|
||||
.setCodJcom(activityRequest.getCodJcom())
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -125,7 +124,8 @@ public class ImportListiniAcquistoService {
|
||||
return atbListData;
|
||||
|
||||
} else
|
||||
anomalie.add(AnomalieDTO.info(String.format("Nessuna variazione sui prezzi del listino %s a data %s", codAlis, UtilityLocalDate.formatDate(dataVariazione, CommonConstants.DATE_FORMAT_DMY_SLASHED))));
|
||||
anomalie.add(AnomalieDTO.info(String.format("Nessuna variazione sui prezzi del listino %s a data %s", codAlis,
|
||||
CommonConstants.DATE_DMY_SLASHED_FORMATTER.format(dataVariazione))));
|
||||
|
||||
return null;
|
||||
|
||||
|
||||
@@ -49,9 +49,10 @@ public class GiacenzaController {
|
||||
@RequestMapping(value = "retrieve", method = RequestMethod.GET)
|
||||
public ServiceRestResponse retrieveGiacenza(HttpServletRequest request,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||
@RequestParam String codMdep) throws Exception {
|
||||
@RequestParam String codMdep,
|
||||
@RequestParam (required = false) String codMart) throws Exception {
|
||||
|
||||
return ServiceRestResponse.createPositiveResponse(giacenzaService.retrieveGiacenza(codMdep, true));
|
||||
return ServiceRestResponse.createPositiveResponse(giacenzaService.retrieveGiacenza(codMdep, true, codMart));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "archivia", method = RequestMethod.POST)
|
||||
|
||||
@@ -186,10 +186,8 @@ public class VariazioniPvExportServices {
|
||||
|
||||
if (isSingleLisv) {
|
||||
String suffix = "";
|
||||
if (variazioniPvDTO.getTipoReportEnum().compareTo(VariazioniReportType.PROMOZIONI) == 0) {
|
||||
suffix = "P";
|
||||
} else if (variazioniPvDTO.getTipoReportEnum().compareTo(VariazioniReportType.TRACCIABILITA) == 0) {
|
||||
suffix = "T";
|
||||
if (variazioniPvDTO.getTipoReportEnum() != VariazioniReportType.LISTINO && variazioniPvDTO.getTipoReportEnum() != VariazioniReportType.VARIAZIONI) {
|
||||
suffix = variazioniPvDTO.getTipoReportEnum().getText();
|
||||
}
|
||||
String pathFile = setup.get("PATH_FILE");
|
||||
if (UtilityString.isNullOrEmpty(pathFile)) {
|
||||
|
||||
@@ -552,7 +552,7 @@ public class PvmServiceSave {
|
||||
|
||||
List<GiacenzaDTO> giacenzaPv = new ArrayList<>();
|
||||
if (saveGiacenza) {
|
||||
giacenzaPv = giacenzaService.retrieveGiacenza(codMdep, false);
|
||||
giacenzaPv = giacenzaService.retrieveGiacenza(codMdep, false, null);
|
||||
}
|
||||
|
||||
MtbColt collo = new MtbColt();
|
||||
|
||||
@@ -579,7 +579,7 @@ public class GiacenzaService {
|
||||
}
|
||||
}
|
||||
|
||||
public List<GiacenzaDTO> retrieveGiacenza(String codMdep, boolean readOrdini) throws Exception {
|
||||
public List<GiacenzaDTO> retrieveGiacenza(String codMdep, boolean readOrdini, String codMart) throws Exception {
|
||||
|
||||
String sql = Query.format(
|
||||
"SELECT cod_mdep FROM stb_gest_setup_depo WHERE gest_name = %s AND section = %s AND key_section = %S AND value = %S",
|
||||
@@ -628,7 +628,8 @@ public class GiacenzaService {
|
||||
" AND wdtb_doct.ser_doc = wdtb_docr.ser_doc\n" +
|
||||
" AND wdtb_doct.num_doc = wdtb_docr.num_doc\n" +
|
||||
" WHERE wdtb_doct.flag_elaborato = 'N'\n" +
|
||||
" AND wdtb_doct.cod_mdep IN (" + whereCond + ") and wdtb_doct.data_ins >= dateadd(day, - 7, cast(getdate() AS DATE))\n" +
|
||||
" AND wdtb_doct.cod_mdep IN (" + whereCond + ") \n" +
|
||||
" AND wdtb_doct.data_ins >= dateadd(day, - 7, cast(getdate() AS DATE))\n" +
|
||||
" UNION ALL\n" +
|
||||
" SELECT ntb_docr.cod_mart,\n" +
|
||||
" ntb_doct.date_only_doc AS data_reg,\n" +
|
||||
@@ -695,7 +696,6 @@ public class GiacenzaService {
|
||||
" SUM(movimenti.qta_car * qta_std) + ISNULL(giac.qta_car, 0) AS qta_car,\n" +
|
||||
" SUM(movimenti.qta_scar * qta_std) + ISNULL(giac.qta_scar, 0) AS qta_scar,\n" +
|
||||
" GETDATE() AS data_ins\n" +
|
||||
"\n" +
|
||||
" FROM movimenti\n" +
|
||||
" INNER JOIN art ON movimenti.cod_mart = art.cod_mart\n" +
|
||||
" LEFT OUTER JOIN selezione_giacenza giac ON giac.cod_mart = art.cod_mart_mov\n" +
|
||||
@@ -710,7 +710,6 @@ public class GiacenzaService {
|
||||
" )\n" +
|
||||
" )\n" +
|
||||
" )\n" +
|
||||
"\n" +
|
||||
" GROUP BY art.cod_mart_mov, giac.qta_car, giac.qta_scar),\n" +
|
||||
" inv AS (SELECT ISNULL(r.cod_mart, k.cod_mart) AS cod_mart,\n" +
|
||||
" ISNULL(r.qta_car, ISNULL(k.qta_car, 0)) - ISNULL(r.qta_scar, ISNULL(k.qta_scar, 0)) AS qta_inv,\n" +
|
||||
@@ -738,6 +737,10 @@ public class GiacenzaService {
|
||||
"FROM final\n" +
|
||||
" LEFT OUTER JOIN mtb_aart ON final.cod_mart = mtb_aart.cod_mart";
|
||||
|
||||
if ( !UtilityString.isNullOrEmpty(codMart)) {
|
||||
sql += " WHERE final.cod_mart = " + UtilityDB.valueToString(codMart);
|
||||
}
|
||||
|
||||
List<GiacenzaDTO> listGiacenza = UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, GiacenzaDTO.class);
|
||||
|
||||
String listiniAcquisto = setupGest.getSetup(gestName, section, "LISTINI_ACQUISTO");
|
||||
@@ -747,60 +750,42 @@ public class GiacenzaService {
|
||||
}
|
||||
if (readOrdini) {
|
||||
sql =
|
||||
"WITH ordine AS (SELECT dtb_ordt.cod_mdep,\n" +
|
||||
" dtb_ordr.cod_mart,\n" +
|
||||
" dtb_ordr.qta_ord,\n" +
|
||||
" dtb_ordr.data_cons\n" +
|
||||
" FROM dtb_ordt\n" +
|
||||
" INNER JOIN dtb_ordr ON dtb_ordt.gestione = dtb_ordr.gestione\n" +
|
||||
" AND dtb_ordt.data_ord = dtb_ordr.data_ord\n" +
|
||||
" AND dtb_ordt.num_ord = dtb_ordr.num_ord\n" +
|
||||
" WHERE dtb_ordt.gestione = 'A'\n" +
|
||||
" AND dtb_ordt.flag_annulla = 'N'\n" +
|
||||
" AND dtb_ordt.flag_sospeso = 'N'\n" +
|
||||
" AND dtb_ordt.cod_mdep = " + UtilityDB.valueToString(codMdep) + "\n" +
|
||||
|
||||
"SELECT dtb_ordt.cod_mdep,\n" +
|
||||
" dtb_ordr.cod_mart,\n" +
|
||||
" dtb_ordr.qta_ord as merce_in_arrivo\n" +
|
||||
"FROM dtb_ordt\n" +
|
||||
" INNER JOIN dtb_ordr ON dtb_ordt.gestione = dtb_ordr.gestione\n" +
|
||||
" AND dtb_ordt.data_ord = dtb_ordr.data_ord\n" +
|
||||
" AND dtb_ordt.num_ord = dtb_ordr.num_ord\n" +
|
||||
"WHERE dtb_ordt.gestione = 'A'\n" +
|
||||
" AND dtb_ordt.flag_annulla = 'N'\n" +
|
||||
" AND dtb_ordt.flag_sospeso = 'N'\n" +
|
||||
" AND dtb_ordr.flag_evaso = 'I'\n" +
|
||||
" AND dtb_ordt.cod_mdep = " + UtilityDB.valueToString(codMdep) + "\n" +
|
||||
(listini != null && !listini.isEmpty() ? " AND dtb_ordt.listino IN (" + UtilityDB.listValueToString(listini) + ")\n" : "") +
|
||||
" AND dtb_ordr.cod_mart IS NOT NULL\n" +
|
||||
" AND (dtb_ordr.data_cons >= CAST(GETDATE() AS DATE) OR\n" +
|
||||
" (\n" +
|
||||
" dtb_ordr.data_cons = dtb_ordr.data_ord\n" +
|
||||
" AND dtb_ordr.flag_evaso = 'I'\n" +
|
||||
" AND dtb_ordr.data_ord >= DATEADD(DAY, - 3, CAST(GETDATE() AS DATE))\n" +
|
||||
" )\n" +
|
||||
" )\n" +
|
||||
" AND NOT EXISTS (SELECT *\n" +
|
||||
" FROM wdtb_doct\n" +
|
||||
" INNER JOIN wdtb_docr ON wdtb_doct.cod_dtip = wdtb_docr.cod_dtip\n" +
|
||||
" AND wdtb_docr.cod_anag = wdtb_doct.cod_anag\n" +
|
||||
" AND wdtb_docr.data_doc = wdtb_doct.data_doc\n" +
|
||||
" AND wdtb_docr.ser_doc = wdtb_doct.ser_doc\n" +
|
||||
" AND wdtb_docr.num_doc = wdtb_doct.num_doc\n" +
|
||||
" WHERE wdtb_docr.data_ord = dtb_ordr.data_ord\n" +
|
||||
" AND wdtb_docr.num_ord = dtb_ordr.num_ord))\n" +
|
||||
"\n" +
|
||||
" , doc AS (SELECT wdtb_doct.cod_mdep,\n" +
|
||||
" wdtb_docr.cod_mart,\n" +
|
||||
" sum(wdtb_docr.qta_doc) as qta_doc \n" +
|
||||
" FROM wdtb_doct\n" +
|
||||
" INNER JOIN wdtb_docr ON wdtb_doct.cod_dtip = wdtb_docr.cod_dtip\n" +
|
||||
" AND wdtb_docr.cod_anag = wdtb_doct.cod_anag\n" +
|
||||
" AND wdtb_docr.data_doc = wdtb_doct.data_doc\n" +
|
||||
" AND wdtb_docr.ser_doc = wdtb_doct.ser_doc\n" +
|
||||
" AND wdtb_docr.num_doc = wdtb_doct.num_doc\n" +
|
||||
" AND wdtb_docr.cod_mart IS NOT NULL\n" +
|
||||
(listini != null && !listini.isEmpty() ? " AND wdtb_doct.listino IN (" + UtilityDB.listValueToString(listini) + ")\n" : "") +
|
||||
" WHERE wdtb_doct.cod_mdep = " + UtilityDB.valueToString(codMdep) + "\n" +
|
||||
" AND wdtb_doct.flag_elaborato = 'I'" +
|
||||
" GROUP BY wdtb_doct.cod_mdep,\n" +
|
||||
" wdtb_docr.cod_mart )\n" +
|
||||
"\n" +
|
||||
"SELECT ISNULL(doc.cod_mdep, ordine.cod_mdep) AS cod_mdep,\n" +
|
||||
" ISNULL(doc.cod_mart, ordine.cod_mart) AS cod_mart,\n" +
|
||||
" ISNULL(doc.qta_doc, 0) + ISNULL(ordine.qta_ord, 0) AS merce_in_arrivo\n" +
|
||||
"FROM doc\n" +
|
||||
" FULL OUTER JOIN ordine ON doc.cod_mart = ordine.cod_mart\n" +
|
||||
" AND doc.cod_mdep = ordine.cod_mdep\n" +
|
||||
" AND doc.cod_mdep = ordine.cod_mdep";
|
||||
(!UtilityString.isNullOrEmpty(codMart) ? " AND dtb_ordr.cod_mart = " + UtilityDB.valueToString(codMart) + "\n":"") +
|
||||
" AND dtb_ordr.cod_mart IS NOT NULL\n" +
|
||||
" AND (dtb_ordr.data_cons >= CAST(GETDATE() AS DATE) OR\n" +
|
||||
" (\n" +
|
||||
" dtb_ordr.data_cons = dtb_ordr.data_ord\n" +
|
||||
" AND dtb_ordr.flag_evaso = 'I'\n" +
|
||||
" AND dtb_ordr.data_ord >= DATEADD(DAY, - 3, CAST(GETDATE() AS DATE))\n" +
|
||||
" )\n" +
|
||||
" )\n" +
|
||||
" AND NOT EXISTS (SELECT 1\n" +
|
||||
" FROM wdtb_doct\n" +
|
||||
" INNER JOIN wdtb_docr ON wdtb_doct.cod_dtip = wdtb_docr.cod_dtip\n" +
|
||||
" AND wdtb_docr.cod_anag = wdtb_doct.cod_anag\n" +
|
||||
" AND wdtb_docr.data_doc = wdtb_doct.data_doc\n" +
|
||||
" AND wdtb_docr.ser_doc = wdtb_doct.ser_doc\n" +
|
||||
" AND wdtb_docr.num_doc = wdtb_doct.num_doc\n" +
|
||||
" WHERE wdtb_docr.data_ord = dtb_ordr.data_ord\n" +
|
||||
" AND wdtb_docr.num_ord = dtb_ordr.num_ord\n" +
|
||||
" AND ((wdtb_doct.merce_ricevuta = 1 AND wdtb_doct.flag_elaborato = 'I') OR\n" +
|
||||
" wdtb_doct.flag_elaborato <> 'I'))";
|
||||
|
||||
|
||||
|
||||
List<HashMap<String, Object>> merceInArrivo = UtilityDB.executeSimpleQuery(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
@@ -849,7 +834,7 @@ public class GiacenzaService {
|
||||
List<String> codMdepList = UtilityDB.executeSimpleQueryOnlyFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
for (String codMdep : codMdepList) {
|
||||
List<GiacenzaDTO> giacenzaDTOS = retrieveGiacenza(codMdep, false);
|
||||
List<GiacenzaDTO> giacenzaDTOS = retrieveGiacenza(codMdep, false, null);
|
||||
if (giacenzaDTOS != null && !giacenzaDTOS.isEmpty()) {
|
||||
List<CarelliGiacenzaProgGg> ggArchivio = giacenzaDTOS.stream().map(
|
||||
x -> {
|
||||
|
||||
@@ -420,6 +420,7 @@ public class WMSUtility {
|
||||
return movementRows;
|
||||
}
|
||||
|
||||
|
||||
public static boolean canULBeDeleted(MtbColt mtbColt, MultiDBTransactionManager multiDBTransactionManager) throws Exception {
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("mtb_colt.gestione", mtbColt.getGestione());
|
||||
|
||||
@@ -49,4 +49,13 @@ public class WMSAccettazioneBollaController {
|
||||
new RetrieveAlreadyRegisteredULAccettazioneBollaResponseDTO()
|
||||
.setUdcList(wmsAccettazioneBollaService.retrieveAlreadyRegisteredUDC(body.getBolle())));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "markDocumentReceived")
|
||||
public ServiceRestResponse markDocumentReceived(@RequestParam(CommonConstants.PROFILE_DB) String profileDB,
|
||||
@RequestBody MarkDocumentReceivedRequestDTO body) throws Exception {
|
||||
|
||||
wmsAccettazioneBollaService.markDocumentReceived(body.getBolle());
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package it.integry.ems.retail.wms.accettazione.dto;
|
||||
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
|
||||
import java.util.Date;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class BollaAccettazioneDTO {
|
||||
|
||||
@@ -16,7 +16,7 @@ public class BollaAccettazioneDTO {
|
||||
private String codDtip;
|
||||
|
||||
@SqlField("data_doc")
|
||||
private Date dataDoc;
|
||||
private LocalDate dataDoc;
|
||||
|
||||
@SqlField("ser_doc")
|
||||
private String serDoc;
|
||||
@@ -60,11 +60,11 @@ public class BollaAccettazioneDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataDoc() {
|
||||
public LocalDate getDataDoc() {
|
||||
return dataDoc;
|
||||
}
|
||||
|
||||
public BollaAccettazioneDTO setDataDoc(Date dataDoc) {
|
||||
public BollaAccettazioneDTO setDataDoc(LocalDate dataDoc) {
|
||||
this.dataDoc = dataDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package it.integry.ems.retail.wms.accettazione.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MarkDocumentReceivedRequestDTO {
|
||||
|
||||
private List<BollaAccettazioneDTO> bolle;
|
||||
|
||||
public List<BollaAccettazioneDTO> getBolle() {
|
||||
return bolle;
|
||||
}
|
||||
|
||||
public MarkDocumentReceivedRequestDTO setBolle(List<BollaAccettazioneDTO> bolle) {
|
||||
this.bolle = bolle;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,8 @@ import it.integry.ems.service.EntityProcessor;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems.user.UserSession;
|
||||
import it.integry.ems_model.entity.MtbAart;
|
||||
import it.integry.ems_model.entity.WdtbDoct;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.UtilityBigDecimal;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityQuery;
|
||||
@@ -284,4 +286,23 @@ public class WMSAccettazioneBollaService {
|
||||
|
||||
return alreadyRegisteredUdcList;
|
||||
}
|
||||
|
||||
public void markDocumentReceived(List<BollaAccettazioneDTO> bolle) throws Exception {
|
||||
List<WdtbDoct> documentList = new ArrayList<>();
|
||||
|
||||
for (BollaAccettazioneDTO bolla : bolle) {
|
||||
WdtbDoct document = new WdtbDoct()
|
||||
.setCodAnag(bolla.getCodAnag())
|
||||
.setCodDtip(bolla.getCodDtip())
|
||||
.setDataDoc(bolla.getDataDoc())
|
||||
.setSerDoc(bolla.getSerDoc())
|
||||
.setNumDoc(bolla.getNumDoc())
|
||||
.setMerceRicevuta(true);
|
||||
document.setOperation(OperationType.UPDATE);
|
||||
|
||||
documentList.add(document);
|
||||
}
|
||||
|
||||
entityProcessor.processEntityList(documentList, multiDBTransactionManager, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +159,11 @@ public class WMSAccettazioneService {
|
||||
udcMtbColt.setCodAnag(createUDCRequestDTO.getCodAnag());
|
||||
}
|
||||
|
||||
//Check temporaneo per evitare problemi sui dati
|
||||
if(udcMtbColt.getSerCollo() != null && udcMtbColt.getSerCollo().equalsIgnoreCase("UL") &&
|
||||
(udcMtbColt.getBarcodeUl() == null || !udcMtbColt.getBarcodeUl().startsWith("U")))
|
||||
throw new Exception("Errore interno durante il salvataggio dell'UDC: il barcode dell'UDC non è valido per la serie UL.");
|
||||
|
||||
udcMtbColt.setOperation(OperationType.INSERT);
|
||||
entityProcessor.processEntity(udcMtbColt, multiDBTransactionManager);
|
||||
|
||||
|
||||
@@ -674,7 +674,7 @@ public class WMSGenericController {
|
||||
|
||||
@PostMapping(value = "wms/updatePosizioneUL")
|
||||
ServiceRestResponse updatePosizioneUL(@RequestParam(CommonConstants.PROFILE_DB) String profileDB,
|
||||
@RequestBody UpdatePosizioneULRequestDTO updatePosizioneULRequest) throws Exception {
|
||||
@RequestBody UpdatePosizioneULRequestDTO updatePosizioneULRequest) throws Exception {
|
||||
|
||||
wmsGenericService.cambiaPosizioneUL(updatePosizioneULRequest);
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
|
||||
@@ -31,7 +31,7 @@ public class WMSVerificaGiacenzeController {
|
||||
public @ResponseBody ServiceRestResponse retrieveGiacenze(@RequestParam String codMdep) throws Exception {
|
||||
wmsVerificaGiacenzeService.setPrimaryDs(codMdep);
|
||||
|
||||
return ServiceRestResponse.createPositiveResponse(giacenzaService.retrieveGiacenza(codMdep, false));
|
||||
return ServiceRestResponse.createPositiveResponse(giacenzaService.retrieveGiacenza(codMdep, false, null));
|
||||
}
|
||||
|
||||
@PostMapping(value = "save_new_row")
|
||||
|
||||
@@ -25,6 +25,7 @@ import it.integry.ems.service.exception.EmptyReportException;
|
||||
import it.integry.ems.settings.Model.AvailableConnectionModel;
|
||||
import it.integry.ems.settings.Model.SettingsModel;
|
||||
import it.integry.ems.status.ServiceChecker;
|
||||
import it.integry.ems.sync.MultiDBTransaction.Connection;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems.system.dto.ChangeLogDTO;
|
||||
import it.integry.ems.system.dto.GestNameDTO;
|
||||
@@ -69,6 +70,8 @@ import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -1756,4 +1759,227 @@ public class SystemController {
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
}
|
||||
|
||||
@PostMapping(value = "system/svuotaNuovoDb")
|
||||
public ServiceRestResponse svuotaNuovoDb(
|
||||
HttpServletRequest request,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||
@RequestBody(required = false) List<String> tabelleDaEscludere
|
||||
) throws Exception {
|
||||
|
||||
Azienda azienda = new Azienda()
|
||||
.setId((short) 1)
|
||||
.setNomeDitta("PROVA")
|
||||
.setNomeDitta(EmsRestConstants.NULL)
|
||||
.setIndirizzo(EmsRestConstants.NULL)
|
||||
.setCap(EmsRestConstants.NULL)
|
||||
.setCitta(EmsRestConstants.NULL)
|
||||
.setProv(EmsRestConstants.NULL)
|
||||
.setPartIva(EmsRestConstants.NULL)
|
||||
.setNumTel(EmsRestConstants.NULL)
|
||||
.setNumFax(EmsRestConstants.NULL)
|
||||
.seteMail(EmsRestConstants.NULL)
|
||||
.setUltNumGio(EmsRestConstants.INTEGER_NULL)
|
||||
.setRibaRSoc1(EmsRestConstants.NULL)
|
||||
.setRibaRSoc2(EmsRestConstants.NULL)
|
||||
.setRibaRSocBreve(EmsRestConstants.NULL)
|
||||
.setDataInizMsg(EmsRestConstants.LOCAL_DATE_NULL)
|
||||
.setDataFineMsg(EmsRestConstants.LOCAL_DATE_NULL)
|
||||
.setMessaggioDoc(EmsRestConstants.NULL)
|
||||
.setLiquidazioniIva(EmsRestConstants.NULL)
|
||||
.setLogoFile(EmsRestConstants.NULL)
|
||||
.setUltDareAv(BigDecimal.ZERO)
|
||||
.setSollTop(0)
|
||||
.setSollLeft(0)
|
||||
.setGgUtili(0)
|
||||
.setCodSia(EmsRestConstants.NULL)
|
||||
.setSollHeadPersonal(EmsRestConstants.NULL)
|
||||
.setSitoWeb(EmsRestConstants.NULL)
|
||||
.setCapitaleSoc(BigDecimal.ZERO)
|
||||
.setCciaa(EmsRestConstants.NULL)
|
||||
.setIscRegImp(EmsRestConstants.NULL)
|
||||
.setRagSocMod(EmsRestConstants.NULL)
|
||||
.setPrefissoEan(EmsRestConstants.NULL)
|
||||
.setCodFiscale(EmsRestConstants.NULL)
|
||||
.setPersFisicaCognome(EmsRestConstants.NULL)
|
||||
.setPersFisicaNome(EmsRestConstants.NULL)
|
||||
.setPersFisicaSesso(EmsRestConstants.NULL)
|
||||
.setPersFisicaDataNascita(EmsRestConstants.LOCAL_DATE_NULL)
|
||||
.setPersFisicaComuneNascita(EmsRestConstants.NULL)
|
||||
.setPersFisicaProvNascita(EmsRestConstants.NULL)
|
||||
.setRapprLegaleCodFisc(EmsRestConstants.NULL)
|
||||
.setSedeAmm(EmsRestConstants.NULL)
|
||||
.setCodIvaOmaggi(EmsRestConstants.NULL)
|
||||
.setTribunale(EmsRestConstants.NULL)
|
||||
.setSettRitardoAnno(0)
|
||||
.setDbDistributore(EmsRestConstants.NULL)
|
||||
.setCodAteco(EmsRestConstants.NULL)
|
||||
.setCodCuc(EmsRestConstants.NULL)
|
||||
.setRegFisc(EmsRestConstants.NULL)
|
||||
.setStatoLiquidazione(EmsRestConstants.NULL)
|
||||
.setEmailSdi(EmsRestConstants.NULL)
|
||||
.setFromEmailSdi(EmsRestConstants.NULL)
|
||||
.setLogoB64(EmsRestConstants.NULL)
|
||||
.setIdCreditoreSepa(EmsRestConstants.NULL)
|
||||
.setMessaggioPrivacy(EmsRestConstants.NULL)
|
||||
.setRapprLegaleNome(EmsRestConstants.NULL)
|
||||
.setRapprLegaleCognome(EmsRestConstants.NULL)
|
||||
.setRapprLegaleSesso(EmsRestConstants.NULL)
|
||||
.setRapprLegaleDataNascita(EmsRestConstants.LOCAL_DATE_NULL)
|
||||
.setRapprLegaleComuneNascita(EmsRestConstants.NULL)
|
||||
.setRapprLegaleProvNascita(EmsRestConstants.NULL)
|
||||
.setRapprLegale(EmsRestConstants.NULL)
|
||||
.setFlagFattEle(EmsRestConstants.NULL)
|
||||
.setCodRuop(EmsRestConstants.NULL)
|
||||
.setCodFda(EmsRestConstants.NULL)
|
||||
.setCodFce(EmsRestConstants.INTEGER_NULL)
|
||||
.setCodLucid(EmsRestConstants.NULL)
|
||||
.setCodSdiDitta(EmsRestConstants.NULL);
|
||||
|
||||
azienda.setOperation(OperationType.UPDATE);
|
||||
|
||||
entityProcessor.processEntity(azienda, multiDBTransactionManager);
|
||||
|
||||
List<String> systemTable = new ArrayList<>();
|
||||
systemTable.add("azienda");
|
||||
systemTable.add("ctb_tipo_azienda");
|
||||
systemTable.add("ctb_tipo_riep");
|
||||
systemTable.add("dtb_intracee_natura");
|
||||
systemTable.add("dtb_mod_stampa");
|
||||
systemTable.add("dtb_tipi_fe");
|
||||
systemTable.add("dtb_transaz_intracee");
|
||||
systemTable.add("gtb_aliq_natura");
|
||||
systemTable.add("gtb_anni_divi");
|
||||
systemTable.add("gtb_divi");
|
||||
systemTable.add("gtb_divi_iso");
|
||||
systemTable.add("gtb_lingue");
|
||||
systemTable.add("gtb_nazi_iso");
|
||||
systemTable.add("gtb_paesi_esteri");
|
||||
systemTable.add("gtb_paga_fe");
|
||||
systemTable.add("gtb_periodo_fisc");
|
||||
systemTable.add("gtb_porto");
|
||||
systemTable.add("gtb_reg_fisc");
|
||||
systemTable.add("gtb_tipi_paga");
|
||||
systemTable.add("jtb_ricorrenze");
|
||||
systemTable.add("mtb_movn");
|
||||
systemTable.add("stb_activity_num");
|
||||
systemTable.add("stb_calt");
|
||||
systemTable.add("stb_counter");
|
||||
systemTable.add("stb_dates");
|
||||
systemTable.add("stb_datetimes");
|
||||
systemTable.add("stb_gest_setup");
|
||||
systemTable.add("stb_gest_setup_query");
|
||||
systemTable.add("stb_gest_sync");
|
||||
systemTable.add("stb_lookup_query");
|
||||
systemTable.add("stb_menu");
|
||||
systemTable.add("stb_menu_opz");
|
||||
systemTable.add("stb_migration_status");
|
||||
systemTable.add("stb_multiplier");
|
||||
systemTable.add("stb_tipo_azienda");
|
||||
systemTable.add("stb_user");
|
||||
systemTable.add("Wtb_languages_det");
|
||||
systemTable.add("Wtb_user_groups");
|
||||
|
||||
if (tabelleDaEscludere == null) tabelleDaEscludere = new ArrayList<>();
|
||||
|
||||
|
||||
String sql =
|
||||
"SELECT DISTINCT t.name AS table_name\n" +
|
||||
"FROM \n" +
|
||||
" sys.tables t\n" +
|
||||
" INNER JOIN sys.schemas s ON t.schema_id = s.schema_id\n" +
|
||||
" INNER JOIN sys.indexes i ON t.object_id = i.object_id\n" +
|
||||
" INNER JOIN sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_id\n" +
|
||||
"WHERE \n" +
|
||||
" t.is_ms_shipped = 0\n" +
|
||||
" and s.name = 'dbo'\n" +
|
||||
" and p.rows > 0\n";
|
||||
|
||||
List<String> tabelleDaSvuotare = UtilityDB.executeSimpleQueryOnlyFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
List<String> finalTabelleDaEscludere = tabelleDaEscludere;
|
||||
|
||||
tabelleDaSvuotare = tabelleDaSvuotare
|
||||
.stream()
|
||||
.filter(x -> !systemTable.contains(x) && !finalTabelleDaEscludere.contains(x))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Integer numMaxRipetizioni = 10, i = 0;
|
||||
if (tabelleDaSvuotare.stream().anyMatch(x -> x.equalsIgnoreCase("ctb_cont"))) {
|
||||
sql = "UPDATE azienda SET cod_ccon_quadra = null ";
|
||||
UtilityDB.executeStatement(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
multiDBTransactionManager.commitAll();
|
||||
}
|
||||
|
||||
while (!tabelleDaSvuotare.isEmpty() && i < numMaxRipetizioni) {
|
||||
++i;
|
||||
Iterator<String> it = tabelleDaSvuotare.iterator();
|
||||
while (it.hasNext()) {
|
||||
String tableName = it.next();
|
||||
sql = Query.format("SELECT OBJECT_NAME(fk.parent_object_id) AS table_name,\n" +
|
||||
" c1.name AS column_name\n" +
|
||||
"FROM sys.foreign_keys fk\n" +
|
||||
" INNER JOIN sys.foreign_key_columns fkc ON fk.object_id = fkc.constraint_object_id\n" +
|
||||
" INNER JOIN sys.columns c1 ON c1.object_id = fkc.parent_object_id AND c1.column_id = fkc.parent_column_id\n" +
|
||||
"WHERE OBJECT_NAME(fk.referenced_object_id) = %s\n" +
|
||||
" AND EXISTS (SELECT*\n" +
|
||||
" FROM sys.indexes i\n" +
|
||||
" INNER JOIN sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_id\n" +
|
||||
" WHERE fk.parent_object_id = i.object_id\n" +
|
||||
" AND p.rows > 0)", tableName);
|
||||
|
||||
List<HashMap<String, Object>> datiFk = UtilityDB.executeSimpleQuery(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
if (datiFk != null && !datiFk.isEmpty() && !tableName.equalsIgnoreCase("gtb_nazi")) {
|
||||
boolean existData = false;
|
||||
Map<Object, List<HashMap<String, Object>>> tableFk = datiFk.stream().collect(Collectors.groupingBy(x -> x.<String>get("table_name")));
|
||||
|
||||
for (Map.Entry<Object, List<HashMap<String, Object>>> entry : tableFk.entrySet()) {
|
||||
String wherecond = "";
|
||||
for (HashMap<String, Object> datiColumn : entry.getValue()) {
|
||||
if (!wherecond.isEmpty()) wherecond = wherecond + "OR ";
|
||||
wherecond = wherecond + " " + datiColumn.get("column_name") + " IS NOT NULL ";
|
||||
}
|
||||
|
||||
String sqlSelect = "SELECT cast(count(*) as bit) FROM " + entry.getKey().toString() + " WHERE " + wherecond;
|
||||
existData = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(),
|
||||
sqlSelect);
|
||||
if (existData) break;
|
||||
}
|
||||
if (existData) continue;
|
||||
}
|
||||
|
||||
if (tableName.equalsIgnoreCase("stb_user")) {
|
||||
String delete = String.format("DELETE FROM dbo.%s WHERE user_name not in ('DBA','SA') ",
|
||||
tableName);
|
||||
UtilityDB.executeStatement(multiDBTransactionManager.getPrimaryConnection(), delete);
|
||||
} else if (tableName.equalsIgnoreCase("gtb_nazi")) {
|
||||
String delete = String.format("DELETE FROM dbo.%s WHERE nazione not in (select nazione from azienda)",
|
||||
tableName);
|
||||
UtilityDB.executeStatement(multiDBTransactionManager.getPrimaryConnection(), delete);
|
||||
} else {
|
||||
int row = 1;
|
||||
while (row > 0) {
|
||||
UtilityDB.executeStatement(multiDBTransactionManager.getPrimaryConnection(), "EXEC dbo.sp_triggerSwitch '" + tableName + "', 'DISABLE'");
|
||||
|
||||
String delete = String.format("DELETE TOP (10000) FROM dbo.%s",
|
||||
tableName);
|
||||
|
||||
UtilityDB.executeStatement(multiDBTransactionManager.getPrimaryConnection(), delete);
|
||||
multiDBTransactionManager.commitAll();
|
||||
|
||||
row = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(),
|
||||
String.format("SELECT count(*) FROM dbo.%s", tableName));
|
||||
}
|
||||
UtilityDB.executeStatement(multiDBTransactionManager.getPrimaryConnection(), "EXEC dbo.sp_triggerSwitch '" + tableName + "', 'ENABLE'");
|
||||
}
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
||||
if (!tabelleDaSvuotare.isEmpty()) {
|
||||
throw new Exception(String.format("Le seguenti tabelle non sono stata cancellate verificare le fk\n: %s", StringUtils.join(tabelleDaSvuotare, "\n")));
|
||||
}
|
||||
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8,16 +8,17 @@ import it.integry.ems.system.exchange.service.structure.ExchangeImportDataManage
|
||||
import it.integry.ems.system.exchange.service.structure.ExchangeImportSchemaManagerService;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import it.integry.ems_model.entity.*;
|
||||
import it.integry.ems_model.entity.key.MtbColtKey;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.types.TypeDbObject;
|
||||
import it.integry.ems_model.utility.Query;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -47,14 +48,26 @@ public class ExchangeArticoliImportService {
|
||||
|
||||
importTipi(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.INSERT, OperationType.INSERT_OR_UPDATE, OperationType.UPDATE);
|
||||
|
||||
importArticoliEquivalenti(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.INSERT, OperationType.INSERT_OR_UPDATE, OperationType.UPDATE);
|
||||
|
||||
importMarchi(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.INSERT, OperationType.INSERT_OR_UPDATE, OperationType.UPDATE);
|
||||
|
||||
importColori(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.INSERT, OperationType.INSERT_OR_UPDATE, OperationType.UPDATE);
|
||||
|
||||
importLinee(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.INSERT, OperationType.INSERT_OR_UPDATE, OperationType.UPDATE);
|
||||
|
||||
importGruppiMerceologici(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.INSERT, OperationType.INSERT_OR_UPDATE, OperationType.UPDATE);
|
||||
|
||||
importAnagrafiche(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO);
|
||||
|
||||
importArticoliEquivalenti(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.DELETE);
|
||||
|
||||
importMarchi(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.DELETE);
|
||||
|
||||
importColori(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.DELETE);
|
||||
|
||||
importLinee(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.DELETE);
|
||||
|
||||
importTipi(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.DELETE);
|
||||
|
||||
importGruppiMerceologici(internalMultiDb, exchangeMultiDb, useTempTable, requestDataDTO, OperationType.DELETE);
|
||||
@@ -78,18 +91,22 @@ public class ExchangeArticoliImportService {
|
||||
List<EquatableEntityInterface> allData = exchangeImportDataManagerService
|
||||
.runSync(MtbAart.class, exchangeImportedData, exchangeUpdatedData);
|
||||
|
||||
allData.stream()
|
||||
.filter(x -> x.getOperation() == OperationType.INSERT)
|
||||
.map(x -> (MtbAart) x)
|
||||
.forEach(x -> x
|
||||
.setFlagStato("A")
|
||||
.setOperation(OperationType.INSERT_OR_UPDATE));
|
||||
|
||||
allData.parallelStream()
|
||||
.filter(x -> x.getOperation() == OperationType.DELETE)
|
||||
.map(x -> (MtbAart) x)
|
||||
.forEach(x -> x.setFlagStato("I")
|
||||
.setOperation(OperationType.UPDATE));
|
||||
.forEach(x -> {
|
||||
OperationType o = OperationType.INSERT_OR_UPDATE;
|
||||
String flagStato = "A";
|
||||
if (x.getOperation() == OperationType.DELETE) {
|
||||
o = OperationType.UPDATE;
|
||||
flagStato = "I";
|
||||
}
|
||||
x
|
||||
.setFlagStato(flagStato)
|
||||
.setOperation(o);
|
||||
x.getMtbAartBarCode().forEach(y -> y.setOperation(y.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : y.getOperation()));
|
||||
x.getMtbAartCarat().forEach(y -> y.setOperation(y.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : y.getOperation()));
|
||||
x.getMtbAartColori().forEach(y -> y.setOperation(y.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : y.getOperation()));
|
||||
});
|
||||
|
||||
final Exception[] firstExceptionToThrow = {null};
|
||||
|
||||
@@ -120,7 +137,6 @@ public class ExchangeArticoliImportService {
|
||||
String originalTableName = "mtb_aart";
|
||||
String tableName = originalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + tableName +
|
||||
@@ -128,17 +144,56 @@ public class ExchangeArticoliImportService {
|
||||
);
|
||||
}
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbAart.class,
|
||||
List<MtbAart> mtbAart = exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbAart.class,
|
||||
tableName, null, retrieveAlreadyImported);
|
||||
|
||||
final List<MtbAartBarCode> mtbAartBarCode = retrieveMtbAartBarcode(connection, retrieveAlreadyImported, useTempTable);
|
||||
final List<MtbAartColori> mtbAartColori = retrieveMtbAartColori(connection, retrieveAlreadyImported, useTempTable);
|
||||
final List<MtbAartCarat> mtbAartCarat = retrieveMtbAartCarat(connection, retrieveAlreadyImported, useTempTable);
|
||||
|
||||
mtbAart
|
||||
.parallelStream()
|
||||
.forEach(x -> x.setMtbAartColori(mtbAartColori.stream()
|
||||
.map(y -> y)
|
||||
.filter(y -> y.getCodMart().equalsIgnoreCase(x.getCodMart()))
|
||||
.collect(Collectors.toList()))
|
||||
.setMtbAartBarCode(mtbAartBarCode.stream()
|
||||
.map(y -> y)
|
||||
.filter(y -> y.getCodMart().equalsIgnoreCase(x.getCodMart()))
|
||||
.collect(Collectors.toList()))
|
||||
.setMtbAartCarat(mtbAartCarat.stream()
|
||||
.map(y -> y)
|
||||
.filter(y -> y.getCodMart().equalsIgnoreCase(x.getCodMart()))
|
||||
.collect(Collectors.toList())));
|
||||
|
||||
return mtbAart;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void singleUpdateImported(Connection connection, MtbAart importedDtbOrdt, boolean useTempTable) throws Exception {
|
||||
private void singleUpdateImported(Connection connection, MtbAart importedMtbAart, boolean useTempTable) throws Exception {
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
put("cod_mart", importedDtbOrdt.getCodMart());
|
||||
put("cod_mart", importedMtbAart.getCodMart());
|
||||
}};
|
||||
|
||||
exchangeImportDataManagerService.updateImportedStatus(connection, "mtb_aart", importedKey, useTempTable);
|
||||
|
||||
final List<HashMap<String, Object>> importedMtbSgrpKeys = importedMtbAart.getMtbAartColori().stream()
|
||||
.map(x -> new HashMap<String, Object>() {{
|
||||
put("cod_col", x.getCodCol());
|
||||
}})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
exchangeImportDataManagerService.updateImportedStatus(connection, "mtb_aart_colori", importedMtbSgrpKeys, useTempTable);
|
||||
}
|
||||
|
||||
|
||||
private void singleUpdateImported(Connection connection, MtbAartEqui importedMtbAartEqui, boolean useTempTable) throws Exception {
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
put("id_art_equi", importedMtbAartEqui.getIdArtEqui());
|
||||
}};
|
||||
|
||||
exchangeImportDataManagerService.updateImportedStatus(connection, "mtb_aart_equi", importedKey, useTempTable);
|
||||
}
|
||||
|
||||
private void importGruppiMerceologici(MultiDBTransactionManager internalMultiDb, MultiDBTransactionManager exchangeDb, boolean useTempTable, RequestDataDTO requestDataDTO, OperationType... operationsToProcess) throws Exception {
|
||||
@@ -154,6 +209,10 @@ public class ExchangeArticoliImportService {
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
true, false);
|
||||
|
||||
final List<MtbSsfam> exchangeImportedDataMtbSsfam = retrieveMtbSsfam(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
true, false);
|
||||
|
||||
final List<MtbGrup> exchangeUpdatedDataMtbGrup = retrieveMtbGrup(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
false, useTempTable);
|
||||
@@ -167,6 +226,11 @@ public class ExchangeArticoliImportService {
|
||||
false, useTempTable);
|
||||
|
||||
|
||||
final List<MtbSsfam> exchangeUpdatedDataMtbSsfam = retrieveMtbSsfam(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
false, useTempTable);
|
||||
|
||||
|
||||
List<EquatableEntityInterface> allMgrpData = exchangeImportDataManagerService
|
||||
.runSync(MtbGrup.class, exchangeImportedDataMtbGrup, exchangeUpdatedDataMtbGrup);
|
||||
|
||||
@@ -176,15 +240,19 @@ public class ExchangeArticoliImportService {
|
||||
List<EquatableEntityInterface> allMsfamData = exchangeImportDataManagerService
|
||||
.runSync(MtbSfam.class, exchangeImportedDataMtbSfam, exchangeUpdatedDataMtbSfam);
|
||||
|
||||
List<EquatableEntityInterface> allMssfamData = exchangeImportDataManagerService
|
||||
.runSync(MtbSsfam.class, exchangeImportedDataMtbSsfam, exchangeUpdatedDataMtbSsfam);
|
||||
|
||||
|
||||
allMgrpData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
allMsgrpData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
allMsfamData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
allMssfamData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
|
||||
allMgrpData = allMgrpData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
allMsgrpData = allMsgrpData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
allMsfamData = allMsfamData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
|
||||
allMssfamData = allMssfamData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
|
||||
allMgrpData = allMgrpData.stream()
|
||||
.filter(x -> Arrays.stream(operationsToProcess).anyMatch(y -> x.getOperation() == y))
|
||||
@@ -195,10 +263,32 @@ public class ExchangeArticoliImportService {
|
||||
allMsfamData = allMsfamData.stream()
|
||||
.filter(x -> Arrays.stream(operationsToProcess).anyMatch(y -> x.getOperation() == y))
|
||||
.collect(Collectors.toList());
|
||||
allMssfamData = allMssfamData.stream()
|
||||
.filter(x -> Arrays.stream(operationsToProcess).anyMatch(y -> x.getOperation() == y))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<EquatableEntityInterface> finalAllMgrpData = allMgrpData;
|
||||
List<EquatableEntityInterface> finalAllMsgrpData = allMsgrpData;
|
||||
List<EquatableEntityInterface> finalAllMsfamData = allMsfamData;
|
||||
List<EquatableEntityInterface> finalAllMssfamData = allMssfamData;
|
||||
|
||||
allMssfamData.stream()
|
||||
.map(x -> (MtbSsfam) x)
|
||||
.filter(x -> finalAllMsfamData.stream()
|
||||
.map(y -> (MtbSfam) y)
|
||||
.noneMatch(y -> x.getCodMgrp().equalsIgnoreCase(y.getCodMgrp()) &&
|
||||
x.getCodMsgr().equalsIgnoreCase(y.getCodMsgr()) &&
|
||||
x.getCodMsfa().equalsIgnoreCase(y.getCodMsfa())))
|
||||
.forEach(x -> {
|
||||
MtbSfam testata = new MtbSfam()
|
||||
.setCodMgrp(x.getCodMgrp())
|
||||
.setCodMsgr(x.getCodMsgr())
|
||||
.setCodMsfa(x.getCodMsfa());
|
||||
|
||||
testata.setOperation(OperationType.UPDATE);
|
||||
finalAllMsfamData.add(testata);
|
||||
});
|
||||
|
||||
|
||||
allMsfamData.stream()
|
||||
.map(x -> (MtbSfam) x)
|
||||
@@ -215,6 +305,15 @@ public class ExchangeArticoliImportService {
|
||||
finalAllMsgrpData.add(testata);
|
||||
});
|
||||
|
||||
allMsfamData.stream()
|
||||
.map(x -> (MtbSfam) x)
|
||||
.forEach(x -> x.setMtbSsfam(finalAllMssfamData.stream()
|
||||
.map(y -> (MtbSsfam) y)
|
||||
.filter(y -> y.getCodMgrp().equalsIgnoreCase(x.getCodMgrp()) &&
|
||||
y.getCodMsgr().equalsIgnoreCase(x.getCodMsgr()) &&
|
||||
y.getCodMsfa().equalsIgnoreCase(x.getCodMsfa()))
|
||||
.collect(Collectors.toList())));
|
||||
|
||||
|
||||
allMsgrpData.stream()
|
||||
.map(x -> (MtbSgrp) x)
|
||||
@@ -320,6 +419,23 @@ public class ExchangeArticoliImportService {
|
||||
mtbSfamTableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
private List<MtbSsfam> retrieveMtbSsfam(Connection connection, boolean retrieveAlreadyImported, boolean useTempTable) throws Exception {
|
||||
String originalTableName = "mtb_ssfam";
|
||||
String tableName = originalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + tableName +
|
||||
" SELECT * FROM " + originalTableName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbSsfam.class,
|
||||
tableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
|
||||
private void singleUpdateImported(Connection connection, MtbGrup importedData, boolean useTempTable) throws Exception {
|
||||
final HashMap<String, Object> importedMtbGrupKey = new HashMap<String, Object>() {{
|
||||
@@ -410,6 +526,126 @@ public class ExchangeArticoliImportService {
|
||||
mtbGrupTableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
private void importArticoliEquivalenti(MultiDBTransactionManager internalMultiDb, MultiDBTransactionManager exchangeDb, boolean useTempTable, RequestDataDTO requestDataDTO, OperationType... operationsToProcess) throws Exception {
|
||||
if (!UtilityDB.existDatabaseObject(exchangeDb.getPrimaryConnection(), "mtb_aart_equi", TypeDbObject.VIEW)) return;
|
||||
final List<MtbAartEqui> exchangeImportedDataMtbAartEqui = retrieveMtbAartEqui(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
true, false);
|
||||
|
||||
final List<MtbAartEqui> exchangeUpdatedDataMtbAartEqui = retrieveMtbAartEqui(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
false, useTempTable);
|
||||
|
||||
List<EquatableEntityInterface> allData = exchangeImportDataManagerService
|
||||
.runSync(MtbAartEqui.class, exchangeImportedDataMtbAartEqui, exchangeUpdatedDataMtbAartEqui);
|
||||
|
||||
allData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
|
||||
allData = allData.stream()
|
||||
.filter(x -> Arrays.stream(operationsToProcess).anyMatch(y -> x.getOperation() == y))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
final Exception[] firstExceptionToThrow = {null};
|
||||
|
||||
AtomicInteger importedCounter = new AtomicInteger();
|
||||
|
||||
for (EquatableEntityInterface dataToSave : allData) {
|
||||
|
||||
logger.debug("Importati {} articoli equivalenti di {}", importedCounter.incrementAndGet(), allData.size());
|
||||
try {
|
||||
entityProcessor.processEntity(dataToSave, true, true, EXCHANGE_USER, internalMultiDb, requestDataDTO);
|
||||
|
||||
singleUpdateImported(exchangeDb.getPrimaryConnection(), (MtbAartEqui) dataToSave, useTempTable);
|
||||
internalMultiDb.commitAll();
|
||||
} catch (Exception ex) {
|
||||
if (firstExceptionToThrow[0] == null) firstExceptionToThrow[0] = ex;
|
||||
|
||||
logger.error("Errore durante l'importazione degli articoli equivalenti", ex);
|
||||
internalMultiDb.rollbackAll();
|
||||
}
|
||||
}
|
||||
|
||||
if (firstExceptionToThrow[0] != null) throw firstExceptionToThrow[0];
|
||||
}
|
||||
|
||||
private List<MtbAartEqui> retrieveMtbAartEqui(Connection connection, boolean retrieveAlreadyImported, boolean useTempTable) throws Exception {
|
||||
String originalTableName = "mtb_aart_equi";
|
||||
String tableName = originalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + tableName +
|
||||
" SELECT * FROM " + originalTableName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbAartEqui.class,
|
||||
tableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
|
||||
private void importColori(MultiDBTransactionManager internalMultiDb, MultiDBTransactionManager exchangeDb, boolean useTempTable, RequestDataDTO requestDataDTO, OperationType... operationsToProcess) throws Exception {
|
||||
if (!UtilityDB.existDatabaseObject(exchangeDb.getPrimaryConnection(), "mtb_colori", TypeDbObject.VIEW)) return;
|
||||
|
||||
final List<MtbColori> exchangeImportedDataMtbColori = retrieveMtbColori(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
true, false);
|
||||
|
||||
final List<MtbColori> exchangeUpdatedDataMtbColori = retrieveMtbColori(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
false, useTempTable);
|
||||
|
||||
List<EquatableEntityInterface> allData = exchangeImportDataManagerService
|
||||
.runSync(MtbColori.class, exchangeImportedDataMtbColori, exchangeUpdatedDataMtbColori);
|
||||
|
||||
allData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
|
||||
allData = allData.stream()
|
||||
.filter(x -> Arrays.stream(operationsToProcess).anyMatch(y -> x.getOperation() == y))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
final Exception[] firstExceptionToThrow = {null};
|
||||
|
||||
AtomicInteger importedCounter = new AtomicInteger();
|
||||
|
||||
for (EquatableEntityInterface dataToSave : allData) {
|
||||
|
||||
logger.debug("Importati {} colori di {}", importedCounter.incrementAndGet(), allData.size());
|
||||
try {
|
||||
entityProcessor.processEntity(dataToSave, true, true, EXCHANGE_USER, internalMultiDb, requestDataDTO);
|
||||
|
||||
singleUpdateImported(exchangeDb.getPrimaryConnection(), (MtbColori) dataToSave, useTempTable);
|
||||
internalMultiDb.commitAll();
|
||||
} catch (Exception ex) {
|
||||
if (firstExceptionToThrow[0] == null) firstExceptionToThrow[0] = ex;
|
||||
|
||||
logger.error("Errore durante l'importazione dei colori", ex);
|
||||
internalMultiDb.rollbackAll();
|
||||
}
|
||||
}
|
||||
|
||||
if (firstExceptionToThrow[0] != null) throw firstExceptionToThrow[0];
|
||||
}
|
||||
|
||||
private List<MtbColori> retrieveMtbColori(Connection connection, boolean retrieveAlreadyImported, boolean useTempTable) throws Exception {
|
||||
String mtbColoriOriginalTableName = "mtb_colori";
|
||||
String mtbColoriTableName = mtbColoriOriginalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + mtbColoriTableName +
|
||||
" SELECT * FROM " + mtbColoriOriginalTableName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbColori.class,
|
||||
mtbColoriTableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
|
||||
private void singleUpdateImported(Connection connection, MtbAartMarchio importedData, boolean useTempTable) throws Exception {
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
@@ -420,7 +656,18 @@ public class ExchangeArticoliImportService {
|
||||
connection.commit();
|
||||
}
|
||||
|
||||
private void singleUpdateImported(Connection connection, MtbColori importedData, boolean useTempTable) throws Exception {
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
put("cod_col", importedData.getCodCol());
|
||||
}};
|
||||
|
||||
exchangeImportDataManagerService.updateImportedStatus(connection, "mtb_colori", importedKey, useTempTable);
|
||||
connection.commit();
|
||||
}
|
||||
|
||||
private void importTipi(MultiDBTransactionManager internalMultiDb, MultiDBTransactionManager exchangeDb, boolean useTempTable, RequestDataDTO requestDataDTO, OperationType... operationsToProcess) throws Exception {
|
||||
if (!UtilityDB.existDatabaseObject(exchangeDb.getPrimaryConnection(), "mtb_tipi", TypeDbObject.VIEW)) return;
|
||||
|
||||
final List<MtbTipi> exchangeImportedData = retrieveMtbAartTipi(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
true, false);
|
||||
@@ -487,4 +734,264 @@ public class ExchangeArticoliImportService {
|
||||
exchangeImportDataManagerService.updateImportedStatus(connection, "mtb_tipi", importedKey, useTempTable);
|
||||
connection.commit();
|
||||
}
|
||||
|
||||
private void importLinee(MultiDBTransactionManager internalMultiDb, MultiDBTransactionManager exchangeDb,
|
||||
boolean useTempTable, RequestDataDTO requestDataDTO, OperationType... operationsToProcess) throws Exception {
|
||||
|
||||
//linea
|
||||
final List<MtbAartLinea> exchangeImportedDataMtbAartLinea = retrieveMtbAartLinea(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
true, false);
|
||||
|
||||
final List<MtbAartLinea> exchangeUpdatedDataMtbAartLinea = retrieveMtbAartLinea(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
false, useTempTable);
|
||||
|
||||
List<EquatableEntityInterface> allData = exchangeImportDataManagerService
|
||||
.runSync(MtbAartLinea.class, exchangeImportedDataMtbAartLinea, exchangeUpdatedDataMtbAartLinea);
|
||||
|
||||
|
||||
allData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
allData = allData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
allData = allData.stream()
|
||||
.filter(x -> Arrays.stream(operationsToProcess).anyMatch(y -> x.getOperation() == y))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
final Exception[] firstExceptionToThrow = {null};
|
||||
|
||||
AtomicInteger importedCounter = new AtomicInteger();
|
||||
|
||||
for (EquatableEntityInterface dataToSave : allData) {
|
||||
|
||||
logger.debug("Importati {} linee di {}", importedCounter.incrementAndGet(), allData.size());
|
||||
try {
|
||||
entityProcessor.processEntity(dataToSave, true, true, EXCHANGE_USER, internalMultiDb, requestDataDTO);
|
||||
|
||||
singleUpdateImported(exchangeDb.getPrimaryConnection(), (MtbAartLinea) dataToSave, useTempTable);
|
||||
internalMultiDb.commitAll();
|
||||
} catch (Exception ex) {
|
||||
if (firstExceptionToThrow[0] == null) firstExceptionToThrow[0] = ex;
|
||||
|
||||
logger.error("Errore durante l'importazione delle linee", ex);
|
||||
internalMultiDb.rollbackAll();
|
||||
}
|
||||
}
|
||||
|
||||
if (firstExceptionToThrow[0] != null) throw firstExceptionToThrow[0];
|
||||
|
||||
//Sottolinea
|
||||
final List<MtbAartSlinea> exchangeImportedDataMtbAartSlinea = retrieveMtbAartSlinea(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
true, false);
|
||||
|
||||
final List<MtbAartSlinea> exchangeUpdatedDataMtbAartSlinea = retrieveMtbAartSlinea(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
false, useTempTable);
|
||||
|
||||
|
||||
allData = exchangeImportDataManagerService
|
||||
.runSync(MtbAartSlinea.class, exchangeImportedDataMtbAartSlinea, exchangeUpdatedDataMtbAartSlinea);
|
||||
|
||||
|
||||
allData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
allData = allData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
|
||||
allData = allData.stream()
|
||||
.filter(x -> Arrays.stream(operationsToProcess).anyMatch(y -> x.getOperation() == y))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
importedCounter = new AtomicInteger();
|
||||
|
||||
for (EquatableEntityInterface dataToSave : allData) {
|
||||
|
||||
logger.debug("Importati {} sotto linee di {}", importedCounter.incrementAndGet(), allData.size());
|
||||
try {
|
||||
entityProcessor.processEntity(dataToSave, true, true, EXCHANGE_USER, internalMultiDb, requestDataDTO);
|
||||
|
||||
singleUpdateImported(exchangeDb.getPrimaryConnection(), (MtbAartSlinea) dataToSave, useTempTable);
|
||||
internalMultiDb.commitAll();
|
||||
} catch (Exception ex) {
|
||||
if (firstExceptionToThrow[0] == null) firstExceptionToThrow[0] = ex;
|
||||
|
||||
logger.error("Errore durante l'importazione delle sottolinee", ex);
|
||||
internalMultiDb.rollbackAll();
|
||||
}
|
||||
}
|
||||
|
||||
if (firstExceptionToThrow[0] != null) throw firstExceptionToThrow[0];
|
||||
|
||||
// Sotto sotto linea
|
||||
final List<MtbAartSslinea> exchangeImportedDataMtbAartSslinea = retrieveMtbAartSslinea(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
true, false);
|
||||
|
||||
final List<MtbAartSslinea> exchangeUpdatedDataMtbAartSslinea = retrieveMtbAartSslinea(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
false, useTempTable);
|
||||
|
||||
allData = exchangeImportDataManagerService
|
||||
.runSync(MtbAartSslinea.class, exchangeImportedDataMtbAartSslinea, exchangeUpdatedDataMtbAartSslinea);
|
||||
|
||||
allData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
|
||||
|
||||
allData = allData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
|
||||
allData = allData.stream()
|
||||
.filter(x -> Arrays.stream(operationsToProcess).anyMatch(y -> x.getOperation() == y))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
importedCounter = new AtomicInteger();
|
||||
|
||||
for (EquatableEntityInterface dataToSave : allData) {
|
||||
|
||||
logger.debug("Importati {} sotto sotto linee di {}", importedCounter.incrementAndGet(), allData.size());
|
||||
try {
|
||||
entityProcessor.processEntity(dataToSave, true, true, EXCHANGE_USER, internalMultiDb, requestDataDTO);
|
||||
|
||||
singleUpdateImported(exchangeDb.getPrimaryConnection(), (MtbAartSslinea) dataToSave, useTempTable);
|
||||
internalMultiDb.commitAll();
|
||||
} catch (Exception ex) {
|
||||
if (firstExceptionToThrow[0] == null) firstExceptionToThrow[0] = ex;
|
||||
|
||||
logger.error("Errore durante l'importazione delle sotto sottolinee", ex);
|
||||
internalMultiDb.rollbackAll();
|
||||
}
|
||||
}
|
||||
|
||||
if (firstExceptionToThrow[0] != null) throw firstExceptionToThrow[0];
|
||||
|
||||
}
|
||||
|
||||
private List<MtbAartLinea> retrieveMtbAartLinea(Connection connection, boolean retrieveAlreadyImported, boolean useTempTable) throws Exception {
|
||||
String originalTableName = "mtb_aart_linea";
|
||||
String tableName = originalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + tableName +
|
||||
" SELECT * FROM " + originalTableName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbAartLinea.class,
|
||||
tableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
|
||||
private List<MtbAartSlinea> retrieveMtbAartSlinea(Connection connection, boolean retrieveAlreadyImported, boolean useTempTable) throws Exception {
|
||||
String originalTableName = "mtb_aart_slinea";
|
||||
String tableName = originalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + tableName +
|
||||
" SELECT * FROM " + originalTableName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbAartSlinea.class,
|
||||
tableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
private List<MtbAartSslinea> retrieveMtbAartSslinea(Connection connection, boolean retrieveAlreadyImported, boolean useTempTable) throws Exception {
|
||||
String originalTableName = "mtb_aart_sslinea";
|
||||
String tableName = originalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + tableName +
|
||||
" SELECT * FROM " + originalTableName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbAartSslinea.class,
|
||||
tableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
private void singleUpdateImported(Connection connection, MtbAartLinea importedData, boolean useTempTable) throws Exception {
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
put("cod_linea", importedData.getCodLinea());
|
||||
}};
|
||||
|
||||
exchangeImportDataManagerService.updateImportedStatus(connection, "mtb_aart_linea", importedKey, useTempTable);
|
||||
connection.commit();
|
||||
}
|
||||
|
||||
private void singleUpdateImported(Connection connection, MtbAartSlinea importedData, boolean useTempTable) throws Exception {
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
put("cod_slinea", importedData.getCodSlinea());
|
||||
}};
|
||||
|
||||
exchangeImportDataManagerService.updateImportedStatus(connection, "mtb_aart_slinea", importedKey, useTempTable);
|
||||
connection.commit();
|
||||
}
|
||||
|
||||
private void singleUpdateImported(Connection connection, MtbAartSslinea importedData, boolean useTempTable) throws Exception {
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
put("cod_sslinea", importedData.getCodSslinea());
|
||||
}};
|
||||
|
||||
exchangeImportDataManagerService.updateImportedStatus(connection, "mtb_aart_sslinea", importedKey, useTempTable);
|
||||
connection.commit();
|
||||
}
|
||||
|
||||
private List<MtbAartColori> retrieveMtbAartColori(Connection connection, boolean retrieveAlreadyImported, boolean useTempTable) throws Exception {
|
||||
String originalTableName = "mtb_aart_colori";
|
||||
String tableName = originalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + tableName +
|
||||
" SELECT * FROM " + originalTableName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbAartColori.class,
|
||||
tableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
private List<MtbAartBarCode> retrieveMtbAartBarcode(Connection connection, boolean retrieveAlreadyImported, boolean useTempTable) throws Exception {
|
||||
String originalTableName = "mtb_aart_bar_code";
|
||||
String tableName = originalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + tableName +
|
||||
" SELECT * FROM " + originalTableName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbAartBarCode.class,
|
||||
tableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
private List<MtbAartCarat> retrieveMtbAartCarat(Connection connection, boolean retrieveAlreadyImported, boolean useTempTable) throws Exception {
|
||||
String originalTableName = "mtb_aart_carat";
|
||||
String tableName = originalTableName + (useTempTable ? "_tmp" : "");
|
||||
|
||||
|
||||
if (useTempTable) {
|
||||
UtilityDB.executeStatement(connection,
|
||||
"INSERT INTO " + tableName +
|
||||
" SELECT * FROM " + originalTableName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, MtbAartCarat.class,
|
||||
tableName, null, retrieveAlreadyImported);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user