refs #3520 feat:silex→salix

This commit is contained in:
Sergio De la torre 2024-04-19 10:48:05 +02:00
parent eab544feef
commit e3f1164353
3 changed files with 0 additions and 850 deletions

View File

@ -4,12 +4,9 @@ import android.content.Context
import es.verdnatura.presentation.common.InteceptorListener import es.verdnatura.presentation.common.InteceptorListener
open class RestClient(context: Context, myObserver: InteceptorListener? = null) { open class RestClient(context: Context, myObserver: InteceptorListener? = null) {
var restClient: VerdnaturaService
var salixClient: SalixService var salixClient: SalixService
init { init {
salixClient = ApiSalixUtils.getApiService(context, myObserver) salixClient = ApiSalixUtils.getApiService(context, myObserver)
restClient = ApiUtils.getApiService(context, myObserver)
} }
} }

View File

@ -1,39 +0,0 @@
package es.verdnatura.domain
import android.content.Context
import android.view.View
import es.verdnatura.MobileApplication
import es.verdnatura.domain.ConstAndValues.TOKEN
import es.verdnatura.presentation.common.InteceptorListener
import okhttp3.Interceptor
import okhttp3.Response
import java.io.IOException
class SilexInterceptor(private val context: Context, private val listener: InteceptorListener?) :
Interceptor {
@Throws(IOException::class)
override fun intercept(chain: Interceptor.Chain): Response {
var request = chain.request()
if (request.headers().toString().isEmpty()) {
val newRequest =
request.newBuilder().addHeader("aplicacion", "json").addHeader("version", "1")
.addHeader(
"Authorization",
(context as MobileApplication).dataStoreApp.readDataStoreKey<String>(TOKEN)
).addHeader("Content-Type", "application/json")
.addHeader("Accept-Language", (context).getLanguage()).build()
request = newRequest
}
if (request.url().toString().contains("renew")) {
return chain.proceed(request)
} else {
listener!!.onInterceptionResult(View.VISIBLE)
val response = chain.proceed(request)
listener.onInterceptionResult(View.INVISIBLE)
return response
}
}
}

View File

@ -1,808 +0,0 @@
package es.verdnatura.domain
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.POST
@JvmSuppressWildcards
interface VerdnaturaService {
/* @POST("security/device_checkLogin")//REVISADA
fun device_checkLogin(
@Body vararg params: Any
):
Call<LoginDevice>*/
/* @POST("almacennew/deviceLog_add")//REVISADA
fun deviceLog_add(
@Body vararg params: Any
):
Call<Unit>*/
/* @POST("/security/getVersion")//REVISADA
fun getVersion(
@Body vararg params: Any
):
Call<VersionApp>*/
//AJUSTES ========================================================================>
/* @POST("almacennew/printer_get")//NO SALIX
fun printer_get():
Call<List<Printers>>*/
/* @POST("almacennew/train_get")//NO SALIX
fun train_get(
):
Call<List<Train>>*/
/* @POST("almacennew/worker_getPrinter")//NO SALIX
fun worker_getPrinter(
):
Call<List<Printers>>*/
/* @POST("almacennew/operator_updateItemPackingType")//NO SALIX
fun operator_updateItemPackingType(
@Body vararg params: Any
):
Call<Unit>*/
/* @POST("almacennew/operator_updateTrain")//NO SALIX
fun operator_updateTrain(
@Body vararg params: Any
):
Call<Unit>*/
/* @POST("almacennew/worker_getSector")//NO SALIX
fun worker_getSector(
):
Call<SectorItemVO>*/
/* @POST("almacennew/operator_getNumberOfWagons")//NO SALIX
fun operator_getNumberOfWagons(
):
Call<Any>*/
/* @POST("almacennew/operator_add")//NO SALIX
fun operator_add(
):
Call<Any>
*/
//PRESACADORES ========================================================================>
/* @POST("almacennew/ticketToPrePrepare")//NO SALIX
fun ticketToPrePrepare(
@Body vararg params: Any
):
Call<List<PreSacadorItemVO>>*/
/* @POST("almacennew/sectorCollection_getSale")//NO SALIX
fun sectorCollection_getSale(
@Body vararg params: Any
):
Call<List<PreSacadorItemVO>>*/
/* @POST("almacennew/itemPlacementSupplyGetOrder")//NO SALIX
fun itemPlacementSupplyGetOrder(
@Body vararg params: Any
):
Call<List<PreSacadorItemVO>>*/
/* @POST("almacennew/itemPlacementSupplyCloseOrder")//NO SALIX
fun itemPlacementSupplyCloseOrder(
@Body vararg params: Any
):
Call<Any>*/
//SACADORES / CONTROLADORES ========================================================================>
/* @POST("almacennew/collectionGet") //NO SALIX
fun collectionGet(
):
Call<List<CollectionVO>>*/
/* @POST("almacennew/sectorCollection_get") //NO SALIX
fun sectorCollection_get(
):
Call<List<CollectionVO>>*/
/* @POST("almacennew/ticket_printLabelPrevious") //NO SALIX
fun ticket_printLabelPrevious(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/collection_assign")//NO SALIX
fun collection_assign(
):
Call<Int>*/
/* @POST("almacennew/operator_getItemPackingType")//NO SALIX
fun operator_getItemPackingType(
):
Call<Any>*/
/* @POST("almacennew/worker_isF11Allowed")//NO SALIX
fun worker_isF11Allowed(
):
Call<Boolean>*/
/* @POST("almacennew/operator_getTrain")//NO SALIX
fun operator_getTrain(
):
Call<String?>*/
/* @POST("almacennew/sectorCollection_new")//NO SALIX
fun sectorCollection_new(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/sectorCollectionSaleGroup_add")//NO SALIX
fun sectorCollectionSaleGroup_add(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/saleTracking_addPrevOK")//NO SALIX
fun saleTracking_addPrevOK(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/saleTracking_updateIsChecked")//NO SALIX
fun saleTracking_updateIsChecked(
@Body vararg params: Any?
):
Call<Any>*/
/* @POST("almacennew/ticket_isOutClosureZone")//NO SALIX
fun ticket_isOutClosureZone(
@Body vararg params: Any
):
Call<Any>*/
//Tarea 3520
/* @POST("almacennew/collection_getUncheckedTicket")//NO SALIX
fun collection_getUncheckedTicket(
@Body vararg params: Any
):
Call<String>*/
//sergio: de momento se separa para ir viendo como funciona. El precontrol llamara a collectionTicketGet con otro parametro.
@POST("almacennew/collection_getTickets")//REVISADA
fun collection_getTickets(
@Body vararg params: Any
):
Call<CollectionVO>
// SE SACA CON LA DE ARRIBA HECHO 3520 PR .collection_get_Tickets //
/* @POST("almacennew/collection_get")//REVISADA
fun collection_get(
@Body vararg params: Any
):
Call<CollectionVO>*/
/* @POST("almacennew/saleTrackingReplace")//REVISADA
fun saleTrackingReplace(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/itemPlacementSupplyAiming")//REVISADA
fun itemPlacementSupplyAiming(
@Body vararg params: Any
):
Call<List<PlacementSupplyVO>>*/
/* @POST("almacennew/itemShelvingSaleSupplyAdd")//REVISADA
fun itemShelvingSaleSupplyAdd(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/saleTracking_mark")//REVISADA
fun saleTracking_mark(
@Body vararg params: Any?
):
Call<Any>*/
/* @POST("almacennew/collection_printSticker")//REVISADA
fun collectionStickerPrint(
@Body vararg params: Any?
):
Call<Any>*/
/* @POST("almacennew/ticketCollection_setUsedShelves")//REVISADA
fun ticketCollection_setUsedShelves(
@Body vararg params: Any
):
Call<Unit>*/
/* @POST("almacennew/item_updatePackingShelve")//REVISADA
fun item_updatePackingShelve(
@Body vararg params: Any
):
Call<Unit>*/
/* @POST("almacennew/saleTracking_add")//REVISADA
fun saleTracking_add(
@Body vararg params: Any
):
Call<Unit>*/
/* @POST("almacennew/collectionAddItem")//REVISADA
fun collectionAddItem(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/saleTrackingDel")//REVISADA
fun saleTrackingDel(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/itemShelving_updateFromSale")//REVISADA
fun itemShelving_updateFromSale(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/ticket_setState")//REVISADA
fun ticket_setState(
@Body vararg params: Any
):
Call<Any>
*/
/* @POST("almacennew/debug_add")//A BORRAR
fun debug_add(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/get_salesModifiedFromTicket")//REVISADA
fun get_salesModifiedFromTicket(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<List<SalesModified>>*/
/* @POST("almacennew/barcodeToItem")//REVISADA
fun getIdFromCode(
@Body vararg params: Any
):
Call<String>*/
/* @POST("almacennew/saleMistakeAdd")//REVISADA
fun saleMistakeAdd(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/workerMistake_Add")//A BORRAR
fun workerMistake_Add(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/expeditionMistake_add")// A BORRAR
fun expeditionMistake_add(
@Body vararg params: Any
):
Call<Any>*/
/* @GET("almacennew/itemShelving_inventory")//REVISADA
fun itemShelving_inventory(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/mistakeType")//REVISADA
fun mistakeType(
):
Call<List<MistakeTypeVO>>*/
/* @POST("almacennew/workerMistakeType_get")//A BORRAR
fun workerMistakeType_get(
):
Call<List<MistakeType>>*/
/* @POST("almacennew/expeditionMistakeType_get")//A BORRAR
fun expeditionMistakeType_get(
):
Call<List<MistakeType>>*/
/* @POST("almacennew/department_getHasMistake")//A BORRAR
fun department_getHasMistake(
):
Call<List<DepartmentMistake>>*/
/* @POST("almacennew/worker_getFromHasMistake")//REVISADA
fun worker_getFromHasMistake(
@Body vararg params: Any
):
Call<List<WorkerFromMistake>>*/
//PASILLEROS ========================================================================>
//CONSULTAR ARTICULO ========================================================================>
/* @POST("almacennew/itemDiary")//REVISADA
fun itemDiary(
@Body vararg params: Any
):
Call<List<ItemHistoricoVO>>*/
/* @POST("almacennew/item_card")//REVISADA
fun getItemCard(
@Body vararg params: Any
):
Call<ItemCardVO>*/
/* @POST("almacennew/item_getSimilar")//REVISADA
fun item_getSimilar(
@Body vararg params: Any
):
Call<List<ItemProposal>>*/
/* @POST("almacennew/get_ItemPackingType")//A BORRAR
fun getItemPackingType(
@Body vararg params: Any
):
Call<List<ItemPackingType>>*/
/* @POST("almacennew/itemTrash")//REVISADA
fun itemTrash(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/buy_updateGrouping")//REVISADA
fun updateGrouping(
@Body vararg params: Any
):
Call<Any>
@POST("almacennew/buy_updatePacking")//REVISADA
fun updatePacking(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/item_saveStems")//A BORRAR
fun item_saveStems(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/item_saveReference")//A BORRAR
fun item_saveReference(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/barcodes_edit")//REVISADA
fun barcodes_edit(
@Body vararg params: Any
):
Call<Any>*/
//BUSCAR ITEM ========================================================================>
/* @POST("almacennew/getItemUbication")//REVISADA
fun searchItemsUbicador(
@Body vararg params: Any
):
Call<List<ItemLocationVO>>*/
//INVENTARIO ========================================================================>
/* @POST("almacennew/itemShelving_filterBuyer")//REVISADA
fun itemShelvingRadarFilterBuyer(
@Body vararg params: Any
):
Call<List<ItemInventaryVO>>*/
//CONTROL DE VEHICULOS
/* @POST("almacennew/machineWorker_add")//REVISADA
fun machineWorker_add(
@Body vararg params: Any
):
Call<Any>
@POST("almacennew/machineWorker_update")//REVISADA
fun machineWorker_update(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/workerMachinery_isRegistered")//REVISADA
fun workerMachinery_isRegistered(
):
Call<String>*/
/* @POST("almacennew/deviceProduction_getnameDevice")//REVISADA
fun deviceProduction_getnameDevice(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/deviceProductionUser_getWorker")//REVISADA
fun deviceProductionUser_getWorker(
@Body vararg params: Any
):
Call<String>*/
/* @POST("almacennew/machine_getWorkerPlate")//REVISADA
fun machine_getWorkerPlate(
):
Call<Any>*/
/* @POST("almacennew/machineWorker_getHistorical")//REVISADA
fun machineWorker_getHistorical(
@Body vararg params: Any
):
Call<List<ItemHistoricoVehiculo>>*/
//UBICADOR ========================================================================>
/* @POST("almacennew/itemShelvingList")//REVISADA
fun itemShelvingList(
@Body vararg params: Any
):
Call<List<ItemUbicadorVO>>*/
/* @POST("almacennew/itemShelvingMake")//REVISADA
fun itemShelvingMake(
@Body vararg params: Any?
):
Call<Any>*/
/* @POST("almacennew/itemShelvingMakeEdit")//REVISADA
fun itemShelvingMakeEdit(
@Body vararg params: Any?
):
Call<Any>*/
@POST("almacennew/itemShelvingMake_multi")//REVISADA
fun itemShelvingMake_multi(
@Body vararg params: Any
):
Call<Any>
/* @POST("almacennew/itemShelving_addList")//REVISADA
fun itemShelving_addList(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/shelvingPark")//REVISADA
fun shelvingPark(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/shelvingChange")//REVISADA
fun shelvingChange(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/itemShelving_return")
fun itemShelving_return(
@Body vararg params: Any
):
Call<ArrayList<Reubication>>*/
/* @POST("almacennew/clearShelvingList")//REVISADA
fun clearShelvingList(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/itemShelvingTransfer")//REVISADA
fun itemShelvingTransfer(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/shelvingLog_add")//REVISADA
fun shelvingLog_add(
@Body vararg params: Any
):
Call<Any>*/
/*
@POST("almacennew/travel_updatePacking")//REVISADA
fun travel_updatePacking(
@Body vararg params: Any
):
Call<Any>
*/
/* @POST("almacennew/itemShelvingDelete")//REVISADA
fun itemShelvingDelete(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/itemShelving_selfConsumption")//REVISADA
fun itemShelving_selfConsumption(
@Body vararg params: Any
):
Call<Any>*/
//BUFFER ==============================================================================>
/* @POST("almacennew/buffer_setTypeByName")//REVISADA
fun buffer_setTypeByName(
@Body vararg params: Any
):
Call<Boolean>*/
// Qr reader ==========================================================================
/* @POST("almacennew/qr_getCall")//REVISADA
fun qr_getCall(
@Body vararg params: Any
):
Call<Any>*/
//PALETIZADORES ========================================================================>
/* @POST("almacennew/expedition_scan")//REVISADA
fun expedition_scan(
@Body vararg params: Any
):
Call<Unit>*/
/* @POST("almacennew/cmrPallet_add")//REVISADA
fun cmrExpeditionPallet_add(
@Body vararg params: Any
):
Call<Unit>*/
/* @POST("almacennew/expedition_getState")//REVISADA
fun expedition_getState(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<itemExpedetionState>*/
/* @POST("almacennew/expedition_getState")//REVISADA
fun expedition_getStateJSON(
@Body vararg params: Any
):
Call<JsonObject>*/
//DIA DE VENTA
/* @POST("almacennew/itemShelving_getSaleDateOld")//REVISADA
fun itemShelving_getSaleDateOld(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<JsonObject>*/
/* @POST("almacennew/itemShelving_getSaleDate")//REVISADA
fun itemShelving_getSaleDate(
@Body vararg params: Any
):
Call<List<ItemShelvingSaleDate>>*/
/* @POST("almacennew/itemShelvingLog_get")//REVISADA
fun itemShelvingLog_get(
@Body vararg params: Any
):
Call<List<ItemShelvingLog>>*/
/* @POST("almacennew/itemShelving_updateSpam")//REVISADA
fun itemShelving_updateSpam(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<Boolean>*/
/* @POST("almacennew/expeditionTruckList")//REVISADA
fun expeditionTruckList(
):
Call<List<ItemExpeditionTruckVO>>*/
/* @POST("almacennew/expeditionTruckAdd")//REVISADA
fun expeditionTruckAdd(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/expeditionPalletList")//REVISADA
fun expeditionPallet_List(
@Body vararg params: Any
):
Call<List<ItemPalletVO>>*/
/* @POST("almacennew/expeditionScanAdd")//REVISADA
fun expeditionScanAdd(
@Body vararg params: Any
):
Call<List<ItemScanVO>>*/
/* @POST("almacennew/expeditionScanPut")//REVISADA
fun expeditionScanPut(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/checkRouteExpeditionScanPut")//REVISADA
fun checkRouteExpeditionScanPut(
@Body vararg params: Any
):
Call<String>*/
/* @POST("almacennew/expeditionPalletView")//REVISADA
fun expeditionPalletView(
@Body vararg params: Any
):
Call<List<ItemPalletViewVO>>*/
/* @POST("almacennew/expeditionPalletDel")//REVISADA
fun expeditionPalletDel(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/expeditionScanList")//REVISADA
fun expeditionScanList(
@Body vararg params: Any
):
Call<List<ItemExpeditionScanVO>>*/
/* @POST("almacennew/expeditionScanDel")//REVISADA
fun expeditionScanDel(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/expeditionPalletPrintSet")//REVISADA
fun expeditionPalletPrintSet(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/expeditionState_addByPallet")//REVISADA
fun expeditionState_addByPallet(
@Body vararg params: Any
):
Call<Unit>*/
/* @POST("almacennew/expeditionPallet_get")//REVISADA
fun expeditionPallet_get(
@Body vararg params: Any
):
Call<ItemExpeditionTruckVO>*/
/* @POST("almacennew/expeditionLoading_add")//REVISADA
fun expeditionLoading_add(
@Body vararg params: Any
):
Call<Any>*/
//CALIDAD
/* @POST("almacennew/itemShelvingBuyerGet")//REVISADA
fun itemShelvingBuyerGet(
):
Call<List<BuyerVO>>*/
/* @POST("almacennew/itemShelvingStarsUpdate")//REVISADA
fun itemShelvingStarsUpdate(
@Body vararg params: Any
):
Call<Any>*/
/* @POST("almacennew/itemShelving_addByClaim")//REVISADA
fun itemShelving_addByClaim(
@Body vararg params: Any
):
Call<Unit>*/
//SUPPLIERS NO VA A UTILIZARSE
/* @POST("almacennew/supplier_getItems")//REVISADA
fun supplier_getItems(
@Body vararg params: Any
):
Call<List<ItemSupplier>>*/
/* @POST("delivery/getInfoCompany")//NO SALIX
fun getInfoCompany(
@Body vararg params: Any
):
Call<List<DeliveryInfo>>*/
/* @POST("delivery/expedition_getLog")//NO SALIX
fun expedition_getLog(
@Body vararg params: Any
):
Call<List<ExpeditionInfoLog>>*/
/* @POST("delivery/get_routesFromExpedition")//NO SALIX
fun get_routesFromExpedition(
@Body vararg params: Any
):
Call<List<RouteDelivery>>*/
/* @POST("delivery/expeditionState_add")// PENDIENTE REDMINE
fun expeditionState_add(
@Body vararg params: Any?
):
Call<Unit>*/
/*@POST("delivery/getInfoFreelance")//NO SALIX
fun getInfoFreelance(
@Body vararg params: Any
):
Call<List<DeliveryInfo>>*/
/* @POST("/delivery/getExpeditionFromRoute")
fun getExpeditionFromRoute(
@Body vararg params: Any
): Call<MutableList<ExpeditionInfoLoadUnload>>*/
/* @POST("/delivery/route_getExpeditionSummary")
fun route_getExpeditionSummary(
@Body vararg params: Any
): Call<List<ExpeditionInfoSummary>>*/
/* @POST("/delivery/get_routes")
fun getRoutes(
@Body vararg params: Any
): Call<MutableList<RouteInfo>>*/
/* @POST("/delivery/addNote")
fun addNotes(
@Body vararg params: Any
): Call<Any>*/
/* @POST("/delivery/get_tickets")
fun getTickets(
@Body vararg params: Any
): Call<MutableList<ClientTicket>>*/
}