feat: cau#297742 stateSTORED
This commit is contained in:
parent
bf5cbf37a8
commit
2a0b251b14
|
@ -201,30 +201,16 @@ class LoadUnloadFragment(
|
||||||
|
|
||||||
private fun setExpeditionsState(list: MutableList<ExpeditionInfoLoadUnload>, state: String) {
|
private fun setExpeditionsState(list: MutableList<ExpeditionInfoLoadUnload>, state: String) {
|
||||||
scanning(false)
|
scanning(false)
|
||||||
/* val mlist = mutableListOf<ExpeditionSalix>()
|
|
||||||
for (l in list) {
|
|
||||||
mlist.add(
|
|
||||||
ExpeditionSalix(
|
|
||||||
expeditionFk = l.id,
|
|
||||||
stateCode = if (l.code != state && l.code != "FOUND" && l.code != "DELIVERED") {
|
|
||||||
if (state == "ON DELIVERY") "NOT SCANNED" else "LOST"
|
|
||||||
} else {
|
|
||||||
l.code
|
|
||||||
},
|
|
||||||
isScanned = l.isScanned
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}*/
|
|
||||||
val mlistPosition = mutableListOf<ExpeditionSalixPosition>()
|
val mlistPosition = mutableListOf<ExpeditionSalixPosition>()
|
||||||
for (l in list) {
|
for (l in list) {
|
||||||
mlistPosition.add(
|
mlistPosition.add(
|
||||||
ExpeditionSalixPosition(
|
ExpeditionSalixPosition(
|
||||||
expeditionFk = l.id,
|
expeditionFk = l.id,
|
||||||
stateCode = if (l.code == "FOUND") (l.code) else {
|
stateCode = if (l.code == "FOUND") (l.code) else {
|
||||||
if (state == "ON DELIVERY" && l.code != "ON DELIVERY" && l.code != "DELIVERED" && l.code != "LOST" && l.code != "PENDING") {
|
if (state == "ON DELIVERY" && l.code != "ON DELIVERY" && l.code != "DELIVERED" && l.code != "LOST" && l.code != "PENDING" && l.code != "STORED") {
|
||||||
"NOT SCANNED"
|
"NOT SCANNED"
|
||||||
} else {
|
} else {
|
||||||
if (state == "DELIVERED" && l.code != "DELIVERED") "PENDING" else l.code
|
if (state == "DELIVERED" && l.code != "DELIVERED" && l.code != "STORED") "PENDING" else l.code
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isScanned = l.isScanned,
|
isScanned = l.isScanned,
|
||||||
|
|
|
@ -176,10 +176,10 @@ class SummaryFragment(
|
||||||
val listExpedition = list.filter { it.addressFk == address }.map { l ->
|
val listExpedition = list.filter { it.addressFk == address }.map { l ->
|
||||||
ExpeditionSalixPosition(
|
ExpeditionSalixPosition(
|
||||||
expeditionFk = l.id, stateCode = if (l.code == "FOUND") (l.code) else {
|
expeditionFk = l.id, stateCode = if (l.code == "FOUND") (l.code) else {
|
||||||
if (state == "ON DELIVERY" && l.code != "ON DELIVERY" && l.code != "DELIVERED" && l.code != "LOST") {
|
if (state == "ON DELIVERY" && l.code != "ON DELIVERY" && l.code != "DELIVERED" && l.code != "LOST" && l.code != "PENDING" && l.code != "STORED") {
|
||||||
"NOT SCANNED"
|
"NOT SCANNED"
|
||||||
} else {
|
} else {
|
||||||
if (state == "DELIVERED" && l.code != "DELIVERED") "LOST" else l.code
|
if (state == "DELIVERED" && l.code != "DELIVERED" && l.code != "STORED") "PENDING" else l.code
|
||||||
}
|
}
|
||||||
}, isScanned = l.isScanned, scanOrder = l.scanOrder
|
}, isScanned = l.isScanned, scanOrder = l.scanOrder
|
||||||
|
|
||||||
|
@ -262,14 +262,6 @@ class SummaryFragment(
|
||||||
found = true
|
found = true
|
||||||
exped.code = state
|
exped.code = state
|
||||||
exped.isScanned = isScanned
|
exped.isScanned = isScanned
|
||||||
|
|
||||||
println(
|
|
||||||
"scanOrder markExpedition${
|
|
||||||
myList.filter { it.addressFk == addressFkSelected }
|
|
||||||
.filter { it.code == state }.size
|
|
||||||
}"
|
|
||||||
)
|
|
||||||
|
|
||||||
exped.scanOrder = myList.filter { it.addressFk == addressFkSelected }
|
exped.scanOrder = myList.filter { it.addressFk == addressFkSelected }
|
||||||
.filter { it.code == state }.size
|
.filter { it.code == state }.size
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue