Version 9.6Beta en test: paletizadores
This commit is contained in:
parent
78a07415ea
commit
16f9072c5f
|
@ -44,8 +44,8 @@
|
|||
</shared>
|
||||
</component>
|
||||
<component name="AndroidLogFilters">
|
||||
<option name="TOOL_WINDOW_CUSTOM_FILTER" value="verdnatura::" />
|
||||
<option name="TOOL_WINDOW_LOG_LEVEL" value="debug" />
|
||||
<option name="TOOL_WINDOW_CUSTOM_FILTER" value="verdnatura" />
|
||||
<option name="TOOL_WINDOW_LOG_LEVEL" value="error" />
|
||||
<option name="TOOL_WINDOW_CONFIGURED_FILTER" value="verdnatura" />
|
||||
<option name="TOOL_WINDOW_REGEXP_FILTER" value="false" />
|
||||
</component>
|
||||
|
@ -86,41 +86,35 @@
|
|||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 9.6Beta en test : ubicador, quality, posicion, buscar item, reclamaciones...">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/release/vn-picking.apk" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetBuscarItemUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetBuscarItemUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetItemCardUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetItemCardUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetSacadorControladorUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetSacadorControladorUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SilexInterceptor.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SilexInterceptor.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetPaletizadoresUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetPaletizadoresUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/QaualityFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/QaualityFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/QaualityViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/QaualityViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/claim/fragment/ClaimFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/claim/fragment/ClaimFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/claim/fragment/ClaimViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/claim/fragment/ClaimViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemProposalFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemProposalFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragmentViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragmentViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferLoadFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferLoadFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/fragment/HistoricoArticuloFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/fragment/HistoricoArticuloFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/fragment/HistoricoArticuloViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/fragment/HistoricoArticuloViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelving/fragment/ItemShelvingLogFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelving/fragment/ItemShelvingLogFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelving/fragment/ItemShelvingLogViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelving/fragment/ItemShelvingLogViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelvinglog/fragment/shelvingLogViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelvinglog/fragment/shelvingLogViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionStateFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionStateFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionStateViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionStateViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionTruckListFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionTruckListFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionTruckListViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionTruckListViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/model/ItemExpeditionTruckVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/model/ItemExpeditionTruckVO.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/model/ItemPalletVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/model/ItemPalletVO.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/model/ItemScanVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/model/ItemScanVO.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/fragment/ReposicionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/fragment/ReposicionFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/fragment/ReposicionViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/fragment/ReposicionViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/adapter/UbicadorAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/adapter/UbicadorAdapter.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/model/ItemUbicadorVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/model/ItemUbicadorVO.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/smarttag/model/SmartTag.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/smarttag/model/SmartTag.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row_fragment.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row_fragment.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row_presacador.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row_presacador.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_expeditionpallet_row.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_expeditionpallet_row.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -131,7 +125,7 @@
|
|||
<component name="CodeInsightWorkspaceSettings">
|
||||
<option name="optimizeImportsOnTheFly" value="true" />
|
||||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[21114523025303]" />
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[C:\Users\sergiodt\.android\avd\Pixel_2_API_24.avd]" />
|
||||
<component name="ExportToHTMLSettings">
|
||||
<option name="OPEN_IN_BROWSER" value="true" />
|
||||
<option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" />
|
||||
|
@ -439,13 +433,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1618825571576</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00050" summary="Version 8.2 obligatorio sector para imprimir, Desmarcar sacador ok. Cambiado texto DiadeVenta.Añadido icono Parking previa. Actualiza datos en Previa. Nuevo diseño INVISIBLE">
|
||||
<created>1651646872970</created>
|
||||
<option name="number" value="00050" />
|
||||
<option name="presentableId" value="LOCAL-00050" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1651646872971</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00051" summary="Version 8.2 obligatorio sector para imprimir, Desmarcar sacador ok. Cambiado texto DiadeVenta.Añadido icono Parking previa. Actualiza datos en Previa. Nuevo diseño INVISIBLE">
|
||||
<created>1651647030034</created>
|
||||
<option name="number" value="00051" />
|
||||
|
@ -782,7 +769,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1669275670424</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="99" />
|
||||
<task id="LOCAL-00099" summary="Version 9.6Beta en test : ubicador, quality, posicion, buscar item, reclamaciones...">
|
||||
<created>1669631463102</created>
|
||||
<option name="number" value="00099" />
|
||||
<option name="presentableId" value="LOCAL-00099" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1669631463102</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="100" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.History.Properties">
|
||||
|
@ -916,7 +910,7 @@
|
|||
<breakpoints>
|
||||
<line-breakpoint enabled="true" suspend="THREAD" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt</url>
|
||||
<line>61</line>
|
||||
<line>63</line>
|
||||
<option name="timeStamp" value="3" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" suspend="THREAD" type="kotlin-line">
|
||||
|
|
|
@ -81,25 +81,18 @@ class GetPaletizadoresUserCase(context: Context) : RestClient(context) {
|
|||
}
|
||||
|
||||
fun expedition_getStateJSON(
|
||||
usuario: String,
|
||||
password: String,
|
||||
expeditionFk: String
|
||||
): Call<JsonObject> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(expeditionFk)
|
||||
return restClient!!.expedition_getStateJSON(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params = params
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
fun expeditionTruckList(usuario: String, password: String): Call<List<ItemExpeditionTruckVO>> {
|
||||
// val params: ArrayList<String> = ArrayList()
|
||||
return restClient!!.expeditionTruckList("json", "1", usuario, password, "application/json")
|
||||
return restClient!!.expeditionTruckList()
|
||||
}
|
||||
|
||||
fun expeditionTruckAdd(
|
||||
|
|
|
@ -65,11 +65,6 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/deviceLog_add")//REVISADA
|
||||
fun deviceLog_add(
|
||||
/* @Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,*/
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<Void>
|
||||
|
@ -905,12 +900,7 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/expedition_getState")//REVISADA
|
||||
fun expedition_getStateJSON(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<JsonObject>
|
||||
|
||||
|
@ -964,44 +954,24 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/expeditionTruckList")//REVISADA
|
||||
fun expeditionTruckList(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String
|
||||
):
|
||||
Call<List<ItemExpeditionTruckVO>>
|
||||
|
||||
@POST("almacennew/expeditionTruckAdd")//REVISADA
|
||||
fun expeditionTruckAdd(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
@POST("almacennew/expeditionPalletList")//REVISADA
|
||||
fun expeditionPallet_List(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<List<ItemPalletVO>>
|
||||
|
||||
@POST("almacennew/expeditionScanAdd")//REVISADA
|
||||
fun expeditionScanAdd(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<List<ItemScanVO>>
|
||||
|
||||
|
@ -1019,67 +989,37 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/expeditionPalletView")//REVISADA
|
||||
fun expeditionPalletView(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<List<ItemPalletViewVO>>
|
||||
|
||||
@POST("almacennew/expeditionPalletDel")//REVISADA
|
||||
fun expeditionPalletDel(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
@POST("almacennew/expeditionScanList")//REVISADA
|
||||
fun expeditionScanList(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<List<ItemExpeditionScanVO>>
|
||||
|
||||
@POST("almacennew/expeditionScanDel")//REVISADA
|
||||
fun expeditionScanDel(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
@POST("almacennew/expeditionPalletPrintSet")//REVISADA
|
||||
fun expeditionPalletPrintSet(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
@POST("almacennew/expeditionState_addByPallet")//REVISADA
|
||||
fun expeditionState_addByPallet(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<Unit>
|
||||
|
||||
|
@ -1091,12 +1031,7 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/expeditionLoading_add")//REVISADA
|
||||
fun expeditionLoading_add(
|
||||
@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>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<String>
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ import es.verdnatura.presentation.view.feature.articulo.model.*
|
|||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
class ItemCardViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase(context)
|
||||
|
@ -77,8 +79,8 @@ class ItemCardViewModel(context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun item_getSimilar(
|
||||
itemFk: String,
|
||||
warehouseFk: String,
|
||||
itemFk: Int,
|
||||
warehouseFk: Int,
|
||||
vShipped: String,
|
||||
vIsShowedByType: Boolean,
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.util.*
|
|||
import kotlin.collections.ArrayList
|
||||
|
||||
class ItemProposalFragment(
|
||||
var itemFk: String = ""
|
||||
var itemFk: Int
|
||||
) : BaseFragment<FragmentItemproposalBinding, ItemCardViewModel>(
|
||||
ItemCardViewModel::class
|
||||
) {
|
||||
|
@ -36,7 +36,7 @@ class ItemProposalFragment(
|
|||
private var filter = true
|
||||
|
||||
companion object {
|
||||
fun newInstance(entryPoint: String) = ItemProposalFragment(entryPoint)
|
||||
fun newInstance(entryPoint: Int) = ItemProposalFragment(entryPoint)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_itemproposal
|
||||
|
@ -49,7 +49,7 @@ class ItemProposalFragment(
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
viewModel.item_getSimilar(
|
||||
itemFk,
|
||||
getData(WAREHOUSEFK),
|
||||
getData(WAREHOUSEFK).toInt(),
|
||||
vShipped = currentDay(),
|
||||
vIsShowedByType = filter,
|
||||
)
|
||||
|
@ -99,7 +99,7 @@ class ItemProposalFragment(
|
|||
|
||||
viewModel.item_getSimilar(
|
||||
itemFk,
|
||||
getData(WAREHOUSEFK),
|
||||
getData(WAREHOUSEFK).toInt(),
|
||||
vIsShowedByType = filter,
|
||||
vShipped = currentDay(),
|
||||
)
|
||||
|
|
|
@ -67,8 +67,8 @@ class BufferFragmentViewModel(context: Context) : BaseViewModel(context) {
|
|||
})
|
||||
}
|
||||
|
||||
fun expeditionLoading_add(usuario:String,password:String,vExpeditionFk:String, vBufferFk:String){
|
||||
GetPaletizadoresUserCase.expeditionLoading_add(usuario,password,vExpeditionFk, vBufferFk).enqueue(object : Callback<String>{
|
||||
fun expeditionLoading_add(vExpeditionFk:Int, vBufferFk:Int){
|
||||
silex.expeditionLoading_add(vExpeditionFk, vBufferFk).enqueue(object : Callback<String>{
|
||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||
_bufferloadresponse.value = ResponseItemVO(
|
||||
isError = true,
|
||||
|
|
|
@ -27,7 +27,7 @@ class BufferLoadFragment(
|
|||
private lateinit var customDialogList: CustomDialogList
|
||||
private var listTags: ArrayList<SmartTag> = ArrayList()
|
||||
private var tagsAdapter: SmartTagAdapter? = null
|
||||
private var itemScaned: String = ""
|
||||
private var itemScaned: Int = 0
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
|
||||
|
@ -66,9 +66,9 @@ class BufferLoadFragment(
|
|||
}
|
||||
|
||||
|
||||
private fun checkLoadExpedition(ExpeditionOrBuffer: String) {
|
||||
private fun checkLoadExpedition(ExpeditionOrBuffer: Int) {
|
||||
|
||||
listTags.add(SmartTag(ExpeditionOrBuffer, getTextScaned(listTags.size + 1) + ExpeditionOrBuffer))
|
||||
listTags.add(SmartTag(ExpeditionOrBuffer.toString(), getTextScaned(listTags.size + 1) + ExpeditionOrBuffer))
|
||||
customDialogList.setTitle(getTextToPosition(listTags.size + 1))
|
||||
|
||||
tagsAdapter!!.notifyDataSetChanged()
|
||||
|
@ -77,10 +77,8 @@ class BufferLoadFragment(
|
|||
if (listTags.size==2) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.expeditionLoading_add(
|
||||
usuario = getData(USER),
|
||||
password=getData(PASSWORD),
|
||||
vBufferFk = ExpeditionOrBuffer,
|
||||
vExpeditionFk = listTags.first().code.toString())
|
||||
vExpeditionFk = listTags.first().code.toString().toInt())
|
||||
|
||||
}
|
||||
|
||||
|
@ -122,6 +120,7 @@ class BufferLoadFragment(
|
|||
showExpeditionOrBufferScan()
|
||||
|
||||
|
||||
|
||||
}
|
||||
binding.splashProgress.visibility = GONE
|
||||
})
|
||||
|
@ -176,7 +175,7 @@ class BufferLoadFragment(
|
|||
if (!customDialogList.getValue().isNullOrEmpty()) {
|
||||
|
||||
|
||||
checkLoadExpedition(customDialogList.getValue())
|
||||
checkLoadExpedition(customDialogList.getValue().toInt())
|
||||
|
||||
}
|
||||
customDialogList.setValue("")
|
||||
|
|
|
@ -40,7 +40,6 @@ import es.verdnatura.presentation.view.feature.collection.adapter.SaleAdapter
|
|||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.*
|
||||
import java.sql.Types.NULL
|
||||
|
||||
|
||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
|
@ -87,7 +86,7 @@ class CollectionFragment(
|
|||
|
||||
private var itemShelvingSaleSupplyAddCall = -1
|
||||
private var saleTrackingCall = -1
|
||||
private var lastScanned: Int =0
|
||||
private var lastScanned: Int = 0
|
||||
private var buttonPushedGetCollection = false
|
||||
private var positionUnmarked = -1
|
||||
private var state = 0
|
||||
|
@ -210,12 +209,12 @@ class CollectionFragment(
|
|||
|
||||
listIcons.add(iconAdd)
|
||||
|
||||
if (type==SACADOR){
|
||||
if (type == SACADOR) {
|
||||
listIcons.add(iconUpdate)
|
||||
listIcons.remove(iconWorker)
|
||||
}
|
||||
|
||||
if (type==PRECHECKER) {
|
||||
if (type == PRECHECKER) {
|
||||
listIcons.add(iconParking)
|
||||
listIcons.remove(iconPrint)
|
||||
}
|
||||
|
@ -229,7 +228,7 @@ class CollectionFragment(
|
|||
iconPrint.drawable -> print()
|
||||
iconAdd.drawable -> addItem()
|
||||
iconWorker.drawable -> showUser()
|
||||
iconUpdate.drawable-> updateScreen()
|
||||
iconUpdate.drawable -> updateScreen()
|
||||
iconParking.drawable -> pasillerosItemClickListener?.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = getString(R.string.Parking)
|
||||
|
@ -244,12 +243,13 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
|
||||
private fun updateScreen(){
|
||||
binding.splashProgress.visibility=VISIBLE
|
||||
private fun updateScreen() {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getData(SECTORFK),
|
||||
type)
|
||||
type
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
@ -578,7 +578,7 @@ class CollectionFragment(
|
|||
var value = customDialogList.getValueTwo()
|
||||
customDialogList.setValueTwo("")
|
||||
|
||||
if (it.response.isEmpty()) {
|
||||
if (it.response.isBlank() || it.response.isEmpty()) {
|
||||
showErrorMessage(getString(R.string.codeNotExist))
|
||||
viewModel.debug_add(
|
||||
"buy_deletedFromApp",
|
||||
|
@ -842,13 +842,14 @@ class CollectionFragment(
|
|||
responseSaleTracking_mark.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = GONE
|
||||
if (it.isError) {
|
||||
//TEST3
|
||||
if (getData(USERFK) == "18890" || getData(USERFK) == "19591") {
|
||||
"La línea NO se ha marcado correctamente".toast(context)
|
||||
}
|
||||
|
||||
if (!goBack) {
|
||||
|
||||
ma.messageWithSound(it.errorMessage, it.isError, true)
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
|
||||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getData(SECTORFK),
|
||||
|
@ -856,12 +857,18 @@ class CollectionFragment(
|
|||
)
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
// pintar línea
|
||||
//TEST3
|
||||
if (getData(USERFK) == "18890" || getData(USERFK) == "19591") {
|
||||
"La línea se ha marcado correctamente".toast(context)
|
||||
}
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
setListPosition(storedPosition, false)
|
||||
ReviewQuantityForRefreshingAndSorting(sales[storedPosition].quantity!!.toInt(),sales[storedPosition].pickedQuantity.toInt())
|
||||
ReviewQuantityForRefreshingAndSorting(
|
||||
sales[storedPosition].quantity!!.toInt(),
|
||||
sales[storedPosition].pickedQuantity.toInt()
|
||||
)
|
||||
goBack = false
|
||||
}
|
||||
})
|
||||
|
@ -1709,7 +1716,7 @@ class CollectionFragment(
|
|||
if (storedPosition >= 0 && sales.size > storedPosition) {
|
||||
val saleToCheck = sales[storedPosition]
|
||||
|
||||
if (saleToCheck.itemFk == valueToCheck.toInt())
|
||||
if (saleToCheck.itemFk.toString() == valueToCheck)
|
||||
return true
|
||||
else {
|
||||
saleToCheck.Barcodes.forEach { barcode ->
|
||||
|
@ -2473,21 +2480,21 @@ class CollectionFragment(
|
|||
break
|
||||
}
|
||||
}*/
|
||||
if (isTicket){
|
||||
if (isTicket) {
|
||||
val builder = AlertDialog.Builder(context)
|
||||
builder.setTitle(getString(R.string.selectLabeltoPrint))
|
||||
val labelCount = arrayOf("1", "2", "3", "4", "5","6","7","8","9","10")
|
||||
val labelCount = arrayOf("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")
|
||||
builder.setItems(labelCount) { dialog, which ->
|
||||
d("VERDNATURA::", "EL ELEGIDO ES" + which)
|
||||
viewModel.collectionStickerPrint(
|
||||
collectionFk = collection.collectionFk,
|
||||
labelCount = (which+1)
|
||||
labelCount = (which + 1)
|
||||
)
|
||||
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
|
||||
}
|
||||
val dialog = builder.create()
|
||||
dialog.show()
|
||||
}else{
|
||||
} else {
|
||||
viewModel.collectionStickerPrint(
|
||||
collectionFk = collection.collectionFk,
|
||||
null
|
||||
|
@ -2498,6 +2505,7 @@ class CollectionFragment(
|
|||
|
||||
|
||||
}
|
||||
|
||||
private fun showMistakeList(list: List<MistakeTypeVO>) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
listPlacementSupply = ArrayList()
|
||||
|
|
|
@ -210,23 +210,6 @@ class LoginViewModel(var context: Context) : BaseViewModel(context) {
|
|||
|
||||
})
|
||||
|
||||
/* getLoginUserCase.deviceLog_add(user, password, app, versionApp, android_id)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
if (!response.isSuccessful) {
|
||||
|
||||
messageError(nameofFunction(this), response.message())
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
|
||||
messageError(nameofFunction(this), t.message!!)
|
||||
}
|
||||
|
||||
})*/
|
||||
}
|
||||
|
||||
fun messageError(callFunction: String, message: String) {
|
||||
|
|
|
@ -396,7 +396,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
}
|
||||
//sergio:no visible desde el menú inicio
|
||||
getString(R.string.titleSearchSimilarItems) -> {
|
||||
addFragmentOnTop(ItemProposalFragment.newInstance(entryPoint))
|
||||
addFragmentOnTop(ItemProposalFragment.newInstance(entryPoint.toInt()))
|
||||
}
|
||||
|
||||
//segio: esta opción no se muestra, solo es accesible para añadir fragmentos de otras partes.
|
||||
|
|
|
@ -66,8 +66,7 @@ class ExpeditionPalletDetailFragment(
|
|||
setToolBar()
|
||||
setEvents()
|
||||
viewModel.expeditionPallet_List(
|
||||
getData(USER),
|
||||
getData(PASSWORD), itemPallet!!.Pallet
|
||||
itemPallet!!.Pallet
|
||||
)
|
||||
super.init()
|
||||
}
|
||||
|
@ -103,8 +102,7 @@ class ExpeditionPalletDetailFragment(
|
|||
if (item == iconReload) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionPallet_List(
|
||||
getData(USER),
|
||||
getData(PASSWORD), itemPallet!!.Pallet
|
||||
itemPallet!!.Pallet
|
||||
)
|
||||
} else if (item == iconEditar) {
|
||||
onPalletClickListener!!.onPalletClickListener(
|
||||
|
@ -118,8 +116,7 @@ class ExpeditionPalletDetailFragment(
|
|||
customDialog.setOkButton(getString(R.string.delete)) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionPalletDel(
|
||||
getData(USER),
|
||||
getData(PASSWORD), itemPallet!!.Pallet
|
||||
itemPallet!!.Pallet
|
||||
)
|
||||
customDialog.dismiss()
|
||||
}
|
||||
|
@ -136,10 +133,8 @@ class ExpeditionPalletDetailFragment(
|
|||
requireContext()
|
||||
)
|
||||
viewModel.expeditionPalletPrintSet(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
itemPallet!!.Pallet,
|
||||
getData(SECTORFK)
|
||||
getData(SECTORFK).toInt()
|
||||
)
|
||||
} else {
|
||||
ma.messageWithSound(
|
||||
|
@ -187,8 +182,6 @@ class ExpeditionPalletDetailFragment(
|
|||
} else {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionState_addByPallet(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
itemPallet!!.Pallet,
|
||||
"PALLETIZED"
|
||||
)
|
||||
|
|
|
@ -34,8 +34,8 @@ class ExpeditionPalletDetailViewModel(context: Context): BaseViewModel(context)
|
|||
|
||||
|
||||
|
||||
fun expeditionPallet_List(usuario:String,password:String,vPalletFk:String){
|
||||
getPaletizadoresUserCase.expeditionPalletView(usuario,password,vPalletFk).enqueue(object :
|
||||
fun expeditionPallet_List(vPalletFk:Int){
|
||||
silex.expeditionPalletView(vPalletFk).enqueue(object :
|
||||
Callback<List<ItemPalletViewVO>> {
|
||||
override fun onFailure(call: Call<List<ItemPalletViewVO>>, t: Throwable) {
|
||||
val listError:ArrayList<ItemPalletViewVO> = ArrayList()
|
||||
|
@ -59,8 +59,8 @@ class ExpeditionPalletDetailViewModel(context: Context): BaseViewModel(context)
|
|||
})
|
||||
}
|
||||
|
||||
fun expeditionPalletDel(usuario:String,password:String,vPalletFk:String){
|
||||
getPaletizadoresUserCase.expeditionPalletDel(usuario,password,vPalletFk).enqueue(object : Callback<Any>{
|
||||
fun expeditionPalletDel(vPalletFk:Int){
|
||||
silex.expeditionPalletDel(vPalletFk).enqueue(object : Callback<Any>{
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
}
|
||||
|
@ -75,12 +75,10 @@ class ExpeditionPalletDetailViewModel(context: Context): BaseViewModel(context)
|
|||
}
|
||||
|
||||
fun expeditionPalletPrintSet(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vPalletFk: String,
|
||||
vSectorFk: String){
|
||||
vPalletFk: Int,
|
||||
vSectorFk: Int){
|
||||
|
||||
getPaletizadoresUserCase.expeditionPalletPrintSet(usuario,password,vPalletFk,vSectorFk).enqueue(object : Callback<Any>{
|
||||
silex.expeditionPalletPrintSet(vPalletFk,vSectorFk).enqueue(object : Callback<Any>{
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responsePrintPallet.value = ResponseItemVO(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
}
|
||||
|
@ -95,13 +93,11 @@ class ExpeditionPalletDetailViewModel(context: Context): BaseViewModel(context)
|
|||
}
|
||||
|
||||
fun expeditionState_addByPallet(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vPalletFk: String,
|
||||
vPalletFk: Int,
|
||||
vStateCode:String,
|
||||
){
|
||||
|
||||
getPaletizadoresUserCase.expeditionState_addByPallet(usuario,password,vPalletFk,vStateCode).enqueue(object : Callback<Unit>{
|
||||
silex.expeditionState_addByPallet(vPalletFk,vStateCode).enqueue(object : Callback<Unit>{
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
}
|
||||
|
|
|
@ -84,9 +84,7 @@ class ExpeditionPalletFragment(
|
|||
}
|
||||
setToolBar()
|
||||
setEvents()
|
||||
viewModel.expeditionPallet_List(
|
||||
getData(USER),
|
||||
getData(PASSWORD), itemExpeditionTruckVO!!.truckFk
|
||||
viewModel.expeditionPallet_List(itemExpeditionTruckVO!!.truckFk
|
||||
)
|
||||
|
||||
super.init()
|
||||
|
@ -113,8 +111,7 @@ class ExpeditionPalletFragment(
|
|||
if (item == iconReload) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionPallet_List(
|
||||
getData(USER),
|
||||
getData(PASSWORD), itemExpeditionTruckVO!!.truckFk
|
||||
itemExpeditionTruckVO!!.truckFk
|
||||
)
|
||||
} else if (item == iconPlus) {
|
||||
expeditionScanAdd()
|
||||
|
@ -193,8 +190,7 @@ class ExpeditionPalletFragment(
|
|||
private fun expeditionScanAdd() {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionScanAdd(
|
||||
getData(USER),
|
||||
getData(PASSWORD), vPalletFk = "0", vTruckFk = itemExpeditionTruckVO!!.truckFk
|
||||
vPalletFk = 0, vTruckFk = itemExpeditionTruckVO!!.truckFk
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -221,7 +217,7 @@ class ExpeditionPalletFragment(
|
|||
if (listExpeditions.size > 0) {
|
||||
onComprobarPalletViewClickListener!!.onComprobarPalletViewClickListener(
|
||||
itemExpeditionTruckVO!!,
|
||||
ItemPalletVO(Pallet = it.list.get(0).palletFk.toString())
|
||||
ItemPalletVO(Pallet = it.list.get(0).palletFk)
|
||||
)
|
||||
} else {
|
||||
customDialog.setTitle(getString(R.string.info))
|
||||
|
@ -238,8 +234,7 @@ class ExpeditionPalletFragment(
|
|||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionPallet_List(
|
||||
getData(USER),
|
||||
getData(PASSWORD), itemExpeditionTruckVO!!.truckFk
|
||||
itemExpeditionTruckVO!!.truckFk
|
||||
)
|
||||
listExpeditions = ArrayList()
|
||||
customDialogList.dismiss()
|
||||
|
|
|
@ -42,12 +42,12 @@ class ExpeditionPalletViewModel (context: Context) : BaseViewModel(context) {
|
|||
|
||||
|
||||
|
||||
fun expeditionPallet_List(usuario:String,password:String,vTruckFk:String){
|
||||
getPaletizadoresUserCase.expeditionPallet_List(usuario,password,vTruckFk).enqueue(object :
|
||||
fun expeditionPallet_List(vTruckFk:Int){
|
||||
silex.expeditionPallet_List(vTruckFk).enqueue(object :
|
||||
Callback<List<ItemPalletVO>> {
|
||||
override fun onFailure(call: Call<List<ItemPalletVO>>, t: Throwable) {
|
||||
val listError:ArrayList<ItemPalletVO> = ArrayList()
|
||||
listError.add(ItemPalletVO(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
||||
listError.add(ItemPalletVO(0,isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
||||
_expeditionPalletList.value = ItemPalletListVO(listError)
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ class ExpeditionPalletViewModel (context: Context) : BaseViewModel(context) {
|
|||
_expeditionPalletList.value = response.body()?.let { ItemPalletListVO(it) }
|
||||
}else{
|
||||
val listError:ArrayList<ItemPalletVO> = ArrayList()
|
||||
listError.add(ItemPalletVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
|
||||
listError.add(ItemPalletVO(0,isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
|
||||
_expeditionPalletList.value = ItemPalletListVO(listError)
|
||||
}
|
||||
}
|
||||
|
@ -67,8 +67,8 @@ class ExpeditionPalletViewModel (context: Context) : BaseViewModel(context) {
|
|||
})
|
||||
}
|
||||
|
||||
fun expeditionScanAdd(usuario:String,password:String,vPalletFk:String,vTruckFk:String){
|
||||
getPaletizadoresUserCase.expeditionScanAdd(usuario,password,vPalletFk,vTruckFk).enqueue(object :
|
||||
fun expeditionScanAdd(vPalletFk:Int,vTruckFk:Int){
|
||||
silex.expeditionScanAdd(vPalletFk,vTruckFk).enqueue(object :
|
||||
Callback<List<ItemScanVO>> {
|
||||
override fun onFailure(call: Call<List<ItemScanVO>>, t: Throwable) {
|
||||
val listError:ArrayList<ItemScanVO> = ArrayList()
|
||||
|
|
|
@ -24,41 +24,42 @@ import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionSca
|
|||
import es.verdnatura.presentation.view.feature.paletizador.model.*
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
class ExpeditionScanFragment (
|
||||
class ExpeditionScanFragment(
|
||||
var itemExpeditionTruckVO: ItemExpeditionTruckVO? = null,
|
||||
var itemPalletVO: ItemPalletVO? = null
|
||||
) : BaseFragment<FragmentExpeditionScanBinding, ExpeditionScanViewModel>(
|
||||
ExpeditionScanViewModel::class) {
|
||||
ExpeditionScanViewModel::class
|
||||
) {
|
||||
|
||||
private var adapter : ExpeditionScanAdapter? = null
|
||||
private var adapter: ExpeditionScanAdapter? = null
|
||||
private var onPalletClickListener: OnPalletClickListener? = null
|
||||
private var onComprobarPalletViewClickListener: OnComprobarPalletViewClickListener? = null
|
||||
private lateinit var customDialogList: CustomDialogList
|
||||
private lateinit var customDialogTwoButtons: CustomDialogTwoButtons
|
||||
|
||||
private var listExpeditions:ArrayList<BarcodeVO> = ArrayList()
|
||||
private var expeditionAdapter : BarcodeAdapter? = null
|
||||
private var listExpeditions: ArrayList<BarcodeVO> = ArrayList()
|
||||
private var expeditionAdapter: BarcodeAdapter? = null
|
||||
private lateinit var customDialog: CustomDialog
|
||||
var mperror: MediaPlayer? = null
|
||||
|
||||
companion object {
|
||||
fun newInstance(item: ItemExpeditionTruckVO,itemPalletVO: ItemPalletVO) =
|
||||
ExpeditionScanFragment(item,itemPalletVO)
|
||||
fun newInstance(item: ItemExpeditionTruckVO, itemPalletVO: ItemPalletVO) =
|
||||
ExpeditionScanFragment(item, itemPalletVO)
|
||||
}
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
if (context is OnPalletClickListener) onPalletClickListener = context
|
||||
if (context is OnComprobarPalletViewClickListener) onComprobarPalletViewClickListener = context
|
||||
if (context is OnComprobarPalletViewClickListener) onComprobarPalletViewClickListener =
|
||||
context
|
||||
super.onAttach(context)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_expedition_scan
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
mperror = MediaPlayer.create((activity as MainActivity),R.raw.error)
|
||||
mperror = MediaPlayer.create((activity as MainActivity), R.raw.error)
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
@ -67,52 +68,58 @@ class ExpeditionScanFragment (
|
|||
customDialog = CustomDialog(requireContext())
|
||||
customDialogList = CustomDialogList(requireContext())
|
||||
customDialogTwoButtons = CustomDialogTwoButtons(requireContext())
|
||||
binding.expeditionScanDetailPallet.text = getString(R.string.pallet) + " " + itemPalletVO!!.Pallet
|
||||
binding.expeditionScanDetailPallet.text =
|
||||
getString(R.string.pallet) + " " + itemPalletVO!!.Pallet
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.mainToolbar.toolbarTitle.text = getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + if (itemExpeditionTruckVO!!.Destino.isNullOrBlank()) {
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + if (itemExpeditionTruckVO!!.Destino.isNullOrBlank()) {
|
||||
itemExpeditionTruckVO!!.description
|
||||
}else{
|
||||
} else {
|
||||
|
||||
itemExpeditionTruckVO!!.Destino
|
||||
}
|
||||
|
||||
setToolBar()
|
||||
setEvents()
|
||||
viewModel.expeditionScanList(getData(USER),
|
||||
getData(PASSWORD),itemPalletVO!!.Pallet)
|
||||
viewModel.expeditionScanList(
|
||||
itemPalletVO!!.Pallet
|
||||
)
|
||||
super.init()
|
||||
}
|
||||
|
||||
private fun setEvents(){
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun setToolBar(){
|
||||
val listIcons:ArrayList<Drawable> = ArrayList()
|
||||
val iconReload : Drawable = resources.getDrawable(R.drawable.ic_autorenew_black_24dp,resources.newTheme())
|
||||
val iconPlus : Drawable = resources.getDrawable(R.drawable.ic_add_black_24dp,resources.newTheme())
|
||||
private fun setToolBar() {
|
||||
val listIcons: ArrayList<Drawable> = ArrayList()
|
||||
val iconReload: Drawable =
|
||||
resources.getDrawable(R.drawable.ic_autorenew_black_24dp, resources.newTheme())
|
||||
val iconPlus: Drawable =
|
||||
resources.getDrawable(R.drawable.ic_add_black_24dp, resources.newTheme())
|
||||
listIcons.add(iconReload)
|
||||
listIcons.add(iconPlus)
|
||||
binding.mainToolbar.toolbarIcons.adapter = ToolBarAdapter(listIcons,object: OnOptionsSelectedListener {
|
||||
binding.mainToolbar.toolbarIcons.adapter =
|
||||
ToolBarAdapter(listIcons, object : OnOptionsSelectedListener {
|
||||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
if (item == iconReload){
|
||||
if (item == iconReload) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionScanList(getData(USER),
|
||||
getData(PASSWORD),itemPalletVO!!.Pallet)
|
||||
}else if(item == iconPlus){
|
||||
expeditionScanAdd ()
|
||||
viewModel.expeditionScanList(itemPalletVO!!.Pallet)
|
||||
} else if (item == iconPlus) {
|
||||
expeditionScanAdd()
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
binding.mainToolbar.toolbarIcons.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
binding.mainToolbar.toolbarIcons.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
}
|
||||
|
||||
private fun getCURDATE(date:String):String{
|
||||
private fun getCURDATE(date: String): String {
|
||||
val c = Calendar.getInstance()
|
||||
val df = SimpleDateFormat(getString(R.string.dateCompleteFormat))
|
||||
val df2 = SimpleDateFormat(getString(R.string.timeFormat))
|
||||
|
@ -121,62 +128,67 @@ class ExpeditionScanFragment (
|
|||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
with(viewModel){
|
||||
with(viewModel) {
|
||||
loadExpeditionScanList.observe(viewLifecycleOwner, Observer { event ->
|
||||
event.getContentIfNotHandled().notNull {printExpeditionList(it) }
|
||||
event.getContentIfNotHandled().notNull { printExpeditionList(it) }
|
||||
})
|
||||
|
||||
loadScanList.observe(viewLifecycleOwner, Observer { event ->
|
||||
event.getContentIfNotHandled().notNull {showScanExpeditions(it) }
|
||||
event.getContentIfNotHandled().notNull { showScanExpeditions(it) }
|
||||
})
|
||||
|
||||
response.observe(viewLifecycleOwner, Observer {
|
||||
if (it.isError){
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
responseCheckexpeditionScanPut.observe(viewLifecycleOwner, Observer {
|
||||
if (it.isError){
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
}else{
|
||||
} else {
|
||||
|
||||
|
||||
if (it.response=="1"){
|
||||
if (it.response == "1") {
|
||||
mperror?.start()
|
||||
|
||||
}}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
responseDeleteScan.observe(viewLifecycleOwner, Observer {
|
||||
if (it.isError){
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
}else{
|
||||
viewModel.expeditionScanList(getData(USER),
|
||||
getData(PASSWORD),itemPalletVO!!.Pallet)
|
||||
} else {
|
||||
viewModel.expeditionScanList(itemPalletVO!!.Pallet)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun printExpeditionList(it: ItemExpeditionScanList){
|
||||
private fun printExpeditionList(it: ItemExpeditionScanList) {
|
||||
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
adapter = ExpeditionScanAdapter(it.list,object: OnScanLongClickListener{
|
||||
adapter = ExpeditionScanAdapter(it.list, object : OnScanLongClickListener {
|
||||
override fun onScanLongClickListener(itemExpeditionScan: ItemExpeditionScanVO) {
|
||||
customDialogTwoButtons.setTitle(getString(R.string.ticket)+itemExpeditionScan.Ticket+getString(R.string.pallet)+itemPalletVO!!.Pallet)
|
||||
.setDescription(getString(R.string.expedit)+itemExpeditionScan.expeditionFk)
|
||||
.setOkButton(getString(R.string.delete)){
|
||||
customDialogTwoButtons.setTitle(
|
||||
getString(R.string.ticket) + itemExpeditionScan.Ticket + getString(
|
||||
R.string.pallet
|
||||
) + itemPalletVO!!.Pallet
|
||||
)
|
||||
.setDescription(getString(R.string.expedit) + itemExpeditionScan.expeditionFk)
|
||||
.setOkButton(getString(R.string.delete)) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionScanDel(getData(USER),
|
||||
getData(PASSWORD),itemExpeditionScan.id)
|
||||
viewModel.expeditionScanDel(
|
||||
itemExpeditionScan.id
|
||||
)
|
||||
customDialogTwoButtons.dismiss()
|
||||
}.setKoButton(getString(R.string.cancel)){
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialogTwoButtons.dismiss()
|
||||
}.show()
|
||||
}
|
||||
|
@ -188,33 +200,41 @@ class ExpeditionScanFragment (
|
|||
|
||||
}
|
||||
|
||||
private fun expeditionScanAdd(){
|
||||
private fun expeditionScanAdd() {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionScanAdd(usuario = getData(USER),
|
||||
getData(PASSWORD),vPalletFk = itemPalletVO!!.Pallet,vTruckFk = itemExpeditionTruckVO!!.truckFk)
|
||||
viewModel.expeditionScanAdd(
|
||||
vPalletFk = itemPalletVO!!.Pallet,
|
||||
vTruckFk = itemExpeditionTruckVO!!.truckFk
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
private fun showScanExpeditions(it: ItemScanList){
|
||||
private fun showScanExpeditions(it: ItemScanList) {
|
||||
|
||||
listExpeditions = ArrayList()
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
it.list.forEach {
|
||||
if(it.expeditionFk != "0")
|
||||
if (it.expeditionFk != "0")
|
||||
listExpeditions.add(BarcodeVO(code = it.expeditionFk))
|
||||
}
|
||||
customDialogList.setTitle(getString(R.string.pallet) +" "+ itemPalletVO!!.Pallet+" \n("+binding.mainToolbar.toolbarTitle.text+")").setOkButton(getString(R.string.test)){
|
||||
customDialogList.setTitle(getString(R.string.pallet) + " " + itemPalletVO!!.Pallet + " \n(" + binding.mainToolbar.toolbarTitle.text + ")")
|
||||
.setOkButton(getString(R.string.test)) {
|
||||
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
||||
if (listExpeditions.size > 0){
|
||||
if (listExpeditions.size > 0) {
|
||||
|
||||
onComprobarPalletViewClickListener!!.onComprobarPalletViewClickListener(itemExpeditionTruckVO!!,
|
||||
ItemPalletVO(Pallet = it.list.get(0).palletFk.toString())
|
||||
onComprobarPalletViewClickListener!!.onComprobarPalletViewClickListener(
|
||||
itemExpeditionTruckVO!!,
|
||||
ItemPalletVO(Pallet = it.list.get(0).palletFk))
|
||||
|
||||
} else {
|
||||
customDialog.setTitle(getString(R.string.info))
|
||||
.setDescription(getString(R.string.expeditionsError)).setOkButton(
|
||||
getString(
|
||||
R.string.ok
|
||||
)
|
||||
}else{
|
||||
customDialog.setTitle(getString(R.string.info)).setDescription(getString(R.string.expeditionsError)).setOkButton(getString(
|
||||
R.string.ok)){
|
||||
) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
}
|
||||
|
@ -222,7 +242,7 @@ class ExpeditionScanFragment (
|
|||
customDialogList.dismiss()
|
||||
|
||||
|
||||
}.setKoButton(getString(R.string.close)){
|
||||
}.setKoButton(getString(R.string.close)) {
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
listExpeditions = ArrayList()
|
||||
customDialogList.dismiss()
|
||||
|
@ -241,7 +261,10 @@ class ExpeditionScanFragment (
|
|||
customDialogList.getValue().toInt()
|
||||
)
|
||||
|
||||
checkRouteExpeditionScanPut(it.list.get(0).palletFk,customDialogList.getValue().toInt())
|
||||
checkRouteExpeditionScanPut(
|
||||
it.list.get(0).palletFk,
|
||||
customDialogList.getValue().toInt()
|
||||
)
|
||||
|
||||
expeditionAdapter!!.notifyDataSetChanged()
|
||||
|
||||
|
@ -253,21 +276,22 @@ class ExpeditionScanFragment (
|
|||
false
|
||||
}
|
||||
|
||||
expeditionAdapter = BarcodeAdapter(listExpeditions,object: OnBarcodeRowClickListener {
|
||||
expeditionAdapter = BarcodeAdapter(listExpeditions, object : OnBarcodeRowClickListener {
|
||||
override fun onBarcodeRowClickListener(item: BarcodeVO) {
|
||||
|
||||
}
|
||||
},showDelete = false)
|
||||
}, showDelete = false)
|
||||
customDialogList.getRecyclerView().adapter = expeditionAdapter
|
||||
|
||||
customDialogList.getRecyclerView().layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
customDialogList.getRecyclerView().layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun checkRouteExpeditionScanPut(palletFk: Int, expedition: Int){
|
||||
private fun checkRouteExpeditionScanPut(palletFk: Int, expedition: Int) {
|
||||
|
||||
viewModel.checkRouteExpeditionScanPut(palletFk,expedition)
|
||||
viewModel.checkRouteExpeditionScanPut(palletFk, expedition)
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -43,13 +43,13 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel(context) {
|
|||
get() = _responseCheckexpeditionScanPut
|
||||
|
||||
|
||||
fun expeditionScanList(usuario: String, password: String, vPalletFk: String) {
|
||||
getPaletizadoresUserCase.expeditionScanList(usuario, password, vPalletFk).enqueue(object :
|
||||
fun expeditionScanList(vPalletFk: Int) {
|
||||
silex.expeditionScanList(vPalletFk).enqueue(object :
|
||||
Callback<List<ItemExpeditionScanVO>> {
|
||||
override fun onFailure(call: Call<List<ItemExpeditionScanVO>>, t: Throwable) {
|
||||
val listError: ArrayList<ItemExpeditionScanVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemExpeditionScanVO(
|
||||
ItemExpeditionScanVO(0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
|
@ -66,11 +66,12 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel(context) {
|
|||
} else {
|
||||
val listError: ArrayList<ItemExpeditionScanVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemExpeditionScanVO(
|
||||
ItemExpeditionScanVO(0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message())
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
)
|
||||
_expeditionScanList.value = ItemExpeditionScanList(listError)
|
||||
|
@ -80,16 +81,20 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel(context) {
|
|||
})
|
||||
}
|
||||
|
||||
fun expeditionScanAdd(usuario: String, password: String, vPalletFk: String, vTruckFk: String) {
|
||||
getPaletizadoresUserCase.expeditionScanAdd(usuario, password, vPalletFk, vTruckFk)
|
||||
fun expeditionScanAdd(vPalletFk: Int, vTruckFk: Int) {
|
||||
silex.expeditionScanAdd(vPalletFk, vTruckFk)
|
||||
.enqueue(object :
|
||||
Callback<List<ItemScanVO>> {
|
||||
override fun onFailure(call: Call<List<ItemScanVO>>, t: Throwable) {
|
||||
val listError: ArrayList<ItemScanVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemScanVO("",0,
|
||||
ItemScanVO(
|
||||
"", 0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
t.message!!
|
||||
)
|
||||
)
|
||||
)
|
||||
_scanList.value = ItemScanList(listError)
|
||||
|
@ -104,11 +109,13 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel(context) {
|
|||
} else {
|
||||
val listError: ArrayList<ItemScanVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemScanVO("",0,
|
||||
ItemScanVO(
|
||||
"", 0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message())
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
)
|
||||
_scanList.value = ItemScanList(listError)
|
||||
|
@ -172,7 +179,8 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel(context) {
|
|||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message())
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
} else {
|
||||
_responseCheckexpeditionScanPut.value =
|
||||
|
@ -184,8 +192,8 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
|
||||
fun expeditionScanDel(usuario: String, password: String, vScanFk: String) {
|
||||
getPaletizadoresUserCase.expeditionScanDel(usuario, password, vScanFk)
|
||||
fun expeditionScanDel( vScanFk: Int) {
|
||||
silex.expeditionScanDel(vScanFk)
|
||||
.enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responseDeleteScan.value = ResponseItemVO(
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.view.inputmethod.EditorInfo
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentItemexpeditionstateCardBinding
|
||||
import es.verdnatura.domain.toInt
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionStateAdapter
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionStateRow
|
||||
|
@ -14,7 +15,9 @@ import es.verdnatura.presentation.view.feature.paletizador.model.itemExpedetionS
|
|||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
class ExpeditionStateFragment(
|
||||
var entryPoint: String = ""
|
||||
) : BaseFragment<FragmentItemexpeditionstateCardBinding, ExpeditionStateViewModel>(ExpeditionStateViewModel::class) {
|
||||
) : BaseFragment<FragmentItemexpeditionstateCardBinding, ExpeditionStateViewModel>(
|
||||
ExpeditionStateViewModel::class
|
||||
) {
|
||||
|
||||
|
||||
private var adapter: ExpeditionStateAdapter? = null
|
||||
|
@ -43,7 +46,7 @@ class ExpeditionStateFragment(
|
|||
binding.editItemFk.setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
if (binding.editItemFk.text.toString().isNotEmpty()) {
|
||||
getExpedtionState(binding.editItemFk.text.toString())
|
||||
getExpedtionState(binding.editItemFk.toInt())
|
||||
itemScan = binding.editItemFk.text.toString()
|
||||
}
|
||||
binding.editItemFk.setText("")
|
||||
|
@ -60,21 +63,24 @@ class ExpeditionStateFragment(
|
|||
|
||||
}
|
||||
|
||||
private fun getExpedtionState(expeditionFk: String) {
|
||||
|
||||
private fun getExpedtionState(expeditionFk: Int) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expedition_getStateJSON(expeditionFk, getData(USER), getData(PASSWORD))
|
||||
|
||||
viewModel.expedition_getStateJSON(expeditionFk)
|
||||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
itemexpedition.observe(viewLifecycleOwner,{
|
||||
itemexpedition.observe(viewLifecycleOwner, {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
binding.itemcardLayout.visibility = View.GONE
|
||||
binding.mainToolbar.toolbarTitle.text = entryPoint
|
||||
ma.messageWithSound(getString(R.string.noDataLabelScanned),true,false,getString(R.string.noResults))
|
||||
ma.messageWithSound(
|
||||
getString(R.string.noDataLabelScanned),
|
||||
true,
|
||||
false,
|
||||
getString(R.string.noResults)
|
||||
)
|
||||
|
||||
} else {
|
||||
setItemExpeditionState(it)
|
||||
|
@ -94,7 +100,7 @@ class ExpeditionStateFragment(
|
|||
listItemsRow.add(
|
||||
ItemExpeditionStateRow(
|
||||
title = i.key,
|
||||
value = i.value?.replace(".0",""),
|
||||
value = i.value?.replace(".0", ""),
|
||||
isEditable = false
|
||||
)
|
||||
)
|
||||
|
|
|
@ -96,8 +96,8 @@ class ExpeditionStateViewModel(context: Context) : BaseViewModel(context) {
|
|||
})
|
||||
}*/
|
||||
|
||||
fun expedition_getStateJSON(expeditionFk: String, user: String, password: String){
|
||||
GetPaletizadoresUserCase.expedition_getStateJSON(user, password, expeditionFk)
|
||||
fun expedition_getStateJSON(expeditionFk: Int){
|
||||
silex.expedition_getStateJSON(expeditionFk)
|
||||
.enqueue(object : Callback<JsonObject> {
|
||||
override fun onFailure(call: Call<JsonObject>, t: Throwable) {
|
||||
|
||||
|
|
|
@ -54,8 +54,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
|
||||
setToolBar()
|
||||
|
||||
viewModel.expeditionTruckList(getData(USER),
|
||||
getData(PASSWORD))
|
||||
viewModel.expeditionTruckList()
|
||||
super.init()
|
||||
}
|
||||
|
||||
|
@ -74,8 +73,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
if (item == iconReload){
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionTruckList(getData(USER),
|
||||
getData(PASSWORD))
|
||||
viewModel.expeditionTruckList()
|
||||
}else if(item == iconPlus){
|
||||
addTruck()
|
||||
}
|
||||
|
@ -99,8 +97,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
event.getContentIfNotHandled().notNull {printExpeditionList(it) }
|
||||
})
|
||||
loadResponseExpeditionAdd.observe(viewLifecycleOwner, Observer { event ->
|
||||
viewModel.expeditionTruckList(getData(USER),
|
||||
getData(PASSWORD))
|
||||
viewModel.expeditionTruckList()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -124,8 +121,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
customDialogHor.setTitle(getString(R.string.newTruck)).setOkButton(getString(R.string.save)){
|
||||
ma.hideKeyboard(customDialogHor.getDestinoEditText())
|
||||
if (customDialogHor.getDestinoValue().isNotEmpty() && customDialogHor.getHoraValue().isNotEmpty()){
|
||||
viewModel.expeditionTruckAdd(getData(USER),
|
||||
getData(PASSWORD),customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
|
||||
viewModel.expeditionTruckAdd(customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
customDialogHor.dismiss()
|
||||
}
|
||||
|
@ -140,8 +136,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
if (customDialogHor.getDestinoValue().isNotEmpty() && customDialogHor.getHoraValue()
|
||||
.isNotEmpty()){
|
||||
viewModel.expeditionTruckAdd(getData(USER),
|
||||
getData(PASSWORD),customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
|
||||
viewModel.expeditionTruckAdd(customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
customDialogHor.dismiss()
|
||||
}
|
||||
|
|
|
@ -30,12 +30,12 @@ class ExpeditionTruckListViewModel(context: Context) : BaseViewModel(context) {
|
|||
|
||||
|
||||
|
||||
fun expeditionTruckList(usuario:String,password:String){
|
||||
getPaletizadoresUserCase.expeditionTruckList(usuario,password).enqueue(object :
|
||||
fun expeditionTruckList(){
|
||||
silex.expeditionTruckList().enqueue(object :
|
||||
Callback<List<ItemExpeditionTruckVO>> {
|
||||
override fun onFailure(call: Call<List<ItemExpeditionTruckVO>>, t: Throwable) {
|
||||
val listError:ArrayList<ItemExpeditionTruckVO> = ArrayList()
|
||||
listError.add(ItemExpeditionTruckVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
||||
listError.add(ItemExpeditionTruckVO(0,isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
||||
_expeditionTruckList.value = ItemExpeditionTruckList(listError)
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class ExpeditionTruckListViewModel(context: Context) : BaseViewModel(context) {
|
|||
_expeditionTruckList.value = response.body()?.let { ItemExpeditionTruckList(it) }
|
||||
}else{
|
||||
val listError:ArrayList<ItemExpeditionTruckVO> = ArrayList()
|
||||
listError.add(ItemExpeditionTruckVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
|
||||
listError.add(ItemExpeditionTruckVO(0,isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
|
||||
_expeditionTruckList.value = ItemExpeditionTruckList(listError)
|
||||
}
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ class ExpeditionTruckListViewModel(context: Context) : BaseViewModel(context) {
|
|||
})
|
||||
}
|
||||
|
||||
fun expeditionTruckAdd(usuario:String,password:String,vHour:String,vDescription:String){
|
||||
getPaletizadoresUserCase.expeditionTruckAdd(usuario,password,vHour,vDescription).enqueue(object : Callback<Any>{
|
||||
fun expeditionTruckAdd(vHour:String,vDescription:String){
|
||||
silex.expeditionTruckAdd(vHour,vDescription).enqueue(object : Callback<Any>{
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
}
|
||||
|
|
|
@ -44,14 +44,12 @@ class PalletScanFragment(
|
|||
binding.mainToolbar.toolbarTitle.text = title
|
||||
}
|
||||
|
||||
private fun expeditionState_addByPallet(vPalletId: String) {
|
||||
private fun expeditionState_addByPallet(vPalletId: Int) {
|
||||
|
||||
customDialogList.dismiss()
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
||||
viewModel.expeditionState_addByPallet(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
vPalletId,
|
||||
"STORED"
|
||||
)
|
||||
|
@ -134,7 +132,7 @@ class PalletScanFragment(
|
|||
binding.splashProgress.visibility = View.GONE
|
||||
ma.messageWithSound(getString(R.string.palletScanned) + itemScaned, false, true)
|
||||
|
||||
ma.onComprobarPalletFromPalletScan(it, ItemPalletVO(Pallet = itemScaned))
|
||||
ma.onComprobarPalletFromPalletScan(it, ItemPalletVO(Pallet = itemScaned.toInt()))
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +180,7 @@ class PalletScanFragment(
|
|||
|
||||
when (action) {
|
||||
"receive" -> expeditionState_addByPallet(
|
||||
customDialogList.getValue()
|
||||
customDialogList.getValue().toInt()
|
||||
)
|
||||
"get" -> expeditionPallet_get(customDialogList.getValue())
|
||||
}
|
||||
|
|
|
@ -29,14 +29,10 @@ class PalletScanViewModel(context: Context) : BaseViewModel(context) {
|
|||
|
||||
|
||||
fun expeditionState_addByPallet(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vPalletId: String,
|
||||
vPalletId: Int,
|
||||
vStatePallet: String
|
||||
) {
|
||||
GetPaletizadoresUserCase.expeditionState_addByPallet(
|
||||
usuario,
|
||||
password,
|
||||
silex.expeditionState_addByPallet(
|
||||
vPalletId,
|
||||
vStatePallet
|
||||
)
|
||||
|
@ -75,6 +71,7 @@ class PalletScanViewModel(context: Context) : BaseViewModel(context) {
|
|||
override fun onFailure(call: Call<ItemExpeditionTruckVO>, t: Throwable) {
|
||||
|
||||
_responsePalletGet.value = ItemExpeditionTruckVO(
|
||||
0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
|
@ -87,6 +84,7 @@ class PalletScanViewModel(context: Context) : BaseViewModel(context) {
|
|||
|
||||
if (!response.isSuccessful) {
|
||||
_responsePalletGet.value = ItemExpeditionTruckVO(
|
||||
0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
|
|
|
@ -3,7 +3,7 @@ package es.verdnatura.presentation.view.feature.paletizador.model
|
|||
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
||||
|
||||
class ItemExpeditionTruckVO(
|
||||
var truckFk: String = "",
|
||||
var truckFk: Int,
|
||||
var ETD: String = "",
|
||||
var Destino: String = "",
|
||||
var description: String = "",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package es.verdnatura.presentation.view.feature.paletizador.model
|
||||
|
||||
class ItemPalletVO(
|
||||
var Pallet:String = "",
|
||||
var Pallet:Int,
|
||||
var Rutas:String = "",
|
||||
var Eti:String = "",
|
||||
var isError: Boolean = false,
|
||||
|
|
|
@ -12,7 +12,7 @@ class ItemScanList(
|
|||
)
|
||||
|
||||
class ItemExpeditionScanVO(
|
||||
var id:String = "",
|
||||
var id:Int,
|
||||
var expeditionFk:String = "",
|
||||
var Ruta:String = "",
|
||||
var Ticket:String = "",
|
||||
|
|
|
@ -4,3 +4,8 @@ class SmartTag(
|
|||
var code:String? = "",
|
||||
var text:String? = " "
|
||||
)
|
||||
|
||||
class BufferLoad(
|
||||
var code:String? = "",
|
||||
var text:String? = " "
|
||||
)
|
|
@ -155,7 +155,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@{Integer.toString(sale.itemFk)}"
|
||||
android:text="@{Long.toString(sale.itemFk)}"
|
||||
tool:text="85478"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/h6"
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:maxLines="1"
|
||||
android:text="@{Integer.toString(sale.itemFk)}"
|
||||
android:text="@{Long.toString(sale.itemFk)}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@{Integer.toString(sale.itemFk)}"
|
||||
android:text="@{Long.toString(sale.itemFk)}"
|
||||
tool:text="85478"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/h6"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.Pallet}"
|
||||
android:text="@{Integer.toString(item.Pallet)}"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1"
|
||||
|
|
Loading…
Reference in New Issue