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
a85e2678
Commit
a85e2678
authored
Feb 14, 2020
by
Juan Carlos Yupanqui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] Cambios generales, arreglo de bugs
parent
7c53ea24
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
201 additions
and
143 deletions
+201
-143
build-impl.xml
nbproject/build-impl.xml
+2
-0
genfiles.properties
nbproject/genfiles.properties
+3
-3
project.properties
nbproject/project.properties
+2
-0
project.xml
nbproject/project.xml
+4
-0
MySqlDAOFactory.java
src/java/pe/siso/horario/MySqlDAO/MySqlDAOFactory.java
+22
-81
MySqlDocenteDAO.java
src/java/pe/siso/horario/MySqlDAO/MySqlDocenteDAO.java
+5
-6
MySqlHorarioDAO.java
src/java/pe/siso/horario/MySqlDAO/MySqlHorarioDAO.java
+0
-0
ServletDocente.java
src/java/pe/siso/horario/Servlets/ServletDocente.java
+4
-2
ServletHorario.java
src/java/pe/siso/horario/Servlets/ServletHorario.java
+15
-15
OsUtils.java
src/java/pe/siso/horario/utilities/OsUtils.java
+106
-0
arm_hor_gen.jsp
web/vista/arm_hor_gen.jsp
+0
-0
gen_hor_gen.jsp
web/vista/gen_hor_gen.jsp
+23
-21
index.jsp
web/vista/index.jsp
+15
-15
No files found.
nbproject/build-impl.xml
View file @
a85e2678
...
@@ -999,6 +999,7 @@ exists or setup the property manually. For example like this:
...
@@ -999,6 +999,7 @@ exists or setup the property manually. For example like this:
<target
depends=
"init"
if=
"dist.ear.dir"
name=
"library-inclusion-in-manifest"
>
<target
depends=
"init"
if=
"dist.ear.dir"
name=
"library-inclusion-in-manifest"
>
<copyfiles
files=
"${file.reference.activation.jar}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<copyfiles
files=
"${file.reference.activation.jar}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<copyfiles
files=
"${file.reference.mysql-connector-java-3.1.14-bin.jar-1}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<copyfiles
files=
"${file.reference.mysql-connector-java-3.1.14-bin.jar-1}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<copyfiles
files=
"${file.reference.java-dotenv-3.1.1.jar}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<copyfiles
files=
"${file.reference.json-20171018.jar}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<copyfiles
files=
"${file.reference.json-20171018.jar}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<mkdir
dir=
"${build.web.dir}/META-INF"
/>
<mkdir
dir=
"${build.web.dir}/META-INF"
/>
<manifest
file=
"${build.web.dir}/META-INF/MANIFEST.MF"
mode=
"update"
/>
<manifest
file=
"${build.web.dir}/META-INF/MANIFEST.MF"
mode=
"update"
/>
...
@@ -1006,6 +1007,7 @@ exists or setup the property manually. For example like this:
...
@@ -1006,6 +1007,7 @@ exists or setup the property manually. For example like this:
<target
depends=
"init"
name=
"library-inclusion-in-archive"
unless=
"dist.ear.dir"
>
<target
depends=
"init"
name=
"library-inclusion-in-archive"
unless=
"dist.ear.dir"
>
<copyfiles
files=
"${file.reference.activation.jar}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
<copyfiles
files=
"${file.reference.activation.jar}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
<copyfiles
files=
"${file.reference.mysql-connector-java-3.1.14-bin.jar-1}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
<copyfiles
files=
"${file.reference.mysql-connector-java-3.1.14-bin.jar-1}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
<copyfiles
files=
"${file.reference.java-dotenv-3.1.1.jar}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
<copyfiles
files=
"${file.reference.json-20171018.jar}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
<copyfiles
files=
"${file.reference.json-20171018.jar}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
</target>
</target>
<target
depends=
"init"
if=
"dist.ear.dir"
name=
"-clean-webinf-lib"
>
<target
depends=
"init"
if=
"dist.ear.dir"
name=
"-clean-webinf-lib"
>
...
...
nbproject/genfiles.properties
View file @
a85e2678
build.xml.data.CRC32
=
f9674732
build.xml.data.CRC32
=
70a6affc
build.xml.script.CRC32
=
5a966c0c
build.xml.script.CRC32
=
5a966c0c
build.xml.stylesheet.CRC32
=
651128d4@1.77.1.1
build.xml.stylesheet.CRC32
=
651128d4@1.77.1.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/
build-impl.xml.data.CRC32
=
f9674732
nbproject/
build-impl.xml.data.CRC32
=
70a6affc
nbproject/
build-impl.xml.script.CRC32
=
4bf6096c
nbproject/
build-impl.xml.script.CRC32
=
9c299a49
nbproject/
build-impl.xml.stylesheet.CRC32
=
99ea4b56@1.77.1.1
nbproject/
build-impl.xml.stylesheet.CRC32
=
99ea4b56@1.77.1.1
nbproject/project.properties
View file @
a85e2678
...
@@ -29,6 +29,7 @@ endorsed.classpath=\
...
@@ -29,6 +29,7 @@ endorsed.classpath=\
${libs.javaee-endorsed-api-6.0.classpath}
${libs.javaee-endorsed-api-6.0.classpath}
excludes
=
excludes
=
file.reference.activation.jar
=
D:
\\
LIBRERIAS
\\
activation.jar
file.reference.activation.jar
=
D:
\\
LIBRERIAS
\\
activation.jar
file.reference.java-dotenv-3.1.1.jar
=
C:
\\
Users
\\
sistem17user
\\
Desktop
\\
Juan Carlos Yupanqui Lozano
\\
Libreria
\\
LIBRERIAS 2
\\
DotEnv
\\
java-dotenv-3.1.1.jar
file.reference.json-20171018.jar
=
D:
\\
LIBRERIAS
\\
json-20171018.jar
file.reference.json-20171018.jar
=
D:
\\
LIBRERIAS
\\
json-20171018.jar
file.reference.mysql-connector-java-3.1.14-bin.jar-1
=
D:
\\
LIBRERIAS
\\
mysql-connector-java-3.1.14-bin.jar
file.reference.mysql-connector-java-3.1.14-bin.jar-1
=
D:
\\
LIBRERIAS
\\
mysql-connector-java-3.1.14-bin.jar
includes
=
**
includes
=
**
...
@@ -47,6 +48,7 @@ jar.compress=false
...
@@ -47,6 +48,7 @@ jar.compress=false
javac.classpath
=
\
javac.classpath
=
\
${file.reference.activation.jar}:
\
${file.reference.activation.jar}:
\
${file.reference.mysql-connector-java-3.1.14-bin.jar-1}:
\
${file.reference.mysql-connector-java-3.1.14-bin.jar-1}:
\
${file.reference.java-dotenv-3.1.1.jar}:
\
${file.reference.json-20171018.jar}
${file.reference.json-20171018.jar}
# Space-separated list of extra javac options
# Space-separated list of extra javac options
javac.compilerargs
=
javac.compilerargs
=
...
...
nbproject/project.xml
View file @
a85e2678
...
@@ -15,6 +15,10 @@
...
@@ -15,6 +15,10 @@
<path-in-war>
WEB-INF/lib
</path-in-war>
<path-in-war>
WEB-INF/lib
</path-in-war>
</library>
</library>
<library
dirs=
"200"
>
<library
dirs=
"200"
>
<file>
${file.reference.java-dotenv-3.1.1.jar}
</file>
<path-in-war>
WEB-INF/lib
</path-in-war>
</library>
<library
dirs=
"200"
>
<file>
${file.reference.json-20171018.jar}
</file>
<file>
${file.reference.json-20171018.jar}
</file>
<path-in-war>
WEB-INF/lib
</path-in-war>
<path-in-war>
WEB-INF/lib
</path-in-war>
</library>
</library>
...
...
src/java/pe/siso/horario/MySqlDAO/MySqlDAOFactory.java
View file @
a85e2678
...
@@ -35,6 +35,7 @@ import pe.siso.horario.DAO.UsuarioDocenteDAO;
...
@@ -35,6 +35,7 @@ import pe.siso.horario.DAO.UsuarioDocenteDAO;
import
pe.siso.horario.DAO.ZonaDAO
;
import
pe.siso.horario.DAO.ZonaDAO
;
import
pe.siso.horario.DAO.ZonaDistritoDAO
;
import
pe.siso.horario.DAO.ZonaDistritoDAO
;
import
pe.siso.horario.DAO.ZonaSedeDAO
;
import
pe.siso.horario.DAO.ZonaSedeDAO
;
import
pe.siso.horario.utilities.OsUtils
;
public
class
MySqlDAOFactory
extends
DAOFactory
{
public
class
MySqlDAOFactory
extends
DAOFactory
{
...
@@ -47,103 +48,43 @@ public class MySqlDAOFactory extends DAOFactory {
...
@@ -47,103 +48,43 @@ public class MySqlDAOFactory extends DAOFactory {
}
}
}
}
public
static
void
main
(
String
[]
args
)
{
// Dotenv dotenv = Dotenv
MySqlDAOFactory
.
obtenerConexion
(
"horario"
);
// .configure()
// .directory(OsUtils.getDotEnvPath("trismegisto-asistencia"))
}
// .load();
// public static void main(String[] args) {
// MySqlDAOFactory.obtenerConexion("horario");
//
// }
public
static
Connection
obtenerConexion
(
String
base
)
{
public
static
Connection
obtenerConexion
(
String
base
)
{
Connection
conexion
=
null
;
Connection
conexion
=
null
;
if
(
base
.
equals
(
"encuentas"
))
{
if
(
base
.
equals
(
"encuentas"
)
||
base
.
equals
(
"nuevo"
)
||
base
.
equals
(
"horario"
)
||
base
.
equals
(
"sacoolive3"
))
{
try
{
if
(
base
.
equals
(
"horario"
))
{
base
=
"horarios_docente"
;
conexion
=
DriverManager
.
getConnection
(
}
else
if
(
base
.
equals
(
"encuentas"
))
{
// "jdbc:mysql://serverprueba:3306/encuesta_docente",
base
=
"encuesta_docente"
;
// "desarrollo",
// "5VC02019");
// "jdbc:mysql://localhost:3306/encuesta_docente",
// "root",
// "mysql");
// server_winpla
"jdbc:mysql://172.16.2.68:3306/encuesta_docente"
,
"sis_horarios"
,
"Sy356ho899"
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
}
else
if
(
base
.
equals
(
"nuevo"
))
{
try
{
try
{
conexion
=
DriverManager
.
getConnection
(
conexion
=
DriverManager
.
getConnection
(
// "jdbc:mysql://serverprueba:3306/nuevo",
//Pruebas
// "desarrollo",
"jdbc:mysql://serverprueba:3306/"
+
base
,
// "5VC02019");
"desarrollo"
,
// // "jdbc:mysql://localhost:3306/nuevo",
"5VC02019"
);
// "root",
// Producción
// "mysql");
// "jdbc:mysql://172.16.2.68:3306/" + base,
//server_winpla
// "sis_horarios",
"jdbc:mysql://172.16.2.68:3306/nuevo"
,
// "Sy356ho899");
"sis_horarios"
,
"Sy356ho899"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
// TODO Auto-generated catch block
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
else
if
(
base
.
equals
(
"horario"
))
{
try
{
conexion
=
DriverManager
.
getConnection
(
// "jdbc:mysql://serverprueba:3306/horarios_docente",
// "desarrollo",
// "5VC02019");
// "jdbc:mysql://localhost:3306/horarios_docente",
// "root",
// "mysql");
//server_winpla
"jdbc:mysql://172.16.2.68:3306/horarios_docente"
,
"sis_horarios"
,
"Sy356ho899"
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
else
if
(
base
.
equals
(
"sacoolive3"
))
{
try
{
conexion
=
DriverManager
.
getConnection
(
// "jdbc:mysql://serverprueba:3306/sacoolive3",
// "desarrollo",
// "5VC02019");
// "jdbc:mysql://localhost:3306/sacoolive3",
// "root",
// "mysql");
//server_winpla
"jdbc:mysql://172.16.2.68:3306/sacoolive3"
,
"sis_horarios"
,
"Sy356ho899"
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
}
return
conexion
;
return
conexion
;
}
}
/*@Override
public UbigeoDAO getUbigeoDAO() {
return new MySqlUbigeoDAO();
}*/
@Override
@Override
public
UsuarioDAO
getUsuarioDAO
()
{
public
UsuarioDAO
getUsuarioDAO
()
{
return
new
MySqlUsuarioDAO
();
return
new
MySqlUsuarioDAO
();
...
...
src/java/pe/siso/horario/MySqlDAO/MySqlDocenteDAO.java
View file @
a85e2678
...
@@ -856,21 +856,20 @@ public class MySqlDocenteDAO implements DocenteDAO {
...
@@ -856,21 +856,20 @@ public class MySqlDocenteDAO implements DocenteDAO {
String
query
=
""
;
String
query
=
""
;
if
(
codcurso
.
equals
(
"30"
))
{
if
(
codcurso
.
equals
(
"30"
))
{
query
=
"SELECT codper,apellido,nombre,codcargo\n"
query
=
"SELECT codper,apellido,nombre,codcargo\n"
+
"FROM personal WHERE codcargo in ("
+
codcurso
+
"
)\n"
+
"FROM personal WHERE (codcargo in ("
+
codcurso
+
") OR codper IN(7873,9718)
)\n"
+
"AND retirado= '0'\n"
+
"AND retirado= '0'\n"
+
"AND codlocal='L067'\n"
+
"AND codlocal='L067'\n"
+
(
documentosIgnorados
.
equalsIgnoreCase
(
""
)
?
""
:
"AND dni NOT IN ("
+
documentosIgnorados
+
")\n"
)
+
(
documentosIgnorados
.
equalsIgnoreCase
(
""
)
?
""
:
"AND dni NOT IN ("
+
documentosIgnorados
+
")\n"
)
+
"ORDER BY apellido,nombre "
;
+
"ORDER BY apellido,nombre "
;
}
else
{
}
else
{
query
=
"SELECT codper,apellido,nombre,codcargo\n"
query
=
"SELECT codper,apellido,nombre,codcargo\n"
+
"FROM personal WHERE codcargo in ("
+
codcurso
+
")
\n"
+
"FROM personal WHERE (codcargo in ("
+
codcurso
+
") OR codper IN(7873,9718))
\n"
+
"AND retirado= '0'\n"
+
"AND retirado= '0'\n"
+
(
documentosIgnorados
.
equalsIgnoreCase
(
""
)
?
""
:
"AND dni NOT IN ("
+
documentosIgnorados
+
")\n"
)
+
(
documentosIgnorados
.
equalsIgnoreCase
(
""
)
?
""
:
"AND dni NOT IN ("
+
documentosIgnorados
+
")\n"
)
+
"ORDER BY apellido,nombre "
;
+
"ORDER BY apellido,nombre "
;
}
}
ResultSet
rs
=
st
.
executeQuery
(
query
);
System
.
out
.
println
(
"cargarDocentePrimaria "
+
query
);
System
.
out
.
println
(
"cargarDocentePrimaria "
+
query
);
ResultSet
rs
=
st
.
executeQuery
(
query
);
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
Docente
docente
=
new
Docente
();
Docente
docente
=
new
Docente
();
docente
.
setCodigoDocentePrimaria
(
rs
.
getString
(
"codper"
));
docente
.
setCodigoDocentePrimaria
(
rs
.
getString
(
"codper"
));
...
@@ -3149,14 +3148,14 @@ public class MySqlDocenteDAO implements DocenteDAO {
...
@@ -3149,14 +3148,14 @@ public class MySqlDocenteDAO implements DocenteDAO {
}
else
{
}
else
{
query
=
"SELECT codper,apellido,nombre,codcargo,dni\n"
query
=
"SELECT codper,apellido,nombre,codcargo,dni\n"
+
"FROM personal\n"
+
"FROM personal\n"
+
"WHERE codcargo in ("
+
codcurso
+
"
)\n"
+
"WHERE (codcargo in ("
+
codcurso
+
") OR codper IN(7873,9718)
)\n"
+
"AND retirado= '0' and apellido LIKE '"
+
apellido
+
"%'\n"
+
"AND retirado= '0' and apellido LIKE '"
+
apellido
+
"%'\n"
+
condicion_documentos_ignorados
+
"\n"
+
condicion_documentos_ignorados
+
"\n"
+
"ORDER BY apellido,nombre LIMIT "
+
inicio
+
", "
+
cantidad
+
" "
;
+
"ORDER BY apellido,nombre LIMIT "
+
inicio
+
", "
+
cantidad
+
" "
;
}
}
ResultSet
rs
=
st
.
executeQuery
(
query
);
ResultSet
rs
=
st
.
executeQuery
(
query
);
System
.
out
.
println
(
"cargarDocentePrimaria
"
+
query
);
System
.
out
.
println
(
"cargarDocentePrimaria3 --->> \n
"
+
query
);
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
Docente
docente
=
new
Docente
();
Docente
docente
=
new
Docente
();
docente
.
setCodDocenteId
(
"P"
+
rs
.
getString
(
"codper"
));
docente
.
setCodDocenteId
(
"P"
+
rs
.
getString
(
"codper"
));
...
...
src/java/pe/siso/horario/MySqlDAO/MySqlHorarioDAO.java
View file @
a85e2678
This diff is collapsed.
Click to expand it.
src/java/pe/siso/horario/Servlets/ServletDocente.java
View file @
a85e2678
...
@@ -3581,7 +3581,9 @@ public class ServletDocente extends HttpServlet {
...
@@ -3581,7 +3581,9 @@ public class ServletDocente extends HttpServlet {
String
codigoDoceSec
=
lista
.
get
(
i
).
getCodigoDocente
();
String
codigoDoceSec
=
lista
.
get
(
i
).
getCodigoDocente
();
String
apellidoDoc
=
lista
.
get
(
i
).
getApellidoDocente
();
String
apellidoDoc
=
lista
.
get
(
i
).
getApellidoDocente
();
String
nombreDoc
=
lista
.
get
(
i
).
getNombreDocente
();
String
nombreDoc
=
lista
.
get
(
i
).
getNombreDocente
();
// System.out.println("ENTRA EN LA CONDICIÓN, ENCUENTRA UN DOCENTE, documentos ignorados BEFORE--->> " + documentosIgnorados);
documentosIgnorados
+=
"'"
+
lista
.
get
(
i
).
getNumeroDocumento
()
+
"'"
+
","
;
documentosIgnorados
+=
"'"
+
lista
.
get
(
i
).
getNumeroDocumento
()
+
"'"
+
","
;
// System.out.println("ENTRA EN LA CONDICIÓN, ENCUENTRA UN DOCENTE, documentos ignorados AFTER--->> " + documentosIgnorados);
cont
++;
cont
++;
if
(
cadena
.
equals
(
""
))
{
if
(
cadena
.
equals
(
""
))
{
cadena
=
"INSERT INTO docente_temporal (cod_doc,apellido_doc,nombre_doc) VALUES ('"
+
codigoDoceSec
+
"','"
+
apellidoDoc
+
"','"
+
nombreDoc
+
"')"
;
cadena
=
"INSERT INTO docente_temporal (cod_doc,apellido_doc,nombre_doc) VALUES ('"
+
codigoDoceSec
+
"','"
+
apellidoDoc
+
"','"
+
nombreDoc
+
"')"
;
...
@@ -3591,7 +3593,7 @@ public class ServletDocente extends HttpServlet {
...
@@ -3591,7 +3593,7 @@ public class ServletDocente extends HttpServlet {
}
}
String
codigoCurso
=
""
;
String
codigoCurso
=
""
;
if
(
codcurso
.
equals
(
"13"
)
||
codcurso
.
equals
(
"34"
)
||
codcurso
.
equals
(
"39"
)
||
codcurso
.
equals
(
"38"
)
||
codcurso
.
equals
(
"42"
)
||
codcurso
.
equals
(
"7"
)
||
codcurso
.
equals
(
"8"
)
||
codcurso
.
equals
(
"26"
)
||
codcurso
.
equals
(
"27"
)
||
codcurso
.
equals
(
"37"
)
||
codcurso
.
equals
(
"54"
)
)
{
if
(
codcurso
.
equals
(
"13"
)
||
codcurso
.
equals
(
"34"
)
||
codcurso
.
equals
(
"39"
)
||
codcurso
.
equals
(
"38"
)
||
codcurso
.
equals
(
"42"
)
||
codcurso
.
equals
(
"7"
)
||
codcurso
.
equals
(
"8"
)
||
codcurso
.
equals
(
"26"
)
||
codcurso
.
equals
(
"27"
)
||
codcurso
.
equals
(
"37"
)
||
codcurso
.
equals
(
"54"
)
||
codcurso
.
equals
(
"45"
)
||
codcurso
.
equals
(
"14"
)
||
codcurso
.
equals
(
"15"
)
)
{
ArrayList
<
Docente
>
listaDocentePrimaria
=
null
;
ArrayList
<
Docente
>
listaDocentePrimaria
=
null
;
if
(
codcurso
.
equals
(
"13"
))
{
if
(
codcurso
.
equals
(
"13"
))
{
codigoCurso
=
"19"
;
codigoCurso
=
"19"
;
...
@@ -3606,7 +3608,7 @@ public class ServletDocente extends HttpServlet {
...
@@ -3606,7 +3608,7 @@ public class ServletDocente extends HttpServlet {
}
else
{
}
else
{
codigoCurso
=
"41,57,102,95"
;
codigoCurso
=
"41,57,102,95"
;
}
}
documentosIgnorados
=
documentosIgnorados
.
equalsIgnoreCase
(
""
)
?
""
:
documentosIgnorados
.
substring
(
documentosIgnorados
.
length
()
-
1
);
documentosIgnorados
=
documentosIgnorados
.
equalsIgnoreCase
(
""
)
?
""
:
documentosIgnorados
.
substring
(
0
,
documentosIgnorados
.
length
()
-
1
);
listaDocentePrimaria
=
serviciosDocente
.
cargarDocentePrimaria
(
codigoCurso
,
documentosIgnorados
);
listaDocentePrimaria
=
serviciosDocente
.
cargarDocentePrimaria
(
codigoCurso
,
documentosIgnorados
);
// String DocPrim = "";
// String DocPrim = "";
for
(
int
p
=
0
;
p
<
listaDocentePrimaria
.
size
();
p
++)
{
for
(
int
p
=
0
;
p
<
listaDocentePrimaria
.
size
();
p
++)
{
...
...
src/java/pe/siso/horario/Servlets/ServletHorario.java
View file @
a85e2678
...
@@ -994,7 +994,7 @@ public class ServletHorario extends HttpServlet {
...
@@ -994,7 +994,7 @@ public class ServletHorario extends HttpServlet {
HorarioServices
servicios
=
new
HorarioServices
();
HorarioServices
servicios
=
new
HorarioServices
();
ArrayList
<
Horario
>
lista
=
new
ArrayList
<
Horario
>();
ArrayList
<
Horario
>
lista
=
new
ArrayList
<
Horario
>();
lista
=
servicios
.
horarioDocente
(
codDocente
,
periodo
);
lista
=
servicios
.
horarioDocente
(
codDocente
,
periodo
);
CursoServices
servicios2
=
new
CursoServices
();
//
CursoServices servicios2 = new CursoServices();
response
.
setContentType
(
"text/html"
);
response
.
setContentType
(
"text/html"
);
PrintWriter
pw
=
response
.
getWriter
();
PrintWriter
pw
=
response
.
getWriter
();
...
@@ -3175,7 +3175,7 @@ public class ServletHorario extends HttpServlet {
...
@@ -3175,7 +3175,7 @@ public class ServletHorario extends HttpServlet {
}
else
{
}
else
{
pw
.
println
(
pw
.
println
(
"
<span data-rel=\"tooltip\" ><a id='verCambioDia' href='javascript:clickHoraActualUpdate("
+
DatosHorario
.
getH_codigoAula
()
+
","
+
posicion
+
","
+
codPeriodo2
+
","
+
diaGen
+
");' "
"<br>
<span data-rel=\"tooltip\" ><a id='verCambioDia' href='javascript:clickHoraActualUpdate("
+
DatosHorario
.
getH_codigoAula
()
+
","
+
posicion
+
","
+
codPeriodo2
+
","
+
diaGen
+
");' "
+
" title='Editar Hora entrada y salida' style='margin-left:40px;'><i class=\"fa fa-clock-o bigger-110\"></i></a></span>"
);
+
" title='Editar Hora entrada y salida' style='margin-left:40px;'><i class=\"fa fa-clock-o bigger-110\"></i></a></span>"
);
}
}
...
@@ -3510,19 +3510,19 @@ public class ServletHorario extends HttpServlet {
...
@@ -3510,19 +3510,19 @@ public class ServletHorario extends HttpServlet {
String
horaAviso
=
request
.
getParameter
(
"horaAviso"
);
String
horaAviso
=
request
.
getParameter
(
"horaAviso"
);
String
recuperacion
=
request
.
getParameter
(
"recuperacion"
);
String
recuperacion
=
request
.
getParameter
(
"recuperacion"
);
int
codClase
=
Integer
.
parseInt
(
request
.
getParameter
(
"codClase"
));
int
codClase
=
Integer
.
parseInt
(
request
.
getParameter
(
"codClase"
));
String
fechafin
=
request
.
getParameter
(
"fechafin"
);
//
String fechafin = request.getParameter("fechafin");
String
cadenaTotal
=
request
.
getParameter
(
"cadenaTotal"
);
//
String cadenaTotal = request.getParameter("cadenaTotal");
String
avance
=
request
.
getParameter
(
"avance"
);
//
String avance = request.getParameter("avance");
String
fechainicio
=
request
.
getParameter
(
"fechainicio"
);
//
String fechainicio = request.getParameter("fechainicio");
String
fecha_recuperacio
=
request
.
getParameter
(
"fecha_recuperacion"
);
//
String fecha_recuperacio = request.getParameter("fecha_recuperacion");
//
String
aula_recuperacion
=
request
.
getParameter
(
"aula_recuperacion"
);
//
String aula_recuperacion = request.getParameter("aula_recuperacion");
//
String
curso_recuperacion
=
request
.
getParameter
(
"curso_recuperacion"
);
//
String curso_recuperacion = request.getParameter("curso_recuperacion");
String
docente_recuperacion
=
request
.
getParameter
(
"docente_recuperacion"
);
//
String docente_recuperacion = request.getParameter("docente_recuperacion");
String
fecha_aviso
=
request
.
getParameter
(
"fecha_aviso"
);
//
String fecha_aviso = request.getParameter("fecha_aviso");
System
.
out
.
println
(
"esto es demasiado sadd"
);
//
System.out.println("esto es demasiado sadd");
int
dato
=
servicios
.
registrarAsigCurDoceHorario
(
codAula
,
dia
,
bloq
,
Hini
,
Hfin
,
codTurno
,
codCurso
,
codDocente
,
periodo
,
codGru
,
codUsuario
,
codClase
,
grupoAulas
,
historial
,
motivoCambio
,
observacion
,
condicionTrabajador
,
horaAviso
,
recuperacion
);
int
dato
=
servicios
.
registrarAsigCurDoceHorario
(
codAula
,
dia
,
bloq
,
Hini
,
Hfin
,
codTurno
,
codCurso
,
codDocente
,
periodo
,
codGru
,
codUsuario
,
codClase
,
grupoAulas
,
historial
,
motivoCambio
,
observacion
,
condicionTrabajador
,
horaAviso
,
recuperacion
);
response
.
setContentType
(
"text/html"
);
response
.
setContentType
(
"text/html"
);
PrintWriter
pw
=
response
.
getWriter
();
PrintWriter
pw
=
response
.
getWriter
();
...
...
src/java/pe/siso/horario/utilities/OsUtils.java
0 → 100644
View file @
a85e2678
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
pe
.
siso
.
horario
.
utilities
;
import
java.io.File
;
import
java.util.Locale
;
/**
*
* @author sistem08user
*/
public
final
class
OsUtils
{
/**
* types of Operating Systems
*/
public
enum
OSType
{
Windows
,
MacOS
,
Linux
,
Other
};
// cached result of OS detection
protected
static
String
detectedOS
;
/**
* detect the operating system from the os.name System property and cache the
* result
*
* @return - the operating system detected
*/
public
static
String
getOperatingSysstemType
()
{
if
(
detectedOS
==
null
)
{
String
OS
=
System
.
getProperty
(
"os.name"
,
"generic"
).
toLowerCase
(
Locale
.
ENGLISH
);
if
((
OS
.
contains
(
"mac"
))
||
(
OS
.
contains
(
"darwin"
)))
{
detectedOS
=
"MacOS"
;
}
else
if
(
OS
.
contains
(
"win"
))
{
detectedOS
=
"Windows"
;
}
else
if
(
OS
.
contains
(
"nux"
))
{
detectedOS
=
"Linux"
;
}
else
{
detectedOS
=
"Other"
;
}
}
return
detectedOS
;
}
public
static
String
getPathOfVouchersDependingOS
()
{
String
path
=
""
;
String
detectedOs
=
OsUtils
.
getOperatingSysstemType
();
switch
(
detectedOs
)
{
case
"MacOS"
:
path
=
""
;
break
;
case
"Windows"
:
path
=
"C:/AppServ/www/comprobantes"
;
break
;
case
"Linux"
:
path
=
"/var/www/html/comprobantes"
;
break
;
}
return
path
;
}
public
static
String
getJSONDependingOS
()
{
String
path
=
""
;
String
detectedOs
=
OsUtils
.
getOperatingSysstemType
();
switch
(
detectedOs
)
{
case
"MacOS"
:
path
=
""
;
break
;
case
"Windows"
:
path
=
"C:/AppServ/www/comprobantes-log"
;
break
;
case
"Linux"
:
path
=
"/var/www/html/comprobantes-log"
;
break
;
}
return
path
;
}
public
static
String
getDotEnvPath
(
String
projectName
)
{
String
path
=
""
;
String
detectedOs
=
OsUtils
.
getOperatingSysstemType
();
switch
(
detectedOs
)
{
case
"MacOS"
:
path
=
""
;
break
;
case
"Windows"
:
char
[]
alphabet
=
"abcdefghijklmnopqrstuvwxyz"
.
toCharArray
();
for
(
char
letter
:
alphabet
)
{
path
=
letter
+
":/dotenv/"
+
projectName
;
File
directory
=
new
File
(
path
);
if
(
directory
.
exists
())
{
break
;
}
}
break
;
case
"Linux"
:
path
=
"/opt/dotenv/"
+
projectName
;
break
;
}
return
path
;
}
}
web/vista/arm_hor_gen.jsp
View file @
a85e2678
This diff is collapsed.
Click to expand it.
web/vista/gen_hor_gen.jsp
View file @
a85e2678
...
@@ -548,12 +548,14 @@
...
@@ -548,12 +548,14 @@
//SELECT2
//SELECT2
$
(
'.select2'
).
css
(
'width'
,
'200px'
).
select2
({
allowClear
:
true
})
$
(
'.select2'
).
css
(
'width'
,
'200px'
).
select2
({
allowClear
:
true
})
$
(
'#select2-multiple-style .btn'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#select2-multiple-style .btn'
).
on
(
'click'
,
function
(
e
)
{
var
target
=
$
(
this
).
find
(
'input[type=radio]'
);
var
target
=
$
(
this
).
find
(
'input[type=radio]'
);
var
which
=
parseInt
(
target
.
val
());
var
which
=
parseInt
(
target
.
val
());
if
(
which
==
2
)
$
(
'.select2'
).
addClass
(
'tag-input-style'
);
if
(
which
==
2
)
else
$
(
'.select2'
).
removeClass
(
'tag-input-style'
);
$
(
'.select2'
).
addClass
(
'tag-input-style'
);
else
$
(
'.select2'
).
removeClass
(
'tag-input-style'
);
});
});
...
@@ -798,9 +800,9 @@
...
@@ -798,9 +800,9 @@
});
});
}
}
function
eliminarSession
()
{
function
eliminarSession
()
{
let
codSede
=
$
(
"#cmbSede"
).
val
()
let
codSede
=
$
(
"#cmbSede"
).
val
()
sessionStorage
.
setItem
(
"aulaNueva"
,
codSede
)
sessionStorage
.
setItem
(
"aulaNueva"
,
codSede
)
console
.
log
(
"holii"
)
console
.
log
(
"holii"
)
}
}
...
@@ -1008,15 +1010,15 @@
...
@@ -1008,15 +1010,15 @@
},
complete
:
function
()
{
},
complete
:
function
()
{
focus
();
focus
();
// sessionStorage.setItem("aula","1");
// sessionStorage.setItem("aula","1");
let
aula
=
sessionStorage
.
getItem
(
"aulaNueva"
);
let
aula
=
sessionStorage
.
getItem
(
"aulaNueva"
);
//recuperar valor de la url
//recuperar valor de la url
if
(
aula
!=
null
)
{
if
(
aula
!=
null
)
{
console
.
log
(
aula
)
console
.
log
(
aula
)
buscarAula
(
1
)
buscarAula
(
1
)
}
else
{
}
else
{
console
.
log
(
"No se ha guardado Nada"
)
console
.
log
(
"No se ha guardado Nada"
)
}
}
}
}
...
@@ -1079,14 +1081,14 @@
...
@@ -1079,14 +1081,14 @@
var
periodo
=
"<%=periodo!=null?periodo.getCodigoPeriodo():""%>"
;
var
periodo
=
"<%=periodo!=null?periodo.getCodigoPeriodo():""%>"
;
//GUARDO LA SEDE EN SESSION
//GUARDO LA SEDE EN SESSION
let
codigoAulaFinal
=
""
;
let
codigoAulaFinal
=
""
;
// sessionStorage.setItem("aula",codSede);
// sessionStorage.setItem("aula",codSede);
let
codAulaSession
=
sessionStorage
.
getItem
(
"aulaNueva"
);
let
codAulaSession
=
sessionStorage
.
getItem
(
"aulaNueva"
);
if
(
codAulaSession
!=
null
)
{
if
(
codAulaSession
!=
null
)
{
codigoAulaFinal
=
codAulaSession
codigoAulaFinal
=
codAulaSession
}
else
{
}
else
{
codigoAulaFinal
=
codSede
codigoAulaFinal
=
codSede
}
}
...
@@ -2024,8 +2026,8 @@
...
@@ -2024,8 +2026,8 @@
$
(
"#dialog-planAcademico"
).
removeClass
(
'hide'
).
dialog
({
$
(
"#dialog-planAcademico"
).
removeClass
(
'hide'
).
dialog
({
resizable
:
false
,
resizable
:
false
,
modal
:
true
,
modal
:
true
,
width
:
'550'
,
width
:
'550'
,
height
:
'360'
,
height
:
'360'
,
title
:
"<div class='widget-color-blue' ><div class='widget-header white' ><h4 class='smaller' ><i class='ace-icon fa fa-check-circle white'></i> <span class='white'>Plan Academico</span></h4></div></div>"
,
title
:
"<div class='widget-color-blue' ><div class='widget-header white' ><h4 class='smaller' ><i class='ace-icon fa fa-check-circle white'></i> <span class='white'>Plan Academico</span></h4></div></div>"
,
title_html
:
true
,
title_html
:
true
,
buttons
:
[
buttons
:
[
...
@@ -2040,13 +2042,13 @@
...
@@ -2040,13 +2042,13 @@
// console.log($("#cboCiencias").select2('val'))
// console.log($("#cboCiencias").select2('val'))
// console.log($("#cboCTA").select2('val'))
// console.log($("#cboCTA").select2('val'))
// console.log($("#cboCEF").select2('val'))
// console.log($("#cboCEF").select2('val'))
let
arrayMatematica
=
$
(
"#cboMatematica"
).
select2
(
'val'
)
let
arrayMatematica
=
$
(
"#cboMatematica"
).
select2
(
'val'
)
let
arrayComunicacion
=
$
(
"#cboComunicacion"
).
select2
(
'val'
)
let
arrayComunicacion
=
$
(
"#cboComunicacion"
).
select2
(
'val'
)
let
arrayCiencias
=
$
(
"#cboCiencias"
).
select2
(
'val'
)
let
arrayCiencias
=
$
(
"#cboCiencias"
).
select2
(
'val'
)
let
arrayCTA
=
$
(
"#cboCTA"
).
select2
(
'val'
)
let
arrayCTA
=
$
(
"#cboCTA"
).
select2
(
'val'
)
let
arrayCEF
=
$
(
"#cboCEF"
).
select2
(
'val'
)
let
arrayCEF
=
$
(
"#cboCEF"
).
select2
(
'val'
)
guardarPlanAcademico
(
arrayMatematica
,
arrayComunicacion
,
arrayCiencias
,
arrayCTA
,
arrayCEF
);
guardarPlanAcademico
(
arrayMatematica
,
arrayComunicacion
,
arrayCiencias
,
arrayCTA
,
arrayCEF
);
$
(
this
).
dialog
(
"close"
);
$
(
this
).
dialog
(
"close"
);
...
@@ -2066,7 +2068,7 @@
...
@@ -2066,7 +2068,7 @@
}
}
function
guardarPlanAcademico
(
arrayMatematica
,
arrayComunicacion
,
arrayCiencias
,
arrayCTA
,
arrayCEF
)
{
function
guardarPlanAcademico
(
arrayMatematica
,
arrayComunicacion
,
arrayCiencias
,
arrayCTA
,
arrayCEF
)
{
// for(var i=0;i
<
arrayMatematica
.
length
;
i
++
){
// for(var i=0;i
<
arrayMatematica
.
length
;
i
++
){
console
.
log
(
arrayMatematica
)
console
.
log
(
arrayMatematica
)
...
...
web/vista/index.jsp
View file @
a85e2678
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<script src="../assets/js/respond.js"></script>
<script src="../assets/js/respond.js"></script>
<![endif]-->
<![endif]-->
<!-- <script type="text/javascript">
<!-- <script type="text/javascript">
$(document).ready(function(){
$(document).ready(function(){
let user=$("#txt_usuario").val();
let user=$("#txt_usuario").val();
$.ajax({
$.ajax({
...
@@ -50,16 +50,16 @@
...
@@ -50,16 +50,16 @@
data:{
data:{
usuario:user
usuario:user
}
}
// success: function (data, textStatus, jqXHR) {
// success: function (data, textStatus, jqXHR) {
//
//
// let usuario=
// let usuario=
// if(usuario.equals("mgalvan")){
// if(usuario.equals("mgalvan")){
// alert("asdas");
// alert("asdas");
// }else{
// }else{
// alert("not exist");
// alert("not exist");
// }
// }
//
//
// }
// }
});
});
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
function
validarLogin
()
{
function
validarLogin
()
{
var
periodo
=
$
(
'#cbPeriodo'
).
val
();
var
periodo
=
$
(
'#cbPeriodo'
).
val
();
if
(
$
(
'#cbPeriodo'
).
val
()
==
""
)
{
if
(
$
(
'#cbPeriodo'
).
val
()
==
""
)
{
$
(
'#MensajeErrorLogin'
).
html
(
"<div class=
\"
alert alert-danger
\"
>"
+
$
(
'#MensajeErrorLogin'
).
html
(
"<div class=
\"
alert alert-danger
\"
>"
+
"<strong>"
+
"<strong>"
+
...
@@ -205,8 +205,8 @@
...
@@ -205,8 +205,8 @@
"Alerta -"
+
"Alerta -"
+
"</strong>"
+
"</strong>"
+
"Seleccionar un periodo. "
+
"Seleccionar un periodo. "
+
"</div>"
+
"<input type='hidden' name='hbandera' id='hbandera' value='0' />"
);
"</div>"
+
"<input type='hidden' name='hbandera' id='hbandera' value='0' />"
);
}
else
{
}
else
{
var
p_usuario
=
$
(
'#txt_usuario'
).
val
();
var
p_usuario
=
$
(
'#txt_usuario'
).
val
();
var
p_password
=
$
(
'#txt_contrasena'
).
val
();
var
p_password
=
$
(
'#txt_contrasena'
).
val
();
var
p_periodo
=
$
(
'#cbPeriodo'
).
val
();
var
p_periodo
=
$
(
'#cbPeriodo'
).
val
();
...
@@ -214,7 +214,7 @@
...
@@ -214,7 +214,7 @@
$
.
ajax
({
$
.
ajax
({
type
:
'POST'
,
type
:
'POST'
,
url
:
'../ServletUsuario?accion=validarUsuario'
,
url
:
'../ServletUsuario?accion=validarUsuario'
,
data
:
'txt_usuario='
+
p_usuario
+
'&txt_contrasena='
+
p_password
+
'&p_periodo='
+
p_periodo
+
'&p_nomPeriodo='
+
p_nomPeriodo
,
data
:
'txt_usuario='
+
p_usuario
+
'&txt_contrasena='
+
p_password
+
'&p_periodo='
+
p_periodo
+
'&p_nomPeriodo='
+
p_nomPeriodo
,
success
:
function
(
resultado
)
{
success
:
function
(
resultado
)
{
$
(
'#MensajeErrorLogin'
).
html
(
resultado
);
$
(
'#MensajeErrorLogin'
).
html
(
resultado
);
},
complete
:
function
()
{
},
complete
:
function
()
{
...
...
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