
    ia6                         S SK Jr  S rg)    )get_connectionTEST101c            
         Sn  [        5       nU(       d  [        S5      eUR                  5       nUR                  U 5        UR	                  5       nU Vs/ s GH  n0 SUS   _SUS   _SUS   _S	US
   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS    _S!US"   _S#US$   _0 S%US&   _S'US(   _S)US*   _S+US,   _S-US.   _S/US0   _S1US2   _S3US4   _S5US6   _S7US8   _S9US:   _S;US<   _S=US>   _S?US@   _SAUSB   _SCUSD   _SEUSF   _E0 SGUSH   _SIUSJ   _SKUSL   _SMUSN   _SOUSP   _SQUSR   _SSUST   _SUUSV   _SWUSX   _SYUSZ   _S[US\   _S]US^   _S_US`   _SaUSb   _ScUSd   _SeUSf   _SgUSh   _E0 SiUSj   _SkUSl   _SmUSn   _SoUSp   _SqUSr   _SsUSt   _SuUSv   _SwUSx   _SyUSz   _S{US|   _S}US~   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _E0 SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _E0 SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _E0 SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _SUS   _EUS   US   US   US   US   S.EPGM     snU(       a  UR                  5         $ $ s  snf ! [         a2  n[        SU 35        / s SnAW(       a  UR                  5         $ $ SnAff = f! W(       a  UR                  5         f f = f)z,Obtiene los Breakers desde la base de datos.u0  
     SELECT
        isnull (ScoreV2temp.OrderNum, '')as OrderNum,
        isnull (ScoreV2temp.Departamento, '')as Departamento,
        isnull (ScoreV2temp.Vendedor, '')as Vendedor,
        isnull (ScoreV2temp.Name, '')as Name,
        isnull (ScoreV2temp.TotalLines, '')as TotalLines,
        isnull (ScoreV2temp.OrderLine, '')as OrderLine,
        isnull (ScoreV2temp.PartNum, '')as PartNum,
        isnull (ScoreV2temp.LineDesc, '')as LineDesc,
        isnull (ScoreV2temp.Capacidad, '')as Capacidad,
        isnull (ScoreV2temp.Voltaje, '')as Voltaje,
        isnull (ScoreV2temp.Tipo, '')as Tipo,
        isnull (ScoreV2temp.RevisionNum, '')as RevisionNum,
        isnull (ScoreV2temp.ProdCode, '')as ProdCode,
        isnull (ScoreV2temp.DecriptionProd, '')as DecriptionProd,
        isnull (ScoreV2temp.Caseta, '')as Caseta,
        isnull (ScoreV2temp.Tanque, '')as Tanque,
        isnull (ScoreV2temp.OrderDate, '')as OrderDate,
        isnull (ScoreV2temp.NeedByDate, '')as NeedByDate,
        isnull (ScoreV2temp.LiberacionCXP, '')as LiberacionCXP,
        isnull (ScoreV2temp.[OrderNum&Line], '')as [OrderNum&Line],
        isnull (ScoreV2temp.ProjectID, '')as ProjectID,
        isnull (ScoreV2temp.JobNum2, '')as JobNum2,
        isnull (ScoreV2temp.Revision_OV, '')as Revision_OV,
        isnull (ScoreV2temp.Revision_Project, '')as Revision_Project,
        isnull (ScoreV2temp.Revision_Job, '')as Revision_Job,
        isnull (ScoreV2temp.FechaVentas, '')as FechaVentas,
        isnull (ScoreV2temp.ComentarioSyC, '')as ComentarioSyC,
        isnull (ScoreV2temp.Chk, '')as Chk,
        isnull (ScoreV2temp.FechaSyC, '')as FechaSyC,
        isnull (ScoreV2temp.FechaSimulaciones, '')as FechaSimulaciones,
        isnull (ScoreV2temp.ConsideradaPreasignacion, '')as ConsideradaPreasignacion,
        isnull (ScoreV2temp.ConsideradaMateriales, '')as ConsideradaMateriales,
        isnull (ScoreV2temp.FechaProducción, '')as FechaProducción,
        isnull (ScoreV2temp.ComentarioProducción, '')as ComentarioProducción,
        isnull (ScoreV2temp.AvanceProducción, '')as AvanceProducción,
        isnull (ScoreV2temp.FechaPlaneación, '')as FechaPlaneación,
        isnull (ScoreV2temp.EstadoFecha, '')as EstadoFecha,
        isnull (ScoreV2temp.ComentarioPlaneación, '')as ComentarioPlaneación,
        isnull (ScoreV2temp.FechaMG, '')as FechaMG,
        isnull (ScoreV2temp.FechaMat, '')as FechaMat,
        isnull (ScoreV2temp.AvanceDeSurtimiento, '')as AvanceDeSurtimiento,
        isnull (ScoreV2temp.MaterialSinSurtir, '')as MaterialSinSurtir,
        isnull (ScoreV2temp.AvisoDeTerminacion, '')as AvisoDeTerminacion,
        isnull (ScoreV2temp.TerminadoConFaltante, '')as TerminadoConFaltante,
        isnull (ScoreV2temp.FechaActualización, '')as FechaActualización,
        isnull (ScoreV2temp.MaterialFaltante, '')as MaterialFaltante,
        isnull (ScoreV2temp.ValidaciónFisica, '')as ValidaciónFisica,
        isnull (ScoreV2temp.ResultadoValidación, '')as ResultadoValidación,
        isnull (ScoreV2temp.FechaDeCierre, '')as FechaDeCierre,
        isnull (ScoreV2temp.ComentarioCalidad, '')as ComentarioCalidad,
        isnull (ScoreV2temp.InsumosDemandados, '')as InsumosDemandados,
        isnull (ScoreV2temp.InsumosEmitidos, '')as InsumosEmitidos,
        isnull (ScoreV2temp.AvaceDeEmisiones, '')as AvaceDeEmisiones,
        isnull (ScoreV2temp.FechaDeTermino, '')as FechaDeTermino,
        isnull (ScoreV2temp.AvanceManufacturaSyC, '')as AvanceManufacturaSyC,
        isnull (ScoreV2temp.AvanceEnsambleSyC, '')as AvanceEnsambleSyC,
        isnull (ScoreV2temp.ComentarioSupervisión, '')as ComentarioSupervisión,
        isnull (ScoreV2temp.EnFilaPruebasSyC, '')as EnFilaPruebasSyC,
        isnull (ScoreV2temp.PendientesCalidSyC, '')as PendientesCalidSyC,
        isnull (ScoreV2temp.PartNum_M, '')as PartNum_M,
        isnull (ScoreV2temp.Description_M, '')as Description_M,
        isnull (ScoreV2temp.PartClass_M, '')as PartClass_M,
        isnull (ScoreV2temp.RefCategory_M, '')as RefCategory_M,
        isnull (ScoreV2temp.QtyPer_M, '')as QtyPer_M,
        isnull (ScoreV2temp.IssuedQty_M, '')as IssuedQty_M,
        isnull (ScoreV2temp.Demandado_M, '')as Demandado_M,
        isnull (ScoreV2temp.OnhandQty_M, '')as OnhandQty_M,
        isnull (ScoreV2temp.Preasignado_M, '')as Preasignado_M,
        isnull (ScoreV2temp.NoSerie_M, '')as NoSerie_M,
        isnull (ScoreV2temp.Faltante_M, '')as Faltante_M,
        isnull (ScoreV2temp.En_PO_M, '')as En_PO_M,
        isnull (ScoreV2temp.NoPO_M, '')as NoPO_M,
        isnull (ScoreV2temp.EnRequisicion_M, '')as EnRequisicion_M,
        isnull (ScoreV2temp.NoRequisicion_M, '')as NoRequisicion_M,
        isnull (ScoreV2temp.Alternativa_M, '')as Alternativa_M,
        isnull (ScoreV2temp.En_PO_Altern_M, '')as En_PO_Altern_M,
        isnull (ScoreV2temp.NoPO_Alern_M, '')as NoPO_Alern_M,
        isnull (ScoreV2temp.Req_M, '')as Req_M,
        isnull (ScoreV2temp.Comment_M, '')as Comment_M,
        isnull (ScoreV2temp.FechaReq_M, '')as FechaReq_M,
        isnull (ScoreV2temp.PO_M, '')as PO_M,
        isnull (ScoreV2temp.Cantidad_Pedida_M, '')as Cantidad_Pedida_M,
        isnull (ScoreV2temp.Estatus_M, '')as Estatus_M,
        isnull (ScoreV2temp.Fecha_Llegada_M, '')as Fecha_Llegada_M,
        isnull (ScoreV2temp.PartNum_G, '')as PartNum_G,
        isnull (ScoreV2temp.Description_G, '')as Description_G,
        isnull (ScoreV2temp.PartClass_G, '')as PartClass_G,
        isnull (ScoreV2temp.RefCategory_G, '')as RefCategory_G,
        isnull (ScoreV2temp.QtyPer_G, '')as QtyPer_G,
        isnull (ScoreV2temp.IssuedQty_G, '')as IssuedQty_G,
        isnull (ScoreV2temp.Demandado_G, '')as Demandado_G,
        isnull (ScoreV2temp.OnhandQty_G, '')as OnhandQty_G,
        isnull (ScoreV2temp.Preasignado_G, '')as Preasignado_G,
        isnull (ScoreV2temp.NoSerie_G, '')as NoSerie_G,
        isnull (ScoreV2temp.Faltante_G, '')as Faltante_G,
        isnull (ScoreV2temp.En_PO_G, '')as En_PO_G,
        isnull (ScoreV2temp.NoPO_G, '')as NoPO_G,
        isnull (ScoreV2temp.EnRequisicion_G, '')as EnRequisicion_G,
        isnull (ScoreV2temp.NoRequisicion_G, '')as NoRequisicion_G,
        isnull (ScoreV2temp.Alternativa_G, '')as Alternativa_G,
        isnull (ScoreV2temp.En_PO_Altern_G, '')as En_PO_Altern_G,
        isnull (ScoreV2temp.NoPO_Alern_G, '')as NoPO_Alern_G,
        isnull (ScoreV2temp.Req_G, '')as Req_G,
        isnull (ScoreV2temp.Comment_G, '')as Comment_G,
        isnull (ScoreV2temp.FechaReq_G, '')as FechaReq_G,
        isnull (ScoreV2temp.PO_G, '')as PO_G,
        isnull (ScoreV2temp.Cantidad_Pedida_G, '')as Cantidad_Pedida_G,
        isnull (ScoreV2temp.Estatus_G, '')as Estatus_G,
        isnull (ScoreV2temp.Fecha_Llegada_G, '')as Fecha_Llegada_G,
        isnull (ScoreV2temp.PartNum_T, '')as PartNum_T,
        isnull (ScoreV2temp.Description_T, '')as Description_T,
        isnull (ScoreV2temp.PartClass_T, '')as PartClass_T,
        isnull (ScoreV2temp.RefCategory_T, '')as RefCategory_T,
        isnull (ScoreV2temp.QtyPer_T, '')as QtyPer_T,
        isnull (ScoreV2temp.IssuedQty_T, '')as IssuedQty_T,
        isnull (ScoreV2temp.OnhandQty_T, '')as OnhandQty_T,
        isnull (ScoreV2temp.PartNum_R, '')as PartNum_R,
        isnull (ScoreV2temp.Description_R, '')as Description_R,
        isnull (ScoreV2temp.PartClass_R, '')as PartClass_R,
        isnull (ScoreV2temp.RefCategory_R, '')as RefCategory_R,
        isnull (ScoreV2temp.QtyPer_R, '')as QtyPer_R,
        isnull (ScoreV2temp.IssuedQty_R, '')as IssuedQty_R,
        isnull (ScoreV2temp.OnhandQty_R, '')as OnhandQty_R,
        isnull (ScoreV2temp.ComentarioLINE, '')as ComentarioLINE
		
    FROM
        ScoreV2temp
    u4   No se pudo establecer conexión con la base de datosOrderNumr   Departamento   Vendedor   Name   
TotalLines   	OrderLine   PartNum   LineDesc   	Capacidad   Voltaje	   Tipo
   RevisionNum   ProdCode   DecriptionProd   Caseta   Tanque   	OrderDate   
NeedByDate   LiberacionCXP   OrderNumAndLine   	ProjectID   JobNum2   Revision_OV   Revision_Project   Revision_Job   FechaVentas   ComentarioSyC   Chk   FechaSyC   FechaSimulaciones   ConsideradaPreasignacion   ConsideradaMateriales   u   FechaProducción    u   ComentarioProducción!   u   AvanceProducción"   u   FechaPlaneación#   EstadoFecha$   u   ComentarioPlaneación%   FechaMG&   FechaMat'   AvanceDeSurtimiento(   MaterialSinSurtir)   AvisoDeTerminacion*   TerminadoConFaltante+   u   FechaActualización,   MaterialFaltante-   u   ValidaciónFisica.   u   ResultadoValidación/   FechaDeCierre0   ComentarioCalidad1   InsumosDemandados2   InsumosEmitidos3   AvaceDeEmisiones4   FechaDeTermino5   AvanceManufacturaSyC6   AvanceEnsambleSyC7   u   ComentarioSupervisión8   EnFilaPruebasSyC9   PendientesCalidSyC:   	PartNum_M;   Description_M<   PartClass_M=   RefCategory_M>   QtyPer_M?   IssuedQty_M@   Demandado_MA   OnhandQty_MB   Preasignado_MC   	NoSerie_MD   
Faltante_ME   En_PO_MF   NoPO_MG   EnRequisicion_MH   NoRequisicion_MI   Alternativa_MJ   En_PO_Altern_MK   NoPO_Alern_ML   Req_MM   	Comment_MN   
FechaReq_MO   PO_MP   Cantidad_Pedida_MQ   	Estatus_MR   Fecha_Llegada_MS   	PartNum_GT   Description_GU   PartClass_GV   RefCategory_GW   QtyPer_GX   IssuedQty_GY   Demandado_GZ   OnhandQty_G[   Preasignado_G\   	NoSerie_G]   
Faltante_G^   En_PO_G_   NoPO_G`   EnRequisicion_Ga   NoRequisicion_Gb   Alternativa_Gc   En_PO_Altern_Gd   NoPO_Alern_Ge   Req_Gf   	Comment_Gg   
FechaReq_Gh   PO_Gi   Cantidad_Pedida_Gj   	Estatus_Gk   Fecha_Llegada_Gl   	PartNum_Tm   Description_Tn   PartClass_To   RefCategory_Tp   QtyPer_Tq   IssuedQty_Tr   OnhandQty_Ts   	PartNum_Rt   Description_Ru   PartClass_Rv   w   x   y   z   {   )RefCategory_RQtyPer_RIssuedQty_ROnhandQty_RComentarioLINEz.[Error inesperado] Error obteniendo breakers: N)r   ConnectionErrorcursorexecutefetchallclose	Exceptionprint)queryconnr   resultsrowes         nC:\Users\victor.barrera\Documents\proyectos\elepV3\Elep\src\Consultas_SQL\SupYCtrol\GerenteSyC\GSYCScoreSQL.pyget_Consultar      s	   AEDN$&!"XYYu//#B !"~ !#}~CF~A~ CF~ A	~
 c!f~ SV~ 3q6~ CF~ SV~ 3q6~ B~ s2w~ CG~ !#b'~ #b'~  #b'!~" SW#~$ c"g%~&  R'~( "3r7)~* SW+~, 3r7-~. s2w/~0 #CG1~2 B3~4 s2w5~6  R7~8 s2w9~: CG;~< $SW=~> +CG?~@ (RA~B #CGC~D (RE~F $SWG~H #CGI~J s2wK~L (RM~N 3r7O~P CGQ~R &s2wS~T $SWU~V %c"gW~X 'BY~Z &s2w[~\ #CG]~^ $SW_~` 'Ba~b  Rc~d $SWe~f $SWg~h "3r7i~j #CGk~l !#b'm~n 'Bo~p $SWq~r )#b's~t #CGu~v %c"gw~x SWy~z  R{~| s2w}~~  R~@ CGA~B s2wC~D s2wE~F s2wG~H  RI~J SWK~L c"gM~N 3r7O~P #b'Q~R "3r7S~T "3r7U~V  RW~X !#b'Y~Z B[~\ R]~^ SW_~` c"ga~b Bc~d $SWe~f SWg~h "3r7i~j SWk~l  Rm~n s2wo~p  Rq~r CGs~t s2wu~v s2ww~x s2wy~z  R{~| SW}~~ c"g~@ 3r7A~B #b'C~D "3r7E~F "3r7G~H  RI~J !#c(K~L CM~N SO~P SXQ~R c#hS~T CU~V $SXW~X SXY~Z "3s8[~\ SX]~^  S_~` s3xa~b  Sc~d CHe~f s3xg~h s3xi~j SXk~l  Sm~n s3xo~p "%SH"3x"3x"%c(y~| !"H JJL I"@  >qcBC	JJL 	 JJL sC   AM0 K;M+M0 +M0 0
N,:N'	N,
N/ 'N,,N/ /O	N)Consultas_SQL.conexionr   r        r   <module>r     s   
 9Rr  