Finish Hotfix-100
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:
@@ -34,15 +34,7 @@ public class UtilityThread {
|
||||
int finalI = i;
|
||||
|
||||
calls.add(() -> {
|
||||
try {
|
||||
return runnables.get(finalI).run();
|
||||
} catch (Exception ex) {
|
||||
logger.error("executeParallel", ex);
|
||||
|
||||
//if (rethrowError) throw ex;
|
||||
}
|
||||
|
||||
return null;
|
||||
return runnables.get(finalI).run();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -132,6 +132,24 @@ public class VariazioniPvService {
|
||||
String query = getQueryVariazioni(variazioniPvDTO, setup, datiLisv.getCodVlis(), UtilityHashMap.getValueIfExists(getSetupSectionDepo, "SELEZIONA_GRIGLIE"));
|
||||
variazioniLisv = UtilityDB.executeSimpleQueryDTO(mdb.getPrimaryConnection(), query, VariazioniDettaglioDTO.class);
|
||||
|
||||
boolean duplicati = variazioniLisv.stream()
|
||||
.filter(x->x.getIdPromo() !=null && !x.getIdPromo().isEmpty())
|
||||
.collect(Collectors.groupingBy(
|
||||
VariazioniDettaglioDTO::getIdPromo,
|
||||
Collectors.mapping(
|
||||
p -> p.getDataIniz() + "#" + p.getDataFine(),
|
||||
Collectors.toSet()
|
||||
)
|
||||
))
|
||||
.values().stream()
|
||||
.anyMatch(set -> set.size() > 1);
|
||||
|
||||
if (duplicati) {
|
||||
throw new Exception(String.format("Attenzione rigenerare il file del punto vendita %s ci sono articoli con dati promo errati.",
|
||||
datiLisv.getCodVlis()));
|
||||
}
|
||||
|
||||
|
||||
if (variazioniLisv != null) {
|
||||
variazioniLisv
|
||||
.forEach(
|
||||
@@ -324,7 +342,6 @@ public class VariazioniPvService {
|
||||
else if (setupDescr.equalsIgnoreCase("B"))
|
||||
descrizioneEstesa = var.getDescrCassa();
|
||||
}
|
||||
descrizioneEstesa = UtilityString.sanitizeXmlString(descrizioneEstesa);
|
||||
codMartType.getContent().add(objectFactory.createCodMartTypeDescrizioneEstesa(UtilityString.streNull(descrizioneEstesa)));
|
||||
codMartType.getContent().add(objectFactory.createCodMartTypeUntMis2(UtilityString.streNull(var.getUntMis2())));
|
||||
codMartType.getContent().add(objectFactory.createCodMartTypeUntMis(UtilityString.streNull(var.getUntMis())));
|
||||
@@ -615,8 +632,8 @@ public class VariazioniPvService {
|
||||
" mtb_aart_equi.descrizione AS 'descr_art_equi',\n" +
|
||||
" promozione.flag_tipo_promo,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN promozione.flag_tipo_promo <> 'P' THEN promozione.data_iniz\n" +
|
||||
" ELSE NULL END AS 'data_iniz_promo',\n" +
|
||||
" WHEN promozione.flag_tipo_promo <> 'P' THEN ISNULL(vtb_list_data.data_iniz, listino.data_iniz)\n" +
|
||||
" ELSE NULL END AS 'data_iniz_promo',\n" +
|
||||
" CASE\n" +
|
||||
" WHEN promozione.cod_promo IS NOT NULL AND promozione.flag_tipo_promo <> 'P'\n" +
|
||||
" THEN listino.cod_vlis + '_' + CAST(promozione.versione AS VARCHAR)\n" +
|
||||
|
||||
Reference in New Issue
Block a user