Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
9
.idea/fileTemplates/Entity.java
generated
9
.idea/fileTemplates/Entity.java
generated
@@ -3,6 +3,7 @@
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import it.integry.ems_model.annotation.*;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
#parse("File Header.java")
|
||||
@@ -11,9 +12,13 @@ import org.kie.api.definition.type.PropertyReactive;
|
||||
@Table(${NAME}.ENTITY)
|
||||
@JsonTypeName(${NAME}.ENTITY)
|
||||
public class ${NAME} extends EntityBase {
|
||||
|
||||
public static final String ENTITY = "${TABLE}";
|
||||
|
||||
private static final long serialVerionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ${NAME}(Logger logger) {
|
||||
super(logger);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
7
.idea/fileTemplates/EntityChild.java
generated
7
.idea/fileTemplates/EntityChild.java
generated
@@ -3,6 +3,7 @@
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import it.integry.ems_model.annotation.*;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
#parse("File Header.java")
|
||||
@@ -12,5 +13,9 @@ import org.kie.api.definition.type.PropertyReactive;
|
||||
public class ${NAME} extends EntityBase {
|
||||
public static final String ENTITY = "${TABLE}";
|
||||
|
||||
#[[$END$]]#
|
||||
public ${NAME}(Logger logger) {
|
||||
super(logger);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
6
.idea/fileTemplates/IntegryMigrationClass.java
generated
6
.idea/fileTemplates/IntegryMigrationClass.java
generated
@@ -1,5 +1,5 @@
|
||||
#if(${PACKAGE_NAME}&&${PACKAGE_NAME}!="")package ${PACKAGE_NAME};#end
|
||||
#parse("File Header.java")
|
||||
#parse("File Header.java")
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
@@ -12,8 +12,6 @@ public class ${NAME} extends BaseMigration implements MigrationModelInterface{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down()throws Exception{
|
||||
|
||||
public void down()throws Exception {
|
||||
}
|
||||
|
||||
}
|
||||
5
.idea/jarRepositories.xml
generated
5
.idea/jarRepositories.xml
generated
@@ -6,6 +6,11 @@
|
||||
<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/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
<mapClasses>asClasses</mapClasses>
|
||||
<mapEnum>asEnum</mapEnum>
|
||||
<optionalProperties>useLibraryDefinition</optionalProperties>
|
||||
<sortDeclarations>true</sortDeclarations>
|
||||
<sortTypeDeclarations>true</sortTypeDeclarations>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -55,11 +55,12 @@ public class MenuConfigurationService {
|
||||
|
||||
for (AdvancedDataSource advancedDataSource : multiDBTransactionManager.getActiveConnections()) {
|
||||
|
||||
if (advancedDataSource.getDataSource().getDbName().equalsIgnoreCase("studioml") || isHistoryDB(advancedDataSource))
|
||||
if (advancedDataSource.getDataSource().getDbName().equalsIgnoreCase("menu") || isHistoryDB(advancedDataSource))
|
||||
continue;
|
||||
|
||||
try {
|
||||
//LocalDateTime startTime = UtilityLocalDate.getNowTime();
|
||||
if (advancedDataSource.getDataSource().getDbName().equalsIgnoreCase("menu")) return;
|
||||
internalRefresh(advancedDataSource.getConnection(), menuConfig);
|
||||
//logger.debug("Menu refresh time: " + ChronoUnit.SECONDS.between(startTime, UtilityLocalDate.getNowTime()));
|
||||
} catch (Exception ex) {
|
||||
@@ -98,6 +99,7 @@ public class MenuConfigurationService {
|
||||
|
||||
private void internalRefresh(Connection connection, MenuConfigDTO menuConfig, boolean forceRefresh) throws Exception {
|
||||
final Azienda azienda = Azienda.getDefaultAzienda(connection);
|
||||
|
||||
int lastMenuUpd = Integer.parseInt(azienda.getLastUpgDbMenu().replace("QM", ""));
|
||||
|
||||
if (!forceRefresh && lastMenuUpd > 0)
|
||||
@@ -202,7 +204,7 @@ public class MenuConfigurationService {
|
||||
}
|
||||
|
||||
public void generate() throws Exception {
|
||||
try (MultiDBTransactionManager studioMlMultiDb = new MultiDBTransactionManager("INTEGRY")) {
|
||||
try (MultiDBTransactionManager studioMlMultiDb = new MultiDBTransactionManager("MENU")) {
|
||||
MenuStaticCreator.createMenu(studioMlMultiDb.getPrimaryConnection(), UtilityDirs.getDevelopmentMenusFolder());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class BaseMigration implements MigrationModelInterface {
|
||||
return historyProfileDB.equalsIgnoreCase(advancedDataSource.getProfileName());
|
||||
}
|
||||
|
||||
protected boolean isDebug() throws Exception {
|
||||
protected boolean isDebug() {
|
||||
return UtilityDebug.isDebugExecution();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ public class Migration_20241014121636 extends BaseMigration implements Migration
|
||||
return;
|
||||
|
||||
if (!isTextiles()) return;
|
||||
|
||||
createOrUpdateView("tvvw_ordv_linee", "CREATE view [dbo].[tvvw_ordv_linee] as \n" +
|
||||
"select dtb_ordt.gestione, \n" +
|
||||
"dtb_ordt.data_ord,\n" +
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241115114016 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
String value = null;
|
||||
if (isCustomerDb(IntegryCustomerDB.RossoGargano_RossoGargano))
|
||||
value = "T";
|
||||
|
||||
createSetup("PVM", "SETUP", "COD_MGRP_RICAMBI", value, "Codice gruppo articoli di ricambio", "COD_MGRP");
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.RossoGargano_RossoGargano)) {
|
||||
createOrUpdateFunction("f_suggestCodeCodMartRicambi", "\n" +
|
||||
"CREATE FUNCTION [dbo].[f_suggestCodeCodMartRicambi](@codMgrp VARCHAR(5), @codMsgr VARCHAR(5), @codMsfa VARCHAR(5))\n" +
|
||||
" RETURNS VARCHAR(20)\n" +
|
||||
" WITH INLINE = OFF\n" +
|
||||
" AS\n" +
|
||||
" BEGIN\n" +
|
||||
"\n" +
|
||||
" DECLARE @codMart VARCHAR(20);\n" +
|
||||
" DECLARE @maxCodMart INTEGER;\n" +
|
||||
"\n" +
|
||||
" SET @codMgrp = ISNULL(@codMgrp, 'T');\n" +
|
||||
" SET @codMsgr = ISNULL(@codMsgr, CONCAT(@codMgrp, '0'));\n" +
|
||||
" SET @codMsfa = ISNULL(@codMsfa, CONCAT(@codMsgr, '00'));\n" +
|
||||
"\n" +
|
||||
" WITH ricambi AS (SELECT TOP 1 CAST(REPLACE(cod_mart, @codMsfa, '') AS INTEGER) + 1 AS maxCodMart\n" +
|
||||
" FROM mtb_aart\n" +
|
||||
" WHERE cod_mart LIKE CONCAT(@codMsfa, '%')\n" +
|
||||
" AND cod_mart NOT LIKE CONCAT(@codMsfa, '%[^0-9]%')\n" +
|
||||
" ORDER BY 1 DESC)\n" +
|
||||
" SELECT @maxCodMart = ISNULL(maxCodMart, 1)\n" +
|
||||
" FROM ricambi\n" +
|
||||
"\n" +
|
||||
" SET @codMart = CONCAT(@codMsfa, FORMAT(ISNULL(@maxCodMart, 1), REPLICATE('0', 4)))\n" +
|
||||
"\n" +
|
||||
" RETURN @codMart\n" +
|
||||
"\n" +
|
||||
" END");
|
||||
} else {
|
||||
createOrUpdateFunction("f_suggestCodeCodMartRicambi", "CREATE FUNCTION [dbo].[f_suggestCodeCodMartRicambi](@codMgrp VARCHAR(5), @codMsgr VARCHAR(5), @codMsfa VARCHAR(5))\n" +
|
||||
" RETURNS VARCHAR(20)\n" +
|
||||
"AS\n" +
|
||||
"BEGIN\n" +
|
||||
" DECLARE @partialCode VARCHAR(15);\n" +
|
||||
" SET @partialCode = CONCAT(@codMgrp, @codMsgr, @codMgrp);\n" +
|
||||
" RETURN dbo.f_suggestCodeCodMart(@partialCode);\n" +
|
||||
"END\n");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241115122521 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetupQuery(null, null, "select section from dbo.getImportProperties('colli', null) where attivo = 'S'");
|
||||
createSetup("pvm", "DOC_INTERNI", "IMPORT_TRASFERIMENTI", null,
|
||||
"inserire il formato del trasferimento", false, null, false, true,
|
||||
false, false, false, null, false, "select section from dbo.getImportProperties('colli', null) where attivo = 'S'");
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Carelli_Format)) {
|
||||
executeStatement(
|
||||
"INSERT INTO stb_gest_setup_depo\n" +
|
||||
"select depo.cod_mdep, gest_name, section, key_section, 'SLIM2K', flag_sync\n" +
|
||||
"from (\n" +
|
||||
"select gest_name, section, key_section, flag_sync\n" +
|
||||
"from stb_gest_setup \n" +
|
||||
"where gest_name = 'PVM' AND section = 'DOC_INTERNI' AND key_section = 'IMPORT_TRASFERIMENTI' ) setup\n" +
|
||||
"cross apply (select *\n" +
|
||||
"from mtb_depo where cod_mdep in ('07','01')) depo\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241115123316 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup("IMPORT_COLLI", "SLIM2K", "COD_DTIP_TRASF", null,
|
||||
null, false, null, false, true,
|
||||
false, false, false, null, false, null);
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Carelli_Format)) {
|
||||
executeStatement(
|
||||
"INSERT INTO stb_gest_setup_depo\n" +
|
||||
"select depo.cod_mdep, gest_name, section, key_section, 'DDTTR', flag_sync\n" +
|
||||
"from (\n" +
|
||||
"select gest_name, section, key_section, flag_sync\n" +
|
||||
"from stb_gest_setup \n" +
|
||||
"where gest_name = 'IMPORT_COLLI' AND section = 'SLIM2K' AND key_section = 'COD_DTIP_TRASF' ) setup\n" +
|
||||
"cross apply (select *\n" +
|
||||
"from mtb_depo where cod_mdep in ('07','01')) depo\n");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241118095742 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement(
|
||||
"ALTER TABLE jtb_rlavr ADD inserito_da varchar(40)",
|
||||
"ALTER TABLE jtb_rlavr ADD data_ins datetime",
|
||||
"ALTER TABLE jtb_rlavr ADD modificato_da varchar(40)",
|
||||
"ALTER TABLE jtb_rlavr ADD data_mod datetime"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241119102437 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement(
|
||||
"update mtb_lisa set qta_cnf = round(qta_cnf/rap_conv, 5)\n" +
|
||||
"where rap_conv <> 1\n" +
|
||||
"and qta_cnf is not null\n",
|
||||
"update mtb_lisa_data \n" +
|
||||
"set qta_cnf = round(mtb_lisa_data.qta_cnf/rap_conv, 5)\n" +
|
||||
"from mtb_lisa_data inner join mtb_lisa on mtb_lisa.cod_art_for = mtb_lisa_data.cod_art_for and mtb_lisa.cod_alis = mtb_lisa_data.cod_alis\n" +
|
||||
"where rap_conv <> 1\n" +
|
||||
"and mtb_lisa_data.qta_cnf is not null\n"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,311 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241119121523 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
createOrUpdateFunction("getListinoVendita_id", "CREATE FUNCTION [dbo].[getListinoVendita_id](@datavalidita DATETIME, @codvlis VARCHAR(5), @codmart VARCHAR(15))\n" +
|
||||
" RETURNS TABLE AS\n" +
|
||||
" RETURN \n" +
|
||||
"\n" +
|
||||
" --declare @datavalidita DATETIME, @codvlis VARCHAR(5), @codmart VARCHAR(15)\n" +
|
||||
"\n" +
|
||||
" with lisv AS (\n" +
|
||||
" SELECT vtb_list_data.cod_vlis,\n" +
|
||||
" vtb_list_data.versione,\n" +
|
||||
" vtb_list_data.id_listino as id_listino,\n" +
|
||||
" vtb_list_data.data_iniz,\n" +
|
||||
" vtb_list_data.cod_vlis AS cod_vlis_rif,\n" +
|
||||
" vtb_list_data.versione AS versione_rif\n" +
|
||||
" FROM vtb_list_data \n" +
|
||||
" WHERE vtb_list_data.data_fine IS NULL\n" +
|
||||
" AND vtb_list_data.cod_promo IS NULL \n" +
|
||||
" and vtb_list_data.cod_vlis_rif IS NULL\n" +
|
||||
" UNION\n" +
|
||||
" SELECT vtb_list_data.cod_vlis,\n" +
|
||||
" vtb_list_data.versione,\n" +
|
||||
" vtb_list_data_rif.id_listino,\n" +
|
||||
" vtb_list_data.data_iniz,\n" +
|
||||
" vtb_list_data.cod_vlis_rif AS cod_vlis_rif,\n" +
|
||||
" vtb_list_data.versione_rif AS versione_rif\n" +
|
||||
" FROM vtb_list_data \n" +
|
||||
" INNER JOIN vtb_list_data vtb_list_data_rif on vtb_list_data.cod_vlis_rif = vtb_list_data_rif.cod_vlis and vtb_list_data.versione_rif = vtb_list_data_rif.versione\n" +
|
||||
" WHERE vtb_list_data.data_fine IS NULL\n" +
|
||||
" AND vtb_list_data.cod_promo IS NULL \n" +
|
||||
" \n" +
|
||||
" \n" +
|
||||
" )\n" +
|
||||
"\n" +
|
||||
" , last_lisv AS ( \n" +
|
||||
" SELECT vtb_list.cod_vlis AS cod_vlis,\n" +
|
||||
" mtb_lisv_data.cod_mart,\n" +
|
||||
" MAX(vtb_list_data.id_listino) AS max_id_lisv,\n" +
|
||||
" IsNull(vtb_list_data.cod_vlis_rif, IsNull(vtb_list.cod_vlis_rif, vtb_list.cod_vlis)) AS 'cod_vlis_rif'\n" +
|
||||
" FROM vtb_list\n" +
|
||||
" INNER JOIN mtb_lisv_data ON vtb_list.cod_vlis = mtb_lisv_data.cod_vlis\n" +
|
||||
" LEFT OUTER JOIN lisv vtb_list_data ON mtb_lisv_data.cod_vlis = vtb_list_data.cod_vlis AND\n" +
|
||||
" mtb_lisv_data.versione = vtb_list_data.versione AND\n" +
|
||||
" vtb_list_data.data_iniz <= ISNULL(@datavalidita, GETDATE()) \n" +
|
||||
" GROUP BY vtb_list.cod_vlis,\n" +
|
||||
" mtb_lisv_data.cod_mart,\n" +
|
||||
" IsNull(vtb_list_data.cod_vlis_rif, IsNull(vtb_list.cod_vlis_rif, vtb_list.cod_vlis)) ),\n" +
|
||||
" art as (\n" +
|
||||
" select mtb_aart.cod_mart, mtb_aart.qta_cnf, mtb_aart.perc_sfrido, mtb_aart.colli_pedana, mtb_aart.colli_strato, mtb_aart.flag_incl_listino\n" +
|
||||
" from mtb_aart )\n" +
|
||||
" SELECT vtb_list.cod_vlis,\n" +
|
||||
" vtb_list.descrizione,\n" +
|
||||
" vtb_list_data.data_iniz AS data_iniz,\n" +
|
||||
" vtb_list_data.versione AS versione,\n" +
|
||||
" vtb_list.cod_divi,\n" +
|
||||
" vtb_list.cambio,\n" +
|
||||
" vtb_list.flag_arr_prz_iva,\n" +
|
||||
" vtb_list.arr_ric,\n" +
|
||||
" vtb_list.flag_list_iva_inclusa,\n" +
|
||||
" vtb_list.flag_lisv_margine,\n" +
|
||||
" vtb_list.flag_add_trasp,\n" +
|
||||
" tmp_list.cod_mart AS 'cod_mart',\n" +
|
||||
" mtb_lisv_data.unt_mis_ven AS unt_mis_ven,\n" +
|
||||
" ISNULL(mtb_lisv_data.rap_conv, 1) AS rap_conv,\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_base, 0) AS prz_base,\n" +
|
||||
" ISNULL(mtb_lisv_data.ricarica, 0) AS ricarico,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN mtb_lisv_data.prz_vend IS NOT NULL AND mtb_lisv_data.prz_vend <> 0 THEN\n" +
|
||||
" ROUND((ISNULL(mtb_lisv_data.prz_vend, 0) -\n" +
|
||||
" (ISNULL(mtb_lisv_data.prz_base, 0) / (1 - mtb_aart.perc_sfrido / 100))) /\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_vend, 0) * 100, 2)\n" +
|
||||
" ELSE 0 END AS margine_eff,\n" +
|
||||
" \n" +
|
||||
" CASE\n" +
|
||||
" WHEN mtb_lisv_data.prz_base IS NOT NULL AND mtb_lisv_data.prz_base <> 0 THEN\n" +
|
||||
" ROUND((ISNULL(mtb_lisv_data.prz_vend, 0) -\n" +
|
||||
" (ISNULL(mtb_lisv_data.prz_base, 0) / (1 - mtb_aart.perc_sfrido / 100))) /\n" +
|
||||
" (ISNULL(mtb_lisv_data.prz_base, 0) / (1 - mtb_aart.perc_sfrido / 100)) * 100, 2)\n" +
|
||||
" ELSE 0 END AS ricarico_eff,\n" +
|
||||
" \n" +
|
||||
" ISNULL(mtb_lisv_data.magg_prz_vend, 0) AS magg_prz_vend,\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_vend, 0) AS prz_vend,\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_vend_iva, 0) AS prz_vend_iva,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_sco1, 0) AS perc_sco1,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_sco2, 0) AS perc_sco2,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_sco3, 0) AS perc_sco3,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_sco4, 0) AS perc_sco4,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_prov, 0) AS perc_prov,\n" +
|
||||
" ISNULL(mtb_lisv_data.fisso_prov, 0) AS fisso_prov,\n" +
|
||||
" ISNULL(mtb_lisv_data.posizione, '') AS posizione,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_gest, 0) AS perc_gest,\n" +
|
||||
" ISNULL(mtb_lisv_data.val_gest, 0) AS val_gest,\n" +
|
||||
" mtb_lisv_data.data_agg_prz AS data_agg_prz,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_ispe, 0) AS perc_ispe,\n" +
|
||||
" ISNULL(mtb_lisv_data.val_ispe, 0) AS val_ispe,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_promo, 0) AS perc_promo,\n" +
|
||||
" ISNULL(mtb_lisv_data.val_promo, 0) AS val_promo,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_oneri, 0) AS perc_oneri,\n" +
|
||||
" ISNULL(mtb_lisv_data.val_oneri, 0) AS val_oneri,\n" +
|
||||
" mtb_lisv_data.tipo_variazione AS tipo_variazione,\n" +
|
||||
" mtb_lisv_data.note AS note,\n" +
|
||||
" mtb_lisv_data.aggiornato_da AS aggiornato_da,\n" +
|
||||
" mtb_lisv_data.prz_vend * (1 - mtb_lisv_data.perc_sco1 / 100) * (1 - mtb_lisv_data.perc_sco2 / 100) *\n" +
|
||||
" (1 - mtb_lisv_data.perc_sco3 / 100) *\n" +
|
||||
" (1 - mtb_lisv_data.perc_sco4 / 100) AS prz_vend_netto,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN ISNULL(mtb_lisv_data.colli_pedana, 0) <> 0 THEN mtb_lisv_data.colli_pedana\n" +
|
||||
" ELSE mtb_aart.colli_pedana END AS colli_pedana,\n" +
|
||||
" mtb_lisv_data.cod_tcol_ul AS cod_tcol_ul,\n" +
|
||||
" mtb_lisv_data.cod_tcol_ui AS cod_tcol_ui,\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_vend_sug, 0) AS prz_vend_sug,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN ISNULL(mtb_lisv_data.qta_cnf, 0) <> 0\n" +
|
||||
" AND dbo.getGestSetup('VTB_LIST', 'SETUP', 'QTA_CNF_LISTINO') = 'S' \n" +
|
||||
" THEN mtb_lisv_data.qta_cnf\n" +
|
||||
" ELSE mtb_aart.qta_cnf/mtb_lisv_data.rap_conv END AS qta_cnf,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN ISNULL(mtb_lisv_data.colli_strato, 0) <> 0 THEN mtb_lisv_data.colli_strato\n" +
|
||||
" ELSE mtb_aart.colli_strato END AS colli_strato,\n" +
|
||||
" mtb_lisv_data.descrizione_html AS descrizione_html,\n" +
|
||||
" mtb_lisv_data.colli_pedana AS colli_pedana_lisv,\n" +
|
||||
" mtb_lisv_data.qta_cnf AS qta_cnf_lisv,\n" +
|
||||
" mtb_lisv_data.colli_strato AS colli_strato_lisv,\n" +
|
||||
" mtb_lisv_data.sconto_cartoni,\n" +
|
||||
" mtb_lisv_data.sconto_strato,\n" +
|
||||
" mtb_lisv_data.sconto_pedane,\n" +
|
||||
" vtb_list.flag_attivo,\n" +
|
||||
" vtb_list_data.note AS note_testata,\n" +
|
||||
" ISNULL(mtb_lisv_data.flag_prz_bloccato, 'N') AS flag_prz_bloccato,\n" +
|
||||
" vtb_list_data.porto AS porto,\n" +
|
||||
" mtb_lisv_data.system_note,\n" +
|
||||
" mtb_lisv.add_val_spese,\n" +
|
||||
" mtb_lisv.add_ric_spese,\n" +
|
||||
" mtb_lisv.add_sco_spese,\n" +
|
||||
" mtb_aart.flag_incl_listino\n" +
|
||||
" FROM last_lisv tmp_list\n" +
|
||||
" INNER JOIN vtb_list ON vtb_list.cod_vlis = tmp_list.cod_vlis\n" +
|
||||
" INNER JOIN mtb_lisv\n" +
|
||||
" ON tmp_list.cod_vlis_rif = mtb_lisv.cod_vlis AND tmp_list.cod_mart = mtb_lisv.cod_mart\n" +
|
||||
" INNER JOIN art mtb_aart ON tmp_list.cod_mart = mtb_aart.cod_mart\n" +
|
||||
" LEFT OUTER JOIN vtb_list_data ON tmp_list.cod_vlis_rif = vtb_list_data.cod_vlis AND\n" +
|
||||
" tmp_list.max_id_lisv = vtb_list_data.id_listino\n" +
|
||||
" LEFT OUTER JOIN mtb_lisv_data ON vtb_list_data.cod_vlis = mtb_lisv_data.cod_vlis AND\n" +
|
||||
" tmp_list.cod_mart = mtb_lisv_data.cod_mart AND\n" +
|
||||
" vtb_list_data.versione = mtb_lisv_data.versione\n" +
|
||||
"\n" +
|
||||
" WHERE (@codmart IS NULL OR tmp_list.cod_mart = @codmart)\n" +
|
||||
" AND (@codvlis IS NULL OR tmp_list.cod_vlis = @codvlis)");
|
||||
createOrUpdateFunction("getListinoVendita", "CREATE FUNCTION [dbo].[getListinoVendita](@datavalidita DATETIME, @codvlis VARCHAR(5), @codmart VARCHAR(15))\n" +
|
||||
" RETURNS TABLE AS\n" +
|
||||
" RETURN\n" +
|
||||
" SELECT vtb_list.cod_vlis,\n" +
|
||||
" vtb_list.descrizione,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN tmp_list.max_lisv IS NULL THEN NULL\n" +
|
||||
" ELSE CONVERT(DATETIME, LEFT(tmp_list.max_lisv, 10)) END AS data_iniz,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN tmp_list.max_lisv IS NULL THEN NULL\n" +
|
||||
" ELSE CONVERT(INT, RIGHT(tmp_list.max_lisv, 4)) END AS versione,\n" +
|
||||
" vtb_list.cod_divi,\n" +
|
||||
" vtb_list.cambio,\n" +
|
||||
" vtb_list.flag_arr_prz_iva,\n" +
|
||||
" vtb_list.arr_ric,\n" +
|
||||
" vtb_list.flag_list_iva_inclusa,\n" +
|
||||
" vtb_list.flag_lisv_margine,\n" +
|
||||
" vtb_list.flag_add_trasp,\n" +
|
||||
" tmp_list.cod_mart AS 'cod_mart',\n" +
|
||||
" mtb_lisv_data.unt_mis_ven AS unt_mis_ven,\n" +
|
||||
" ISNULL(mtb_lisv_data.rap_conv, 1) AS rap_conv,\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_base, 0) AS prz_base,\n" +
|
||||
" ISNULL(mtb_lisv_data.ricarica, 0) AS ricarico,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN mtb_lisv_data.prz_vend IS NOT NULL AND mtb_lisv_data.prz_vend <> 0 THEN\n" +
|
||||
" ROUND((ISNULL(mtb_lisv_data.prz_vend, 0) -\n" +
|
||||
" (ISNULL(mtb_lisv_data.prz_base, 0) / (1 - mtb_aart.perc_sfrido / 100))) /\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_vend, 0) * 100, 2)\n" +
|
||||
" ELSE 0 END AS margine_eff,\n" +
|
||||
" --dbo.f_calcMargineEffettivo(IsNull(mtb_lisv_data.prz_base, 0), IsNull(mtb_lisv_data.prz_vend, 0), mtb_aart.perc_sfrido) as margine_eff,\n" +
|
||||
" --dbo.f_calcRicaricoEffettivo(IsNull(mtb_lisv_data.prz_base, 0), IsNull(mtb_lisv_data.prz_vend, 0), mtb_aart.perc_sfrido) ricarico_eff, \n" +
|
||||
" CASE\n" +
|
||||
" WHEN mtb_lisv_data.prz_base IS NOT NULL AND mtb_lisv_data.prz_base <> 0 THEN\n" +
|
||||
" ROUND((ISNULL(mtb_lisv_data.prz_vend, 0) -\n" +
|
||||
" (ISNULL(mtb_lisv_data.prz_base, 0) / (1 - mtb_aart.perc_sfrido / 100))) /\n" +
|
||||
" (ISNULL(mtb_lisv_data.prz_base, 0) / (1 - mtb_aart.perc_sfrido / 100)) * 100, 2)\n" +
|
||||
" ELSE 0 END AS ricarico_eff,\n" +
|
||||
"\n" +
|
||||
" ISNULL(mtb_lisv_data.magg_prz_vend, 0) AS magg_prz_vend,\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_vend, 0) AS prz_vend,\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_vend_iva, 0) AS prz_vend_iva,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_sco1, 0) AS perc_sco1,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_sco2, 0) AS perc_sco2,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_sco3, 0) AS perc_sco3,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_sco4, 0) AS perc_sco4,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_prov, 0) AS perc_prov,\n" +
|
||||
" ISNULL(mtb_lisv_data.fisso_prov, 0) AS fisso_prov,\n" +
|
||||
" ISNULL(mtb_lisv_data.posizione, '') AS posizione,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_gest, 0) AS perc_gest,\n" +
|
||||
" ISNULL(mtb_lisv_data.val_gest, 0) AS val_gest,\n" +
|
||||
" mtb_lisv_data.data_agg_prz AS data_agg_prz,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_ispe, 0) AS perc_ispe,\n" +
|
||||
" ISNULL(mtb_lisv_data.val_ispe, 0) AS val_ispe,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_promo, 0) AS perc_promo,\n" +
|
||||
" ISNULL(mtb_lisv_data.val_promo, 0) AS val_promo,\n" +
|
||||
" ISNULL(mtb_lisv_data.perc_oneri, 0) AS perc_oneri,\n" +
|
||||
" ISNULL(mtb_lisv_data.val_oneri, 0) AS val_oneri,\n" +
|
||||
" mtb_lisv_data.tipo_variazione AS tipo_variazione,\n" +
|
||||
" mtb_lisv_data.note AS note,\n" +
|
||||
" mtb_lisv_data.aggiornato_da AS aggiornato_da,\n" +
|
||||
" mtb_lisv_data.prz_vend * (1 - mtb_lisv_data.perc_sco1 / 100) * (1 - mtb_lisv_data.perc_sco2 / 100) *\n" +
|
||||
" (1 - mtb_lisv_data.perc_sco3 / 100) *\n" +
|
||||
" (1 - mtb_lisv_data.perc_sco4 / 100) AS prz_vend_netto,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN ISNULL(mtb_lisv_data.colli_pedana, 0) <> 0 THEN mtb_lisv_data.colli_pedana\n" +
|
||||
" ELSE mtb_aart.colli_pedana END AS colli_pedana,\n" +
|
||||
" mtb_lisv_data.cod_tcol_ul AS cod_tcol_ul,\n" +
|
||||
" mtb_lisv_data.cod_tcol_ui AS cod_tcol_ui,\n" +
|
||||
" ISNULL(mtb_lisv_data.prz_vend_sug, 0) AS prz_vend_sug,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN ISNULL(mtb_lisv_data.qta_cnf, 0) <> 0\n" +
|
||||
" AND dbo.getGestSetup('VTB_LIST', 'SETUP', 'QTA_CNF_LISTINO') = 'S' \n" +
|
||||
" THEN mtb_lisv_data.qta_cnf\n" +
|
||||
" ELSE mtb_aart.qta_cnf / mtb_lisv_data.rap_conv END AS qta_cnf,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN ISNULL(mtb_lisv_data.colli_strato, 0) <> 0 THEN mtb_lisv_data.colli_strato\n" +
|
||||
" ELSE mtb_aart.colli_strato END AS colli_strato,\n" +
|
||||
" mtb_lisv_data.descrizione_html AS descrizione_html,\n" +
|
||||
" mtb_lisv_data.colli_pedana AS colli_pedana_lisv,\n" +
|
||||
" mtb_lisv_data.qta_cnf AS qta_cnf_lisv,\n" +
|
||||
" mtb_lisv_data.colli_strato AS colli_strato_lisv,\n" +
|
||||
" mtb_lisv_data.sconto_cartoni,\n" +
|
||||
" mtb_lisv_data.sconto_strato,\n" +
|
||||
" mtb_lisv_data.sconto_pedane,\n" +
|
||||
" vtb_list.flag_attivo,\n" +
|
||||
" vtb_list_data.note AS note_testata,\n" +
|
||||
" ISNULL(mtb_lisv_data.flag_prz_bloccato, 'N') AS flag_prz_bloccato,\n" +
|
||||
" vtb_list_data.porto AS porto,\n" +
|
||||
" mtb_lisv_data.system_note,\n" +
|
||||
" mtb_lisv.add_val_spese,\n" +
|
||||
" mtb_lisv.add_ric_spese,\n" +
|
||||
" mtb_lisv.add_sco_spese,\n" +
|
||||
" mtb_aart.flag_incl_listino\n" +
|
||||
" FROM (SELECT vtb_list.cod_vlis AS cod_vlis,\n" +
|
||||
" mtb_lisv_data.cod_mart,\n" +
|
||||
" MAX(CASE\n" +
|
||||
" WHEN vtb_list_data.versione IS NULL THEN NULL\n" +
|
||||
" ELSE CONVERT(VARCHAR(10), vtb_list_data.data_iniz, 111) + ' ' +\n" +
|
||||
" REPLICATE('0', 5 - LEN(vtb_list_data.versione)) +\n" +
|
||||
" CONVERT(VARCHAR(5), vtb_list_data.versione) END) AS max_lisv,\n" +
|
||||
" vtb_list.cod_vlis AS 'cod_vlis_rif'\n" +
|
||||
" FROM vtb_list\n" +
|
||||
" INNER JOIN mtb_lisv_data ON vtb_list.cod_vlis = mtb_lisv_data.cod_vlis\n" +
|
||||
" LEFT OUTER JOIN vtb_list_data ON mtb_lisv_data.cod_vlis = vtb_list_data.cod_vlis AND\n" +
|
||||
" mtb_lisv_data.versione = vtb_list_data.versione AND\n" +
|
||||
" vtb_list_data.cod_promo IS NULL AND\n" +
|
||||
" vtb_list_data.data_iniz <= ISNULL(@datavalidita, GETDATE())\n" +
|
||||
" WHERE vtb_list.cod_vlis_rif IS NULL\n" +
|
||||
" GROUP BY vtb_list.cod_vlis,\n" +
|
||||
" mtb_lisv_data.cod_mart\n" +
|
||||
" UNION\n" +
|
||||
" SELECT vtb_list.cod_vlis AS cod_vlis,\n" +
|
||||
" mtb_lisv_data.cod_mart,\n" +
|
||||
" MAX(CASE\n" +
|
||||
" WHEN vtb_list_data.versione IS NULL THEN NULL\n" +
|
||||
" ELSE CONVERT(VARCHAR(10), vtb_list_data.data_iniz, 111) + ' ' +\n" +
|
||||
" REPLICATE('0', 5 - LEN(vtb_list_data.versione_rif)) +\n" +
|
||||
" CONVERT(VARCHAR(5), vtb_list_data.versione_rif) END) AS max_lisv,\n" +
|
||||
" vtb_list.cod_vlis_rif AS 'cod_vlis_rif'\n" +
|
||||
" FROM vtb_list\n" +
|
||||
" INNER JOIN vtb_list_data ON vtb_list.cod_vlis = vtb_list_data.cod_vlis\n" +
|
||||
" INNER JOIN vtb_list_data vtb_list_data_rif\n" +
|
||||
" ON vtb_list_data.versione_rif = vtb_list_data_rif.versione AND\n" +
|
||||
" vtb_list_data.cod_vlis_rif = vtb_list_data_rif.cod_vlis\n" +
|
||||
" INNER JOIN mtb_lisv_data ON vtb_list_data_rif.cod_vlis = mtb_lisv_data.cod_vlis AND\n" +
|
||||
" vtb_list_data_rif.versione = mtb_lisv_data.versione\n" +
|
||||
"\n" +
|
||||
" WHERE vtb_list_data.data_iniz <= ISNULL(@datavalidita, GETDATE())\n" +
|
||||
" AND vtb_list.cod_vlis_rif IS NOT NULL\n" +
|
||||
" GROUP BY vtb_list.cod_vlis,\n" +
|
||||
" mtb_lisv_data.cod_mart,\n" +
|
||||
" vtb_list.cod_vlis_rif) tmp_list\n" +
|
||||
" INNER JOIN vtb_list ON vtb_list.cod_vlis = tmp_list.cod_vlis\n" +
|
||||
" INNER JOIN mtb_lisv\n" +
|
||||
" ON tmp_list.cod_vlis_rif = mtb_lisv.cod_vlis AND tmp_list.cod_mart = mtb_lisv.cod_mart\n" +
|
||||
" INNER JOIN mtb_aart ON tmp_list.cod_mart = mtb_aart.cod_mart\n" +
|
||||
" LEFT OUTER JOIN mtb_lisv_data ON tmp_list.cod_vlis_rif = mtb_lisv_data.cod_vlis AND\n" +
|
||||
" tmp_list.cod_mart = mtb_lisv_data.cod_mart AND\n" +
|
||||
" CONVERT(INT, RIGHT(tmp_list.max_lisv, 5)) = mtb_lisv_data.versione\n" +
|
||||
" LEFT OUTER JOIN vtb_list_data ON tmp_list.cod_vlis = vtb_list_data.cod_vlis AND\n" +
|
||||
" CONVERT(INT, RIGHT(tmp_list.max_lisv, 5)) = vtb_list_data.versione\n" +
|
||||
"\n" +
|
||||
" WHERE (@codmart IS NULL OR tmp_list.cod_mart = @codmart)\n" +
|
||||
" AND (@codvlis IS NULL OR tmp_list.cod_vlis = @codvlis)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241120093059 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
createOrUpdateView("cvw_mov_black_list", "CREATE VIEW [dbo].[cvw_mov_black_list] AS\n" +
|
||||
"SELECT crl_movt_rif_cmov.num_cmov, \n" +
|
||||
" ctb_movt.num_cmov as num_cmov_rif,\n" +
|
||||
" ctb_movt.data_cmov, \n" +
|
||||
" ctb_movt.cod_ccau, \n" +
|
||||
" ctb_movt.cod_anag, \n" +
|
||||
" ctb_movt.cod_ireg, \n" +
|
||||
" gtb_anag.rag_soc,\n" +
|
||||
" ctb_movt.data_doc, \n" +
|
||||
" ctb_movt.ser_doc, \n" +
|
||||
" ctb_movt.num_doc,\n" +
|
||||
" ctb_movt.importo\n" +
|
||||
"FROM crl_movt_rif_cmov INNER JOIN ctb_movt ON crl_movt_rif_cmov.num_cmov_rif = ctb_movt.num_cmov\n" +
|
||||
"LEFT OUTER JOIN gtb_anag on ctb_movt.cod_anag = gtb_anag.cod_anag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -847,6 +847,9 @@ public class CommonRules extends QueryRules {
|
||||
MtbAart mtbAart = new ResultSetMapper()
|
||||
.mapQueryToObject(connection, sql, MtbAart.class);
|
||||
|
||||
if (mtbAart == null )
|
||||
throw new Exception(String.format("Codice Articolo %s non trovato", mtbColr.getCodMart()));
|
||||
|
||||
qtaCnf = DocOrdUntMisRules.calcQtaCnf(connection, mtbColr.getCodMart(), mtbColr.getPartitaMag(), mtbAart, mtbColr.getNumCnf(), BigDecimal.ONE, mtbColr.getQtaCol(), mtbColr.getQtaCnf());
|
||||
}
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ public class ProductionsRules extends QueryRules {
|
||||
"WITH steps AS (SELECT DISTINCT gestione,\n" +
|
||||
" data_ord,\n" +
|
||||
" num_ord,\n" +
|
||||
" LAST_VALUE(id_step)\n" +
|
||||
" MAX(id_step)\n" +
|
||||
" OVER (PARTITION BY gestione, data_ord, num_ord, id_riga ORDER BY id_riga) AS id_step,\n" +
|
||||
" id_riga\n" +
|
||||
" FROM dtb_ord_steps\n" +
|
||||
|
||||
@@ -438,7 +438,7 @@ public class PurchasesRules extends QueryRules {
|
||||
"SELECT TOP 1 lisa.cod_art_for,\n" +
|
||||
" lisa.unt_mis_acq AS " + fielsNameUntMis + ",\n" +
|
||||
" lisa.rap_conv,\n" +
|
||||
" ROUND(lisa.qta_cnf / %s, 5) AS qta_cnf,\n" +
|
||||
" lisa.qta_cnf AS qta_cnf,\n" +
|
||||
" lisa.prz_acq AS val_unt,\n" +
|
||||
" lisa.perc_oneri,\n" +
|
||||
" lisa.val_oneri,\n" +
|
||||
@@ -458,7 +458,6 @@ public class PurchasesRules extends QueryRules {
|
||||
"FROM dbo.getlistinoacquisto(%s, %s, %s, %s, 'S', %s) lisa\n" +
|
||||
"WHERE lisa.tipo_variazione <> 'D'\n" +
|
||||
" AND lisa.flag_attivo = 'S' ",
|
||||
entity.getRapConv(),
|
||||
dataValidita,
|
||||
entity.getListino(),
|
||||
entity.getCodArtFor(),
|
||||
|
||||
@@ -247,13 +247,20 @@ public class ReportProcessor {
|
||||
jasperDTO.setReportId(getReportID(jasperDTO.getReportName()));
|
||||
}
|
||||
|
||||
//Refill
|
||||
jasperDTO = getReportByID(jasperDTO.getReportId(), jasperDTO.getParams());
|
||||
if (jasperDTO.getReportId() != null && UtilityString.isNullOrEmpty(jasperDTO.getB64ReportJrxml())) {
|
||||
//Refill
|
||||
JasperDTO jasperTmp = getReportByID(jasperDTO.getReportId());
|
||||
|
||||
if (jasperDTO.getOrientation() == null && jasperDTO.getReportId() != null) {
|
||||
String sql = "SELECT orientation FROM " + WtbJrept.ENTITY + " WHERE id = " + UtilityDB.valueToString(jasperDTO.getReportId());
|
||||
int orientation = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
jasperDTO.setOrientation(WtbJreptSetup.Orientation.from(orientation));
|
||||
jasperDTO.setCompiledJasper(jasperTmp.getCompiledJasper())
|
||||
.setReportId(jasperTmp.getReportId())
|
||||
.setB64ReportJrxml(jasperTmp.getB64ReportJrxml())
|
||||
.setSubreports(jasperTmp.getSubreports());
|
||||
|
||||
if (jasperDTO.getOrientation() == null) {
|
||||
String sql = "SELECT orientation FROM " + WtbJrept.ENTITY + " WHERE id = " + UtilityDB.valueToString(jasperDTO.getReportId());
|
||||
int orientation = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
jasperDTO.setOrientation(WtbJreptSetup.Orientation.from(orientation));
|
||||
}
|
||||
}
|
||||
|
||||
// this.prepareTempReportFile(jasperDTO);
|
||||
@@ -429,7 +436,7 @@ public class ReportProcessor {
|
||||
return paramsMap;
|
||||
}
|
||||
|
||||
private JasperDTO getReportByID(Long reportId, List<PairsDTO> params) throws Exception {
|
||||
private JasperDTO getReportByID(Long reportId) throws Exception {
|
||||
String sql = "SELECT id, " +
|
||||
" CONVERT(TEXT, b64_jrxml) AS b64_jrxml," +
|
||||
" compiled_jasper " +
|
||||
@@ -441,7 +448,6 @@ public class ReportProcessor {
|
||||
if (result == null) throw new Exception("Report non valido");
|
||||
|
||||
JasperDTO jasperDTO = new JasperDTO()
|
||||
.setParams(params)
|
||||
.setReportId(UtilityHashMap.getValueIfExists(result, "id"))
|
||||
.setB64ReportJrxml(UtilityHashMap.getValueIfExists(result, "b64_jrxml"))
|
||||
.setCompiledJasper(UtilityHashMap.getValueIfExists(result, "compiled_jasper"));
|
||||
|
||||
@@ -1526,7 +1526,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter
|
||||
);
|
||||
|
||||
final List<Quartet<String, Object, Boolean, Object>> preparedFieldsToQuery = prepareFieldsToQuery(fields);
|
||||
// preparedField: 1 = sql_field_name, 2 = value_to_save, 3 = is_identity, 4 = old_value (if present)
|
||||
// preparedField: 0 = sql_field_name, 1 = value_to_save, 2 = is_identity, 3 = old_value (if present)
|
||||
|
||||
boolean containsIdentity = false;
|
||||
String identityFieldName = null;
|
||||
|
||||
@@ -6,7 +6,6 @@ import it.integry.ems_model.base.EntityBase;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.ArrayList;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -113,6 +112,19 @@ public class JtbRLavr extends EntityBase {
|
||||
@SqlField(value = "id_posizione")
|
||||
private Long idPosizione;
|
||||
|
||||
@SqlField(value = "inserito_da")
|
||||
private String inseritoDa;
|
||||
|
||||
@SqlField(value = "data_ins")
|
||||
private Date dataIns;
|
||||
|
||||
@SqlField(value = "modificato_da")
|
||||
private String modificatoDa;
|
||||
|
||||
@SqlField(value = "data_mod")
|
||||
private Date dataMod;
|
||||
|
||||
|
||||
public JtbRLavr() {
|
||||
super(logger);
|
||||
}
|
||||
@@ -377,4 +389,40 @@ public class JtbRLavr extends EntityBase {
|
||||
this.idPosizione = idPosizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getInseritoDa() {
|
||||
return inseritoDa;
|
||||
}
|
||||
|
||||
public JtbRLavr setInseritoDa(String inseritoDa) {
|
||||
this.inseritoDa = inseritoDa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataIns() {
|
||||
return dataIns;
|
||||
}
|
||||
|
||||
public JtbRLavr setDataIns(Date dataIns) {
|
||||
this.dataIns = dataIns;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getModificatoDa() {
|
||||
return modificatoDa;
|
||||
}
|
||||
|
||||
public JtbRLavr setModificatoDa(String modificatoDa) {
|
||||
this.modificatoDa = modificatoDa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataMod() {
|
||||
return dataMod;
|
||||
}
|
||||
|
||||
public JtbRLavr setDataMod(Date dataMod) {
|
||||
this.dataMod = dataMod;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import it.integry.ems_model.annotation.*;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import it.integry.ems_model.entity._enum.IBaseEnum;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
@@ -41,7 +43,7 @@ public class MtbGrup extends EntityBase implements EquatableEntityInterface<MtbG
|
||||
private String criterioVal;
|
||||
|
||||
@SqlField(value = "tipo_mgrp", maxLength = 3)
|
||||
private String tipoMgrp;
|
||||
private TipoGruppo tipoMgrp;
|
||||
|
||||
@SqlField(value = "flag_attivo", nullable = false, defaultObjectValue = "1")
|
||||
private Boolean flagAttivo;
|
||||
@@ -104,11 +106,11 @@ public class MtbGrup extends EntityBase implements EquatableEntityInterface<MtbG
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTipoMgrp() {
|
||||
public TipoGruppo getTipoMgrp() {
|
||||
return tipoMgrp;
|
||||
}
|
||||
|
||||
public MtbGrup setTipoMgrp(String tipoMgrp) {
|
||||
public MtbGrup setTipoMgrp(TipoGruppo tipoMgrp) {
|
||||
this.tipoMgrp = tipoMgrp;
|
||||
return this;
|
||||
}
|
||||
@@ -184,4 +186,47 @@ public class MtbGrup extends EntityBase implements EquatableEntityInterface<MtbG
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodMgrp(), getDescrizione(), getFlagValMag(), getLogoWeb(), getCriterioVal(), getTipoMgrp(), getFlagAttivo(), getFlagTracciabilita());
|
||||
}
|
||||
|
||||
public enum TipoGruppo implements IBaseEnum<MtbGrup.TipoGruppo> {
|
||||
|
||||
ACCONTI_SCONTI("ACS"),
|
||||
FITTIZIO("FTT"),
|
||||
IMBALLAGGI("IMB"),
|
||||
MATERIALE_ACCESSORI("ACC"),
|
||||
MATERIE_PRIME("MP"),
|
||||
PRODOTTI_FINITI("PF"),
|
||||
SEMILAVORATI("SL"),
|
||||
RICAMBI("RIC")
|
||||
;
|
||||
|
||||
private final String value;
|
||||
|
||||
TipoGruppo(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static MtbGrup.TipoGruppo from(Object value) {
|
||||
String castValue = String.valueOf(value);
|
||||
for (MtbGrup.TipoGruppo b : MtbGrup.TipoGruppo.values()) {
|
||||
if (b.value.equalsIgnoreCase(castValue))
|
||||
return b;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MtbGrup.TipoGruppo fromInternal(Object val) {
|
||||
return from(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
|
||||
import it.integry.ems.sync.MultiDBTransaction.Connection;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
import java.sql.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -358,9 +359,8 @@ public class UtilityDB {
|
||||
return valueString;
|
||||
}
|
||||
|
||||
public static String listValueToString(List<String> lista) {
|
||||
lista = Stream.of(lista).map(UtilityDB::valueToString).toList();
|
||||
return StringUtils.join(lista, ",");
|
||||
public static <T> String listValueToString(List<T> lista) {
|
||||
return StringUtils.join(Stream.of(lista).map(UtilityDB::valueToString).toList(), ",");
|
||||
}
|
||||
|
||||
public static int countRow(ResultSet res) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -216,4 +216,5 @@ when
|
||||
then
|
||||
List<JtbRLavt> jtbRlavt = ConfigActivityRules.completeJtbRlavtActivity(conn, $entity);
|
||||
modify ( $entity ) { setJtbRLavt(jtbRlavt), setEffectiveEndtime($entity.getEffectiveEndtime() == null? new Date(): $entity.getEffectiveEndtime()) }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -164,6 +164,27 @@ then
|
||||
modify ( $rLavR ) { setaOra(aOra) }
|
||||
end
|
||||
|
||||
rule "completeDatiInsJtbRlavr"
|
||||
no-loop
|
||||
when
|
||||
eval(completeRulesEnabled)
|
||||
$entity : JtbRLavr(operation == OperationType.INSERT || (operation == OperationType.INSERT_OR_UPDATE && inseritoDa== null))
|
||||
then
|
||||
modify ( $entity ) {
|
||||
setInseritoDa(username), setDataIns(new Date())
|
||||
}
|
||||
end
|
||||
|
||||
rule "completeDatiModJtbRlavr"
|
||||
no-loop
|
||||
when
|
||||
eval(completeRulesEnabled)
|
||||
$entity : JtbRLavr(operation != OperationType.DELETE )
|
||||
then
|
||||
modify ( $entity ) {
|
||||
setModificatoDa(username), setDataMod(new Date())
|
||||
}
|
||||
end
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -92,6 +92,8 @@
|
||||
<mapClasses>asClasses</mapClasses>
|
||||
<mapEnum>asEnum</mapEnum>
|
||||
<optionalProperties>useLibraryDefinition</optionalProperties>
|
||||
<sortDeclarations>true</sortDeclarations>
|
||||
<sortTypeDeclarations>true</sortTypeDeclarations>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -6,6 +6,7 @@ import it.integry.ems.logistic.Import.service.*;
|
||||
import it.integry.ems.logistic.service.ColliBaioneImportService;
|
||||
import it.integry.ems.logistic.service.ColliEviosysImportService;
|
||||
import it.integry.ems.logistic.service.ColliImportService;
|
||||
import it.integry.ems.logistic.service.Slim2kLogisticService;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
@@ -62,6 +63,9 @@ public class ColliImporter extends BaseEntityImporter implements IEntityImporter
|
||||
case PIEGARESE:
|
||||
entities = context.getBean(ColliImportService.class).importColliVebad(type, format, requestDto, anomalie);
|
||||
break;
|
||||
case SLIM2K:
|
||||
entities = context.getBean(Slim2kLogisticService.class).importTrasferimenti(type, format);
|
||||
break;
|
||||
default:
|
||||
throw new Exception(String.format("Tipo %s non supportato", format));
|
||||
}
|
||||
@@ -83,7 +87,8 @@ public class ColliImporter extends BaseEntityImporter implements IEntityImporter
|
||||
METALSISTEM("METALSISTEM"),
|
||||
BAIONE("BAIONE"),
|
||||
EVIOSYS("EVIOSYS"),
|
||||
PIEGARESE("DESADV");
|
||||
PIEGARESE("DESADV"),
|
||||
SLIM2K("SLIM2K");
|
||||
|
||||
private String text;
|
||||
|
||||
|
||||
@@ -72,5 +72,4 @@ public class Slim2kLogisticController {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
package it.integry.ems.logistic.service;
|
||||
|
||||
import it.integry.ems.Import.dto.AnomalieDTO;
|
||||
import it.integry.ems.Import.dto.ImportRequestDTO;
|
||||
import it.integry.ems.datasource.DataSource;
|
||||
import it.integry.ems.json.ResponseJSONObjectMapper;
|
||||
import it.integry.ems.menu.dto.StbMenuDTO;
|
||||
import it.integry.ems.properties.EmsProperties;
|
||||
import it.integry.ems.response.EsitoType;
|
||||
import it.integry.ems.response.ServiceRestResponse;
|
||||
import it.integry.ems.service.EntityProcessor;
|
||||
import it.integry.ems.service.MailService;
|
||||
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems.user.UserSession;
|
||||
import it.integry.ems.utility.UtilityDirs;
|
||||
import it.integry.ems.utility.UtilityFile;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
@@ -16,10 +21,8 @@ import it.integry.ems_model.entity.*;
|
||||
import it.integry.ems_model.resolver.SqlFieldHolder;
|
||||
import it.integry.ems_model.service.SetupGest;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
import it.integry.ems_model.utility.UtilityResultSet;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import it.integry.ems_model.utility.*;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -36,24 +39,27 @@ import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.stream.Collectors.groupingBy;
|
||||
|
||||
@Service
|
||||
@Scope("request")
|
||||
public class Slim2kLogisticService {
|
||||
@Autowired
|
||||
private EmsProperties properties;
|
||||
|
||||
@Autowired
|
||||
private MultiDBTransactionManager multiDBTransactionManager;
|
||||
|
||||
@Autowired
|
||||
private SetupGest setupGest;
|
||||
@Autowired
|
||||
private ResponseJSONObjectMapper jsonObjectMapper;
|
||||
|
||||
@Autowired
|
||||
private MailService mailService;
|
||||
|
||||
@Autowired
|
||||
private EntityProcessor entityProcessor;
|
||||
|
||||
@Autowired
|
||||
private UserSession userSession;
|
||||
|
||||
// IMPORTAZIONE COLLI DI VENDITA DA SHIPPINGPLAN_EXPORT
|
||||
public List<ServiceRestResponse> importListeDiScarico(String listType, String listCode) throws Exception {
|
||||
List<ServiceRestResponse> respList = new ArrayList<ServiceRestResponse>();
|
||||
@@ -272,6 +278,132 @@ public class Slim2kLogisticService {
|
||||
return respList;
|
||||
}
|
||||
|
||||
public List<EntityBase> importTrasferimenti(String type, String format) throws Exception {
|
||||
if ( userSession.getDefaultDepo() == null )
|
||||
throw new Exception(String.format("Nessun deposito trovato per l'utente %s", userSession.getUsername()));
|
||||
|
||||
String codMdep = userSession.getDefaultDepo().getCodMdep();
|
||||
Map<String, String> setup = setupGest.getImportSetupSection(multiDBTransactionManager.getPrimaryConnection(), type, format);
|
||||
String profileSlim2k = setup.get("PROFILE");
|
||||
|
||||
if (UtilityString.isNullOrEmpty(profileSlim2k)) {
|
||||
throw new Exception("Profile non configurato per la procedura di importazione liste di scarico SLIM2K");
|
||||
}
|
||||
|
||||
String codDtip = setupGest.getSetupDepo("IMPORT_"+type, format, "COD_DTIP_TRASF", codMdep);
|
||||
if ( UtilityString.isNullOrEmpty(codDtip) )
|
||||
throw new Exception(String.format("Tipo documento non confiutrato per il deposito %s", userSession.getUsername()));
|
||||
|
||||
List<EntityBase> colli = new ArrayList<>();
|
||||
DataSource dsSlim2k = new DataSource();
|
||||
try {
|
||||
dsSlim2k.initialize(profileSlim2k);
|
||||
|
||||
LocalDate today = UtilityLocalDate.getNow();
|
||||
|
||||
String sql =
|
||||
Query.format(
|
||||
"SELECT track_number\n" +
|
||||
"FROM mtb_colt\n" +
|
||||
"WHERE cod_mdep = %s\n" +
|
||||
" AND data_collo = %s\n" +
|
||||
" AND track_number IS NOT NULL",
|
||||
codMdep, today);
|
||||
|
||||
List<Integer> listTrackNumber = UtilityDB.executeSimpleQueryOnlyFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
sql =
|
||||
Query.format(
|
||||
"SELECT e.whouse AS cod_dest,\n" +
|
||||
" movements_export.whouse AS cod_mdep,\n" +
|
||||
" movements_export.item AS cod_mart,\n" +
|
||||
" movements_export.workorder AS lotto,\n" +
|
||||
" ABS(movements_export.qtymove) AS qta_collo,\n" +
|
||||
" movements_export.unum as track_number\n"+
|
||||
"FROM movements_export\n" +
|
||||
" INNER JOIN movements_export e ON movements_export.item = e.item\n" +
|
||||
" AND movements_export.trtype = e.trtype\n" +
|
||||
" AND movements_export.movedate = e.movedate\n" +
|
||||
" AND movements_export.whouse <> e.whouse\n" +
|
||||
" AND movements_export.workorder = e.workorder\n" +
|
||||
" AND movements_export.utime = e.utime\n" +
|
||||
"WHERE movements_export.movedate = %s\n" +
|
||||
" AND movements_export.qtymove < 0\n" +
|
||||
" AND movements_export.trtype LIKE (%s)\n" +
|
||||
" AND movements_export.whouse = %s \n",
|
||||
UtilityLocalDate.formatDate(today, "yyyyMMdd") , "W%", codMdep);
|
||||
|
||||
if ( !listTrackNumber.isEmpty()) {
|
||||
sql += " AND movements_export.unum not in ( " + UtilityDB.listValueToString(listTrackNumber) + " )";
|
||||
}
|
||||
|
||||
List<HashMap<String, Object>> listaColli = UtilityDB.executeSimpleQuery(dsSlim2k.getConnection(), sql);
|
||||
|
||||
Map<HashMap<String, Object>, List<HashMap<String, Object>>> trackNumber = listaColli.stream()
|
||||
.collect(groupingBy(x -> {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("track_number", x.get("track_number"));
|
||||
map.put("cod_mdep", x.get("cod_mdep"));
|
||||
map.put("cod_dest", x.get("cod_dest"));
|
||||
return map;
|
||||
}));
|
||||
|
||||
for (Map.Entry<HashMap<String, Object>, List<HashMap<String, Object>>> entry : trackNumber.entrySet()) {
|
||||
HashMap<String, Object> keyMap = entry.getKey();
|
||||
List<HashMap<String, Object>> righe = entry.getValue();
|
||||
|
||||
String codDest = (String) keyMap.get("cod_dest");
|
||||
|
||||
sql =
|
||||
Query.format(
|
||||
"SELECT cod_anag, cod_vdes FROM mtb_depo WHERE cod_mdep = %s AND cod_anag is not null",
|
||||
codDest.trim());
|
||||
|
||||
HashMap<String, Object> datiDepo = UtilityDB.executeSimpleQueryOnlyFirstRow(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
if (!UtilityHashMap.isPresent(datiDepo) )
|
||||
throw new Exception(String.format("Dati non trovati per il deposito %s", codDest));
|
||||
|
||||
MtbColt mtbColt =
|
||||
new MtbColt()
|
||||
.setDataCollo(today)
|
||||
.setCodMdep((String) keyMap.get("cod_mdep"))
|
||||
.setCodAnag((String) datiDepo.get("cod_anag"))
|
||||
.setCodVdes((String) datiDepo.get("cod_vdes"))
|
||||
.setGestione("L")
|
||||
.setSegno(-1)
|
||||
.setTrackNumber(keyMap.get("track_number").toString())
|
||||
.setCodDtipProvv(codDtip);
|
||||
mtbColt.setOperation(OperationType.INSERT);
|
||||
mtbColt.setMtbColr(new ArrayList<>());
|
||||
colli.add(mtbColt);
|
||||
|
||||
|
||||
for (HashMap<String, Object> r : righe){
|
||||
MtbColr mtbColr =
|
||||
new MtbColr()
|
||||
.setCodMart(((String) r.get("cod_mart")).trim())
|
||||
.setPartitaMag(((String) r.get("lotto")).trim())
|
||||
.setQtaCol((BigDecimal) r.get("qta_collo"));
|
||||
mtbColt.getMtbColr().add(mtbColr);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (colli.size() > 0 ) {
|
||||
return entityProcessor.processEntityList(colli, false);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw e;
|
||||
} finally {
|
||||
if (!dsSlim2k.isClosed()) {
|
||||
dsSlim2k.forceClose();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// IMPORTAZIONE COLLI DI VENDITA DA DOCUMENTS_EXPORT
|
||||
public List<ServiceRestResponse> importListeDiCarico(String scode, String dcode, String docDate, String docnum, String refdoc) throws Exception {
|
||||
Date ldt_dataOrd;
|
||||
|
||||
@@ -140,40 +140,40 @@ public class ImportListiniAcquistoApuliaCarrefourService {
|
||||
}
|
||||
).collect(Collectors.toList());
|
||||
|
||||
List<String> listCond =
|
||||
righeListino.parallelStream()
|
||||
.filter(x -> x.getQtaCnf() != null)
|
||||
.map(lisa -> {
|
||||
String whereCond =
|
||||
"mtb_lisa.cod_art_for = " + UtilityDB.valueToString(lisa.getCodArtFor()) + " AND " +
|
||||
"mtb_lisa.cod_alis = " + UtilityDB.valueToString(lisa.getCodAlis());
|
||||
return whereCond;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if (listCond != null && !listCond.isEmpty()) {
|
||||
sql =
|
||||
"SELECT mtb_lisa.cod_art_for, mtb_lisa.rap_conv\n" +
|
||||
"FROM mtb_lisa\n" +
|
||||
" INNER JOIN mtb_aart ON mtb_lisa.cod_mart = mtb_aart.cod_mart AND mtb_lisa.rap_conv <> 1 ";
|
||||
String whereCond = StringUtils.join(listCond, ") OR (");
|
||||
|
||||
sql = UtilityDB.addwhereCond(sql, "(" + whereCond + ")", false);
|
||||
List<HashMap<String, Object>> datiLisa = UtilityDB.executeSimpleQuery(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
for (HashMap<String, Object> l : datiLisa) {
|
||||
String codArtForDb = UtilityHashMap.getValueIfExists(l, "cod_art_for");
|
||||
BigDecimal rapConvDb = UtilityHashMap.getValueIfExists(l, "rap_conv");
|
||||
List<MtbLisaData> list = Stream.of(righeListino)
|
||||
.filter(x -> x.getCodArtFor().equalsIgnoreCase(codArtForDb) &&
|
||||
x.getQtaCnf() != null
|
||||
).toList();
|
||||
for (MtbLisaData e : list) {
|
||||
righeListino.remove(e);
|
||||
BigDecimal qtaCnf = e.getQtaCnf().multiply(rapConvDb);
|
||||
e.setQtaCnf(qtaCnf);
|
||||
righeListino.add(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
// List<String> listCond =
|
||||
// righeListino.parallelStream()
|
||||
// .filter(x -> x.getQtaCnf() != null)
|
||||
// .map(lisa -> {
|
||||
// String whereCond =
|
||||
// "mtb_lisa.cod_art_for = " + UtilityDB.valueToString(lisa.getCodArtFor()) + " AND " +
|
||||
// "mtb_lisa.cod_alis = " + UtilityDB.valueToString(lisa.getCodAlis());
|
||||
// return whereCond;
|
||||
// }).collect(Collectors.toList());
|
||||
//
|
||||
// if (listCond != null && !listCond.isEmpty()) {
|
||||
// sql =
|
||||
// "SELECT mtb_lisa.cod_art_for, mtb_lisa.rap_conv\n" +
|
||||
// "FROM mtb_lisa\n" +
|
||||
// " INNER JOIN mtb_aart ON mtb_lisa.cod_mart = mtb_aart.cod_mart AND mtb_lisa.rap_conv <> 1 ";
|
||||
// String whereCond = StringUtils.join(listCond, ") OR (");
|
||||
//
|
||||
// sql = UtilityDB.addwhereCond(sql, "(" + whereCond + ")", false);
|
||||
// List<HashMap<String, Object>> datiLisa = UtilityDB.executeSimpleQuery(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
// for (HashMap<String, Object> l : datiLisa) {
|
||||
// String codArtForDb = UtilityHashMap.getValueIfExists(l, "cod_art_for");
|
||||
// BigDecimal rapConvDb = UtilityHashMap.getValueIfExists(l, "rap_conv");
|
||||
// List<MtbLisaData> list = Stream.of(righeListino)
|
||||
// .filter(x -> x.getCodArtFor().equalsIgnoreCase(codArtForDb) &&
|
||||
// x.getQtaCnf() != null
|
||||
// ).toList();
|
||||
// for (MtbLisaData e : list) {
|
||||
// righeListino.remove(e);
|
||||
// BigDecimal qtaCnf = e.getQtaCnf().multiply(rapConvDb);
|
||||
// e.setQtaCnf(qtaCnf);
|
||||
// righeListino.add(e);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//salvataggio testate listini
|
||||
if (atbList != null)
|
||||
|
||||
@@ -1224,7 +1224,7 @@ public class MesProductionServiceV2 {
|
||||
" WHEN stb_gest_setup.flag_setup_depo = 'S' THEN ISNULL(stb_gest_setup_depo.value, stb_gest_setup.value)\n" +
|
||||
" ELSE CASE\n" +
|
||||
" WHEN stb_gest_setup.flag_setup_user_web = 'S'\n" +
|
||||
" THEN ISNULL(stb_gest_setup_user.value, stb_gest_setup.value)\n" +
|
||||
" THEN ISNULL(wtb_gest_setup_user.value, stb_gest_setup.value)\n" +
|
||||
" ELSE CASE\n" +
|
||||
" WHEN stb_gest_setup.tipo_setup = 'jtb_fasi'\n" +
|
||||
" THEN ISNULL(stb_gest_setup_det.value, stb_gest_setup.value)\n" +
|
||||
@@ -1232,7 +1232,7 @@ public class MesProductionServiceV2 {
|
||||
" END END END AS value,\n" +
|
||||
" stb_gest_setup.value,\n" +
|
||||
" stb_gest_setup_depo.value,\n" +
|
||||
" stb_gest_setup_user.value,\n" +
|
||||
" wtb_gest_setup_user.value,\n" +
|
||||
" stb_gest_setup_det.value\n" +
|
||||
"FROM stb_gest_setup\n" +
|
||||
" LEFT OUTER JOIN\n" +
|
||||
@@ -1240,9 +1240,9 @@ public class MesProductionServiceV2 {
|
||||
" stb_gest_setup.section = stb_gest_setup_depo.section AND\n" +
|
||||
" stb_gest_setup.key_section = stb_gest_setup_depo.key_section AND\n" +
|
||||
" stb_gest_setup_depo.cod_mdep = {}\n" +
|
||||
" LEFT OUTER JOIN stb_gest_setup_user ON stb_gest_setup.section = stb_gest_setup_user.section AND\n" +
|
||||
" stb_gest_setup.key_section = stb_gest_setup_user.key_section\n" +
|
||||
" AND stb_gest_setup_user.user_name = {}\n" +
|
||||
" LEFT OUTER JOIN wtb_gest_setup_user ON stb_gest_setup.section = wtb_gest_setup_user.section AND\n" +
|
||||
" stb_gest_setup.key_section = wtb_gest_setup_user.key_section\n" +
|
||||
" AND wtb_gest_setup_user.user_name = {}\n" +
|
||||
" LEFT OUTER JOIN stb_gest_setup_det ON stb_gest_setup.gest_name = stb_gest_setup_det.gest_name AND\n" +
|
||||
" stb_gest_setup.section = stb_gest_setup_det.section AND\n" +
|
||||
" stb_gest_setup.key_section = stb_gest_setup_det.key_section AND\n" +
|
||||
|
||||
@@ -1471,7 +1471,7 @@ public class ProductionService {
|
||||
"FROM dtb_ordt\n" +
|
||||
" INNER JOIN doc_l ON dtb_ordt.data_ord = doc_l.data_ord AND dtb_ordt.num_ord = doc_l.num_ord\n" +
|
||||
"WHERE cod_prod = " + UtilityDB.valueToString(codProd) + "\n" +
|
||||
" AND cod_jcom = " + UtilityDB.valueToString(codJcom) + "\n" +
|
||||
" AND (" + UtilityDB.valueToString(codJcom) + " IS NULL OR cod_jcom = " + UtilityDB.valueToString(codJcom) + ")\n" +
|
||||
" AND (" + UtilityDB.valueToString(partitaMag) + " IS NULL OR dtb_ordt.partita_mag = " + UtilityDB.valueToString(partitaMag) + ")\n" +
|
||||
" AND dtb_ordt.gestione = 'L'\n" +
|
||||
"UNION ALL\n" +
|
||||
@@ -1488,7 +1488,7 @@ public class ProductionService {
|
||||
" num_ord\n" +
|
||||
"FROM rapportini\n" +
|
||||
"WHERE cod_prod = " + UtilityDB.valueToString(codProd) + "\n" +
|
||||
" AND cod_jcom = " + UtilityDB.valueToString(codJcom) + "\n" +
|
||||
" AND (" + UtilityDB.valueToString(codJcom) + " IS NULL OR cod_jcom = " + UtilityDB.valueToString(codJcom) + ")\n" +
|
||||
" AND (" + UtilityDB.valueToString(partitaMag) + " IS NULL OR rapportini.partita_mag_prod = " + UtilityDB.valueToString(partitaMag) + ")\n" +
|
||||
"UNION ALL\n" +
|
||||
"SELECT 'T' AS gruppo,\n" +
|
||||
@@ -1507,7 +1507,7 @@ public class ProductionService {
|
||||
" dtb_ordt.gestione = dtb_ords.gestione\n" +
|
||||
" INNER JOIN gtb_anag ON dtb_ordt.cod_anag = gtb_anag.cod_anag\n" +
|
||||
"WHERE cod_prod = " + UtilityDB.valueToString(codProd) + "\n" +
|
||||
" AND cod_jcom = " + UtilityDB.valueToString(codJcom) + "\n" +
|
||||
" AND (" + UtilityDB.valueToString(codJcom) + " IS NULL OR cod_jcom = " + UtilityDB.valueToString(codJcom) + ") \n" +
|
||||
" AND (" + UtilityDB.valueToString(partitaMag) + " IS NULL OR dtb_ordt.partita_mag = " + UtilityDB.valueToString(partitaMag) + ")\n" +
|
||||
" AND dtb_ordt.gestione = 'L'\n" +
|
||||
" AND NOT EXISTS(SELECT * FROM azienda WHERE azienda.part_iva = gtb_anag.part_iva)\n" +
|
||||
|
||||
@@ -101,7 +101,7 @@ public class ListiniAcquistoHandlerService {
|
||||
" descrizione,\n" +
|
||||
" cod_mart,\n" +
|
||||
" cod_art_for,\n" +
|
||||
" round(qta_cnf/rap_conv, 5) qta_cnf,\n" +
|
||||
" qta_cnf,\n" +
|
||||
" unt_mis_acq,\n" +
|
||||
" qta_min_ord,\n" +
|
||||
" flag_qta_multipla\n" +
|
||||
|
||||
@@ -83,4 +83,14 @@ public class WMSArticoloController {
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "saveArticolo", method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse saveArticolo(@RequestParam(CommonConstants.PROFILE_DB) String profileDB,
|
||||
@RequestBody SaveArticoloDTO saveArticoloDTO) throws Exception {
|
||||
|
||||
return ServiceRestResponse.createPositiveResponse(wmsArticoloService.saveArticolo(saveArticoloDTO));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
package it.integry.ems.retail.wms.generic.dto;
|
||||
|
||||
import it.integry.ems_model.annotation.MapToTable;
|
||||
import it.integry.ems_model.entity.MtbAart;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class SaveArticoloDTO {
|
||||
private String codMart;
|
||||
private String descrizione;
|
||||
private String untMis;
|
||||
private String barCode;
|
||||
private BigDecimal qtaCnf;
|
||||
private String codAliq;
|
||||
private String articoloComposto;
|
||||
private String descrizioneEstesa;
|
||||
private String note;
|
||||
private String posizione;
|
||||
private String codMgrp;
|
||||
private String codMsfa;
|
||||
private String codMsgr;
|
||||
private String codMstp;
|
||||
private String codMtip;
|
||||
private Boolean flagStato;
|
||||
private String codBarreImb;
|
||||
private String diacod;
|
||||
private Boolean flagQtaCnfFissa;
|
||||
private String idArtEqui;
|
||||
private Boolean flagKit;
|
||||
private String precode;
|
||||
|
||||
public MtbAart getMtbAart(){
|
||||
MtbAart articolo = new MtbAart();
|
||||
articolo
|
||||
.setCodMart(codMart)
|
||||
.setDescrizione(descrizione)
|
||||
.setUntMis(untMis)
|
||||
.setBarCode(barCode)
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setCodAliq(codAliq)
|
||||
.setArticoloComposto(articoloComposto)
|
||||
.setDescrizioneEstesa(descrizioneEstesa)
|
||||
.setNote(note)
|
||||
.setPosizione(posizione)
|
||||
.setCodMgrp(codMgrp)
|
||||
.setCodMsfa(codMsfa)
|
||||
.setCodMsgr(codMsgr)
|
||||
.setCodMstp(codMstp)
|
||||
.setCodMtip(codMtip)
|
||||
.setFlagStato(flagStato ? "A" : "I")
|
||||
.setCodBarreImb(codBarreImb)
|
||||
.setDiacod(diacod)
|
||||
.setFlagQtaCnfFissa(flagQtaCnfFissa ? "S" : "N")
|
||||
.setIdArtEqui(idArtEqui)
|
||||
.setFlagKit(flagKit ? "S" : "N");
|
||||
|
||||
return articolo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setUntMis(String untMis) {
|
||||
this.untMis = untMis;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodAliq() {
|
||||
return codAliq;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setCodAliq(String codAliq) {
|
||||
this.codAliq = codAliq;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getArticoloComposto() {
|
||||
return articoloComposto;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setArticoloComposto(String articoloComposto) {
|
||||
this.articoloComposto = articoloComposto;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizioneEstesa() {
|
||||
return descrizioneEstesa;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setDescrizioneEstesa(String descrizioneEstesa) {
|
||||
this.descrizioneEstesa = descrizioneEstesa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setNote(String note) {
|
||||
this.note = note;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizione() {
|
||||
return posizione;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setPosizione(String posizione) {
|
||||
this.posizione = posizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMgrp() {
|
||||
return codMgrp;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setCodMgrp(String codMgrp) {
|
||||
this.codMgrp = codMgrp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMsfa() {
|
||||
return codMsfa;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setCodMsfa(String codMsfa) {
|
||||
this.codMsfa = codMsfa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMsgr() {
|
||||
return codMsgr;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setCodMsgr(String codMsgr) {
|
||||
this.codMsgr = codMsgr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMstp() {
|
||||
return codMstp;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setCodMstp(String codMstp) {
|
||||
this.codMstp = codMstp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMtip() {
|
||||
return codMtip;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setCodMtip(String codMtip) {
|
||||
this.codMtip = codMtip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getFlagStato() {
|
||||
return flagStato;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setFlagStato(Boolean flagStato) {
|
||||
this.flagStato = flagStato;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setFlagStato(String flagStato) {
|
||||
this.flagStato = flagStato != null && flagStato.equalsIgnoreCase("A");
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodBarreImb() {
|
||||
return codBarreImb;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setCodBarreImb(String codBarreImb) {
|
||||
this.codBarreImb = codBarreImb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDiacod() {
|
||||
return diacod;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setDiacod(String diacod) {
|
||||
this.diacod = diacod;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getFlagQtaCnfFissa() {
|
||||
return flagQtaCnfFissa;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setFlagQtaCnfFissa(Boolean flagQtaCnfFissa) {
|
||||
this.flagQtaCnfFissa = flagQtaCnfFissa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setFlagQtaCnfFissa(String flagQtaCnfFissa) {
|
||||
this.flagQtaCnfFissa = flagQtaCnfFissa != null && flagQtaCnfFissa.equalsIgnoreCase("S");
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIdArtEqui() {
|
||||
return idArtEqui;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setIdArtEqui(String idArtEqui) {
|
||||
this.idArtEqui = idArtEqui;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getFlagKit() {
|
||||
return flagKit;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setFlagKit(Boolean flagKit) {
|
||||
this.flagKit = flagKit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setFlagKit(String flagKit) {
|
||||
this.flagKit = flagKit != null && flagKit.equalsIgnoreCase("S");
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPrecode() {
|
||||
return precode;
|
||||
}
|
||||
|
||||
public SaveArticoloDTO setPrecode(String precode) {
|
||||
this.precode = precode;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package it.integry.ems.retail.wms.generic.service;
|
||||
|
||||
import it.integry.ems.exception.MissingDataException;
|
||||
import it.integry.ems.product.importaz.service.ProductServices;
|
||||
import it.integry.ems.retail.wms.generic.dto.SaveArticoloDTO;
|
||||
import it.integry.ems.retail.wms.generic.dto.SearchArticoloByBarcodeOrCodMartResponseDTO;
|
||||
import it.integry.ems.retail.wms.generic.dto.SearchArticoloByCodArtFornOrDescrizioneRequestDTO;
|
||||
import it.integry.ems.retail.wms.generic.dto.SearchArticoloByCodArtFornOrDescrizioneResponseDTO;
|
||||
@@ -8,7 +10,9 @@ import it.integry.ems.service.EntityProcessor;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems_model.entity.MtbAart;
|
||||
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.UtilityString;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -88,4 +92,33 @@ public class WMSArticoloService {
|
||||
entityProcessor.processEntity(mtbAart, multiDBTransactionManager);
|
||||
|
||||
}
|
||||
|
||||
public SaveArticoloDTO saveArticolo(SaveArticoloDTO saveArticoloDTO)throws Exception {
|
||||
if (saveArticoloDTO == null)
|
||||
throw new MissingDataException("saveArticolo");
|
||||
|
||||
MtbAart articolo = saveArticoloDTO.getMtbAart();
|
||||
articolo.setOperation(OperationType.INSERT_OR_UPDATE);
|
||||
if (UtilityString.isNullOrEmpty(articolo.getCodMart())){
|
||||
articolo.setCodMart(suggestCodMart(articolo, saveArticoloDTO.getPrecode()));
|
||||
}
|
||||
entityProcessor.processEntity(articolo,true,multiDBTransactionManager);
|
||||
return saveArticoloDTO;
|
||||
|
||||
}
|
||||
|
||||
private String suggestCodMartRicambi(String codMgrp, String codMsgr, String codMsfa) throws Exception {
|
||||
String sql = Query.format("select dbo.f_suggestCodeCodMartRicambi(%s,%s,%s) ", codMgrp,codMsgr,codMsfa);
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(),sql);
|
||||
}
|
||||
private String suggestCodMart(MtbAart mtbAart, String precode) throws Exception {
|
||||
|
||||
String sql = Query.format("select dbo.f_suggestCodeCodMart(%s) ", precode);
|
||||
if (mtbAart.getCodMgrp().equalsIgnoreCase("T")){
|
||||
sql = Query.format("select dbo.f_suggestCodeCodMartRicambi(%s,%s,%s) ", mtbAart.getCodMgrp(),mtbAart.getCodMsgr(),mtbAart.getCodMsfa());
|
||||
}
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(),sql);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -166,6 +166,11 @@ public class ExchangeSystemManagerService {
|
||||
final ExchangeDestinatariImportService beanDestinatari = ContextLoader.getCurrentWebApplicationContext().getBean(ExchangeDestinatariImportService.class);
|
||||
beanDestinatari.importDestinatari(internalDb, exchangeDb, requestDataDTO);
|
||||
break;
|
||||
|
||||
case DocumentiAcquisto:
|
||||
final ExchangeDocumentImportService beanDocumentiAcquisto = ContextLoader.getCurrentWebApplicationContext().getBean(ExchangeDocumentImportService.class);
|
||||
beanDocumentiAcquisto.importAcquisto(internalDb, exchangeDb, requestDataDTO);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user