v5.4.3
This commit is contained in:
parent
837d23a5da
commit
67588e41e8
|
@ -14,8 +14,8 @@ android {
|
|||
applicationId "es.verdnatura"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 50
|
||||
versionName "5.4.0"
|
||||
versionCode 53
|
||||
versionName "5.4.3"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
|
|
@ -168,12 +168,12 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
private fun runSound(){
|
||||
// Get the maximum media/music volume
|
||||
val maxVolume = mAudioManager?.mediaMaxVolume
|
||||
mAudioManager?.setMediaVolume(maxVolume!! / 2)
|
||||
// mAudioManager?.setMediaVolume(maxVolume!!)
|
||||
}
|
||||
|
||||
private fun muteSound() {
|
||||
if (mAudioManager?.mediaCurrentVolume != 0){
|
||||
mAudioManager?.setMediaVolume(0)
|
||||
// mAudioManager?.setMediaVolume(0)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -82,6 +82,8 @@ class CollectionFragment(
|
|||
private var mIsListening = false
|
||||
private var placementPicked:PlacementVO? = null
|
||||
|
||||
private var lastPlacementPicked: PlacementVO? = null
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(collection:CollectionVO,type:String) = CollectionFragment(collection,type)
|
||||
|
@ -831,7 +833,6 @@ class CollectionFragment(
|
|||
sales[storedPosition].placements[storedShelvingPosition].visible = "("+(shelvingVisible.toInt() - quantity.toInt()).toString()+")"
|
||||
}
|
||||
|
||||
|
||||
viewModel.itemShelvingSaleSupplyAdd(
|
||||
usuario = user,
|
||||
password = password,
|
||||
|
@ -1416,7 +1417,7 @@ class CollectionFragment(
|
|||
private fun speakOrder(){
|
||||
if (type == SACADOR){
|
||||
if (state == 0){
|
||||
speak("Colección cargada, diga listo para empezar.")
|
||||
speak("Colección cargada.")
|
||||
}else{
|
||||
var index = 0
|
||||
for (sale in sales){
|
||||
|
@ -1444,13 +1445,25 @@ class CollectionFragment(
|
|||
carroSeparate.append(l)
|
||||
carroSeparate.append(" ")
|
||||
}
|
||||
try {
|
||||
speak("Pasillo "+pasillo.toInt()+ ", Sector "+sector.toInt()+ ", "+carroSeparate.toString())
|
||||
}catch (e:Exception){
|
||||
speak("Pasillo "+pasillo+ " Sector "+sector+" Carro "+carro)
|
||||
}
|
||||
|
||||
|
||||
placementPicked = placement
|
||||
storedShelvingPosition = placementIndex
|
||||
|
||||
if (lastPlacementPicked != null && lastPlacementPicked!!.placement != placement.placement){
|
||||
lastPlacementPicked = placement
|
||||
try {
|
||||
speak("Pasillo "+pasillo.toInt()+ ", Sector "+sector.toInt()+ ", "+carroSeparate.toString())
|
||||
}catch (e:Exception){
|
||||
speak("Pasillo "+pasillo+ " Sector "+sector+" Carro "+carro)
|
||||
}
|
||||
}else if(lastPlacementPicked != null && lastPlacementPicked!!.shelving != placement.shelving){
|
||||
speak(" Carro "+carro)
|
||||
}else{
|
||||
state = 2
|
||||
speakOrder()
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -1467,7 +1480,15 @@ class CollectionFragment(
|
|||
try {
|
||||
val item = sale.itemFk
|
||||
val cantidad = sale.quantity.toInt() - sale.pickedQuantity.toInt()
|
||||
speak("Item "+item.toInt()+ ", Cantidad: "+cantidad)
|
||||
val listtext = sale.longName.split(" ")
|
||||
var nombre = ""
|
||||
if (listtext.isNotEmpty()){
|
||||
nombre = listtext.get(0)+ " "+ sale.color
|
||||
}else{
|
||||
nombre = sale.longName+ " "+ sale.color
|
||||
}
|
||||
|
||||
speak("Item "+item.toInt()+ " "+nombre+" , Cantidad: "+cantidad)
|
||||
}catch (e:Exception){
|
||||
speak("Se necesita actuación manual")
|
||||
}
|
||||
|
@ -1488,13 +1509,14 @@ class CollectionFragment(
|
|||
|
||||
storedPosition = index
|
||||
if (quantityVisible < needPicked){
|
||||
onQuantityOfShelvingSelected(itemShelvingFk = placementPicked!!.itemShelvingSaleFk,quantity = quantityVisible.toString())
|
||||
onQuantityOfShelvingSelected(itemShelvingFk = placementPicked!!.shelving,quantity = quantityVisible.toString())
|
||||
}else{
|
||||
onQuantityOfShelvingSelected(itemShelvingFk = placementPicked!!.itemShelvingSaleFk,quantity = needPicked.toString())
|
||||
onQuantityOfShelvingSelected(itemShelvingFk = placementPicked!!.shelving,quantity = needPicked.toString())
|
||||
}
|
||||
|
||||
state = 0
|
||||
speak("Acción registrada. Diga listo para continuar")
|
||||
//speak("Acción registrada. Diga listo para continuar")
|
||||
speak("Registrada")
|
||||
|
||||
}
|
||||
|
||||
|
@ -1506,7 +1528,7 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
if (index >= sales.size){
|
||||
speak("Colección completada. Muchas gracias")
|
||||
speak("Colección completada.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue