Finish v1.28.6(300)
This commit is contained in:
commit
fa6ab9f58f
17
.idea/deploymentTargetDropDown.xml
generated
17
.idea/deploymentTargetDropDown.xml
generated
@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="deploymentTargetDropDown">
|
|
||||||
<runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<Target>
|
|
||||||
<type value="RUNNING_DEVICE_TARGET" />
|
|
||||||
<deviceKey>
|
|
||||||
<Key>
|
|
||||||
<type value="SERIAL_NUMBER" />
|
|
||||||
<value value="20119B1E55" />
|
|
||||||
</Key>
|
|
||||||
</deviceKey>
|
|
||||||
</Target>
|
|
||||||
</runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<timeTargetWasSelectedWithDropDown value="2022-07-21T14:57:04.221380200Z" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 299
|
def appVersionCode = 300
|
||||||
def appVersionName = '1.28.5'
|
def appVersionName = '1.28.6'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import androidx.lifecycle.MutableLiveData;
|
|||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.annimon.stream.ComparatorCompat;
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||||
@ -43,6 +44,7 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailBinding;
|
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailBinding;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||||
@ -76,6 +78,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
|
|
||||||
private BluetoothManager bluetoothManager;
|
private BluetoothManager bluetoothManager;
|
||||||
private BluetoothSerialDevice mConnectedBluetoothDevice;
|
private BluetoothSerialDevice mConnectedBluetoothDevice;
|
||||||
|
private String mLatestCodTcol;
|
||||||
|
|
||||||
|
|
||||||
public ObservableField<BigDecimal> sumLUNumber = new ObservableField<>(BigDecimal.ZERO);
|
public ObservableField<BigDecimal> sumLUNumber = new ObservableField<>(BigDecimal.ZERO);
|
||||||
@ -182,6 +185,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDetach() {
|
public void onDetach() {
|
||||||
|
mLatestCodTcol = null;
|
||||||
if (mConnectedBluetoothDevice != null)
|
if (mConnectedBluetoothDevice != null)
|
||||||
bluetoothManager.close();
|
bluetoothManager.close();
|
||||||
|
|
||||||
@ -207,13 +211,28 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
AtomicBigDecimal sumColli = new AtomicBigDecimal(BigDecimal.ZERO);
|
AtomicBigDecimal sumColli = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||||
AtomicBigDecimal sumNet = new AtomicBigDecimal(BigDecimal.ZERO);
|
AtomicBigDecimal sumNet = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||||
AtomicBigDecimal sumGross = new AtomicBigDecimal(BigDecimal.ZERO);
|
AtomicBigDecimal sumGross = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||||
|
AtomicBigDecimal sumQtaCol = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||||
|
|
||||||
Stream.of(mtbColts)
|
Stream.of(mtbColts)
|
||||||
.forEach(x -> Stream.of(x.getMtbColr()).forEach(y -> {
|
.forEach(x -> Stream.of(x.getMtbColr()).forEach(y -> {
|
||||||
sumColli.getAndAdd(y.getNumCnf());
|
sumColli.getAndAdd(y.getNumCnf());
|
||||||
sumNet.getAndAdd(y.getPesoNettoKg());
|
sumNet.getAndAdd(y.getPesoNettoKg());
|
||||||
sumGross.getAndAdd(y.getPesoLordoKg());
|
sumGross.getAndAdd(y.getPesoLordoKg());
|
||||||
|
sumQtaCol.getAndAdd(y.getQtaCol());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
ComparatorCompat<MtbColt> c = ComparatorCompat
|
||||||
|
.chain(
|
||||||
|
new ComparatorCompat<MtbColt>((x, y) -> x.getDataVersD().compareTo(y.getDataVersD()))
|
||||||
|
)
|
||||||
|
.reversed();
|
||||||
|
MtbColt lastUl = Stream.of(mtbColts).sorted(c).findFirstOrElse(null);
|
||||||
|
if (lastUl != null && !UtilityString.isNullOrEmpty(lastUl.getCodTcol())) {
|
||||||
|
mLatestCodTcol = lastUl.getCodTcol();
|
||||||
|
}
|
||||||
|
|
||||||
|
currentOrder.getValue().setQtaTrasferite(sumQtaCol.get());
|
||||||
|
this.progress.set(currentOrder.getValue().getProgress());
|
||||||
sumColliNumber.set(sumColli.get());
|
sumColliNumber.set(sumColli.get());
|
||||||
sumGrossKG.set(sumGross.get());
|
sumGrossKG.set(sumGross.get());
|
||||||
progress.set(currentOrder.getValue().getProgress());
|
progress.set(currentOrder.getValue().getProgress());
|
||||||
@ -237,7 +256,12 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
public void addULButtonClick() {
|
public void addULButtonClick() {
|
||||||
this.onLoadingStarted();
|
this.onLoadingStarted();
|
||||||
|
|
||||||
String codProd = this.currentOrder.getValue().getCodProd();
|
OrdineLavorazioneDTO currentOrder = this.currentOrder.getValue();
|
||||||
|
if (currentOrder == null) {
|
||||||
|
this.onError(new Exception("Nessun ordine rilevato!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String codProd = currentOrder.getCodProd();
|
||||||
mArticoloRESTConsumer.getByCodMart(codProd, mtbAart -> {
|
mArticoloRESTConsumer.getByCodMart(codProd, mtbAart -> {
|
||||||
|
|
||||||
String sql = "SELECT TOP 1 * " +
|
String sql = "SELECT TOP 1 * " +
|
||||||
@ -246,9 +270,9 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
" * " +
|
" * " +
|
||||||
" FROM dtb_ord_steps " +
|
" FROM dtb_ord_steps " +
|
||||||
" WHERE cod_jfas IS NOT NULL " +
|
" WHERE cod_jfas IS NOT NULL " +
|
||||||
" AND gestione = " + UtilityDB.valueToString(this.currentOrder.getValue().getGestione()) +
|
" AND gestione = " + UtilityDB.valueToString(currentOrder.getGestione()) +
|
||||||
" AND num_ord = " + UtilityDB.valueToString(this.currentOrder.getValue().getNumOrd()) +
|
" AND num_ord = " + UtilityDB.valueToString(currentOrder.getNumOrd()) +
|
||||||
" AND data_ord = " + UtilityDB.valueToString(this.currentOrder.getValue().getDataOrdD()) +
|
" AND data_ord = " + UtilityDB.valueToString(currentOrder.getDataOrdD()) +
|
||||||
" ) tmp " +
|
" ) tmp " +
|
||||||
"WHERE data_iniz IS NOT NULL " +
|
"WHERE data_iniz IS NOT NULL " +
|
||||||
" AND (data_fine IS NULL OR last_step = id_step) " +
|
" AND (data_fine IS NULL OR last_step = id_step) " +
|
||||||
@ -259,15 +283,24 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
|||||||
|
|
||||||
this.onLoadingEnded();
|
this.onLoadingEnded();
|
||||||
|
|
||||||
|
String codTcol = currentOrder.getCodTcolUl();
|
||||||
|
if (UtilityString.isNullOrEmpty(codTcol)) {
|
||||||
|
if (!UtilityString.isNullOrEmpty(mLatestCodTcol)) {
|
||||||
|
codTcol = mLatestCodTcol;
|
||||||
|
} else {
|
||||||
|
codTcol = mtbAart.getCodTcolUl();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DialogInputLUProdDTO dialogInputLUProdDTO = new DialogInputLUProdDTO()
|
DialogInputLUProdDTO dialogInputLUProdDTO = new DialogInputLUProdDTO()
|
||||||
.setMtbAart(mtbAart)
|
.setMtbAart(mtbAart)
|
||||||
.setNumCnf(this.currentOrder.getValue().getColliPedana())
|
.setNumCnf(currentOrder.getColliPedana())
|
||||||
.setQtaCnf(mtbAart.getQtaCnf())
|
.setQtaCnf(mtbAart.getQtaCnf())
|
||||||
.setQtaTot(this.currentOrder.getValue().getColliPedana().multiply(mtbAart.getQtaCnf()))
|
.setQtaTot(currentOrder.getColliPedana().multiply(mtbAart.getQtaCnf()))
|
||||||
.setPartitaMag(this.currentOrder.getValue().getPartitaMag())
|
.setPartitaMag(currentOrder.getPartitaMag())
|
||||||
.setDataScad(this.currentOrder.getValue().getDataScadD())
|
.setDataScad(currentOrder.getDataScadD())
|
||||||
.setCodJfasParent(this.currentOrder.getValue().getCodJfas())
|
.setCodJfasParent(currentOrder.getCodJfas())
|
||||||
.setCodTcol(this.currentOrder.getValue().getCodTcolUl())
|
.setCodTcol(codTcol)
|
||||||
.setSuggestedCodJfas(dtbOrdStep != null && dtbOrdStep.size() > 0 ? dtbOrdStep.get(0).getCodJfas() : null);
|
.setSuggestedCodJfas(dtbOrdStep != null && dtbOrdStep.size() > 0 ? dtbOrdStep.get(0).getCodJfas() : null);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user