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