Compare commits

..

1 Commits

Author SHA1 Message Date
jenkins
1be0c3f72e 20240325_150408 2024-03-25 15:04:08 +01:00
3558 changed files with 117789 additions and 284291 deletions

121
.gitignore vendored
View File

@@ -1,60 +1,39 @@
# Created by https://www.toptal.com/developers/gitignore/api/intellij
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij
# Created by https://www.gitignore.io/api/intellij
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.shelf/*
# AWS User-specific
.idea/**/aws.xml
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Generated files
.idea/**/contentModel.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Mongo Explorer plugin:
.idea/mongoSettings.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
out/
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
@@ -62,65 +41,21 @@ out/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
*.iml
modules.xml
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml
# End of https://www.toptal.com/developers/gitignore/api/intellij
# Integry
*/target/*
*.ckie
/ts
/temp
/docker/tomcat/conf/integry/logs.db
/docker/tomcat/conf/integry/logs.db-journal
copilot.*.xml
/.idea/dataSources.xml

17
.idea/compiler.xml generated
View File

@@ -6,9 +6,24 @@
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="ems-engine" />
<module name="ems-core" />
<module name="ems-engine" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="ems-activity" target="1.8" />
<module name="ems-contabil" target="1.8" />
<module name="ems-document" target="1.8" />
<module name="ems-engine-customizations" target="1.8" />
<module name="ems-logistic" target="1.8" />
<module name="ems-offer" target="1.8" />
<module name="ems-order" target="1.8" />
<module name="ems-ordikids" target="1.8" />
<module name="ems-product" target="1.8" />
<module name="ems-production" target="1.8" />
<module name="ems-retail" target="1.8" />
<module name="ems-system" target="1.8" />
<module name="ems-utility" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EditMigrationStateService">
<option name="migrationStatus" value="COMPLETED" />
</component>
</project>

12
.idea/dataSources.xml generated
View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="@SERVERDB2019" uuid="ff4f0bad-7271-429e-a4e1-bae28629efc8">
<driver-ref>sqlserver.ms</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc-driver>
<jdbc-url>jdbc:sqlserver://SERVERDB2019</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

26
.idea/encodings.xml generated
View File

@@ -1,10 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/ems-activity/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-activity/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-contabil/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-contabil/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-core/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-core/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-document/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-document/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-engine-customizations/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-engine-customizations/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-engine/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-engine/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-logistic/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-logistic/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-offer/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-offer/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-order/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-order/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-ordikids/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-ordikids/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-product/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-product/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-production/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-production/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-retail/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-retail/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-system/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-system/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-utility/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-utility/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExportableFileTemplateSettings">
<default_templates>
<template name="IntegryMigrationClass.java" file-name="Migration_${YEAR}${MONTH}${DAY}${HOUR}${MINUTE}${SECOND}" reformat="true" live-template-enabled="false" />
</default_templates>
</component>
</project>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxBlameSettings">
<option name="version" value="2" />
</component>
</project>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxProjectSettings">
<option name="commitMessageIssueKeyValidationOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
<option name="commitMessageValidationEnabledOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
</component>
</project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="LocalDate Checks" />
<version value="1.0" />
</settings>
</component>

View File

@@ -1,21 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="repo-sqlserver" />
<option name="name" value="repo-sqlserver" />
<option name="url" value="http://maven.lib.umd.edu/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="repo.jenkins-ci.org" />
<option name="name" value="repo.jenkins-ci.org" />
<option name="url" value="https://repo.jenkins-ci.org/public/" />
<option name="id" value="central-http" />
<option name="name" value="central-http" />
<option name="url" value="http://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="AsposeJavaAPI" />
<option name="name" value="Aspose Java API" />
<option name="url" value="https://releases.aspose.com/java/repo/" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Jenkins.Application.Settings">
<option name="serverUrl" value="https://ci.studioml.it" />
</component>
</project>

4
.idea/misc.xml generated
View File

@@ -7,9 +7,7 @@
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="PWA">
<option name="wasEnabledAtLeastOnce" value="true" />
<option name="workspaceImportForciblyTurnedOn" value="true" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>

View File

@@ -1,17 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="KieStaticCompiler" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="it.integry.ems_model.rulescompleting.KieStaticCompiler" />
<module name="ems-core" />
<shortenClasspath name="MANIFEST" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="it.integry.ems_model.rulescompleting.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,15 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MenuStaticCreator" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="it.integry.ems.menu.MenuStaticCreator" />
<module name="ems-core" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="it.integry.ems.menu.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,141 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat" ALTERNATIVE_JRE_ENABLED="false" ALTERNATIVE_JRE_PATH="1.8" nameIsGenerated="true">
<option name="COMMON_VM_ARGUMENTS" value="-DDISABLE_DROOLS_COMPILE=TRUE -Xms1G -Xmx6G" />
<deployment>
<artifact name="ems-engine:war exploded">
<settings>
<option name="CONTEXT_PATH" value="/ems-api" />
</settings>
</artifact>
</deployment>
<server-settings>
<option name="BASE_DIRECTORY_NAME" value="a89fc2ca-88f5-402a-95b3-33bd03a9c1ac" />
</server-settings>
<log_file alias="Tomcat Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/manager.*" />
<log_file alias="Tomcat Host Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/host-manager.*" />
<log_file alias="Tomcat Localhost Access Log" path="%IDEA_RUN:CATALINA_BASE%/logs/localhost_access_log.*" />
<predefined_log_file enabled="true" id="Tomcat" />
<predefined_log_file enabled="true" id="Tomcat Catalina" />
<RunnerSettings RunnerId="AppServerDebuggerRunner">
<option name="DEBUG_PORT" value="javadebug" />
</RunnerSettings>
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="javadebug" />
</RunnerSettings>
<RunnerSettings RunnerId="JProfiler">
<option name="jreHome" value="$USER_HOME$/.jdks/openjdk-21.0.2" />
</RunnerSettings>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="AppServerDebuggerRunner">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="JProfiler">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Profile">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Profile ">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<method v="2">
<option name="RunConfigurationTask" enabled="true" run_configuration_name="KieStaticCompiler" run_configuration_type="Application" />
<option name="Make" enabled="true" />
<option name="BuildArtifacts" enabled="true">
<artifact name="ems-engine:war exploded" />
</option>
</method>
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat9Import ( TomcatSrv)" type="Remote" folderName="Carelli">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="172.16.30.239" />
<option name="PORT" value="8003" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8003" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat9Wingest (GestSRV)" type="Remote" folderName="Carelli">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="172.16.30.238" />
<option name="PORT" value="8002" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8002" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat9 #1" type="Remote" folderName="Frudis">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="127.0.0.1" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat9 #1 (DBServer)" type="Remote" folderName="Lamonarca">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="localhost" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat9 (GestSRV)" type="Remote" folderName="Carelli">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="172.16.30.238" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat 9 #1 (DBServer2019)" type="Remote" folderName="Biolevante">
<module name="ims" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="192.168.10.6" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat 9 #1 (ServerDev)" type="Remote" folderName="Integry">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="serverdev" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat 9 #1 (Server-01)" type="Remote" folderName="VgAlimenti">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="10.107.107.15" />
<option name="PORT" value="5005" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="5005" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat 9 #2 (ServerDev)" type="Remote" folderName="Integry">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="serverdev" />
<option name="PORT" value="8002" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8002" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat 9 (AnydeskTunnel)" type="Remote">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="localhost" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,15 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat #1 (Gramm)" type="Remote" folderName="Gramm">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="192.168.50.17" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat #1 (Rosso Gargano)" type="Remote" folderName="Rosso Gargano">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="172.16.10.51" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat #1 (ServerTomcat)" type="Remote" folderName="Integry">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="192.168.3.16" />
<option name="PORT" value="8000" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8000" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat #1 (Smetar) [VPN]" type="Remote" folderName="Smetar">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="10.0.0.2" />
<option name="PORT" value="5005" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="5005" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat #2 (ServerTomcat)" type="Remote" folderName="Integry">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="192.168.3.16" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,140 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat (FAST)" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat" ALTERNATIVE_JRE_ENABLED="false" show_console_on_std_err="true" show_console_on_std_out="true">
<option name="COMMON_VM_ARGUMENTS" value="-DDISABLE_DROOLS_COMPILE=TRUE -Xms1G -Xmx6G" />
<deployment>
<artifact name="ems-engine:war exploded">
<settings>
<option name="CONTEXT_PATH" value="/ems-api" />
</settings>
</artifact>
</deployment>
<server-settings>
<option name="BASE_DIRECTORY_NAME" value="00c7852d-22fb-44e1-9140-8ae73b4192fd" />
</server-settings>
<log_file alias="Tomcat Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/manager.*" />
<log_file alias="Tomcat Host Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/host-manager.*" />
<log_file alias="Tomcat Localhost Access Log" path="%IDEA_RUN:CATALINA_BASE%/logs/localhost_access_log.*" />
<predefined_log_file enabled="true" id="Tomcat" />
<predefined_log_file enabled="true" id="Tomcat Catalina" />
<RunnerSettings RunnerId="AppServerDebuggerRunner">
<option name="DEBUG_PORT" value="63868" />
</RunnerSettings>
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="javadebug" />
</RunnerSettings>
<RunnerSettings RunnerId="JProfiler">
<option name="jreHome" value="$PROJECT_DIR$/../../../Program Files/Java/jdk1.8.0_202" />
</RunnerSettings>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="AppServerDebuggerRunner">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="JProfiler">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Profile">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Profile ">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<method v="2">
<option name="Make" enabled="true" />
<option name="BuildArtifacts" enabled="true">
<artifact name="ems-engine:war exploded" />
</option>
</method>
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tosca Cloud" type="Remote" folderName="Tosca">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="4.232.161.31" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,16 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tosca Verona" type="Remote" folderName="Tosca">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="10.19.178.6" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,12 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="docker-compose.yml: Compose Deployment" type="docker-deploy" factoryName="docker-compose.yml" server-name="Docker">
<deployment type="docker-compose.yml">
<settings>
<option name="envFilePath" value="" />
<option name="commandLineOptions" value="--build" />
<option name="sourceFilePath" value="docker-compose.yml" />
</settings>
</deployment>
<method v="2" />
</configuration>
</component>

View File

@@ -1,15 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="tomcat9 ( TomcatSrv)" type="Remote" folderName="Carelli">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="172.16.30.239" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="StructuralSearch">
<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="LocalDate 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\.LocalDate" within="" contains="" />
<constraint name="d2" nameOfExprType="java\.util\.Date" within="" contains="" />
</searchConfiguration>
<searchConfiguration name="java.util.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="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>

6
.idea/vcs.xml generated
View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -1,18 +0,0 @@
FROM tomcat:9-jre8-alpine
RUN apk add --no-cache fontconfig ttf-dejavu
ENV TZ="Europe/Rome"
ENV JAVA_OPTS="-DDISABLE_DROOLS_COMPILE=TRUE -Xms512M -Xmx1G -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
ENV USERDOMAIN="STUDIO-ML"
COPY docker/tomcat/conf/integry/ems.properties /usr/local/tomcat/conf/integry/
COPY docker/tomcat/conf/integry/ems_automated_operations.json /usr/local/tomcat/conf/integry/
COPY docker/tomcat/conf/integry/ems_settings.json /usr/local/tomcat/conf/integry/
COPY ems-engine/target/ems-api.war /usr/local/tomcat/webapps/
#COPY docker/FontTest.class .
#ENTRYPOINT ["java","FontTest"]
EXPOSE 8080
EXPOSE 5005

View File

@@ -1,18 +0,0 @@
FROM tomcat:9-jre8-alpine
RUN apk add --no-cache fontconfig ttf-dejavu
ENV TZ="Europe/Rome"
ENV JAVA_OPTS="-DDISABLE_DROOLS_COMPILE=TRUE -Xms512M -Xmx2G -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
ENV USERDOMAIN="STUDIO-ML"
COPY docker/tomcat/conf/integry/ems.properties /usr/local/tomcat/conf/integry/
COPY docker/tomcat/conf/integry/ems_automated_operations.json /usr/local/tomcat/conf/integry/
COPY docker/tomcat/conf/integry/ems_settings.json /usr/local/tomcat/conf/integry/
COPY ems-engine/target/ems-api.war /usr/local/tomcat/webapps/
#COPY docker/FontTest.class .
#ENTRYPOINT ["java","FontTest"]
EXPOSE 8080
EXPOSE 5005

4165
IntegryManagementSystem.ipr Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,210 +0,0 @@
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
disableConcurrentBuilds()
}
stages {
stage('PreBuild Steps (Master)') {
when {
expression {
return env.GIT_BRANCH == "master" || env.GIT_BRANCH == "feature/RefactoringGestioneColli"
}
}
steps {
echo "Creo version tag su Git"
script {
def date = new Date()
def formattedDate = date.format('yyyyMMdd_HHmm')
def tagName = "${env.GIT_BRANCH.toLowerCase().replace('/', '-')}-${formattedDate}"
def tagMessage = "Build #${env.BUILD_NUMBER} - ${env.GIT_BRANCH}"
def envPropertiesText = "project.version=${formattedDate}"
writeFile(
'file': 'ems-core\\src\\main\\resources\\configs\\env.properties',
'text': envPropertiesText
)
bat "git add . -A"
bat "git tag -a ${tagName} -m \"${tagMessage}\""
bat "git push origin ${tagName}"
}
}
}
stage('Maven Build') {
steps {
echo "${WORKSPACE}"
withMaven(traceability: true, maven: 'Maven 3.9.5', options: [artifactsPublisher(disabled: true)]) {
bat(script: 'mvn clean install -t toolchains-jenkins.xml', returnStdout: true)
archiveArtifacts(artifacts: 'ems-engine/target/ems-api.war', onlyIfSuccessful: true)
}
stash includes: 'ems-engine/target/ems-api.war,docker/**,Containerfile', name: 'container-files'
}
}
stage('Publish') {
parallel {
stage('Publish Develop') {
when {
expression {
return env.GIT_BRANCH == "develop"
}
}
stages {
stage('Update Tomcat 1') {
steps {
echo "Updating Tomcat9 from ${WORKSPACE}"
powershell returnStdout: true, script: "build\\update_tomcat.ps1 -serviceName \"Tomcat9\" -httpPort \"8081\" -updatedArtifactPath \"${WORKSPACE}\\ems-engine\\target\\ems-api.war\""
}
}
stage('Update Tomcat 2') {
steps {
echo "Updating Tomcat9 from ${WORKSPACE}"
powershell returnStdout: true, script: "build\\update_tomcat.ps1 -serviceName \"Tomcat9Backup\" -httpPort \"8082\" -updatedArtifactPath \"${WORKSPACE}\\ems-engine\\target\\ems-api.war\""
bat 'curl -k "https://devservices.studioml.it/ems-api/updateWMSApp?overrideForced=false"'
bat 'curl -k "https://devservices.studioml.it/ems-api/updateWMSApp?overrideForced=false&suffix=beta"'
}
}
}
}
stage('Publish Master') {
when {
expression {
return env.GIT_BRANCH == "master"
}
}
stages {
stage('Update Tomcat 1') {
steps {
echo "Updating Tomcat9 from ${WORKSPACE}"
sshPublisher(publishers: [sshPublisherDesc(configName: 'Production Linux Tomcat Server (192.168.3.16)', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''sudo /usr/bin/systemctl stop tomcat9
rm -R tomcat9/webapps/ems-api
sudo /usr/bin/systemctl start tomcat9
/home/studioml/./wait_tomcat_startup.sh 8081''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/tomcat9/webapps', remoteDirectorySDF: false, removePrefix: 'ems-engine/target/', sourceFiles: 'ems-engine/target/*.war*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
}
}
stage('Update Tomcat 2') {
steps {
echo "Updating Tomcat9 from ${WORKSPACE}"
sshPublisher(publishers: [sshPublisherDesc(configName: 'Production Linux Tomcat Server (192.168.3.16)', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''sudo /usr/bin/systemctl stop tomcat9backup
rm -R tomcat9backup/webapps/ems-api
sudo /usr/bin/systemctl start tomcat9backup
/home/studioml/./wait_tomcat_startup.sh 8082
sleep 10''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/tomcat9backup/webapps', remoteDirectorySDF: false, removePrefix: 'ems-engine/target/', sourceFiles: 'ems-engine/target/*.war*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
bat 'curl -k "https://services.studioml.it/ems-api/updateWMSApp?overrideForced=false"'
bat 'curl -k "https://services.studioml.it/ems-api/updateWMSApp?overrideForced=false&suffix=beta"'
}
}
}
}
stage('Publish Branch on Azure') {
steps {
azureUpload fileShareName: 'storage-ci', filesPath: 'ems-engine/target/*.war*', removePrefixPath: 'ems-engine/target/', storageCredentialId: '83a86793-c1d6-4776-b20f-1ff652a57fee', storageType: 'filestorage', uploadArtifactsOnlyIfSuccessful: true, verbose: true, virtualPath: "ems-api/${env.GIT_BRANCH}"
}
}
stage('Docker Build') {
steps {
node('server-build') {
echo "Building Docker image"
unstash 'container-files'
script {
def branchVersion = ""
if (env.GIT_BRANCH != "master") {
branchVersion = "-${env.GIT_BRANCH.toLowerCase().replace('/', '-')}"
}
// bat "docker buildx build --platform linux/amd64,linux/arm64 --push -t \"git.studioml.it/integry/ems-api${branchVersion}:latest\" ."
bat "podman build -f .\\Containerfile -t \"git.studioml.it/integry/ems-api${branchVersion}:latest\" ."
bat "podman push \"git.studioml.it/integry/ems-api${branchVersion}:latest\""
//containerImageLink "git.studioml.it/integry/ems-api-${env.GIT_BRANCH.toLowerCase().replace('/', '-')}:latest}"
}
}
}
}
stage('Publish TypeScript modules') {
when {
expression {
return env.GIT_BRANCH == "master" || env.GIT_BRANCH == "develop"
}
}
steps {
script {
bat "IF EXIST IntegryManagementSystemTSModules RMDIR IntegryManagementSystemTSModules /S /Q"
// Clona la repository di destinazione
echo "Clonazione della repository di destinazione..."
bat 'git clone https://git.studioml.it/Integry/IntegryManagementSystemTSModules.git'
// Entra nella directory della repository di destinazione
dir('IntegryManagementSystemTSModules') {
if(env.GIT_BRANCH != "master") {
// Crea un nuovo branch se non è master o develop
bat "git checkout -b ${env.GIT_BRANCH} origin/${env.GIT_BRANCH}"
} else {
// Altrimenti, torna al branch master o develop
bat "git checkout ${env.GIT_BRANCH}"
}
//bat "git checkout -b ${env.GIT_BRANCH}"
bat "git pull origin ${env.GIT_BRANCH}"
// Copia i file .ts nella repository di destinazione
echo "Copia dei file .ts nella repository di destinazione..."
bat 'copy ..\\ts\\*.ts .'
// Aggiungi i file modificati
bat 'git add *.ts'
// Commit e push
bat 'git commit -m "Aggiornamento file .ts"'
bat 'git push https://git.studioml.it/Integry/IntegryManagementSystemTSModules.git --all'
}
}
}
}
}
}
}
post {
success {
script {
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "develop") {
office365ConnectorSend adaptiveCards: true, color: '#008000', message: 'EMS-API è stato compilato con successo', status: 'SUCCESS', webhookUrl: 'https://prod-197.westeurope.logic.azure.com:443/workflows/69a7b8ee3c284175bd6da7127c7eb3cf/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=_-eMfvsQGkIidHWzzlhGFgiZG28ujHZ41QqzuqD9YGw'
}
}
}
unstable {
script {
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "develop") {
office365ConnectorSend adaptiveCards: true, color: '#FFDE21', message: 'EMS-API è INSTABILE', status: 'UNSTABLE', webhookUrl: 'https://prod-197.westeurope.logic.azure.com:443/workflows/69a7b8ee3c284175bd6da7127c7eb3cf/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=_-eMfvsQGkIidHWzzlhGFgiZG28ujHZ41QqzuqD9YGw'
}
}
}
failure {
script {
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "develop") {
office365ConnectorSend adaptiveCards: true, color: '#FF2C2C', message: 'Errore di compilazione su EMS-API', status: 'FAILURE', webhookUrl: 'https://prod-197.westeurope.logic.azure.com:443/workflows/69a7b8ee3c284175bd6da7127c7eb3cf/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=_-eMfvsQGkIidHWzzlhGFgiZG28ujHZ41QqzuqD9YGw'
}
}
}
}
}

View File

@@ -1,153 +0,0 @@
Param(
[string]$serviceName, #Argomento passato dal chiamante
[Int32]$httpPort, #Argomento passato dal chiamante
[string]$updatedArtifactPath #Argomento passato dal chiamante
)
$max_attempts = 48
$attempt = 0
$webappsPath = "C:\Program Files\$serviceName\webapps"
# Funzione per eseguire la chiamata GET e controllare lo status code
function Check-Status {
try {
$request = Invoke-WebRequest -Uri "http://localhost:$httpPort/ems-api/system/ok" -Method Get -ErrorAction Stop -UseBasicParsing
$statusCode = $request.StatusCode
if ($statusCode -eq 200) {
Write-Host "Status code 200 ricevuto, processo completato."
exit 0
} else {
Write-Host "Status code $statusCode ricevuto, continuo a provare..."
}
} catch {
Write-Host "Errore: $_"
}
}
# Funzione per cancellare una cartella e un file
function Delete-FilesAndFolder
{
param (
[string]$folderPath,
[string]$filePath
)
try {
# Cancellare la cartella specificata
if (Test-Path -Path $folderPath) {
Remove-Item -Path $folderPath -Recurse -Force
Write-Host "Cartella $folderPath eliminata con successo."
} else {
Write-Host "La cartella $folderPath non esiste."
}
# Cancellare il file specificato
if (Test-Path -Path $filePath) {
Remove-Item -Path $filePath -Force
Write-Host "File $filePath eliminato con successo."
} else {
Write-Host "Il file $filePath non esiste."
}
} catch {
Write-Host "Errore nella cancellazione di file o cartella: $_"
exit 1
}
}
# Funzione per copiare un file
function Copy-File {
param (
[string]$sourceFilePath,
[string]$destinationFilePath
)
try {
if (Test-Path -Path $sourceFilePath) {
Copy-Item -Path $sourceFilePath -Destination $destinationFilePath -Force
Write-Host "File copiato da $sourceFilePath a $destinationFilePath con successo."
} else {
Write-Host "Il file sorgente $sourceFilePath non esiste."
}
} catch {
Write-Host "Errore nella copia del file: $_"
exit 1
}
}
# Funzione per stoppare un servizio e attendere che sia completamente fermato
function Stop-ServiceAndWait {
param (
[string]$serviceName
)
# Tentativo di stoppare il servizio
try {
Write-Host "Sto stoppando il servizio $serviceName..."
Stop-Service -Name $serviceName -Force
# Attesa finché il servizio non viene stoppato
$service = Get-Service -Name $serviceName
while ($service.Status -ne 'Stopped') {
Write-Host "Attendo che il servizio $serviceName si fermi..."
Start-Sleep -Seconds 5
$service = Get-Service -Name $serviceName
}
Write-Host "Il servizio $serviceName è stato fermato con successo."
} catch {
Write-Host "Errore nello stoppare il servizio ${serviceName}: $_"
exit 1
}
}
# Funzione per avviare nuovamente un servizio e attendere che sia in esecuzione
function Start-ServiceAndWait {
param (
[string]$serviceName
)
try {
Write-Host "Sto avviando il servizio $serviceName..."
Start-Service -Name $serviceName
# Attesa finché il servizio non viene avviato
$service = Get-Service -Name $serviceName
while ($service.Status -ne 'Running') {
Write-Host "Attendo che il servizio $serviceName si avvii..."
Start-Sleep -Seconds 5
$service = Get-Service -Name $serviceName
}
Write-Host "Il servizio $serviceName è stato avviato con successo."
} catch {
Write-Host "Errore nell'avvio del servizio ${serviceName}: $_"
exit 1
}
}
# Chiamare la funzione per stoppare il servizio
Stop-ServiceAndWait -serviceName $serviceName
# Subito dopo lo stop, cancellare la cartella e il file
$emsApiPath = "$webappsPath\ems-api"
$emsWarFilePath = "$webappsPath\ems-api.war"
Delete-FilesAndFolder -folderPath $emsApiPath -filePath $emsWarFilePath
# Chiamare la funzione per copiare il file
Write-Host "Copio $updatedArtifactPath in $emsWarFilePath"
Copy-File -sourceFilePath $updatedArtifactPath -destinationFilePath $emsWarFilePath
# Avvia nuovamente il servizio
Start-ServiceAndWait -serviceName $serviceName
# Ciclo fino a quando lo status code non è 200 o superiamo il numero massimo di tentativi
while ($attempt -lt $max_attempts) {
$attempt++
Check-Status
Start-Sleep -Seconds 5 # Attendere per 5 secondi prima di fare un altro tentativo
}
Write-Host "Numero massimo di tentativi superato. Nessuna risposta 200 ricevuta."
exit 1

View File

@@ -1,11 +0,0 @@
services:
tomcat:
build: ./
restart: unless-stopped
ports:
- "8080:8080"
- "5005:5005"
volumes:
- ./docker/tomcat/conf/integry:/usr/local/tomcat/conf/integry
extra_hosts:
- host.docker.internal:host-gateway

Binary file not shown.

View File

@@ -1,14 +0,0 @@
import java.awt.*;
public class FontTest {
public static void main(String[] args) {
String[] names = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
System.out.println("Found " + names.length + " fonts:");
for (String name : names) {
System.out.println(name);
}
}
}

View File

@@ -1,13 +0,0 @@
ini.path=C:/MLSetupWS
global.connection.ini.path=C:/MLSetupWS/connectDB.ini
endpoint.ws=http://localhost:8080
endpoint.brt.ws=http://10.0.0.12:9005/easyspeddews?wsdl
receipts.folder=C:/WEB_SHARE/SCONTRINI
crontime.folder=
quartz.enabled=false
cron.expr=0 0/2 * 1/1 * ? *
default.printer.name=Samsung SCX-4x24 Series PCL 6
default.database=integry
default.nodatabase.login=integry_ems_psw_system_legacy
amazon.import.enabled=false
sh.import.enabled=false

View File

@@ -1,895 +0,0 @@
{
"accessTokenExpireMinutes": 30,
"refreshTokenExpireDays": 14,
"defaultProfile": "INTEGRY",
"primaryInstance": true,
"enableTokenCaching": false,
"systemPassword": "?MF!jbI+&OkA",
"availableConnections": [
{
"profileName": "MAGGIOSRL",
"connectionType": "MSSQL",
"dbName": "MaggioSRL",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "AGRICOPER",
"connectionType": "MSSQL",
"dbName": "agricoper",
"username": "sa",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "MUCCI",
"connectionType": "MSSQL",
"dbName": "MUCCI",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "RESINA_COLOR",
"connectionType": "MSSQL",
"dbName": "RESINACOLOR",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "RESINA_COLOR_PASQUALE",
"connectionType": "MSSQL",
"dbName": "RESINACOLOR_PASQUALE",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "ALAMBICCO",
"connectionType": "MSSQL",
"dbName": "alambicco",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "AURICCHIO",
"connectionType": "MSSQL",
"dbName": "auricchio",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "AURICCHIOSRL",
"connectionType": "MSSQL",
"dbName": "auricchiosrl",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "AURICCHIO_MIKI",
"connectionType": "MSSQL",
"dbName": "auricchio_miki",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "CARELLI",
"connectionType": "MSSQL",
"dbName": "carelli",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "CSGR",
"connectionType": "MSSQL",
"dbName": "csgr",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "CHIUSO",
"connectionType": "MSSQL",
"dbName": "chiuso",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "COSMINT",
"connectionType": "MSSQL",
"dbName": "cosmint",
"username": "sa",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "DAGA",
"connectionType": "MSSQL",
"dbName": "Daga",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "DIDONNA",
"connectionType": "MSSQL",
"dbName": "DIDONNA",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "DOLCE_BONTA",
"connectionType": "MSSQL",
"dbName": "DOLCE_BO",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "DULCIAR",
"connectionType": "MSSQL",
"dbName": "dulciar",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "FLORAPULIA",
"connectionType": "MSSQL",
"dbName": "florapulia",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "FLORAPULIASRL",
"connectionType": "MSSQL",
"dbName": "florapuliasrl",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"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",
"dbName": "folliesgroup",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "FORMAT",
"connectionType": "MSSQL",
"dbName": "format",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "GESTFOOD",
"connectionType": "MSSQL",
"dbName": "GESTFOOD",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "GIOVMAGGIO",
"connectionType": "MSSQL",
"dbName": "giovmaggio",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "GRAMM",
"connectionType": "MSSQL",
"dbName": "gramm",
"username": "SA",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "IDROTECNICA",
"connectionType": "MSSQL",
"dbName": "idrotecnica",
"username": "sa",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "IME_BA",
"connectionType": "MSSQL",
"dbName": "IME_BA",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "IME_TE",
"connectionType": "MSSQL",
"dbName": "IME_TE",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "IND01",
"connectionType": "MSSQL",
"dbName": "ind01",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "IND02",
"connectionType": "MSSQL",
"dbName": "ind02",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "IND04",
"connectionType": "MSSQL",
"dbName": "ind04",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "IND05",
"connectionType": "MSSQL",
"dbName": "ind05",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "INTEGRY",
"connectionType": "MSSQL",
"dbName": "studioml",
"username": "sa",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "LAMONARCA",
"connectionType": "MSSQL",
"dbName": "lamonarca",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "LEVANPLAST",
"connectionType": "MSSQL",
"dbName": "levanplast",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "LICOR",
"connectionType": "MSSQL",
"dbName": "licor",
"username": "sa",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "MIDEL",
"connectionType": "MSSQL",
"dbName": "midel",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "MURGIA",
"connectionType": "MSSQL",
"dbName": "MURGIA",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "OF_DEMO",
"connectionType": "MSSQL",
"dbName": "of_demo",
"username": "sa",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "PANIMAL",
"connectionType": "MSSQL",
"dbName": "panimal",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"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": "PAPARELLA_IMMOBILIARE",
"connectionType": "MSSQL",
"dbName": "immobiliare",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "PAPARELLA_IMMOBILIARE_SRL",
"connectionType": "MSSQL",
"dbName": "immobiliaresrl",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "RISTO_CASH",
"connectionType": "MSSQL",
"dbName": "risto_cash",
"username": "sa",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "SALPAR",
"connectionType": "MSSQL",
"dbName": "salpar",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "MASABA",
"connectionType": "MSSQL",
"dbName": "masabasrl",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "SABATO",
"connectionType": "MSSQL",
"dbName": "SABATO",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "SANTANTONIO",
"connectionType": "MSSQL",
"dbName": "SANTANTONIO",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "SARDINYA",
"connectionType": "MSSQL",
"dbName": "Sardinya",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "SICILIANIDMSOLAP",
"connectionType": "MSSQL",
"dbName": "SicilianiDMSOlap",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": false
},
{
"profileName": "SICILIANIOLAP",
"connectionType": "MSSQL",
"dbName": "SicilianiDMSOlap",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": false
},
{
"profileName": "SICILIANITRAXAL",
"connectionType": "MSSQL",
"dbName": "scambio_traxal",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": false
},
{
"profileName": "SMETAR",
"connectionType": "MSSQL",
"dbName": "smetar",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "SUIT",
"connectionType": "MSSQL",
"dbName": "SUIT",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TEMPESTA",
"connectionType": "MSSQL",
"dbName": "tempesta",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TOSCA_BA",
"connectionType": "MSSQL",
"dbName": "tosca_ba",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TOSCA_CE",
"connectionType": "MSSQL",
"dbName": "tosca_ce",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TOSCA_CZ",
"connectionType": "MSSQL",
"dbName": "tosca_cz",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TOSCA_FC",
"connectionType": "MSSQL",
"dbName": "tosca_fc",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TOSCA_MI",
"connectionType": "MSSQL",
"dbName": "tosca_mi",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TOSCA_RM",
"connectionType": "MSSQL",
"dbName": "tosca_rm",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TOSCA_RG",
"connectionType": "MSSQL",
"dbName": "tosca_rg",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TOSCA_VR",
"connectionType": "MSSQL",
"dbName": "tosca_vr",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TOSCA_CLOUD",
"connectionType": "MSSQL",
"dbName": "tosca-primary-db",
"username": "sa",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "VGALIMENTI",
"connectionType": "MSSQL",
"dbName": "vgalimenti",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "VINELLA",
"connectionType": "MSSQL",
"dbName": "VINELLA",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "LEVANPLASTSRL",
"connectionType": "MSSQL",
"dbName": "levanplastsrl",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "BIOLEVANTE",
"connectionType": "MSSQL",
"dbName": "biolevante",
"username": "SA",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "CAPELLI_MONELLI",
"connectionType": "MSSQL",
"dbName": "capelli_monelli",
"username": "SA",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "PENELOPE_EXCHANGE",
"connectionType": "MSSQL",
"dbName": "penelope_exchange",
"username": "SA",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": false
},
{
"profileName": "ROSSOGARGANO",
"connectionType": "MSSQL",
"dbName": "RossoGargano",
"username": "SA",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "MORGANTE",
"connectionType": "MSSQL",
"dbName": "morgante",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "WINACT",
"connectionType": "MSSQL",
"dbName": "winact",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "FRUDIS",
"connectionType": "MSSQL",
"dbName": "frudis",
"username": "SA",
"password": "sZ",
"host": "192.168.2.220",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "SAPORI_VERI",
"connectionType": "MSSQL",
"dbName": "SAPORI_VERI",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "DISPENSA",
"connectionType": "MSSQL",
"dbName": "DISPENSA",
"username": "SA",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "TWOBROTHERS",
"connectionType": "MSSQL",
"dbName": "twobrothers",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "SGSRL",
"connectionType": "MSSQL",
"dbName": "SGSRL",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "STUDIOML_HISTORY",
"connectionType": "MSSQL",
"dbName": "studioml_history",
"username": "sa",
"password": "sa",
"host": "192.168.2.220",
"encryptedDbPsw": false,
"internalDb": false
},
{
"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",
"dbName": "vetta",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
},
{
"profileName": "CARNI_SARDEGNA",
"connectionType": "MSSQL",
"dbName": "CARNI_SARDEGNA",
"username": "sa",
"password": "sZ",
"host": "192.168.2.214",
"encryptedDbPsw": true,
"internalDb": true
}
],
"defaultMailConfiguration": {
"from": "internal@integry.it",
"smtp": "smtp.integry.it",
"port": 25,
"enableSSL": false,
"username": "sender@integry.it",
"password": "sendsqlml",
"encryptedPassword": false
},
"loggerConfiguration": {
"level": "DEBUG",
"deleteDays": 15,
"dbDeleteDays": 3,
"dbMaxSize": "500M"
},
"enablePermissionCheck": false,
"minioConfiguration": {
"host": "192.168.2.206",
"port": 9000,
"accessKey": "integry_minio",
"secretKey": "9yMd3@0.GPKf",
"enabled": true,
"enableOldSave": false,
"excludedEntities": []
}
}

View File

@@ -13,7 +13,30 @@
<name>Ems Core</name>
<repositories>
<repository>
<id>maven-public</id>
<url>https://maven.studioml.it/repository/maven-public/</url>
</repository>
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://releases.aspose.com/java/repo/</url>
</repository>
</repositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -24,62 +47,85 @@
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.4.0</version>
<version>3.0.0</version>
<configuration>
<longClasspath>true</longClasspath>
<longModulepath>true</longModulepath>
<toolchain>jdk</toolchain>
<executable>java</executable>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
<skip>false</skip>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>it.integry.ems_model.rulescompleting.KieStaticCompiler</argument>
<argument>src/main/resources/rules/</argument>
<argument>../ems-engine/src/main/resources/drools/</argument>
</arguments>
<systemProperties>
<projectProperties/>
<exec.longClasspath>true</exec.longClasspath>
</systemProperties>
<skip>true</skip>
<mainClass>it.integry.ems_model.rulescompleting.KieStaticCompiler</mainClass>
</configuration>
<executions>
<execution>
<phase>process-classes</phase>
<phase>post-clean</phase>
<goals>
<goal>exec</goal>
<goal>java</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>cz.habarta.typescript-generator</groupId>
<artifactId>typescript-generator-maven-plugin</artifactId>
<version>2.37.1128</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<jsonLibrary>jackson2</jsonLibrary>
<classPatterns>it.integry.ems_model.entity.*</classPatterns>
<classes>
<class>it.integry.ems.response.ServiceRestResponse</class>
</classes>
<excludeClasses>
<excludeClass>it.integry.ems_model.base.EntityInterface</excludeClass>
</excludeClasses>
<outputFile>../ts/ems-core.module.ts</outputFile>
<outputKind>module</outputKind>
<outputFileType>implementationFile</outputFileType>
<customTypeNaming>
<naming>it.integry.ems_model.entity.AtbOfft$StatoOfferta:AtbOfftStatoOfferta</naming>
<naming>it.integry.ems_model.entity.VtbOfft$StatoOfferta:VtbOfftStatoOfferta</naming>
<naming>it.integry.ems_model.entity.GrlAnagJrept$Tipo:GrlAnagJreptTipo</naming>
<naming>it.integry.ems_model.entity.WtbJreptSetup$Tipo:WtbJreptSetupTipo</naming>
<naming>it.integry.ems_model.entity.MtbColr$Causale:MtbColrCausale</naming>
<naming>it.integry.ems_model.entity.MtbCols$Causale:MtbColsCausale</naming>
</customTypeNaming>
<generateConstructors>true</generateConstructors>
<mapClasses>asClasses</mapClasses>
<mapEnum>asEnum</mapEnum>
<optionalProperties>useLibraryDefinition</optionalProperties>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-bom</artifactId>
<version>2.25.0</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>prod</id>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
<version>2.2</version>
<scope>compile</scope>
</dependency>
@@ -100,7 +146,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>12.8.0.jre8</version>
<version>9.4.1.jre8</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
@@ -113,24 +159,19 @@
<version>1.13</version>
</dependency>
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
<version>8.5.14</version>
</dependency>
<!-- SWAGGER -->
<!-- SWAGGER
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-oas</artifactId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
</dependency> -->
<!-- REST CLIENT -->
<dependency>
@@ -145,20 +186,42 @@
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.3.6</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20200518</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.10.2</version>
<version>0.9.10</version>
</dependency>
<!-- Mail -->
@@ -168,42 +231,49 @@
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.3.0</version>
</dependency>
<!-- JASPER REPORT -->
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>${jaspersoft.version}</version>
<version>6.16.0</version>
<exclusions>
<exclusion>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7.js8</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-htmlcomponent</artifactId>
<version>4.1.1</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.lowagie</groupId>-->
<!-- <artifactId>itext</artifactId>-->
<!-- <version>2.1.7.js8</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>net.sf.jasperreports</groupId>-->
<!-- <artifactId>jasperreports-htmlcomponent</artifactId>-->
<!-- <version>4.1.1</version>-->
<!-- </dependency>-->
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-fonts</artifactId>
<version>${jaspersoft.version}</version>
<version>6.16.0</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-functions</artifactId>
<version>${jaspersoft.version}</version>
<version>6.16.0</version>
</dependency>
<dependency>
<groupId>it.integry.font</groupId>
<artifactId>Arial</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>it.integry.font</groupId>
<artifactId>Aptos</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>it.integry.font</groupId>
<artifactId>ArialBlack</artifactId>
@@ -224,93 +294,83 @@
<artifactId>Tahoma</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>it.integry.font</groupId>
<artifactId>arial-rounded</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>it.integry.font</groupId>
<artifactId>NotoSerif</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>4.0.16</version>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.7.5</version>
</dependency>
<!-- SOSTITUISCONO batik-all -->
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-awt-util</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-awt-util</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-bridge</artifactId>
<version>1.17</version>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-css</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-dom</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-ext</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-gvt</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-parser</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svg-dom</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-transcoder</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-util</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-xml</artifactId>
<version>1.9</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-css</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-dom</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-ext</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-gvt</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-parser</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-svg-dom</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-transcoder</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-util</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.xmlgraphics</groupId>-->
<!-- <artifactId>batik-xml</artifactId>-->
<!-- <version>1.9</version>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.5</version>
<version>3.9</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.5</version>
<version>3.9</version>
</dependency>
<dependency>
@@ -347,7 +407,13 @@
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.24</version>
<version>2.0.22</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
@@ -365,15 +431,11 @@
<artifactId>jackson-dataformat-csv</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.20</version> <!-- Versione scritta a mano perché qui non hanno usato lo 0 finale -->
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson.version}</version>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.47</version>
</dependency>
<!-- Spring -->
@@ -386,14 +448,13 @@
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-instrument-tomcat</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
@@ -443,36 +504,21 @@
<version>${drools.version}</version>
</dependency>
<!-- log4j -->
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>3.4.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.19.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.36</version>
<version>2.19.0</version>
</dependency>
<dependency>
@@ -490,26 +536,39 @@
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.41.2.2</version>
<version>3.39.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
<version>1.9</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
<!-- UTILS -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>javax</groupId>
@@ -521,20 +580,30 @@
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.9.0</version>
<version>3.5</version>
</dependency>
<dependency>
<groupId>com.mashape.unirest</groupId>
<artifactId>unirest-java</artifactId>
<version>1.4.9</version>
</dependency>
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>2.2.0</version>
<version>0.2.7</version>
</dependency>
<!-- File manipulation -->
@@ -572,7 +641,7 @@
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.11.5</version>
<scope>compile</scope>
<scope>runtime</scope>
</dependency>
<!--Expiring Map-->
@@ -584,18 +653,18 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
<version>1.78.1</version>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.70</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk18on</artifactId>
<version>1.78.1</version>
<artifactId>bcmail-jdk15on</artifactId>
<version>1.70</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.78.1</version>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
</dependency>
@@ -605,19 +674,26 @@
<version>1.2.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.http-client/google-http-client -->
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<version>1.34.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.http-client/google-http-client-xml -->
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-xml</artifactId>
<version>1.34.0</version>
</dependency>
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>9.2.0</version>
<version>7.0.1</version>
</dependency>
<!-- Needed for Firebase 9.4.2 -->
<!-- <dependency>-->
<!-- <groupId>com.google.auth</groupId>-->
<!-- <artifactId>google-auth-library-credentials</artifactId>-->
<!-- <version>1.28.0</version>-->
<!-- </dependency>-->
<!-- Video -->
<dependency>
@@ -640,13 +716,13 @@
<dependency>
<groupId>com.hierynomus</groupId>
<artifactId>sshj</artifactId>
<version>0.39.0</version>
<version>0.27.0</version>
</dependency>
<dependency>
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-symbol-solver-core</artifactId>
<version>3.26.1</version>
<version>3.25.9</version>
</dependency>
</dependencies>

View File

@@ -152,7 +152,7 @@ public class CollectionsUtils {
}
if (objs.isEmpty()) {
if (objs.size() == 0) {
return;

View File

@@ -441,7 +441,7 @@ public class GeneralComparator implements Comparator,
}
if (this.fields.isEmpty()) {
if (this.fields.size() == 0) {
this.fields.add(0,
new SortField(field,

View File

@@ -526,7 +526,7 @@ public class ObjectCache implements ObjectCacheManager {
public boolean isEmpty() {
return this.keys.isEmpty();
return this.keys.size() == 0;
}

View File

@@ -1,18 +0,0 @@
package it.integry.FoodProcess.api;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import java.io.IOException;
public class AddApiKeyHeaderRequestFilter implements ClientRequestFilter {
private final String apiKey;
public AddApiKeyHeaderRequestFilter(String apiKey) {
this.apiKey = apiKey;
}
@Override
public void filter(ClientRequestContext clientRequestContext) throws IOException {
clientRequestContext.getHeaders().add("X-Api-Key", apiKey);
}
}

View File

@@ -1,62 +0,0 @@
package it.integry.FoodProcess.api;
import com.fasterxml.jackson.databind.ObjectMapper;
import it.integry.FoodProcess.dto.response.ErrorResponse;
import javax.ws.rs.*;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientResponseContext;
import javax.ws.rs.client.ClientResponseFilter;
import javax.ws.rs.core.Response;
import java.io.IOException;
public class ErrorMessageResponseFilter implements ClientResponseFilter {
private static final ObjectMapper objectMapper = new ObjectMapper();
@Override
public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException {
if (responseContext.getStatus() != Response.Status.OK.getStatusCode()) {
if (responseContext.hasEntity()) {
ErrorResponse error = objectMapper.readValue(responseContext.getEntityStream(), ErrorResponse.class);
String message = error.getErrorMessage();
Response.Status status = Response.Status.fromStatusCode(responseContext.getStatus());
WebApplicationException webAppException;
switch (status) {
case BAD_REQUEST:
webAppException = new BadRequestException(message);
break;
case UNAUTHORIZED:
webAppException = new NotAuthorizedException(message, Response.status(Response.Status.UNAUTHORIZED).build());
break;
case FORBIDDEN:
webAppException = new ForbiddenException(message);
break;
case NOT_FOUND:
webAppException = new NotFoundException(message);
break;
case METHOD_NOT_ALLOWED:
webAppException = new NotAllowedException(message);
break;
case NOT_ACCEPTABLE:
webAppException = new NotAcceptableException(message);
break;
case UNSUPPORTED_MEDIA_TYPE:
webAppException = new NotSupportedException(message);
break;
case INTERNAL_SERVER_ERROR:
webAppException = new InternalServerErrorException(message);
break;
case SERVICE_UNAVAILABLE:
webAppException = new ServiceUnavailableException(message);
break;
default:
webAppException = new WebApplicationException(message);
}
throw webAppException;
}
}
}
}

View File

@@ -1,69 +0,0 @@
package it.integry.FoodProcess.api;
import it.integry.FoodProcess.dto.*;
import it.integry.FoodProcess.dto.response.*;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.util.List;
public interface FoodProcessClient {
// Orders
@GET
@Path("/getorderstatuses")
@Produces(MediaType.APPLICATION_JSON)
List<OrderStatusResponse> getOrderStatuses(@QueryParam("order_ids") List<String> orderIds);
@POST
@Path("/importorders")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
ImportOrdersResponse importOrders(ImportOrdersRequest importOrdersRequest);
// Master data
@GET
@Path("/getarticles")
@Produces(MediaType.APPLICATION_JSON)
List<Article> getArticles();
@POST
@Path("/importarticles")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
ImportArticlesResponse importArticles(ImportArticlesRequest importArticlesRequest);
@GET
@Path("/getbusinesspartners")
@Produces(MediaType.APPLICATION_JSON)
List<BusinessPartner> getBusinessPartners();
@POST
@Path("/importbusinesspartners")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
ImportBusinessPartnersResponse importBusinessPartners(ImportBusinessPartnersRequest importBusinessPartnersRequest);
@GET
@Path("/getpackagingmaterials")
@Produces(MediaType.APPLICATION_JSON)
List<PackagingMaterial> getPackagingMaterials();
@POST
@Path("/importpackagingmaterials")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
ImportPackagingMaterialsResponse importPackagingMaterials(ImportPackagingMaterialsRequest importPackagingMaterialsRequest);
@GET
@Path("/getrawmaterials")
@Produces(MediaType.APPLICATION_JSON)
List<RawMaterial> getRawMaterials();
@POST
@Path("/importrawmaterials")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
ImportRawMaterialsResponse importRawMaterials(ImportRawMaterialsRequest importRawMaterialsRequest);
}

View File

@@ -1,25 +0,0 @@
package it.integry.FoodProcess.api;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.Provider;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
@Provider
public class JacksonProvider extends ResteasyJackson2Provider {
@Override
public void writeTo(Object value, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException {
ObjectMapper mapper = locateMapper(type, MediaType.APPLICATION_JSON_TYPE);
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
super.writeTo(value, type, genericType, annotations, mediaType, httpHeaders, entityStream);
}
}

View File

@@ -1,116 +0,0 @@
package it.integry.FoodProcess.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import it.integry.ems_model.annotation.SqlField;
import java.util.List;
public class Article {
@SqlField
private String id;
@SqlField
private String code;
@SqlField
private String name;
@JsonProperty("raw_materials")
private List<ArticleRawMaterial> rawMaterials;
@JsonProperty("packaging_material_id")
private String packagingMaterialId;
@JsonProperty("packaging_material_code")
private String packagingMaterialCode;
@JsonProperty("packaging_material_name")
private String packagingMaterialName;
@SqlField
private String note;
@JsonProperty("is_archived")
private boolean isArchived;
public String getId() {
return id;
}
public Article setId(String id) {
this.id = id;
return this;
}
public String getCode() {
return code;
}
public Article setCode(String code) {
this.code = code;
return this;
}
public String getName() {
return name;
}
public Article setName(String name) {
this.name = name;
return this;
}
public List<ArticleRawMaterial> getRawMaterials() {
return rawMaterials;
}
public Article setRawMaterials(List<ArticleRawMaterial> rawMaterials) {
this.rawMaterials = rawMaterials;
return this;
}
public String getPackagingMaterialId() {
return packagingMaterialId;
}
public Article setPackagingMaterialId(String packagingMaterialId) {
this.packagingMaterialId = packagingMaterialId;
return this;
}
public String getPackagingMaterialCode() {
return packagingMaterialCode;
}
public Article setPackagingMaterialCode(String packagingMaterialCode) {
this.packagingMaterialCode = packagingMaterialCode;
return this;
}
public String getPackagingMaterialName() {
return packagingMaterialName;
}
public Article setPackagingMaterialName(String packagingMaterialName) {
this.packagingMaterialName = packagingMaterialName;
return this;
}
public String getNote() {
return note;
}
public Article setNote(String note) {
this.note = note;
return this;
}
public boolean getIsArchived() {
return isArchived;
}
public Article setIsArchived(boolean isArchived) {
this.isArchived = isArchived;
return this;
}
}

View File

@@ -1,50 +0,0 @@
package it.integry.FoodProcess.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ArticleRawMaterial {
private String id;
private String code;
private String name;
@JsonProperty("weight_kg")
private Double weightKg;
public String getId() {
return id;
}
public ArticleRawMaterial setId(String id) {
this.id = id;
return this;
}
public String getCode() {
return code;
}
public ArticleRawMaterial setCode(String code) {
this.code = code;
return this;
}
public String getName() {
return name;
}
public ArticleRawMaterial setName(String name) {
this.name = name;
return this;
}
public Double getWeightKg() {
return weightKg;
}
public ArticleRawMaterial setWeightKg(Double weightKg) {
this.weightKg = weightKg;
return this;
}
}

View File

@@ -1,93 +0,0 @@
package it.integry.FoodProcess.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import it.integry.ems_model.annotation.SqlField;
public class BusinessPartner {
@SqlField
private String id;
@SqlField
private String code;
@SqlField
private String name;
@SqlField
@JsonProperty("is_customer")
private boolean isCustomer;
@SqlField
@JsonProperty("is_supplier")
private boolean isSupplier;
@SqlField
private String note;
@SqlField
@JsonProperty("is_archived")
private boolean isArchived;
public String getId() {
return id;
}
public BusinessPartner setId(String id) {
this.id = id;
return this;
}
public String getCode() {
return code;
}
public BusinessPartner setCode(String code) {
this.code = code;
return this;
}
public String getName() {
return name;
}
public BusinessPartner setName(String name) {
this.name = name;
return this;
}
public boolean getIsCustomer() {
return isCustomer;
}
public BusinessPartner setIsCustomer(boolean isCustomer) {
this.isCustomer = isCustomer;
return this;
}
public boolean getIsSupplier() {
return isSupplier;
}
public BusinessPartner setIsSupplier(boolean isSupplier) {
this.isSupplier = isSupplier;
return this;
}
public String getNote() {
return note;
}
public BusinessPartner setNote(String note) {
this.note = note;
return this;
}
public boolean getIsArchived() {
return isArchived;
}
public BusinessPartner setIsArchived(boolean isArchived) {
this.isArchived = isArchived;
return this;
}
}

View File

@@ -1,16 +0,0 @@
package it.integry.FoodProcess.dto;
import java.util.List;
public class ImportArticlesRequest {
private List<Article> articles;
public List<Article> getArticles() {
return articles;
}
public ImportArticlesRequest setArticles(List<Article> articles) {
this.articles = articles;
return this;
}
}

View File

@@ -1,19 +0,0 @@
package it.integry.FoodProcess.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class ImportBusinessPartnersRequest {
@JsonProperty("business_partners")
private List<BusinessPartner> businessPartners;
public List<BusinessPartner> getBusinessPartners() {
return businessPartners;
}
public ImportBusinessPartnersRequest setBusinessPartners(List<BusinessPartner> businessPartners) {
this.businessPartners = businessPartners;
return this;
}
}

View File

@@ -1,16 +0,0 @@
package it.integry.FoodProcess.dto;
import java.util.List;
public class ImportOrdersRequest {
private List<RequestOrder> orders;
public List<RequestOrder> getOrders() {
return orders;
}
public ImportOrdersRequest setOrders(List<RequestOrder> orders) {
this.orders = orders;
return this;
}
}

View File

@@ -1,19 +0,0 @@
package it.integry.FoodProcess.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class ImportPackagingMaterialsRequest {
@JsonProperty("packaging_materials")
private List<PackagingMaterial> packagingMaterials;
public List<PackagingMaterial> getPackagingMaterials() {
return packagingMaterials;
}
public ImportPackagingMaterialsRequest setPackagingMaterials(List<PackagingMaterial> packagingMaterials) {
this.packagingMaterials = packagingMaterials;
return this;
}
}

View File

@@ -1,19 +0,0 @@
package it.integry.FoodProcess.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class ImportRawMaterialsRequest {
@JsonProperty("raw_materials")
private List<RawMaterial> rawMaterials;
public List<RawMaterial> getRawMaterials() {
return rawMaterials;
}
public ImportRawMaterialsRequest setRawMaterials(List<RawMaterial> rawMaterials) {
this.rawMaterials = rawMaterials;
return this;
}
}

View File

@@ -1,120 +0,0 @@
package it.integry.FoodProcess.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
public class PackagingMaterial {
private String id;
private String code;
private String name;
private PackagingMaterialType type;
@JsonProperty("weight_kg")
private Double weightKg;
@JsonProperty("length_mm")
private Double lengthMm;
@JsonProperty("width_mm")
private Double widthMm;
@JsonProperty("height_mm")
private Double heightMm;
private String note;
@JsonProperty("is_archived")
private boolean isArchived;
public String getId() {
return id;
}
public PackagingMaterial setId(String id) {
this.id = id;
return this;
}
public String getCode() {
return code;
}
public PackagingMaterial setCode(String code) {
this.code = code;
return this;
}
public String getName() {
return name;
}
public PackagingMaterial setName(String name) {
this.name = name;
return this;
}
public PackagingMaterialType getType() {
return type;
}
public PackagingMaterial setType(PackagingMaterialType type) {
this.type = type;
return this;
}
public Double getWeightKg() {
return weightKg;
}
public PackagingMaterial setWeightKg(Double weightKg) {
this.weightKg = weightKg;
return this;
}
public Double getLengthMm() {
return lengthMm;
}
public PackagingMaterial setLengthMm(Double lengthMm) {
this.lengthMm = lengthMm;
return this;
}
public Double getWidthMm() {
return widthMm;
}
public PackagingMaterial setWidthMm(Double widthMm) {
this.widthMm = widthMm;
return this;
}
public Double getHeightMm() {
return heightMm;
}
public PackagingMaterial setHeightMm(Double heightMm) {
this.heightMm = heightMm;
return this;
}
public String getNote() {
return note;
}
public PackagingMaterial setNote(String note) {
this.note = note;
return this;
}
public boolean getIsArchived() {
return isArchived;
}
public PackagingMaterial setIsArchived(boolean isArchived) {
this.isArchived = isArchived;
return this;
}
}

View File

@@ -1,10 +0,0 @@
package it.integry.FoodProcess.dto;
public enum PackagingMaterialType {
PUNNET,
TRAY,
BAG,
CARTON,
CRATE,
PALLET
}

View File

@@ -1,61 +0,0 @@
package it.integry.FoodProcess.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
public class RawMaterial {
private String id;
private String code;
private String name;
private String note;
@JsonProperty("is_archived")
private boolean isArchived;
public String getId() {
return id;
}
public RawMaterial setId(String id) {
this.id = id;
return this;
}
public String getCode() {
return code;
}
public RawMaterial setCode(String code) {
this.code = code;
return this;
}
public String getName() {
return name;
}
public RawMaterial setName(String name) {
this.name = name;
return this;
}
public String getNote() {
return note;
}
public RawMaterial setNote(String note) {
this.note = note;
return this;
}
public boolean getIsArchived() {
return isArchived;
}
public RawMaterial setIsArchived(boolean isArchived) {
this.isArchived = isArchived;
return this;
}
}

View File

@@ -1,234 +0,0 @@
package it.integry.FoodProcess.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.LocalDate;
import java.time.LocalDateTime;
public class RequestOrder {
private String id;
private String type;
@JsonProperty("article_id")
private String articleId;
@JsonProperty("article_code")
private String articleCode;
@JsonProperty("customer_id")
private String customerId;
@JsonProperty("customer_code")
private String customerCode;
@JsonProperty("secondary_packaging_material_id")
private String secondaryPackagingMaterialId;
@JsonProperty("secondary_packaging_material_code")
private String secondaryPackagingMaterialCode;
@JsonProperty("tertiary_packaging_material_id")
private String tertiaryPackagingMaterialId;
@JsonProperty("tertiary_packaging_material_code")
private String tertiaryPackagingMaterialCode;
@JsonProperty("units_per_secondary_packaging")
private int unitsPerSecondaryPackaging;
@JsonProperty("units_per_pallet_layer")
private int unitsPerPalletLayer;
@JsonProperty("pallet_layer_quantity")
private int palletLayerQuantity;
@JsonProperty("target_quantity")
private double targetQuantity;
@JsonProperty("target_quantity_unit")
private TargetQuantityUnit targetQuantityUnit;
@JsonProperty("scheduled_for")
private LocalDateTime scheduledFor;
@JsonProperty("to_be_completed_until")
private LocalDateTime toBeCompletedUntil;
@JsonProperty("best_before_date")
private LocalDate bestBeforeDate;
@JsonProperty("production_lot")
private String productionLot;
public String getId() {
return id;
}
public RequestOrder setId(String id) {
this.id = id;
return this;
}
public String getType() {
return type;
}
public RequestOrder setType(String type) {
this.type = type;
return this;
}
public String getArticleId() {
return articleId;
}
public RequestOrder setArticleId(String articleId) {
this.articleId = articleId;
return this;
}
public String getArticleCode() {
return articleCode;
}
public RequestOrder setArticleCode(String articleCode) {
this.articleCode = articleCode;
return this;
}
public String getCustomerId() {
return customerId;
}
public RequestOrder setCustomerId(String customerId) {
this.customerId = customerId;
return this;
}
public String getCustomerCode() {
return customerCode;
}
public RequestOrder setCustomerCode(String customerCode) {
this.customerCode = customerCode;
return this;
}
public String getSecondaryPackagingMaterialId() {
return secondaryPackagingMaterialId;
}
public RequestOrder setSecondaryPackagingMaterialId(String secondaryPackagingMaterialId) {
this.secondaryPackagingMaterialId = secondaryPackagingMaterialId;
return this;
}
public String getSecondaryPackagingMaterialCode() {
return secondaryPackagingMaterialCode;
}
public RequestOrder setSecondaryPackagingMaterialCode(String secondaryPackagingMaterialCode) {
this.secondaryPackagingMaterialCode = secondaryPackagingMaterialCode;
return this;
}
public String getTertiaryPackagingMaterialId() {
return tertiaryPackagingMaterialId;
}
public RequestOrder setTertiaryPackagingMaterialId(String tertiaryPackagingMaterialId) {
this.tertiaryPackagingMaterialId = tertiaryPackagingMaterialId;
return this;
}
public String getTertiaryPackagingMaterialCode() {
return tertiaryPackagingMaterialCode;
}
public RequestOrder setTertiaryPackagingMaterialCode(String tertiaryPackagingMaterialCode) {
this.tertiaryPackagingMaterialCode = tertiaryPackagingMaterialCode;
return this;
}
public int getUnitsPerSecondaryPackaging() {
return unitsPerSecondaryPackaging;
}
public RequestOrder setUnitsPerSecondaryPackaging(int unitsPerSecondaryPackaging) {
this.unitsPerSecondaryPackaging = unitsPerSecondaryPackaging;
return this;
}
public int getUnitsPerPalletLayer() {
return unitsPerPalletLayer;
}
public RequestOrder setUnitsPerPalletLayer(int unitsPerPalletLayer) {
this.unitsPerPalletLayer = unitsPerPalletLayer;
return this;
}
public int getPalletLayerQuantity() {
return palletLayerQuantity;
}
public RequestOrder setPalletLayerQuantity(int palletLayerQuantity) {
this.palletLayerQuantity = palletLayerQuantity;
return this;
}
public double getTargetQuantity() {
return targetQuantity;
}
public RequestOrder setTargetQuantity(double targetQuantity) {
this.targetQuantity = targetQuantity;
return this;
}
public TargetQuantityUnit getTargetQuantityUnit() {
return targetQuantityUnit;
}
public RequestOrder setTargetQuantityUnit(TargetQuantityUnit targetQuantityUnit) {
this.targetQuantityUnit = targetQuantityUnit;
return this;
}
public LocalDateTime getScheduledFor() {
return scheduledFor;
}
public RequestOrder setScheduledFor(LocalDateTime scheduledFor) {
this.scheduledFor = scheduledFor;
return this;
}
public LocalDateTime getToBeCompletedUntil() {
return toBeCompletedUntil;
}
public RequestOrder setToBeCompletedUntil(LocalDateTime toBeCompletedUntil) {
this.toBeCompletedUntil = toBeCompletedUntil;
return this;
}
public LocalDate getBestBeforeDate() {
return bestBeforeDate;
}
public RequestOrder setBestBeforeDate(LocalDate bestBeforeDate) {
this.bestBeforeDate = bestBeforeDate;
return this;
}
public String getProductionLot() {
return productionLot;
}
public RequestOrder setProductionLot(String productionLot) {
this.productionLot = productionLot;
return this;
}
}

View File

@@ -1,8 +0,0 @@
package it.integry.FoodProcess.dto;
public enum TargetQuantityUnit {
PIECE,
SECONDARY_PACKAGING,
TERTIARY_PACKAGING,
KILOGRAM
}

View File

@@ -1,17 +0,0 @@
package it.integry.FoodProcess.dto.response;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ErrorResponse {
@JsonProperty("error_message")
private String errorMessage;
public String getErrorMessage() {
return errorMessage;
}
public ErrorResponse setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
return this;
}
}

View File

@@ -1,17 +0,0 @@
package it.integry.FoodProcess.dto.response;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ImportArticleStatus extends ResponseStatus {
@JsonProperty("article_id")
private String articleId;
public String getArticleId() {
return articleId;
}
public ImportArticleStatus setArticleId(String articleId) {
this.articleId = articleId;
return this;
}
}

View File

@@ -1,16 +0,0 @@
package it.integry.FoodProcess.dto.response;
import java.util.List;
public class ImportArticlesResponse {
private List<ImportArticleStatus> statuses;
public List<ImportArticleStatus> getStatuses() {
return statuses;
}
public ImportArticlesResponse setStatuses(List<ImportArticleStatus> statuses) {
this.statuses = statuses;
return this;
}
}

View File

@@ -1,17 +0,0 @@
package it.integry.FoodProcess.dto.response;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ImportBusinessPartnerStatus extends ResponseStatus {
@JsonProperty("business_partner_id")
private String businessPartnerId;
public String getBusinessPartnerId() {
return businessPartnerId;
}
public ImportBusinessPartnerStatus setBusinessPartnerId(String businessPartnerId) {
this.businessPartnerId = businessPartnerId;
return this;
}
}

View File

@@ -1,16 +0,0 @@
package it.integry.FoodProcess.dto.response;
import java.util.List;
public class ImportBusinessPartnersResponse {
private List<ImportBusinessPartnerStatus> statuses;
public List<ImportBusinessPartnerStatus> getStatuses() {
return statuses;
}
public ImportBusinessPartnersResponse setStatuses(List<ImportBusinessPartnerStatus> statuses) {
this.statuses = statuses;
return this;
}
}

View File

@@ -1,17 +0,0 @@
package it.integry.FoodProcess.dto.response;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ImportOrderStatus extends ResponseStatus {
@JsonProperty("order_id")
private String orderId;
public String getOrderId() {
return orderId;
}
public ImportOrderStatus setOrderId(String orderId) {
this.orderId = orderId;
return this;
}
}

View File

@@ -1,16 +0,0 @@
package it.integry.FoodProcess.dto.response;
import java.util.List;
public class ImportOrdersResponse {
private List<ImportOrderStatus> statuses;
public List<ImportOrderStatus> getStatuses() {
return statuses;
}
public ImportOrdersResponse setStatuses(List<ImportOrderStatus> statuses) {
this.statuses = statuses;
return this;
}
}

View File

@@ -1,17 +0,0 @@
package it.integry.FoodProcess.dto.response;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ImportPackagingMaterialStatus extends ResponseStatus {
@JsonProperty("packaging_material_id")
private String packagingMaterialId;
public String getPackagingMaterialId() {
return packagingMaterialId;
}
public ImportPackagingMaterialStatus setPackagingMaterialId(String packagingMaterialId) {
this.packagingMaterialId = packagingMaterialId;
return this;
}
}

View File

@@ -1,16 +0,0 @@
package it.integry.FoodProcess.dto.response;
import java.util.List;
public class ImportPackagingMaterialsResponse {
private List<ImportPackagingMaterialStatus> statuses;
public List<ImportPackagingMaterialStatus> getStatuses() {
return statuses;
}
public ImportPackagingMaterialsResponse setStatuses(List<ImportPackagingMaterialStatus> statuses) {
this.statuses = statuses;
return this;
}
}

View File

@@ -1,17 +0,0 @@
package it.integry.FoodProcess.dto.response;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ImportRawMaterialStatus extends ResponseStatus {
@JsonProperty("raw_material_id")
private String rawMaterialId;
public String getRawMaterialId() {
return rawMaterialId;
}
public ImportRawMaterialStatus setRawMaterialId(String rawMaterialId) {
this.rawMaterialId = rawMaterialId;
return this;
}
}

View File

@@ -1,16 +0,0 @@
package it.integry.FoodProcess.dto.response;
import java.util.List;
public class ImportRawMaterialsResponse {
private List<ImportRawMaterialStatus> statuses;
public List<ImportRawMaterialStatus> getStatuses() {
return statuses;
}
public ImportRawMaterialsResponse setStatuses(List<ImportRawMaterialStatus> statuses) {
this.statuses = statuses;
return this;
}
}

View File

@@ -1,9 +0,0 @@
package it.integry.FoodProcess.dto.response;
public enum OrderStatus {
NEW,
ASSIGNED,
ACTIVE,
CLOSED,
CANCELED
}

View File

@@ -1,29 +0,0 @@
package it.integry.FoodProcess.dto.response;
import com.fasterxml.jackson.annotation.JsonProperty;
public class OrderStatusResponse {
@JsonProperty("order_id")
private String orderId;
@JsonProperty("order_status")
private OrderStatus orderStatus;
public String getOrderId() {
return orderId;
}
public OrderStatusResponse setOrderId(String orderId) {
this.orderId = orderId;
return this;
}
public OrderStatus getOrderStatus() {
return orderStatus;
}
public OrderStatusResponse setOrderStatus(OrderStatus orderStatus) {
this.orderStatus = orderStatus;
return this;
}
}

View File

@@ -1,24 +0,0 @@
package it.integry.FoodProcess.dto.response;
public class ResponseStatus {
private boolean success;
private String message;
public boolean isSuccess() {
return success;
}
public ResponseStatus setSuccess(boolean success) {
this.success = success;
return this;
}
public String getMessage() {
return message;
}
public ResponseStatus setMessage(String message) {
this.message = message;
return this;
}
}

View File

@@ -1,175 +0,0 @@
package it.integry.FoodProcess.service;
import it.integry.FoodProcess.api.AddApiKeyHeaderRequestFilter;
import it.integry.FoodProcess.api.ErrorMessageResponseFilter;
import it.integry.FoodProcess.api.FoodProcessClient;
import it.integry.FoodProcess.api.JacksonProvider;
import it.integry.FoodProcess.dto.Article;
import it.integry.FoodProcess.dto.ImportArticlesRequest;
import it.integry.FoodProcess.dto.response.ImportArticlesResponse;
import it.integry.ems.service.EntityProcessor;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems.utility.UtilityEntity;
import it.integry.ems_model.entity.MtbAart;
import it.integry.ems_model.entity.MtbAartAnag;
import it.integry.ems_model.service.SetupGest;
import it.integry.ems_model.types.OperationType;
import it.integry.ems_model.utility.Query;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityList;
import it.integry.ems_model.utility.UtilityString;
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.regex.Pattern;
@Service
@Scope("request")
public class FoodProcessRestService {
private final Pattern ID_REGEX = Pattern.compile("^[0-9A-Fa-f]{1,}$");
private final SetupGest setupGest;
private final MultiDBTransactionManager multiDBTransactionManager;
private final EntityProcessor entityProcessor;
public FoodProcessRestService(SetupGest setupGest, MultiDBTransactionManager multiDBTransactionManager, EntityProcessor entityProcessor) {
this.setupGest = setupGest;
this.multiDBTransactionManager = multiDBTransactionManager;
this.entityProcessor = entityProcessor;
}
public FoodProcessClient makeInstance() throws Exception {
String endpoint = setupGest.getSetup("FOODPROCESS", "SETUP", "ENDPOINT");
if (UtilityString.isNullOrEmpty(endpoint)) {
throw new Exception("Endpoint per il servizio di FoodProcess non configurato.\nImpostarlo in FOODPROCESS->SETUP->ENDPOINT.");
}
String apiKey = setupGest.getSetup("FOODPROCESS", "SETUP", "API_KEY");
if (UtilityString.isNullOrEmpty(apiKey)) {
throw new Exception("Api key per il servizio di FoodProcess non configurato.\nImpostarlo in FOODPROCESS->SETUP->API_KEY.");
}
ResteasyClient client = new ResteasyClientBuilder().build();
client.register(new JacksonProvider());
client.register(new ErrorMessageResponseFilter());
client.register(new AddApiKeyHeaderRequestFilter(apiKey));
ResteasyWebTarget target = client.target(endpoint);
return target.proxy(FoodProcessClient.class);
}
public ImportArticlesResponse importArticles(ImportArticlesRequest importArticlesRequest) throws Exception {
if (UtilityList.isNullOrEmpty(importArticlesRequest.getArticles())) {
return null;
}
String codAnagTopControl = setupGest.getSetup("FOODPROCESS", "SETUP", "TOPCONTROL_CODANAG");
if (UtilityString.isNullOrEmpty(codAnagTopControl)) {
throw new Exception("Cod. anag. di Top Control non configurato.\nImpostarlo in FOODPROCESS->SETUP->TOPCONTROL_CODANAG.");
}
FoodProcessClient client = makeInstance();
List<Article> foodProcessArticles = client.getArticles();
List<MtbAart> entityList = new ArrayList<>();
for (Article article : importArticlesRequest.getArticles()) {
if (UtilityString.isNullOrEmpty(article.getId()) || !ID_REGEX.matcher(article.getId()).matches()) {
String sql;
MtbAartAnag mtbAartAnag = null;
// Cerco negli articoli loro
Optional<Article> optionalFoodProcessArticle = foodProcessArticles.stream()
.filter(x -> !x.getIsArchived())
.filter(x -> x.getCode().equalsIgnoreCase(article.getCode()))
.findFirst();
if (optionalFoodProcessArticle.isPresent()) {
Article foodProcessArticle = optionalFoodProcessArticle.get();
mtbAartAnag = new MtbAartAnag()
.setCodAnag(codAnagTopControl)
.setCodMartAnag(foodProcessArticle.getId())
.setCodMart(article.getId());
mtbAartAnag.setOperation(OperationType.INSERT_OR_UPDATE);
}
// Cerco id in nostra anagrafica
if (mtbAartAnag == null && !UtilityString.isNullOrEmpty(article.getId())) {
sql = Query.format(
"SELECT id, cod_mart_anag\n" +
"FROM mtb_aart_anag\n" +
"WHERE cod_anag = %s\n" +
" AND cod_mart = %s",
codAnagTopControl,
article.getId()
);
mtbAartAnag = UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(), sql, MtbAartAnag.class);
}
// Articolo nuovo, creo un nuovo id
if (mtbAartAnag == null) {
sql = Query.format(
"SELECT CAST(ISNULL(MAX(CAST(cod_mart_anag AS INT)), 0) + 1 AS VARCHAR) AS cod_mart_anag\n" +
"FROM mtb_aart_anag\n" +
"WHERE cod_anag = %s",
codAnagTopControl
);
String codMartAnag = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
mtbAartAnag = new MtbAartAnag()
.setCodAnag(codAnagTopControl)
.setCodMartAnag(codMartAnag);
mtbAartAnag.setOperation(OperationType.INSERT_OR_UPDATE);
}
if (!UtilityString.isNullOrEmpty(mtbAartAnag)) {
if (!mtbAartAnag.getOperation().equals(OperationType.SELECT_OBJECT)) {
MtbAart mtbAart = entityList.stream()
.filter(x -> x.getCodMart().equalsIgnoreCase(article.getId()))
.findFirst()
.orElseGet(() -> {
MtbAart newMtbAart = new MtbAart()
.setCodMart(article.getId())
.setMtbAartAnag(new ArrayList<>());
newMtbAart.setOperation(OperationType.NO_OP);
entityList.add(newMtbAart);
return newMtbAart;
});
mtbAart.getMtbAartAnag().add(mtbAartAnag);
}
article.setId(mtbAartAnag.getCodMartAnag());
}
}
}
if (!UtilityList.isNullOrEmpty(entityList)) {
entityProcessor.processEntityList(entityList, false);
UtilityEntity.throwEntitiesException(entityList);
}
return client.importArticles(importArticlesRequest);
}
}

View File

@@ -208,7 +208,7 @@ public class DefaultHttpClient implements HttpClient {
private List<NameValuePair> getParametersAsList(Map<String, String> params) {
List<NameValuePair> postParameters = new ArrayList<>();
if (params != null && !params.isEmpty()) {
if (params != null && params.size() > 0) {
for (String key : params.keySet()) {
postParameters.add(new BasicNameValuePair(key, params.get(key)));
}

View File

@@ -5,7 +5,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import it.integry.WooCommerce.dto.order.WooCommerceOrderDTO;
import it.integry.WooCommerce.service.WooCommerceService;
import it.integry.common.var.CommonConstants;
import it.integry.ems.json.ResponseJSONObjectMapper;
import it.integry.ems.json.JSONObjectMapper;
import it.integry.ems.response.ServiceRestResponse;
import it.integry.ems_model.config.EmsRestConstants;
import org.apache.logging.log4j.LogManager;
@@ -26,7 +26,7 @@ public class WooCommerceController {
@Autowired
private WooCommerceService wooService;
@Autowired
private ResponseJSONObjectMapper jsonObjectMapper;
private JSONObjectMapper jsonObjectMapper;
@RequestMapping(value = EmsRestConstants.PATH_WOO_NEW_ORDER, method = RequestMethod.POST)

View File

@@ -1,7 +1,7 @@
package it.integry.WooCommerce.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import it.integry.ems_model.annotation.SqlField;
import org.codehaus.jackson.annotate.JsonProperty;
public class AttributeDTO {
@SqlField("attributo")

View File

@@ -1,8 +1,8 @@
package it.integry.WooCommerce.dto.order;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import it.integry.WooCommerce.enums.OrderStatus;
import org.codehaus.jackson.JsonNode;
import java.util.Arrays;
import java.util.List;

View File

@@ -12,7 +12,6 @@ import it.integry.WooCommerce.dto.order.WooCommerceBillingDTO;
import it.integry.WooCommerce.dto.order.WooCommerceShippingDTO;
import it.integry.WooCommerce.dto.product.WooCommerceImageDTO;
import it.integry.WooCommerce.dto.product.WooCommerceProductAttributeDTO;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems_model.db.ResultSetMapper;
import it.integry.ems_model.service.SetupGest;
@@ -29,6 +28,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
@@ -305,7 +305,7 @@ public class WooCommerceArticoliDataManager {
List<CategoriaDTO> categorieList = UtilityDB.executeSimpleQueryDTO(conn, sql, CategoriaDTO.class);
if (categorieList != null && !categorieList.isEmpty()) {
if (categorieList != null && categorieList.size() > 0) {
return categorieList;
} else {
return null;
@@ -320,7 +320,7 @@ public class WooCommerceArticoliDataManager {
List<CategoriaDTO> categorieList = UtilityDB.executeSimpleQueryDTO(conn, sql, CategoriaDTO.class);
if (categorieList != null && !categorieList.isEmpty()) {
if (categorieList != null && categorieList.size() > 0) {
return categorieList;
} else {
return null;
@@ -333,7 +333,7 @@ public class WooCommerceArticoliDataManager {
List<ArticoloListino> list = getArticoliListino(codMarts);
if (list != null && !list.isEmpty()) return list.get(0);
if (list != null && list.size() > 0) return list.get(0);
return null;
}
@@ -358,7 +358,7 @@ public class WooCommerceArticoliDataManager {
" left join gtb_aliq on mtb_aart.cod_aliq = gtb_aliq.cod_aliq" +
" where cod_mdep = dbo.getGestSetup('WOOCOMMERCE','SETUP','COD_MDEP')";
if (codMarts != null && !codMarts.isEmpty()) {
if (codMarts != null && codMarts.size() > 0) {
sql += " AND lisv.cod_mart IN (" + UtilityQuery.concatStringFieldsWithSeparator(codMarts, ",") + ")";
}
@@ -451,11 +451,11 @@ public class WooCommerceArticoliDataManager {
}
public boolean getBooleanSetup(String keySection) throws Exception {
return setupGest.getSetupBoolean(multiDBTransactionManager.getPrimaryConnection(), "WOOCOMMERCE", "SETUP", keySection);
return setupGest.getSetupBoolean("WOOCOMMERCE", "SETUP", keySection);
}
public int getSetupInteger(String keySection) throws Exception {
return setupGest.getSetupInteger(multiDBTransactionManager.getPrimaryConnection(), "WOOCOMMERCE", "SETUP", keySection);
return setupGest.getSetupInteger("WOOCOMMERCE", "SETUP", keySection);
}
public List<WooCommerceImageDTO> getImagesArticolo(String codMart) throws Exception {

View File

@@ -33,7 +33,7 @@ public class WooCommerceDataFactory {
List<WooCommerceProductCategoryDTO> result = new ArrayList<>();
for (CategoryDTO toConvert : toConvertList) {
WooCommerceProductCategoryDTO convCat = new WooCommerceProductCategoryDTO();
if (remoteCategories != null && !remoteCategories.isEmpty()) {
if (remoteCategories != null && remoteCategories.size() > 0) {
convCat = remoteCategories.stream().filter(
rmt -> rmt.getName().equalsIgnoreCase(toConvert.getCodice() != null ? toConvert.getCodice() : toConvert.getDescrizione())
).findFirst().orElse(new WooCommerceProductCategoryDTO());

View File

@@ -206,7 +206,7 @@ public class WooCommerceRestService {
categorie = instance.getAll(EndpointBaseType.PRODUCTS_CATEGORIES.getValue(), params, new TypeReference<List<WooCommerceProductCategoryDTO>>() {
});
totRemoteCategories.addAll(categorie);
} while (!categorie.isEmpty() && categorie.size() == per_page);
} while (categorie.size() > 0 && categorie.size() == per_page);
return totRemoteCategories;
}
@@ -301,7 +301,7 @@ public class WooCommerceRestService {
}
}
if (!exceptionList.isEmpty()) throw new Exception(exceptionList.get(0).getError());
if (exceptionList.size() > 0) throw new Exception(exceptionList.get(0).getError());
List<UpdateArticoloDTO> syncedArts = new ArrayList<>(artsToCreate);
syncedArts.addAll(artsToUpdate);

View File

@@ -86,7 +86,7 @@ public class WooCommerceService {
///trasmetto articoli
List<ArticoloException> errors = syncProdotti(restInstance, attributes, categories);
if (!errors.isEmpty()) {
if (errors.size() > 0) {
StringBuilder builder = new StringBuilder("Uno o più errori sono avvenuti durante l'esecuzione dello script: \n\r");
Stream.of(errors).forEach(err -> {
@@ -108,7 +108,7 @@ public class WooCommerceService {
List<WooCommerceProductAttributeDTO> finalAttributes = new ArrayList<>();
List<AttributeDTO> localAttributes = dataManager.getAttributes();
List<WooCommerceProductAttributeDTO> attributes = restService.getAttributes(restInstance);
if (!localAttributes.isEmpty()) {
if (localAttributes.size() > 0) {
List<AttributeDTO> localAttrTypes = localAttributes.stream().filter(UtilityStream.distinctByKey(AttributeDTO::getAttributo)).collect(Collectors.toList());
if (syncAttributi) {
for (AttributeDTO type : localAttrTypes) {
@@ -160,7 +160,7 @@ public class WooCommerceService {
term -> term.getName().equalsIgnoreCase(attribute.getCodice())
)
).collect(Collectors.toList());
if (!toCreateAttrs.isEmpty()) {
if (toCreateAttrs.size() > 0) {
AttributeTermsBatchUpdateRequest request = dataFactory.createTermsBatchRequest(toCreateAttrs, null, null);
AttributeTermsBatchUpdateRequest response = restService.batchUpdateAttribute(restInstance, attr, request);
@@ -176,12 +176,12 @@ public class WooCommerceService {
if (syncCategorie) {
List<CategoryDTO> localCategories = dataManager.getCategories();
if (!localCategories.isEmpty()) {
if (localCategories.size() > 0) {
List<WooCommerceProductCategoryDTO> remoteCategories = restService.getCategories(restInstance);
List<WooCommerceProductCategoryDTO> convertList = dataFactory.convertLocalToRemoteCategory(localCategories, remoteCategories);
List<WooCommerceProductCategoryDTO> toCreate = convertList.stream().filter(conv -> conv.getId() == null).collect(Collectors.toList());
CategoryBatchUpdateRequest request = new CategoryBatchUpdateRequest();
if (!toCreate.isEmpty()) {
if (toCreate.size() > 0) {
request.setCreate(toCreate);
remoteCategories.addAll(restService.batchUpdateCategories(restInstance, request).getCreate());
convertList = dataFactory.convertLocalToRemoteCategory(localCategories, remoteCategories);
@@ -290,7 +290,7 @@ public class WooCommerceService {
.setSku(art.getSku());
batch.add(updateDTO);
if (art.getVariations() != null && !art.getVariations().isEmpty()) {
if (art.getVariations() != null && art.getVariations().size() > 0) {
List<WooCommerceProductVariationDTO> variations = restService.getVariazioniArticolo(restInstance, art.getId());
List<UpdateArticoloDTO> variazioni = Stream.of(variations)
.map(x -> new UpdateArticoloDTO()
@@ -347,7 +347,7 @@ public class WooCommerceService {
}
//creo varianti
if (textilesArt.getVariazioni() != null && !textilesArt.getVariazioni().isEmpty()) {
if (textilesArt.getVariazioni() != null && textilesArt.getVariazioni().size() > 0) {
List<UpdateArticoloDTO> varianti = new ArrayList<>();
List<WooCommerceProductVariationDTO> variations = new ArrayList<>();
@@ -648,7 +648,7 @@ public class WooCommerceService {
error.setError(e.getMessage());
errorArts.add(error);
}
} else if (!dto.getVariations().isEmpty()) {
} else if (dto.getVariations().size() > 0) {
BatchUpdateRequest updateVariazioni = new BatchUpdateRequest();
dto.getVariations().forEach(variation -> {
@@ -768,8 +768,7 @@ public class WooCommerceService {
private void sendErrorMail(String errorMsg, String service, byte[] content, String filename, List<AnomalieDTO> anomalie) {
try {
mailService.sendErrorMailByGestNameSection(multiDBTransactionManager.getPrimaryConnection(), service, "WOOCOMMERCE", "Errore WooCommerce",
null, content, filename, anomalie);
mailService.sendErrorMail(multiDBTransactionManager, service, "WOOCOMMERCE", null, content, filename, anomalie);
} catch (Exception exception) {
logger.error(service, exception);
}

View File

@@ -1,14 +0,0 @@
package it.integry.annotations;
import it.integry.ems.migration._base.IntegryCustomer;
import org.springframework.stereotype.Indexed;
import java.lang.annotation.*;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Indexed
public @interface CustomerComponent {
IntegryCustomer value();
}

View File

@@ -1,17 +0,0 @@
package it.integry.annotations;
import it.integry.ems.migration._base.IntegryCustomer;
import org.springframework.core.annotation.AliasFor;
import java.lang.annotation.*;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@CustomerComponent(IntegryCustomer.Integry) // Valore di default, verrà sovrascritto
public @interface CustomerService {
@AliasFor(
annotation = CustomerComponent.class
)
IntegryCustomer value();
}

View File

@@ -1,13 +1,12 @@
package it.integry.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Retention(RUNTIME)
@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.ANNOTATION_TYPE})
@Target(FIELD)
public @interface PostContextAutowired {
}

View File

@@ -11,7 +11,6 @@ public class CommonConstants {
public static final String INTEGRY = "integry";
public static final String PROFILE_DB = "profileDb";
public static final String COD_MDEP = "codMdep";
public static final String WHERE_COND = "whereCond";
public static final String EMPTY_STRING = "";
@@ -21,7 +20,6 @@ public class CommonConstants {
public static final String TIMESTAMP = "timestamp";
public static final String DATE_FORMAT_YMD_SLASHED = "yyyy/MM/dd";
public static final String DATE_FORMAT_YMD = "yyyy-MM-dd";
public static final String DATE_FORMAT_DMY = "dd/MM/yyyy";
public static final String DATE_FORMAT_DMY_DASHED = "dd-MM-yyyy";
@@ -29,10 +27,9 @@ public class CommonConstants {
public static final String TIME_FORMAT = "HH:mm:ss";
public static final String DATETIME_FORMAT_YMD = String.format("%s %s", DATE_FORMAT_YMD_SLASHED, TIME_FORMAT);
public static final String DATETIME_FORMAT_YMD = String.format("%s %s", DATE_FORMAT_YMD, TIME_FORMAT);
public static final String DATETIME_FORMAT_DMY = String.format("%s %s", DATE_FORMAT_DMY_DASHED, TIME_FORMAT);
public static final String DATETIME_FORMAT_DMY_SLASHED = String.format("%s %s", DATE_FORMAT_DMY, TIME_FORMAT);
public static final String DATETIME_FORMAT_DMY_DASHED = String.format("%s %s", DATE_FORMAT_DMY_DASHED, TIME_FORMAT);
public static final DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.TIME_FORMAT)
@@ -41,17 +38,10 @@ public class CommonConstants {
public static final DateTimeFormatter TIMESTAMP_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMddHHmmss")
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATESTAMP_YMD_FORMATTER = DateTimeFormatter.ofPattern("yyMMdd")
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATESTAMP_DMY_FORMATTER = DateTimeFormatter.ofPattern("ddMMyy")
public static final DateTimeFormatter DATESTAMP_FORMATTER = DateTimeFormatter.ofPattern("yyMMdd")
.withZone(ZoneId.systemDefault());
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)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATETIME_YMD_DASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATETIME_FORMAT_YMD)
@@ -59,12 +49,9 @@ public class CommonConstants {
public static final DateTimeFormatter DATE_DMY_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATE_FORMAT_DMY)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATE_DMY_DASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATE_FORMAT_DMY_DASHED)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATETIME_DMY_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATETIME_FORMAT_DMY_SLASHED)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATETIME_DMY_DASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATETIME_FORMAT_DMY_DASHED)
.withZone(ZoneId.systemDefault());
public static final String ULTC = "ULTC";
public static final String DIST = "DIST";

View File

@@ -1,52 +1,33 @@
package it.integry.common.var;
import it.integry.ems._context.ApplicationContextProvider;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems_model.entity.Azienda;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.concurrent.locks.ReentrantLock;
@Service
public class EmsDBConst {
private final ReentrantLock datiAziendaLock = new ReentrantLock();
private HashMap<String, Const> datiAziendaBindingTable = new HashMap<String, Const>() {{
}};
public Const getConstsByProfile(String profileDb) {
profileDb = profileDb.toUpperCase();
public Const getConsts(String profileDb) {
String aziendaUp = profileDb.toUpperCase();
final SettingsModel settingsModel = ApplicationContextProvider.getApplicationContext().getBean(SettingsModel.class);
final String dbName = settingsModel.getDbNameFromProfileDb(profileDb);
return getConsts(dbName);
}
public Const getConsts(String dbName) {
String aziendaUp = dbName.toUpperCase();
datiAziendaLock.lock();
try {
if (!datiAziendaBindingTable.containsKey(aziendaUp)) {
datiAziendaBindingTable.put(aziendaUp, new Const());
}
return datiAziendaBindingTable.get(aziendaUp);
} finally {
datiAziendaLock.unlock();
if (!datiAziendaBindingTable.containsKey(aziendaUp)) {
datiAziendaBindingTable.put(aziendaUp, new Const());
}
return datiAziendaBindingTable.get(aziendaUp);
}
public void destroyAll() {
datiAziendaLock.lock();
datiAziendaBindingTable = new HashMap<>();
datiAziendaLock.unlock();
datiAziendaBindingTable = new HashMap<String, Const>();
}
public static class Const {
public class Const {
private String applicationDbName;
private String nomeAzienda;

View File

@@ -2,11 +2,8 @@ package it.integry.ems.Import.base;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import it.integry.ems.Import.dto.AnomalieDTO;
import it.integry.ems.Import.dto.ImportRequestDTO;
import it.integry.ems.javabeans.RequestDataDTO;
import it.integry.ems.json.JsonObjectMapperConfig;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.service.SetupGest;
@@ -25,20 +22,10 @@ public abstract class BaseEntityImporter<T> implements IEntityImporter<T> {
protected String format;
protected boolean headless;
protected ImportRequestDTO requestDto;
protected RequestDataDTO requestDataDTO;
protected MultiDBTransactionManager multiDBTransactionManager;
protected List<AnomalieDTO> anomalie = new ArrayList<AnomalieDTO>();
private final ObjectMapper objectMapper;
protected BaseEntityImporter() {
objectMapper = new ObjectMapper();
SimpleModule simpleModule = new SimpleModule();
JsonObjectMapperConfig.addDefaultAdapters(simpleModule);
objectMapper.registerModule(simpleModule);
}
private final ObjectMapper objectMapper = new ObjectMapper();
public IEntityImporter<T> setSetupGest(SetupGest setupGest) {
this.setupGest = setupGest;
@@ -79,12 +66,6 @@ public abstract class BaseEntityImporter<T> implements IEntityImporter<T> {
return this;
}
@Override
public IEntityImporter<T> setRequestDataDTO(RequestDataDTO requestDataDTO) {
this.requestDataDTO = requestDataDTO;
return this;
}
public List<AnomalieDTO> getAnomalie() {
return anomalie;
}
@@ -108,6 +89,4 @@ public abstract class BaseEntityImporter<T> implements IEntityImporter<T> {
}
}

Some files were not shown because too many files have changed in this diff Show More