Finish v1.16.31(213)

This commit is contained in:
Giuseppe Scorrano 2021-04-26 12:01:37 +02:00
commit 88b1c56360
3 changed files with 24 additions and 31 deletions

View File

@ -6,8 +6,8 @@ apply plugin: 'com.google.gms.google-services'
android {
def appVersionCode = 212
def appVersionName = '1.16.30'
def appVersionCode = 213
def appVersionName = '1.16.31'
signingConfigs {
release {

View File

@ -11,7 +11,6 @@ import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@ -485,40 +484,31 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
public static void getByTestataStatic(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
String ssccString = null;
testata.setMtbColr(new ObservableArrayList<>());
if (testata.getSerCollo().equalsIgnoreCase(CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE)) {
ssccString = "U";
SimpleDateFormat sdf = new SimpleDateFormat("yy");
ssccString += sdf.format(testata.getDataColloD());
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
colliMagazzinoRESTConsumerService.getColloInGiac(onlyResiduo, throwExcIfNull, testata).enqueue(new Callback<ServiceRESTResponse<MtbColt>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
analyzeAnswer(response, "getColloInGiac", mtbColt -> {
ssccString += String.format("%07d", testata.getNumCollo());
} else {
ssccString = "";
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
List<MtbColt> mtbColtList = new ArrayList<>();
mtbColtList.add(mtbColt);
fillMtbAartsOfMtbColtsStatic(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
} else {
onComplete.run(mtbColt);
}
switch (testata.getGestioneEnum()) {
case ACQUISTO:
ssccString += "1";
break;
case LAVORAZIONE:
ssccString += "2";
break;
case VENDITA:
ssccString += "3";
break;
}, onFailed);
}
SimpleDateFormat sdf = new SimpleDateFormat("yy");
ssccString += sdf.format(testata.getDataColloD());
ssccString += String.format("%05d", testata.getNumCollo());
ssccString += "0";
}
getBySSCCStatic(ssccString, onlyResiduo, throwExcIfNull, onComplete, onFailed);
@Override
public void onFailure(Call<ServiceRESTResponse<MtbColt>> call, Throwable t) {
onFailed.run(new Exception(t));
}
});
}

View File

@ -24,6 +24,9 @@ public interface ColliMagazzinoRESTConsumerService {
@POST("getColloByBarcode")
Call<ServiceRESTResponse<MtbColt>> getColloByBarcode(@Query("codBarreCollo") String sscc, @Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull);
@POST("getColloInGiac")
Call<ServiceRESTResponse<MtbColt>> getColloInGiac(@Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull, @Body MtbColt mtbColt);
@GET("getColliInBasket")
Call<ServiceRESTResponse<List<MtbColt>>> getColliInBasket(@Query("codMdep") String codMdep);