feat itemShelvingLog refs #7168
This commit is contained in:
parent
10cf8ddbda
commit
2333e3b878
|
@ -675,6 +675,12 @@ interface SalixService {
|
|||
@Query("params") params: Any,
|
||||
): Call<List<ItemShelvingLog>>
|
||||
|
||||
//Tarea 7168
|
||||
@GET("Applications/itemShelvingLogs")
|
||||
fun itemShelvingLogGet(
|
||||
@Query("filter") filter: String,
|
||||
): Call<List<ItemShelvingLog>>
|
||||
|
||||
@POST("Applications/itemshelving_getInfo/execute-proc")
|
||||
fun itemshelvingGetInfo(
|
||||
@Query("schema") schema: String = "vn",
|
||||
|
|
|
@ -17,11 +17,18 @@ class ItemShelvingLogViewModel(val context: Context) : BaseViewModel(context) {
|
|||
val itemShelvingLogList: LiveData<ItemShelvingLogList>
|
||||
get() = _itemShelvingLogList
|
||||
|
||||
fun itemShelvingLogGet(vShelvingFK: String, records: Int = LIMITRECORDSSHELVINGLOG) {
|
||||
fun itemShelvingLogGet(shelvingOrItem: String, records: Int = LIMITRECORDSSHELVINGLOG) {
|
||||
|
||||
//tarea 7168
|
||||
//salix.itemShelvingLogGet(params = listOf(vShelvingFK,records).formatWithQuotes())
|
||||
salix.itemShelvingLogGet(params = listOf(vShelvingFK).formatWithQuotes())
|
||||
salix.itemShelvingLogGet(filter = """
|
||||
|{"where":{"or": [ {"shelvingFk": "$shelvingOrItem"},
|
||||
|{"itemFk": "$shelvingOrItem"}]},
|
||||
|"limit":$records,"order":"created",
|
||||
|"include": [ { "relation": "worker", "scope": { "fields": ["code"]}},
|
||||
|{ "relation": "item", "scope": { "fields": ["longName"]}}]}
|
||||
|""".trimMargin())
|
||||
salix.itemShelvingLogGet(params = listOf(shelvingOrItem).formatWithQuotes())
|
||||
.enqueue(object :
|
||||
SalixCallback<List<ItemShelvingLog>>(context) {
|
||||
override fun onSuccess(response: Response<List<ItemShelvingLog>>) {
|
||||
|
|
|
@ -9,6 +9,8 @@ class ItemShelvingLog(
|
|||
var visible: Int? = null,
|
||||
var accion: String? = null,
|
||||
var code: String? = null,
|
||||
//Tarea 7168
|
||||
//Falta crear campos anidados
|
||||
) {
|
||||
var created: String = ""
|
||||
get() {
|
||||
|
|
Loading…
Reference in New Issue