Finish v1.17.9(229)
This commit is contained in:
commit
c3ee5519b4
@ -6,8 +6,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 228
|
def appVersionCode = 229
|
||||||
def appVersionName = '1.17.8'
|
def appVersionName = '1.17.9'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -37,13 +37,17 @@ public class BaseFragment extends Fragment {
|
|||||||
|
|
||||||
|
|
||||||
public void onLoadingStarted() {
|
public void onLoadingStarted() {
|
||||||
BarcodeManager.disable();
|
new Thread(() -> {
|
||||||
this.openProgress();
|
BarcodeManager.disable();
|
||||||
|
this.openProgress();
|
||||||
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLoadingEnded() {
|
public void onLoadingEnded() {
|
||||||
this.closeProgress();
|
new Thread(() -> {
|
||||||
BarcodeManager.enable();
|
this.closeProgress();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onError(Exception ex) {
|
public void onError(Exception ex) {
|
||||||
|
|||||||
@ -694,4 +694,30 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void assegnaLottoSuColloScarico(MtbColt sourceMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
|
||||||
|
|
||||||
|
for (int i = 0; i < sourceMtbColtClone.getMtbColr().size(); i++) {
|
||||||
|
sourceMtbColtClone.getMtbColr().get(i)
|
||||||
|
.setMtbAart(null)
|
||||||
|
.setMtbPartitaMag(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
colliMagazzinoRESTConsumerService.assegnaLottoSuColloScarico(sourceMtbColtClone).enqueue(new Callback<ServiceRESTResponse<MtbColt>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
||||||
|
analyzeAnswer(response, "assegnaLottoSuColloScarico", data -> {
|
||||||
|
onComplete.run();
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<MtbColt>> call, Throwable t) {
|
||||||
|
if (onFailed != null) onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import retrofit2.http.Query;
|
|||||||
|
|
||||||
public interface ColliMagazzinoRESTConsumerService {
|
public interface ColliMagazzinoRESTConsumerService {
|
||||||
|
|
||||||
@POST("SM2DistribuzioneRigheCollo")
|
@POST("wms/distribuzioneRigheCollo")
|
||||||
Call<ServiceRESTResponse<JsonObject>> distribuisciCollo(@Body DistribuzioneColloDTO distribuzioneCollo);
|
Call<ServiceRESTResponse<JsonObject>> distribuisciCollo(@Body DistribuzioneColloDTO distribuzioneCollo);
|
||||||
|
|
||||||
@POST("getColloByBarcode")
|
@POST("getColloByBarcode")
|
||||||
@ -39,4 +39,7 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("wms/spostaArtsTraUL")
|
@POST("wms/spostaArtsTraUL")
|
||||||
Call<ServiceRESTResponse<Object>> spostaArtsTraUL(@Body SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO);
|
Call<ServiceRESTResponse<Object>> spostaArtsTraUL(@Body SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/assegnaLottoSuColloScarico")
|
||||||
|
Call<ServiceRESTResponse<MtbColt>> assegnaLottoSuColloScarico(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -190,19 +190,19 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
|||||||
|
|
||||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
this.openProgress();
|
this.onLoadingStarted();
|
||||||
|
|
||||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
this.mViewModel.processBarcodeDTO(data, () -> {
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
this.closeProgress();
|
this.onLoadingEnded();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
public void createNewLU() {
|
public void createNewLU() {
|
||||||
this.openProgress();
|
this.onLoadingStarted();
|
||||||
|
|
||||||
this.mViewModel.createNewLU(null, null, () -> {
|
this.mViewModel.createNewLU(null, null, () -> {
|
||||||
this.closeProgress();
|
this.onLoadingEnded();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,16 +225,6 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLoadingStarted() {
|
|
||||||
this.openProgress();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLoadingEnded() {
|
|
||||||
this.closeProgress();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUOpened(MtbColt mtbColt) {
|
public void onLUOpened(MtbColt mtbColt) {
|
||||||
getActivity().runOnUiThread(() -> {
|
getActivity().runOnUiThread(() -> {
|
||||||
|
|||||||
@ -477,48 +477,50 @@ public class PickingLiberoViewModel {
|
|||||||
|
|
||||||
|
|
||||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||||
this.sendOnLoadingStarted();
|
new Thread(this::sendOnLoadingStarted).start();
|
||||||
|
|
||||||
final MtbColr mtbColr = new MtbColr()
|
|
||||||
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
|
||||||
.setPartitaMag(partitaMag)
|
|
||||||
.setDataScadPartita(dataScad)
|
|
||||||
.setQtaCol(qtaTot)
|
|
||||||
.setQtaCnf(qtaCnf)
|
|
||||||
.setNumCnf(numCnf)
|
|
||||||
.setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
|
||||||
.setDatetimeRow(UtilityDate.getDateInstance());
|
|
||||||
|
|
||||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
final MtbColr mtbColr = new MtbColr()
|
||||||
|
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||||
|
.setPartitaMag(partitaMag)
|
||||||
|
.setDataScadPartita(dataScad)
|
||||||
|
.setQtaCol(qtaTot)
|
||||||
|
.setQtaCnf(qtaCnf)
|
||||||
|
.setNumCnf(numCnf)
|
||||||
|
.setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
||||||
|
.setDatetimeRow(UtilityDate.getDateInstance());
|
||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
|
||||||
|
|
||||||
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||||
cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
|
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||||
|
|
||||||
if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
|
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||||
this.sendOnLoadingEnded();
|
cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
|
||||||
mtbColr
|
this.sendOnLoadingEnded();
|
||||||
.setDataCollo(value.getDataColloS())
|
return;
|
||||||
.setNumCollo(value.getNumCollo())
|
}
|
||||||
.setGestione(value.getGestione())
|
|
||||||
.setSerCollo(value.getSerCollo())
|
|
||||||
.setRiga(value.getMtbColr().get(value.getMtbColr().size() - 1).getRiga())
|
|
||||||
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
|
||||||
.setMtbAart(pickingObjectDTO.getMtbAart());
|
|
||||||
|
|
||||||
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
||||||
|
mtbColr
|
||||||
|
.setDataCollo(value.getDataColloS())
|
||||||
|
.setNumCollo(value.getNumCollo())
|
||||||
|
.setGestione(value.getGestione())
|
||||||
|
.setSerCollo(value.getSerCollo())
|
||||||
|
.setRiga(value.getMtbColr().get(value.getMtbColr().size() - 1).getRiga())
|
||||||
|
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||||
|
.setMtbAart(pickingObjectDTO.getMtbAart());
|
||||||
|
|
||||||
this.sendOnRowSaved();
|
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||||
this.sendOnLoadingEnded();
|
|
||||||
|
this.sendOnRowSaved();
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
|
if (shouldCloseLU) closeLU(null);
|
||||||
|
}, this::sendError);
|
||||||
|
|
||||||
if (shouldCloseLU) closeLU(null);
|
|
||||||
}, this::sendError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -710,12 +712,15 @@ public class PickingLiberoViewModel {
|
|||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
mColliMagazzinoRESTConsumer.updateDataFine(mCurrentMtbColt, () -> {
|
|
||||||
this.sendLUClosed();
|
|
||||||
this.sendOnLoadingEnded();
|
|
||||||
|
|
||||||
this.mCurrentMtbColt = null;
|
this.mColliMagazzinoRESTConsumer.assegnaLottoSuColloScarico(mCurrentMtbColt, () -> {
|
||||||
if (onComplete != null) onComplete.run();
|
this.mColliMagazzinoRESTConsumer.updateDataFine(mCurrentMtbColt, () -> {
|
||||||
|
this.sendLUClosed();
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
|
this.mCurrentMtbColt = null;
|
||||||
|
if (onComplete != null) onComplete.run();
|
||||||
|
}, this::sendError);
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user