Finish Hotfix-72
This commit is contained in:
@@ -219,7 +219,7 @@ public class GiacenzaService {
|
|||||||
|
|
||||||
private void popolaQtaCarInventario(String codMdep, Date dataIniz, String queryArt, List<String> articoliSalvati, String codDtipRett) throws Exception {
|
private void popolaQtaCarInventario(String codMdep, Date dataIniz, String queryArt, List<String> articoliSalvati, String codDtipRett) throws Exception {
|
||||||
String sql =
|
String sql =
|
||||||
Query.format("SELECT min(id_inventario) from carelli_giacenza_prog WHERE cod_mdep = %s and id_inventario is not null", codMdep);
|
Query.format("SELECT max(id_inventario) from carelli_giacenza_prog WHERE cod_mdep = %s and id_inventario is not null", codMdep);
|
||||||
|
|
||||||
Integer maxIdInv = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
Integer maxIdInv = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||||
|
|
||||||
@@ -299,10 +299,10 @@ public class GiacenzaService {
|
|||||||
|
|
||||||
sql =
|
sql =
|
||||||
Query.format(
|
Query.format(
|
||||||
"SELECT art.cod_mart_mov as cod_mart " +
|
"SELECT DISTINCT art.cod_mart_mov as cod_mart " +
|
||||||
" FROM mtb_aart " +
|
" FROM mtb_aart " +
|
||||||
" INNER JOIN (" + queryArt + ") art on mtb_aart.cod_mart = art.cod_mart\n" +
|
" INNER JOIN (" + queryArt + ") art on mtb_aart.cod_mart = art.cod_mart\n" +
|
||||||
"WHERE exists(select * from mtb_sart where mtb_aart.cod_marT = mtb_sart.cod_mart and mtb_sart.cod_mdep = %s and \n" +
|
"WHERE exists(select * from mtb_sart where art.cod_mart_mov = mtb_sart.cod_mart and mtb_sart.cod_mdep = %s and \n" +
|
||||||
"(qta_iniz <> 0 or qta_car <> 0 or qta_scar <> 0 ))", codMdep);
|
"(qta_iniz <> 0 or qta_car <> 0 or qta_scar <> 0 ))", codMdep);
|
||||||
sql = UtilityDB.addwhereCond(sql, whereCondFiltro, true);
|
sql = UtilityDB.addwhereCond(sql, whereCondFiltro, true);
|
||||||
List<String> datiArt = UtilityDB.executeSimpleQueryOnlyFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
List<String> datiArt = UtilityDB.executeSimpleQueryOnlyFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||||
@@ -367,7 +367,7 @@ public class GiacenzaService {
|
|||||||
.setQtaScar(BigDecimal.ZERO)
|
.setQtaScar(BigDecimal.ZERO)
|
||||||
.setDataReg(dataCollo)
|
.setDataReg(dataCollo)
|
||||||
.setTipoCar("R")
|
.setTipoCar("R")
|
||||||
.setDataIns(new Date());
|
.setDataIns(dataCollo);
|
||||||
|
|
||||||
if (articoliSalvati.contains(codMart))
|
if (articoliSalvati.contains(codMart))
|
||||||
c.setOperation(OperationType.UPDATE);
|
c.setOperation(OperationType.UPDATE);
|
||||||
|
|||||||
Reference in New Issue
Block a user