Merge branch 'master' into develop
This commit is contained in:
@@ -162,11 +162,18 @@ public class ExchangeArticoliImportService {
|
||||
allMsgrpData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
allMsfamData.forEach(x -> x.setOperation(x.getOperation() == OperationType.INSERT ? OperationType.INSERT_OR_UPDATE : x.getOperation()));
|
||||
|
||||
allMgrpData = allMgrpData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
allMsgrpData = allMsgrpData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
allMsfamData = allMsfamData.stream().filter(x -> x.getOperation() != OperationType.DELETE).collect(Collectors.toList());
|
||||
|
||||
|
||||
List<EquatableEntityInterface> finalAllMgrpData = allMgrpData;
|
||||
List<EquatableEntityInterface> finalAllMsgrpData = allMsgrpData;
|
||||
List<EquatableEntityInterface> finalAllMsfamData = allMsfamData;
|
||||
|
||||
allMsfamData.stream()
|
||||
.map(x -> (MtbSfam) x)
|
||||
.filter(x -> allMsgrpData.stream()
|
||||
.filter(x -> finalAllMsgrpData.stream()
|
||||
.map(y -> (MtbSgrp) y)
|
||||
.noneMatch(y -> x.getCodMgrp().equalsIgnoreCase(y.getCodMgrp()) &&
|
||||
x.getCodMsgr().equalsIgnoreCase(y.getCodMsgr())))
|
||||
@@ -176,13 +183,13 @@ public class ExchangeArticoliImportService {
|
||||
.setCodMsgr(x.getCodMsgr());
|
||||
|
||||
testata.setOperation(OperationType.UPDATE);
|
||||
allMsgrpData.add(testata);
|
||||
finalAllMsgrpData.add(testata);
|
||||
});
|
||||
|
||||
|
||||
allMsgrpData.stream()
|
||||
.map(x -> (MtbSgrp) x)
|
||||
.forEach(x -> x.setMtbSfam(allMsfamData.stream()
|
||||
.forEach(x -> x.setMtbSfam(finalAllMsfamData.stream()
|
||||
.map(y -> (MtbSfam) y)
|
||||
.filter(y -> y.getCodMgrp().equalsIgnoreCase(x.getCodMgrp()) &&
|
||||
y.getCodMsgr().equalsIgnoreCase(x.getCodMsgr()))
|
||||
@@ -190,7 +197,7 @@ public class ExchangeArticoliImportService {
|
||||
|
||||
allMsgrpData.stream()
|
||||
.map(x -> (MtbSgrp) x)
|
||||
.filter(x -> allMgrpData.stream()
|
||||
.filter(x -> finalAllMgrpData.stream()
|
||||
.map(y -> (MtbGrup) y)
|
||||
.noneMatch(y -> x.getCodMgrp().equalsIgnoreCase(y.getCodMgrp())))
|
||||
.forEach(x -> {
|
||||
@@ -198,13 +205,13 @@ public class ExchangeArticoliImportService {
|
||||
.setCodMgrp(x.getCodMgrp());
|
||||
|
||||
testata.setOperation(OperationType.UPDATE);
|
||||
allMgrpData.add(testata);
|
||||
finalAllMgrpData.add(testata);
|
||||
});
|
||||
|
||||
|
||||
allMgrpData.stream()
|
||||
.map(x -> (MtbGrup) x)
|
||||
.forEach(x -> x.setMtbSgrp(allMsgrpData.stream()
|
||||
.forEach(x -> x.setMtbSgrp(finalAllMsgrpData.stream()
|
||||
.map(y -> (MtbSgrp) y)
|
||||
.filter(y -> y.getCodMgrp().equalsIgnoreCase(x.getCodMgrp()))
|
||||
.collect(Collectors.toList())));
|
||||
|
||||
Reference in New Issue
Block a user