Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -58,6 +58,7 @@ public class RossoGarganoSyncService {
|
||||
Date startDate = new Date();
|
||||
DataSource rgExchange = new DataSource();
|
||||
rgExchange.initialize("ROSSOGARGANOEXCHANGE");
|
||||
try {
|
||||
saveCtbCaus(rgExchange.getConnection());
|
||||
logger.info("Importazione causali: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
@@ -73,8 +74,8 @@ public class RossoGarganoSyncService {
|
||||
savePdc(rgExchange.getConnection());
|
||||
logger.info("Importazione Conti del piano dei conti: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
saveFornitori(rgExchange.getConnection());
|
||||
logger.info("Importazione Fornitori dei conti: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
// saveFornitori(rgExchange.getConnection());
|
||||
// logger.info("Importazione Fornitori dei conti: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
deleteCtbMovt(rgExchange.getConnection());
|
||||
logger.info("Cancellazione movimenti contabili: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
@@ -103,17 +104,17 @@ public class RossoGarganoSyncService {
|
||||
saveCtbMovt(rgExchange.getConnection(), "(PNOTA.PN_SEZIONALE_IVA <> '' AND PN_CAUSALE_MOVIMENTO <> '998')", dataIniz, dataFine);
|
||||
logger.info("Importazione fatture attive e passive: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
|
||||
// sql =
|
||||
// "SELECT CAST(FORMAT(DATEPART(YEAR, data_fine), '0000') +\n" +
|
||||
// " FORMAT(DATEPART(MONTH, data_fine), '00') +\n" +
|
||||
// " FORMAT(DATEPART(DAY, data_fine), '00') AS NUMERIC) as data_fine\n" +
|
||||
// "FROM azienda\n" +
|
||||
// " CROSS APPLY dbo.getperiodoannofisc(azienda.anno_contab)";
|
||||
//
|
||||
// dataFine = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
saveCtbMovt(rgExchange.getConnection(), "(PN_CAUSALE_MOVIMENTO <> '998')", dataIniz, dataFine);
|
||||
logger.info("Importazione altri movimenti contabili: Timing " + ((new Date().getTime() - startDate.getTime()) / 1000) + " secs");
|
||||
} catch (Exception e ){
|
||||
if (!UtilityDebug.isDebugExecution()) {
|
||||
mailService.sendSystemErrorLog("Importazione movimenti contabili " + multiDBTransactionManager.getPrimaryDatasource().getDbName(),
|
||||
"Importazione movimenti contabili ",
|
||||
"Errore durante la procedura di importazione movimenti contabili.",
|
||||
e, new Date());
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteCtbMovt(Connection sourceData) throws Exception {
|
||||
|
||||
@@ -610,7 +610,7 @@ public class GiacenzaService {
|
||||
" ISNULL(ip.qta_col, gp.qta_car) AS qta_car,\n" +
|
||||
" ISNULL(IIF(gp.data_ins < ip.data_ins, 0, gp.qta_scar), 0) AS qta_scar,\n" +
|
||||
" ISNULL(ip.data_ins, gp.data_ins) AS data_ins,\n" +
|
||||
" ISNULL(CAST(ip.data_ins AS DATE), gp.data_reg) AS data_reg,\n" +
|
||||
" ISNULL(ip.data_ins, gp.data_reg) AS data_reg,\n" +
|
||||
" IIF(ip.data_ins IS NULL, 0, 1) AS is_invent,\n" +
|
||||
" ip.data_ins AS last_rgiac\n" +
|
||||
" FROM carelli_giacenza_prog gp\n" +
|
||||
@@ -628,7 +628,7 @@ public class GiacenzaService {
|
||||
" INNER JOIN art ON movimenti.cod_mart = art.cod_mart\n" +
|
||||
" LEFT OUTER JOIN selezione_giacenza giac ON giac.cod_mart = art.cod_mart_mov\n" +
|
||||
" WHERE (\n" +
|
||||
" (movimenti.data_reg >= ISNULL(giac.data_reg, CAST(GETDATE() AS DATE)) AND\n" +
|
||||
" (movimenti.data_reg >= CAST(ISNULL(giac.data_reg, GETDATE()) AS DATE) AND\n" +
|
||||
" (giac.data_ins IS NULL OR (movimenti.data_ins >= giac.data_ins))) OR\n" +
|
||||
" (\n" +
|
||||
" (movimenti.tipo_car = 'W') AND (\n" +
|
||||
|
||||
Reference in New Issue
Block a user