Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
horario
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Juan Guevara Mayta
horario
Commits
d325353d
Commit
d325353d
authored
Jan 14, 2020
by
sistem02 user
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] disponibilidad por cada jefe de area
parent
f3a10347
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
15 deletions
+14
-15
Area.java
src/java/pe/siso/horario/Beans/Area.java
+0
-1
AreaDAO.java
src/java/pe/siso/horario/DAO/AreaDAO.java
+1
-1
MySqlAreaDAO.java
src/java/pe/siso/horario/MySqlDAO/MySqlAreaDAO.java
+8
-4
MySqlUsuarioDAO.java
src/java/pe/siso/horario/MySqlDAO/MySqlUsuarioDAO.java
+3
-3
AreaServices.java
src/java/pe/siso/horario/Services/AreaServices.java
+2
-2
ServletArea.java
src/java/pe/siso/horario/Servlets/ServletArea.java
+0
-0
validar.jsp
web/vista/validar.jsp
+0
-1
vistaDobleDisponibilidad.jsp
web/vista/vistaDobleDisponibilidad.jsp
+0
-3
No files found.
src/java/pe/siso/horario/Beans/Area.java
View file @
d325353d
...
...
@@ -6,7 +6,6 @@
package
pe
.
siso
.
horario
.
Beans
;
public
class
Area
{
private
int
codigoArea
;
private
String
nombreArea
;
...
...
src/java/pe/siso/horario/DAO/AreaDAO.java
View file @
d325353d
...
...
@@ -20,7 +20,7 @@ public interface AreaDAO {
public
void
Actualizar
(
String
codigo
,
String
nombreArea
)
throws
Exception
;
public
int
registrarAreas
(
String
nombreArea
)
throws
Exception
;
public
void
cambiarEstado
(
String
dato
,
String
codigoArea
)
throws
Exception
;
public
ArrayList
<
Area
>
cargarArea
()
throws
Exception
;
public
ArrayList
<
Area
>
cargarArea
(
int
cod
)
throws
Exception
;
public
int
cantidadAreaUso
(
String
codigoArea
)
throws
Exception
;
public
Area
datosArea
(
String
codDocente
)
throws
Exception
;
public
int
registrarAreaDocente
(
String
codigoArea
,
String
codigoDocente
)
throws
Exception
;
...
...
src/java/pe/siso/horario/MySqlDAO/MySqlAreaDAO.java
View file @
d325353d
...
...
@@ -94,15 +94,19 @@ public class MySqlAreaDAO implements AreaDAO {
}
@Override
public
ArrayList
<
Area
>
cargarArea
()
throws
Exception
{
public
ArrayList
<
Area
>
cargarArea
(
int
cod
)
throws
Exception
{
ArrayList
<
Area
>
lista
=
new
ArrayList
<
Area
>();
Connection
cnx
=
null
;
try
{
String
base
=
"horario"
;
cnx
=
MySqlDAOFactory
.
obtenerConexion
(
base
);
String
codarea
=
""
;
cnx
=
MySqlDAOFactory
.
obtenerConexion
(
base
);
Statement
st
=
cnx
.
createStatement
();
String
query
=
"SELECT cod_are,nom_are,est_are from area WHERE est_are = '1'"
;
if
(
cod
!=
0
){
codarea
=
" and cod_are ="
+
cod
;
}
String
query
=
"SELECT cod_are,nom_are,est_are from area WHERE est_are = '1'"
+
codarea
;
ResultSet
rs
=
st
.
executeQuery
(
query
);
...
...
src/java/pe/siso/horario/MySqlDAO/MySqlUsuarioDAO.java
View file @
d325353d
...
...
@@ -52,17 +52,17 @@ public class MySqlUsuarioDAO implements UsuarioDAO {
cnx
=
MySqlDAOFactory
.
obtenerConexion
(
base
);
Statement
st
=
cnx
.
createStatement
();
String
query
=
"SELECT area.cod_are
a
,usuario.cod_usu,usuario.cod_tip_usu,usuario.ani_usu, usuario.usu_usu, usuario.cla_usu, usuario.cod_loc, usuario.est_usu, tipo_usuario.nom_tip_usu, sede.des_loc "
String
query
=
"SELECT area.cod_are,usuario.cod_usu,usuario.cod_tip_usu,usuario.ani_usu, usuario.usu_usu, usuario.cla_usu, usuario.cod_loc, usuario.est_usu, tipo_usuario.nom_tip_usu, sede.des_loc "
+
"FROM usuario "
+
"LEFT JOIN sede ON sede.cod_loc = usuario.cod_loc "
+
"LEFT JOIN area ON usuario.cod_usu=area.cod_usuario"
+
"LEFT JOIN area ON usuario.cod_usu=area.cod_usuario
"
+
"INNER JOIN tipo_usuario ON tipo_usuario.cod_tip_usu = usuario.cod_tip_usu "
+
"WHERE usuario.usu_usu='"
+
usuario
+
"' and usuario.cla_usu='"
+
clave
+
"' and usuario.est_usu='1'"
;
ResultSet
rs
=
st
.
executeQuery
(
query
);
while
(
rs
.
next
())
{
usuario1
.
setCodarea
(
rs
.
getInt
(
"cod_are
a
"
));
usuario1
.
setCodarea
(
rs
.
getInt
(
"cod_are"
));
usuario1
.
setCodigoUsuario
(
rs
.
getInt
(
"cod_usu"
));
usuario1
.
setCodigoTipoUsuario
(
rs
.
getInt
(
"cod_tip_usu"
));
usuario1
.
setCodigoSede
(
rs
.
getInt
(
"cod_loc"
));
...
...
src/java/pe/siso/horario/Services/AreaServices.java
View file @
d325353d
...
...
@@ -62,10 +62,10 @@ public class AreaServices {
}
public
ArrayList
<
Area
>
cargarArea
()
{
public
ArrayList
<
Area
>
cargarArea
(
int
cod
)
{
ArrayList
<
Area
>
lista
=
null
;
try
{
lista
=
objAreaDAO
.
cargarArea
();
lista
=
objAreaDAO
.
cargarArea
(
cod
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
...
...
src/java/pe/siso/horario/Servlets/ServletArea.java
View file @
d325353d
This diff is collapsed.
Click to expand it.
web/vista/validar.jsp
View file @
d325353d
...
...
@@ -19,7 +19,6 @@ Menu menu=(Menu)session_actual.getAttribute("menu");
Sede SedeCod=(Sede)session_actual.getAttribute("sedeSessionCod");
PeriodoAcademico periodo=(PeriodoAcademico)session_actual.getAttribute("periodo");
Horario armandoHorario=(Horario)session_actual.getAttribute("armandoHorario");
Grupo CadenaGrupo=(Grupo)session_actual.getAttribute("sessionGrupoHorario");
if(usuario == null || periodo== null){
...
...
web/vista/vistaDobleDisponibilidad.jsp
View file @
d325353d
...
...
@@ -24,10 +24,7 @@
<
%
HttpSession
session_actual =
request.getSession(true);
Usuario
usuario =
(Usuario)
session_actual
.
getAttribute
("
usuario
");
PeriodoAcademico
periodo =
(PeriodoAcademico)
session_actual
.
getAttribute
("
periodo
");
System
.
out
.
println
("*******************");
System
.
out
.
println
(
usuario
.
getCodarea
());
%
>
<style
type=
"text/css"
>
@media
print
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment