Commit 20407af1 by Juan Pablo dure

a probar rc2

1 parent 9708f30f
...@@ -31,7 +31,7 @@ class FosaDiaria(): ...@@ -31,7 +31,7 @@ class FosaDiaria():
except: except:
data = False data = False
if not data == False: if not data == False:
return data return data["hora"]
try: try:
self.ActualizarDatosDominios(selenium,dia) self.ActualizarDatosDominios(selenium,dia)
except Exception as E: except Exception as E:
...@@ -67,6 +67,8 @@ class FosaDiaria(): ...@@ -67,6 +67,8 @@ class FosaDiaria():
except: except:
self.Cache[dia] = {} self.Cache[dia] = {}
for n in data["domino"].keys(): for n in data["domino"].keys():
if data["resultado"][n] in ["No Inspeccionado","Anulado"]:
continue
#print("key", n) #print("key", n)
dominio = data["domino"][n] dominio = data["domino"][n]
#print(dominio,"dominio") #print(dominio,"dominio")
......
...@@ -125,6 +125,7 @@ def anomalies(): ...@@ -125,6 +125,7 @@ def anomalies():
except: except:
s.driver.quit() s.driver.quit()
return f"Error en el login" return f"Error en el login"
fingfd = FozaDiaria.BuscarDatosDominio(plate.upper(),selenium=s)
try: try:
gototec(s, d) gototec(s, d)
except: except:
...@@ -143,6 +144,7 @@ def anomalies(): ...@@ -143,6 +144,7 @@ def anomalies():
s.driver.quit() s.driver.quit()
anom['header']['patente'] = plate anom['header']['patente'] = plate
anom['header']['fecha'] = datetime.datetime.now().strftime("%d/%m/%Y") anom['header']['fecha'] = datetime.datetime.now().strftime("%d/%m/%Y")
anom['header']["hora"] = str(fingfd)
return render_template("anomalies.html", anomalies = anom) return render_template("anomalies.html", anomalies = anom)
@app.route('/report', methods = ['POST']) @app.route('/report', methods = ['POST'])
...@@ -165,10 +167,10 @@ def report(): ...@@ -165,10 +167,10 @@ def report():
answer['header']['patente'] = plate.upper() answer['header']['patente'] = plate.upper()
answer['header']["fecha-hora"] = apollo.estaticos.FechaHora() answer['header']["fecha-hora"] = apollo.estaticos.FechaHora()
print(1,answer) #print(1,answer)
answer['header']["ingeniero"] = ing.LeerDatosUsuario(request.cookies["login"])['nombreyapellido'] answer['header']["ingeniero"] = ing.LeerDatosUsuario(request.cookies["login"])['nombreyapellido']
#answer['header']["hora"] = apollo.estaticos.Hora() #answer['header']["hora"] = apollo.estaticos.Hora()
print(2,answer) #print(2,answer)
try: try:
login( login(
...@@ -183,7 +185,7 @@ def report(): ...@@ -183,7 +185,7 @@ def report():
return f"Error en el login" return f"Error en el login"
fingfd = FozaDiaria.BuscarDatosDominio(plate.upper(),selenium=s) fingfd = FozaDiaria.BuscarDatosDominio(plate.upper(),selenium=s)
print(3,answer) #print(3,answer)
try: try:
...@@ -201,7 +203,7 @@ def report(): ...@@ -201,7 +203,7 @@ def report():
except: except:
s.driver.quit() s.driver.quit()
return f"Error completando datos extra de la patente '{plate}'." return f"Error completando datos extra de la patente '{plate}'."
print(answer) #print(answer)
answer['header']["hora"] = str(fingfd) answer['header']["hora"] = str(fingfd)
s.driver.quit() s.driver.quit()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!