Rimossa domanda di posizionamento nel caso si apre una UL e non viene creata da 0.
This commit is contained in:
parent
91f4658fe3
commit
3663b2bf4e
@ -93,6 +93,7 @@ public class SpedizioneViewModel {
|
|||||||
private boolean mCanOverflowOrderQuantity;
|
private boolean mCanOverflowOrderQuantity;
|
||||||
private boolean mShouldAskPesoLU;
|
private boolean mShouldAskPesoLU;
|
||||||
private String mReportNameSpedizioneChiudiOrdine;
|
private String mReportNameSpedizioneChiudiOrdine;
|
||||||
|
private boolean mIsNewLU;
|
||||||
|
|
||||||
private MtbColt mCurrentMtbColt = null;
|
private MtbColt mCurrentMtbColt = null;
|
||||||
|
|
||||||
@ -435,6 +436,7 @@ public class SpedizioneViewModel {
|
|||||||
} else {
|
} else {
|
||||||
this.mCurrentMtbColt = mtbColt;
|
this.mCurrentMtbColt = mtbColt;
|
||||||
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(mtbColt, mTestateOrdini);
|
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(mtbColt, mTestateOrdini);
|
||||||
|
this.mIsNewLU = false;
|
||||||
|
|
||||||
this.sendLUOpened(mtbColt);
|
this.sendLUOpened(mtbColt);
|
||||||
|
|
||||||
@ -1236,8 +1238,8 @@ public class SpedizioneViewModel {
|
|||||||
.setMtbColr(new ObservableArrayList<>());
|
.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
this.mCurrentMtbColt = mtbColt;
|
this.mCurrentMtbColt = mtbColt;
|
||||||
|
|
||||||
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(mtbColt, mTestateOrdini);
|
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(mtbColt, mTestateOrdini);
|
||||||
|
this.mIsNewLU = true;
|
||||||
|
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
this.sendLUOpened(mtbColt);
|
this.sendLUOpened(mtbColt);
|
||||||
@ -1476,6 +1478,7 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
if (canBeDeleted) {
|
if (canBeDeleted) {
|
||||||
deleteLU(() -> {
|
deleteLU(() -> {
|
||||||
|
this.mIsNewLU = false;
|
||||||
this.sendLUClosed();
|
this.sendLUClosed();
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
});
|
});
|
||||||
@ -1510,42 +1513,45 @@ public class SpedizioneViewModel {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
distribuisciLU(mtbColts -> {
|
distribuisciLU(mtbColts -> {
|
||||||
this.sendLUPositionChangeRequest((shouldChangePosition, mtbDepoPosizione) -> {
|
if(this.mIsNewLU) {
|
||||||
|
this.sendLUPositionChangeRequest((shouldChangePosition, mtbDepoPosizione) -> {
|
||||||
|
|
||||||
if (shouldChangePosition) {
|
if (shouldChangePosition) {
|
||||||
|
|
||||||
if (mtbDepoPosizione != null) {
|
if (mtbDepoPosizione != null) {
|
||||||
if (mtbDepoPosizione.isFlagMonoCollo()) {
|
if (mtbDepoPosizione.isFlagMonoCollo()) {
|
||||||
this.mPosizioneRESTConsumer.getBancaliInPosizione(mtbDepoPosizione, destMtbColtList -> {
|
this.mPosizioneRESTConsumer.getBancaliInPosizione(mtbDepoPosizione, destMtbColtList -> {
|
||||||
if (destMtbColtList == null || destMtbColtList.size() != 1) {
|
if (destMtbColtList == null || destMtbColtList.size() != 1) {
|
||||||
//Nessuna UL trovata oppure più UL nella stessa posizione
|
//Nessuna UL trovata oppure più UL nella stessa posizione
|
||||||
this.sendError(new NoLUFoundException());
|
this.sendError(new NoLUFoundException());
|
||||||
} else {
|
|
||||||
if (destMtbColtList.get(0).getSegno() != mDefaultSegnoCol) {
|
|
||||||
this.sendError(new InvalidLUException());
|
|
||||||
} else {
|
} else {
|
||||||
moveLUtoLU(mtbColts, destMtbColtList.get(0), savedMtbColt -> {
|
if (destMtbColtList.get(0).getSegno() != mDefaultSegnoCol) {
|
||||||
ArrayList<MtbColt> savedMtbColtList = new ArrayList<>();
|
this.sendError(new InvalidLUException());
|
||||||
savedMtbColtList.add(savedMtbColt);
|
} else {
|
||||||
postCloseOperations(savedMtbColtList);
|
moveLUtoLU(mtbColts, destMtbColtList.get(0), savedMtbColt -> {
|
||||||
});
|
ArrayList<MtbColt> savedMtbColtList = new ArrayList<>();
|
||||||
}
|
savedMtbColtList.add(savedMtbColt);
|
||||||
|
postCloseOperations(savedMtbColtList);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
} else {
|
||||||
|
//La posizione non è Mono-UL
|
||||||
|
this.sendError(new CurrentMonoLUPositionIsNotCorrectException());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
//La posizione non è Mono-UL
|
//Nessuna posizione trovata con questo barcode
|
||||||
this.sendError(new CurrentMonoLUPositionIsNotCorrectException());
|
this.sendError(new ScannedPositionNotExistException());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Nessuna posizione trovata con questo barcode
|
postCloseOperations(mtbColts);
|
||||||
this.sendError(new ScannedPositionNotExistException());
|
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
postCloseOperations(mtbColts);
|
} else {
|
||||||
}
|
postCloseOperations(mtbColts);
|
||||||
|
}
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1723,6 +1729,8 @@ public class SpedizioneViewModel {
|
|||||||
pickingObjectDTO.setWithdrawMtbColrs(new ArrayList<>());
|
pickingObjectDTO.setWithdrawMtbColrs(new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.mIsNewLU = false;
|
||||||
|
|
||||||
this.resetMatchedRows();
|
this.resetMatchedRows();
|
||||||
this.sendLUClosed();
|
this.sendLUClosed();
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user