Aggiunto supporto a Zebra TC20.
Fix vari.
This commit is contained in:
parent
4e8fe26c6b
commit
1310b34a8d
@ -7,8 +7,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 164
|
||||
def appVersionName = '1.13.18'
|
||||
def appVersionCode = 165
|
||||
def appVersionName = '1.13.19'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@ -10,9 +10,19 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
|
||||
public class PickDataDTO {
|
||||
|
||||
private MtbColt refMtbColt;
|
||||
private MtbColt sourceMtbColt;
|
||||
private ManualPickDTO manualPickDTO;
|
||||
|
||||
public MtbColt getRefMtbColt() {
|
||||
return refMtbColt;
|
||||
}
|
||||
|
||||
public PickDataDTO setRefMtbColt(MtbColt refMtbColt) {
|
||||
this.refMtbColt = refMtbColt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColt getSourceMtbColt() {
|
||||
return sourceMtbColt;
|
||||
}
|
||||
|
||||
@ -774,7 +774,7 @@ public class AccettazionePickingViewModel {
|
||||
return;
|
||||
}
|
||||
|
||||
String reportName = ReportManager.getReportNameLUFromGestione(mCurrentMtbColt.getGestioneEnum());
|
||||
String reportName = ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO);
|
||||
|
||||
this.mPrinterRESTConsumer.printCollo(
|
||||
printerList.get(0),
|
||||
|
||||
@ -6,7 +6,9 @@ import com.annimon.stream.Stream;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@ -277,6 +279,14 @@ public class RettificaGiacenzeViewModel {
|
||||
initialQtaTot = UtilityBigDecimal.multiply(initialNumCnf, initialQtaCnf);
|
||||
}
|
||||
|
||||
if(dataScad == null && pickingObjectDTO.getMtbAart().getGgScadPartita() != null && pickingObjectDTO.getMtbAart().getGgScadPartita() > 0) {
|
||||
dataScad = UtilityDate.getDateInstance();
|
||||
Calendar c = new GregorianCalendar();
|
||||
c.setTime(dataScad);
|
||||
c.add(Calendar.DATE, pickingObjectDTO.getMtbAart().getGgScadPartita());
|
||||
dataScad = c.getTime();
|
||||
}
|
||||
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
|
||||
@ -204,9 +204,9 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
this.mBindings.spedizionePickingList.setAdapter(spedizioneListAdapter);
|
||||
this.mBindings.spedizionePickingList.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
spedizioneListAdapter.setOnItemClicked(clickedItem -> {
|
||||
spedizioneListAdapter.setOnItemClicked((clickedItem) -> {
|
||||
if (!noLUPresent.get() && SettingsManager.iDB().isFlagSpedizioneEnableManualPick() && clickedItem.getSitArtOrdDTO().isFlagEnablePickManuale()) {
|
||||
this.mViewmodel.dispatchOrdineRow(clickedItem);
|
||||
this.mViewmodel.dispatchOrdineRow(clickedItem, clickedItem.getRefMtbColt());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -648,7 +648,7 @@ public class SpedizioneViewModel {
|
||||
if (matchedRows == null || matchedRows.size() == 0) {
|
||||
this.sendError(new NoArtsFoundException());
|
||||
} else if (matchedRows.size() == 1) {
|
||||
this.dispatchOrdineRow(matchedRows.get(0));
|
||||
this.dispatchOrdineRow(matchedRows.get(0), matchedRows.get(0).getRefMtbColt());
|
||||
} else {
|
||||
List<PickingObjectDTO> pickingList = mPickingList.getValue();
|
||||
|
||||
@ -665,7 +665,7 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO) {
|
||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt) {
|
||||
|
||||
BigDecimal totalQtaOrd = pickingObjectDTO.getSitArtOrdDTO().getQtaOrd();
|
||||
BigDecimal totalNumCnfOrd = pickingObjectDTO.getSitArtOrdDTO().getNumCnfOrd();
|
||||
@ -779,6 +779,11 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
if(refMtbColt == null && pickingObjectDTO.getMtbColts().size() == 1) {
|
||||
refMtbColt = pickingObjectDTO.getMtbColts().get(0);
|
||||
}
|
||||
|
||||
MtbColt finalRefMtbColt = refMtbColt;
|
||||
this.sendOnItemDispatched(
|
||||
pickingObjectDTO,
|
||||
pickingObjectDTO.getMtbAart(),
|
||||
@ -797,6 +802,7 @@ public class SpedizioneViewModel {
|
||||
mCanOverflowOrderQuantity,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
finalRefMtbColt,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
@ -883,6 +889,7 @@ public class SpedizioneViewModel {
|
||||
mCanOverflowOrderQuantity,
|
||||
(pickedQuantityDTO, shouldCloseLU) -> {
|
||||
this.saveNewRow(pickingObjectDTO,
|
||||
null,
|
||||
pickedQuantityDTO.getNumCnf(),
|
||||
pickedQuantityDTO.getQtaCnf(),
|
||||
pickedQuantityDTO.getQtaTot(),
|
||||
@ -1087,7 +1094,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
}
|
||||
|
||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
final MtbColr mtbColr = new MtbColr()
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione.model;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -9,17 +11,32 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||
|
||||
public class PickingObjectDTO {
|
||||
public class PickingObjectDTO implements Cloneable {
|
||||
|
||||
private SitArtOrdDTO sitArtOrdDTO;
|
||||
private MtbAart mtbAart;
|
||||
private List<MtbColt> mtbColts;
|
||||
|
||||
private PickDataDTO tempPickData;
|
||||
private MtbColt refMtbColt;
|
||||
private List<MtbColr> withdrawMtbColrs = new ArrayList<>();
|
||||
|
||||
private boolean hidden = false;
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object clone() {
|
||||
try {
|
||||
return super.clone();
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public PickingObjectDTO cloneObject() {
|
||||
return (PickingObjectDTO) this.clone();
|
||||
}
|
||||
|
||||
|
||||
public SitArtOrdDTO getSitArtOrdDTO() {
|
||||
return sitArtOrdDTO;
|
||||
@ -66,6 +83,15 @@ public class PickingObjectDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColt getRefMtbColt() {
|
||||
return refMtbColt;
|
||||
}
|
||||
|
||||
public PickingObjectDTO setRefMtbColt(MtbColt refMtbColt) {
|
||||
this.refMtbColt = refMtbColt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbColr> getWithdrawMtbColrs() {
|
||||
return withdrawMtbColrs;
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ public class DialogInputQuantityV2 extends DialogFragment implements DialogInput
|
||||
|
||||
private void openProgress() {
|
||||
if (this.mCurrentProgress == null) {
|
||||
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
|
||||
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(this.context);
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,6 +181,7 @@ public class DialogInputQuantityV2 extends DialogFragment implements DialogInput
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
this.mOnAbort.run();
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
|
||||
@ -35,6 +35,8 @@ public class ZebraBarcodeReader implements BarcodeReaderInterface {
|
||||
return true;
|
||||
} else if(model.equalsIgnoreCase("TC200J")) {
|
||||
return true;
|
||||
} else if(model.equalsIgnoreCase("TC20")) {
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user