Compare commits
22 Commits
v1.16.23(2
...
v1.16.28(2
| Author | SHA1 | Date | |
|---|---|---|---|
| ac446d953c | |||
| 407ff0b264 | |||
| 10e748b9d4 | |||
| e30273fe42 | |||
| 44564245a7 | |||
| 920f306907 | |||
| 90aa52ab55 | |||
| 93f3eb65f0 | |||
| eb94944928 | |||
| 28698ba306 | |||
| c713bbebbc | |||
| 38e2a02766 | |||
| dd8bf264a4 | |||
| 9488c1994d | |||
| 16099cdaf6 | |||
| f061f2bfc9 | |||
| f7253fd44c | |||
| e12d371567 | |||
| 5596f71c03 | |||
| 8669b812f5 | |||
| 3243484dd0 | |||
| 37114dc4d1 |
@@ -6,8 +6,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 205
|
||||
def appVersionName = '1.16.23'
|
||||
def appVersionCode = 210
|
||||
def appVersionName = '1.16.28'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@@ -660,9 +660,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
).enqueue(new Callback<ServiceRESTResponse<MtbColr>>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbColr>> call, Response<ServiceRESTResponse<MtbColr>> response) {
|
||||
analyzeAnswer(response, "creaRettificaCollo", data -> {
|
||||
onComplete.run(data);
|
||||
}, onFailed);
|
||||
analyzeAnswer(response, "creaRettificaCollo", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -674,6 +672,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
public void spostaArtsTraUL(MtbColt sourceMtbColt, MtbColt destMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
MtbColt mtbColtToMoveClone = (MtbColt) sourceMtbColt.clone();
|
||||
MtbColt mtbColtDestClone = (MtbColt) destMtbColt.clone();
|
||||
|
||||
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
|
||||
mtbColtToMoveClone.getMtbColr().get(i)
|
||||
@@ -681,9 +680,11 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
.setMtbPartitaMag(null);
|
||||
}
|
||||
|
||||
mtbColtDestClone.setMtbColr(null);
|
||||
|
||||
SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO = new SpostaArtsTraULRequestDTO()
|
||||
.setSourceMtbColt(sourceMtbColt)
|
||||
.setDestinationMtbColt(destMtbColt);
|
||||
.setSourceMtbColt(mtbColtToMoveClone)
|
||||
.setDestinationMtbColt(mtbColtDestClone);
|
||||
|
||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||
colliMagazzinoRESTConsumerService.spostaArtsTraUL(
|
||||
|
||||
@@ -312,6 +312,8 @@ public class SettingsManager {
|
||||
return clazz.cast(value.getValue());
|
||||
} else if(clazz == Boolean.class) {
|
||||
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
||||
} else if(clazz == Integer.class) {
|
||||
return clazz.cast(Integer.parseInt(value.getValue()));
|
||||
} else return null;
|
||||
|
||||
}
|
||||
|
||||
@@ -125,6 +125,9 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
this.initRecyclerView();
|
||||
this.initBarcodeReader();
|
||||
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
mViewModel.init(codMdep, mCurrentGestioneOrd, mCurrentGestioneCol, mCurrentSegnoCol);
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
@@ -132,8 +135,9 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
mViewModel.init(codMdep, mCurrentGestioneOrd, mCurrentGestioneCol, mCurrentSegnoCol);
|
||||
if(mAppliedFilterViewModel != null) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -191,7 +191,7 @@ public class VersamentoMerceViewModel {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.spostaArtsTraUL(
|
||||
sourceMtbColt,
|
||||
clonedSourceTestata,
|
||||
destMtbColt,
|
||||
this::sendOnDataSaved,
|
||||
this::sendError
|
||||
|
||||
@@ -46,6 +46,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
|
||||
private boolean mShouldCheckResiduo;
|
||||
private boolean mShouldCheckIfExistDoc;
|
||||
private boolean mEnableCreation;
|
||||
|
||||
private final BindableBoolean basketEnabled = new BindableBoolean();
|
||||
private final BindableBoolean creationEnabled = new BindableBoolean();
|
||||
@@ -71,6 +72,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
this.basketEnabled.set(enableBasket);
|
||||
this.creationEnabled.set(enableCreation);
|
||||
|
||||
mEnableCreation = enableCreation;
|
||||
mOnComplete = onComplete;
|
||||
}
|
||||
|
||||
@@ -95,7 +97,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
getDialog().setCanceledOnTouchOutside(false);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc);
|
||||
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc, mEnableCreation);
|
||||
|
||||
mBindings.createNewLuButton.setOnClickListener(v -> {
|
||||
this.mViewModel.createNewLU();
|
||||
|
||||
@@ -29,6 +29,7 @@ public class DialogScanOrCreateLUViewModel {
|
||||
|
||||
private boolean mShouldCheckResiduo = false;
|
||||
private boolean mShouldCheckIfExistDoc = true;
|
||||
private boolean mEnableCreation = false;
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
@@ -40,9 +41,10 @@ public class DialogScanOrCreateLUViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc) {
|
||||
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean enableCreation) {
|
||||
this.mShouldCheckResiduo = checkResiduo;
|
||||
this.mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
||||
this.mEnableCreation = enableCreation;
|
||||
}
|
||||
|
||||
public void createNewLU() {
|
||||
@@ -94,11 +96,14 @@ public class DialogScanOrCreateLUViewModel {
|
||||
this.mColliMagazzinoRESTConsumer.getBySSCC(barcodeScanDTO.getStringValue(), mShouldCheckResiduo, false, mtbColt -> {
|
||||
|
||||
if (mtbColt == null) {
|
||||
this.mColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(barcodeScanDTO, GestioneEnum.LAVORAZIONE, createdMtbColt -> {
|
||||
onComplete.run();
|
||||
this.sendOnLUOpened(createdMtbColt, true);
|
||||
}, this::sendError);
|
||||
|
||||
if(mEnableCreation) {
|
||||
this.mColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(barcodeScanDTO, GestioneEnum.LAVORAZIONE, createdMtbColt -> {
|
||||
onComplete.run();
|
||||
this.sendOnLUOpened(createdMtbColt, true);
|
||||
}, this::sendError);
|
||||
} else {
|
||||
this.sendError(new NoLUFoundException());
|
||||
}
|
||||
} else {
|
||||
if (mtbColt.getCodDtip() != null && mShouldCheckIfExistDoc) {
|
||||
this.sendError(new AlreadyAttachedDocumentToLUException());
|
||||
|
||||
Reference in New Issue
Block a user