Fix null pointer se articolo senza cq

This commit is contained in:
2025-11-06 15:29:48 +01:00
parent 7112cf15da
commit cf261ab427

View File

@@ -864,6 +864,7 @@ public class ProductionBusinessLogic {
List<JtbCiclCq> jtbCiclCqList = UtilityDB.executeSimpleQueryDTO(conn, sql, JtbCiclCq.class);
if (!UtilityList.isNullOrEmpty(jtbCiclCqList)) {
for (JtbCiclCq cq : jtbCiclCqList) {
int numFase = cq.getNumFase();
String controllo = cq.getControllo();
@@ -894,6 +895,7 @@ public class ProductionBusinessLogic {
ordT.getDtbOrdCq().add(ordCQ);
//((DtbOrdr) dtbOrdr).getOrdLav().getDtbOrdCq().add(ordCQ);
}
}
// -------------------------------------------------
// DISEGNI ORDINE DI LAVORAZIONE
@@ -1846,11 +1848,11 @@ public class ProductionBusinessLogic {
Stream.of(dtbOrdtTrasf.getDtbOrdr()).forEach(
x -> {
DtbOrdr row = null;
BigDecimal qtaEvasa= BigDecimal.ZERO;
BigDecimal qtaEvasa = BigDecimal.ZERO;
FlagEvaso flagEvaso = FlagEvaso.INEVASO;
if (!UtilityList.isNullOrEmpty(rowsDataToMantain)) {
row = rowsDataToMantain.stream().filter(c -> Objects.equals(c.getRigaOrd(), x.getRigaOrd())).findFirst().orElse(null);
if (row != null){
if (row != null) {
qtaEvasa = row.getQtaEvasa();
flagEvaso = row.getFlagEvaso();
}