ViniciusConsultor / controlhoras

Automatically exported from code.google.com/p/controlhoras
1 stars 0 forks source link

Nuevo Listado: Estado de Actividad de todos los funcionarios para un determinado dia #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Modulo que cambia:
Nuevo Listado

Requerimiento:
Tener un listado que muestre el estado de actividad de todos los funcionarios 
activos para un determinado dia. 
Esto es similar al listado del issue 60, solo que es para todos los 
funcionarios activos y para un dia determinado.

Original issue reported on code.google.com by juanga...@gmail.com on 21 May 2011 at 2:28

GoogleCodeExporter commented 8 years ago

Original comment by juanga...@gmail.com on 31 May 2011 at 1:11

GoogleCodeExporter commented 8 years ago
select FechaCorrespondiente as FECHA, emp.NroEmpleado as NroFuncionario, CAST( 
concat_ws(' ', emp.Apellido, emp.Nombre) as CHAR) as FUNCIONARIO, 
'ESCALAFON',CAST(if(hge.Descanso=0,concat(NumeroCliente,'-', 
NumeroServicio),'Descanso') as CHAR) as OBSERVACION from Empleados emp, 
horasgeneradasescalafon hge where hge.FechaCorrespondiente='FECHASOLA' and 
hge.NroEmpleado=emp.NroEmpleado
UNION DISTINCT
select 'FECHASOLA' as FECHA, emp.NroEmpleado as NroFuncionario, CAST( 
concat_ws(' ', emp.Apellido, emp.Nombre) as CHAR) as FUNCIONARIO, 'HISTORIAL 
FUNCIONARIO', CAST(concat(ehe.FechaInicio,' a ',ehe.FechaFin,': ', 
ehe.Descripcion) as CHAR) as OBSERVACION from Empleados emp, 
EventosHistorialEmpleado ehe, TiposEventoHistorial teh where 
ehe.IdEmpleado=emp.NroEmpleado and ehe.IdTipoEvento = teh.IdTipoEventoHistorial 
and ( ehe.FechaInicio <= 'FECHASOLA' and ehe.FechaFin >= 'FECHASOLA')
UNION DISTINCT
select FechaCorresponde as FECHA, emp.NroEmpleado as NroFuncionario, CAST( 
concat_ws(' ', emp.Apellido, emp.Nombre) as CHAR) as FUNCIONARIO, 'MOTIVO 
CAMBIO DIARIO', CAST(mcd.Observaciones as CHAR) as OBSERVACION from Empleados 
emp, motivoscambiosdiarios mcd where mcd.FechaCorresponde='FECHASOLA' and 
mcd.NroEmpleado=emp.NroEmpleado
ORDER BY 1,2,3,4

Original comment by juanga...@gmail.com on 31 May 2011 at 1:51

GoogleCodeExporter commented 8 years ago
INSERT INTO CONSULTASEMPLEADOS VALUES (0,"ACTIVIDAD DE TODOS LOS FUNCIONARIOS 
EN UN DIA","Devuelve la actividad de todos los funcionarios en un dia 
dado.","SELECT CAST(FechaCorrespondiente as CHAR) as FECHA, emp.NroEmpleado as 
NroFuncionario, CAST( concat_ws(' ', emp.Apellido, emp.Nombre) as CHAR) as 
FUNCIONARIO, 'ESCALAFON',CAST(if(hge.Descanso=0,concat(NumeroCliente,'-', 
NumeroServicio),'Descanso') as CHAR) as OBSERVACION FROM Empleados emp, 
horasgeneradasescalafon hge WHERE hge.FechaCorrespondiente='FECHASOLA' AND 
hge.NroEmpleado=emp.NroEmpleado UNION DISTINCT SELECT CAST('FECHASOLA' as CHAR) 
as FECHA, emp.NroEmpleado as NroFuncionario, CAST( concat_ws(' ', emp.Apellido, 
emp.Nombre) as CHAR) as FUNCIONARIO, 'HISTORIAL FUNCIONARIO', 
CAST(concat(ehe.FechaInicio,' a ',ehe.FechaFin,': ', ehe.Descripcion) as CHAR) 
as OBSERVACION FROM Empleados emp, EventosHistorialEmpleado ehe, 
TiposEventoHistorial teh WHERE ehe.IdEmpleado=emp.NroEmpleado AND 
ehe.IdTipoEvento = teh.IdTipoEventoHistorial AND ( ehe.FechaInicio <= 
'FECHASOLA' AND ehe.FechaFin >= 'FECHASOLA') UNION DISTINCT SELECT 
CAST(FechaCorresponde as CHAR) as FECHA, emp.NroEmpleado as NroFuncionario, 
CAST( concat_ws(' ', emp.Apellido, emp.Nombre) as CHAR) as FUNCIONARIO, 'MOTIVO 
CAMBIO DIARIO', CAST(mcd.Observaciones as CHAR) as OBSERVACION FROM Empleados 
emp, motivoscambiosdiarios mcd WHERE mcd.FechaCorresponde='FECHASOLA' AND 
mcd.NroEmpleado=emp.NroEmpleado ORDER BY 1,2,3",1);

Original comment by juanga...@gmail.com on 31 May 2011 at 3:30

GoogleCodeExporter commented 8 years ago

Original comment by juanga...@gmail.com on 31 May 2011 at 3:30