Se modifico el campo de Ruta para que pueda leer cadenas

This commit is contained in:
IsR0d
2024-06-11 13:12:01 -06:00
parent b219cc8e96
commit c24320fda9
3 changed files with 35 additions and 41 deletions

View File

@@ -49,6 +49,7 @@ Sub Class_Globals
Dim count As Int = 0 Dim count As Int = 0
Dim count2 As Int = 0 Dim count2 As Int = 0
Dim ime As IME Dim ime As IME
Private L_Color As Label
End Sub End Sub
'You can add more parameters here. 'You can add more parameters here.
@@ -148,7 +149,7 @@ Sub JobDone(Job As HttpJob)
End If End If
End If End If
End If End If
If Job.JobName = "DBRequest" Then If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job) Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "CartaPorte_OK" Then 'query tag If result.Tag = "CartaPorte_OK" Then 'query tag
@@ -160,78 +161,67 @@ Sub JobDone(Job As HttpJob)
CARTAPORTE_OK= records(result.Columns.Get("INFO_OK")) CARTAPORTE_OK= records(result.Columns.Get("INFO_OK"))
Next Next
Next Next
If CARTAPORTE_OK = "OK" Then If CARTAPORTE_OK = "OK" Then
count2 = count2+1 count2 = count2+1
End If End If
End If End If
End If End If
' Log($"placa:${PLACA_OK}, operador:${OPERADOR_OK}, checklist:${CHECK_LIST}, cp:${CARTAPORTE_OK}"$)
Log($"placa:${PLACA_OK}, operador:${OPERADOR_OK}, checklist:${CHECK_LIST}, cp:${CARTAPORTE_OK}"$)
Log(count)
Log(count2)
' If count = 4 Then
' If PLACA_OK = "OK" And OPERADOR_OK = "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK = "OK" Then
' P_Color.Visible = True
' P_Color.Color = Colors.Green
' Else If PLACA_OK = "OK" And OPERADOR_OK = "OK" And CHECK_LIST <> "OK" And CARTAPORTE_OK = "OK" Then
' P_Color.Visible = True
' P_Color.Color = Colors.Yellow
' MsgboxAsync("Favor de revisar El Check List", "AVISO")
' Else If PLACA_OK <> "OK" Or OPERADOR_OK <> "OK" Or CHECK_LIST <> "OK" Or CARTAPORTE_OK <> "OK" Then
' If PLACA_OK <> "OK" And OPERADOR_OK <> "OK" And CHECK_LIST <> "OK" And CARTAPORTE_OK = "OK" Then
' P_Color.Visible = True
' P_Color.Color = Colors.Red
' MsgboxAsync("Revisa La Placa", "AVISO")
' Else If PLACA_OK = "OK" And OPERADOR_OK <> "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK = "OK" Then
' P_Color.Visible = True
' P_Color.Color = Colors.Red
' MsgboxAsync("Revisa El Operador", "AVISO")
' End If
' If PLACA_OK <> "OK" And OPERADOR_OK <> "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK <> "OK" Then
' P_Color.Visible = True
' P_Color.Color = Colors.Red
' MsgboxAsync("No hay Carta Porte para esa Ruta", "AVISO")
' End If
' End If
' End If
'--------------------------------------
If count = 4 Then If count = 4 Then
If count2 = 4 Then If count2 = 4 Then
P_Color.Visible = True P_Color.Visible = True
P_Color.Color = Colors.Green P_Color.Color = Colors.Green
L_Color.Visible = True
Else If PLACA_OK = "OK" And OPERADOR_OK = "OK" And CHECK_LIST <> "OK" And CARTAPORTE_OK = "OK" Then Else If PLACA_OK = "OK" And OPERADOR_OK = "OK" And CHECK_LIST <> "OK" And CARTAPORTE_OK = "OK" Then
P_Color.Visible = True P_Color.Visible = True
P_Color.Color = Colors.Yellow P_Color.Color = Colors.Yellow
L_Color.Visible = False
MsgboxAsync("Favor de revisar el CheckList", "AVISO") MsgboxAsync("Favor de revisar el CheckList", "AVISO")
Else If count2 < 4 Then Else If count2 < 4 Then
P_Color.Visible = True P_Color.Visible = True
P_Color.Color = Colors.Red P_Color.Color = Colors.Red
L_Color.Visible = False
If PLACA_OK <> "OK" And OPERADOR_OK <> "OK" And CHECK_LIST <> "OK" And CARTAPORTE_OK = "OK" Then If PLACA_OK <> "OK" And OPERADOR_OK <> "OK" And CHECK_LIST <> "OK" And CARTAPORTE_OK = "OK" Then
P_Color.Visible = True P_Color.Visible = True
P_Color.Color = Colors.Red P_Color.Color = Colors.Red
L_Color.Visible = False
MsgboxAsync("Revisa La Placa", "AVISO") MsgboxAsync("Revisa La Placa", "AVISO")
Else If PLACA_OK = "OK" And OPERADOR_OK <> "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK = "OK" Then Else If PLACA_OK = "OK" And OPERADOR_OK <> "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK = "OK" Then
P_Color.Visible = True P_Color.Visible = True
P_Color.Color = Colors.Red P_Color.Color = Colors.Red
L_Color.Visible = False
MsgboxAsync("Revisa El Operador", "AVISO") MsgboxAsync("Revisa El Operador", "AVISO")
Else if PLACA_OK <> "OK" And OPERADOR_OK <> "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK <> "OK" And count2 = 1 Then Else if PLACA_OK <> "OK" And OPERADOR_OK <> "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK <> "OK" And count2 = 1 Then
P_Color.Visible = True P_Color.Visible = True
P_Color.Color = Colors.Red P_Color.Color = Colors.Red
L_Color.Visible = False
MsgboxAsync("No hay Carta Porte para esa Ruta", "AVISO") MsgboxAsync("No hay Carta Porte para esa Ruta", "AVISO")
End If Else If PLACA_OK <> "OK" And OPERADOR_OK <> "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK = "OK" Then
End If
If PLACA_OK = "OK" And OPERADOR_OK = "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK <> "OK" Then
P_Color.Visible = True P_Color.Visible = True
P_Color.Color = Colors.Red P_Color.Color = Colors.Red
MsgboxAsync("No se encuentra Carta Porte", "AVISO") L_Color.Visible = False
MsgboxAsync("La Placa o el Operador no coinsiden con CheckList y Carta Porte", "AVISO")
End If End If
End If
If PLACA_OK = "OK" And OPERADOR_OK = "OK" And CHECK_LIST = "OK" And CARTAPORTE_OK <> "OK" Then
P_Color.Visible = True
P_Color.Color = Colors.Red
L_Color.Visible = False
MsgboxAsync("No se encuentra Carta Porte", "AVISO")
End If
If PLACA_OK <> "OK" And OPERADOR_OK <> "OK" And CHECK_LIST <> "OK" And CARTAPORTE_OK <> "OK" Then If PLACA_OK <> "OK" And OPERADOR_OK <> "OK" And CHECK_LIST <> "OK" And CARTAPORTE_OK <> "OK" Then
P_Color.Visible = True P_Color.Visible = True
P_Color.Color = Colors.Red P_Color.Color = Colors.Red
L_Color.Visible = False
MsgboxAsync("No se encuentran Placas, Operador, CheckList, CartaPorte", "AVISO") MsgboxAsync("No se encuentran Placas, Operador, CheckList, CartaPorte", "AVISO")
End If End If
If PLACA_OK = "OK" And OPERADOR_OK = "OK" And CHECK_LIST <> "OK" And CARTAPORTE_OK <> "OK" Then
P_Color.Visible = True
P_Color.Color = Colors.Red
L_Color.Visible = False
MsgboxAsync("No se encuentran CheckList y CartaPorte", "AVISO")
End If
End If End If
Job.Release Job.Release
End If End If
End Sub End Sub
@@ -410,7 +400,7 @@ Private Sub b_guardar_Click
MS = JoinStrings(ValDato, ", ") & " deben ser obligatorios" MS = JoinStrings(ValDato, ", ") & " deben ser obligatorios"
End If End If
MsgboxAsync(MS, "AVISO") MsgboxAsync(MS, "AVISO")
Else Else if IsNumber(et_rutaReparto.Text) Then
c = Starter.skmt.ExecQuery("select ID_ALMACEN from CAT_ALMACEN") c = Starter.skmt.ExecQuery("select ID_ALMACEN from CAT_ALMACEN")
c.Position = 0 c.Position = 0
Dim ALM_ENV = c.GetString ("ID_ALMACEN") Dim ALM_ENV = c.GetString ("ID_ALMACEN")
@@ -443,7 +433,11 @@ Private Sub b_guardar_Click
cmd.Parameters = Array As Object(et_rutaReparto.Text, ALM_ENV) cmd.Parameters = Array As Object(et_rutaReparto.Text, ALM_ENV)
Log(et_rutaReparto.Text & " ," & ALM_ENV) Log(et_rutaReparto.Text & " ," & ALM_ENV)
reqManager.ExecuteQuery(cmd , 0, "CartaPorte_OK") reqManager.ExecuteQuery(cmd , 0, "CartaPorte_OK")
Else
P_Color.Visible = True
P_Color.Color = Colors.Red
L_Color.Visible = False
MsgboxAsync("Las Ruta debe ser numerica", "AVISO")
End If End If
End Sub End Sub

Binary file not shown.

View File

@@ -28,6 +28,6 @@ ModuleClosedNodes6=
ModuleClosedNodes7= ModuleClosedNodes7=
ModuleClosedNodes8= ModuleClosedNodes8=
ModuleClosedNodes9= ModuleClosedNodes9=
NavigationStack=C_Principal,JobDone,151,6,C_Principal,Camera1_Preview,373,0,C_Principal,FoundBarcode,299,3,C_Principal,Class_Globals,8,6,C_Principal,b_guardar_Click,373,6,C_Principal,B4XPage_CloseRequest,239,0,C_Principal,b_escanOperador_Click,494,0,Diseñador Visual,principal.bal,-100,6,C_Principal,et_kmsInicial_TextChanged,518,0,C_Principal,et_rutaReparto_TextChanged,512,6 NavigationStack=C_Principal,B4XPage_CloseRequest,239,0,C_Principal,b_escanOperador_Click,494,0,C_Principal,et_kmsInicial_TextChanged,518,0,C_Principal,et_rutaReparto_TextChanged,512,6,C_Principal,Class_Globals,32,6,C_Principal,JoinStrings,462,0,C_Principal,B4XPage_Appear,76,0,C_Principal,b_guardar_Click,422,6,Diseñador Visual,principal.bal,-100,6,C_Principal,JobDone,105,6
SelectedBuild=0 SelectedBuild=0
VisibleModules=2,8,4,9,6,7,3 VisibleModules=2,8,4,9,6,7,3