Changeset b010f23 in observatorio
- Timestamp:
- Jul 22, 2014, 11:13:14 AM (10 years ago)
- Branches:
- master
- Children:
- 93d134b
- Parents:
- a0e0e20
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
procesos/apps/sigesic/ajax.py
ra6740ed rb010f23 14 14 import csv 15 15 import subprocess 16 import json 17 18 16 19 def updatecomboM(request): 17 20 dajax = Dajax() … … 85 88 return dajax 86 89 87 def generarConsultaUE(request):88 dajax = Dajax()89 print request90 91 #ciiuSeleccionados = request.POST['ciiuSeleccionados']92 93 rif = str(request.POST['rif'])94 95 narriba = str(request.POST['narriba'])96 nabajo = str(request.POST['nabajo'])97 annyo = str(request.POST['annyo'])98 99 """100 os.system("cd " + os.path.join(settings.PATH, "tmp/") + ";" + os.path.join(settings.PATH, "extapps/chains/print_prod_chain") + " --host=" + settings.DATABASES['default']['HOST'] + " --port=" + settings.DATABASES['default']['PORT'] + " --username=" + settings.DATABASES['default']['USER'] + " --password=" + settings.DATABASES['default']['PASSWORD'] + " --dbname=" + settings.DATABASES['default']['NAME'] + " --levelsup=" + narriba + " --levelsdown=" + nabajo + " --output=" + str(request.user) + " RIF " + rif)101 os.system("mv -f " + os.path.join(settings.PATH, "tmp/grafico.html ") + os.path.join(settings.PATH, "templates/cadenas/" + str(request.user) + "_grafico.html") + ";")102 os.system("mv -f " + os.path.join(settings.PATH, "tmp/factores.xml ") + os.path.join(settings.PATH, "tmp/" + str(request.user) + "_factores.xml ") + ";")103 os.system("mv -f " + os.path.join(settings.PATH, "tmp/respuestas.xml ") + os.path.join(settings.PATH, "tmp/" + str(request.user) + "_respuestas.xml ") + ";")104 """105 106 ahora = date.today().isoformat()107 108 #dajax.script("window.open('"+settings.BASE_URL+"/SigesicListado?ahora="+ahora+"&ciiuSeleccionados="+ciiuSeleccionados+"')")109 dajax.script("window.open('"+settings.BASE_URL+"/unidadecon/GraficoUE?rif="+rif+"&ahora="+ahora+"&narriba="+narriba+"&nabajo="+nabajo+"&annyo="+annyo+"&usuario="+str(request.user)+"')")110 111 return dajax112 113 def generarConsultaPro(request):114 dajax = Dajax()115 print request116 117 #ciiuSeleccionados = request.POST['ciiuSeleccionados']118 119 rif = str(request.POST['rif'])120 121 narriba = str(request.POST['narriba'])122 nabajo = str(request.POST['nabajo'])123 annyo = str(request.POST['annyo'])124 125 """126 os.system("cd " + os.path.join(settings.PATH, "tmp/") + ";" + os.path.join(settings.PATH, "extapps/chains/print_prod_chain") + " --host=" + settings.DATABASES['default']['HOST'] + " --port=" + settings.DATABASES['default']['PORT'] + " --username=" + settings.DATABASES['default']['USER'] + " --password=" + settings.DATABASES['default']['PASSWORD'] + " --dbname=" + settings.DATABASES['default']['NAME'] + " --levelsup=" + narriba + " --levelsdown=" + nabajo + " --output=" + str(request.user) + " RIF " + rif)127 os.system("mv -f " + os.path.join(settings.PATH, "tmp/grafico.html ") + os.path.join(settings.PATH, "templates/cadenas/" + str(request.user) + "_grafico.html") + ";")128 os.system("mv -f " + os.path.join(settings.PATH, "tmp/factores.xml ") + os.path.join(settings.PATH, "tmp/" + str(request.user) + "_factores.xml ") + ";")129 os.system("mv -f " + os.path.join(settings.PATH, "tmp/respuestas.xml ") + os.path.join(settings.PATH, "tmp/" + str(request.user) + "_respuestas.xml ") + ";")130 """131 132 ahora = date.today().isoformat()133 134 #dajax.script("window.open('"+settings.BASE_URL+"/SigesicListado?ahora="+ahora+"&ciiuSeleccionados="+ciiuSeleccionados+"')")135 dajax.script("window.open('"+settings.BASE_URL+"/unidadecon/GraficoPro?rif="+rif+"&ahora="+ahora+"&narriba="+narriba+"&nabajo="+nabajo+"&annyo="+annyo+"&usuario="+str(request.user)+"')")136 137 return dajax138 139 def generarConsultaIns(request):140 dajax = Dajax()141 print request142 143 #ciiuSeleccionados = request.POST['ciiuSeleccionados']144 145 rif = str(request.POST['rif'])146 147 narriba = str(request.POST['narriba'])148 nabajo = str(request.POST['nabajo'])149 annyo = str(request.POST['annyo'])150 151 """152 os.system("cd " + os.path.join(settings.PATH, "tmp/") + ";" + os.path.join(settings.PATH, "extapps/chains/print_prod_chain") + " --host=" + settings.DATABASES['default']['HOST'] + " --port=" + settings.DATABASES['default']['PORT'] + " --username=" + settings.DATABASES['default']['USER'] + " --password=" + settings.DATABASES['default']['PASSWORD'] + " --dbname=" + settings.DATABASES['default']['NAME'] + " --levelsup=" + narriba + " --levelsdown=" + nabajo + " --output=" + str(request.user) + " RIF " + rif)153 os.system("mv -f " + os.path.join(settings.PATH, "tmp/grafico.html ") + os.path.join(settings.PATH, "templates/cadenas/" + str(request.user) + "_grafico.html") + ";")154 os.system("mv -f " + os.path.join(settings.PATH, "tmp/factores.xml ") + os.path.join(settings.PATH, "tmp/" + str(request.user) + "_factores.xml ") + ";")155 os.system("mv -f " + os.path.join(settings.PATH, "tmp/respuestas.xml ") + os.path.join(settings.PATH, "tmp/" + str(request.user) + "_respuestas.xml ") + ";")156 """157 158 ahora = date.today().isoformat()159 160 #dajax.script("window.open('"+settings.BASE_URL+"/SigesicListado?ahora="+ahora+"&ciiuSeleccionados="+ciiuSeleccionados+"')")161 dajax.script("window.open('"+settings.BASE_URL+"/unidadecon/GraficoIns?rif="+rif+"&ahora="+ahora+"&narriba="+narriba+"&nabajo="+nabajo+"&annyo="+annyo+"&usuario="+str(request.user)+"')")162 163 return dajax164 165 166 90 def generarGrafo(request): 167 91 dajax = Dajax()
Note: See TracChangeset
for help on using the changeset viewer.