Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1422 → Rev 1423

/branches/v3/impl/src/java/pt/estgp/estgweb/Globals.java
181,7 → 181,19
public static final String SIGES_WEBSERVICE_SECRET = ConfigProperties.getProperty("ws.siges.secret");
 
 
public static final String SIGES_TIPO_ALUNO_NORMAL = ConfigProperties.getProperty("siges.tipo.aluno.normal");
public static final String SIGES_TIPO_ALUNO_BOLSEIRO = ConfigProperties.getProperty("siges.tipo.aluno.bolseiro");
public static final String SIGES_TIPO_ALUNO_MILITAR = ConfigProperties.getProperty("siges.tipo.aluno.militar");
public static final String SIGES_TIPO_ALUNO_TRABALHADOR_ESTUDANTE = ConfigProperties.getProperty("siges.tipo.aluno.trabalhador.estudante");
public static final String SIGES_TIPO_ALUNO_DIRIGENTE_ASSOCIATIVO = ConfigProperties.getProperty("siges.tipo.aluno.dirigente.associativo");
public static final String SIGES_TIPO_ALUNO_DEFICIENTE = ConfigProperties.getProperty("siges.tipo.aluno.deficiente");
public static final String SIGES_TIPO_ALUNO_BOMBEIRO = ConfigProperties.getProperty("siges.tipo.aluno.bombeiro");
public static final String SIGES_TIPO_ALUNO_VASCODAGAMA = ConfigProperties.getProperty("siges.tipo.vascodagama");
public static final String SIGES_TIPO_ALUNO_ERASMUS = ConfigProperties.getProperty("siges.tipo.erasmus");
 
 
 
 
public static final long URL_STAT_CHART_EXPIRE_INTERVAL = ConfigProperties.getIntProperty("url.stat.image.expire.interval.time.minutes");
public static final String URL_STAT_CHART_TMP_DIR = ConfigProperties.getProperty("url.stat.tmp.dir");
public static final int URL_STAT_CACHE_SIZE = ConfigProperties.getIntProperty("url.stat.click.cache.size");
/branches/v3/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportStudentsService.java
167,8 → 167,8
newUser = true;
}
 
if(alunoSiges.getCodigo() == 11211)
System.out.println("Aqui");
//if(alunoSiges.getCodigo() == 11211)
// System.out.println("Aqui");
 
persist(alunoSiges, s, newUser,year,institutionCode,activeImportYearParaVerificacaoDePropinasEmDia,logMessages,service);
 
1355,6 → 1355,31
 
 
}
 
if(alunoSiges.getTiposAlunosRepresentados() != null)
{
for(Aluno.TipoAluno tipo:alunoSiges.getTiposAlunosRepresentados())
{
if(tipo.getCodigoTipoAluno().equals(Globals.SIGES_TIPO_ALUNO_NORMAL))
student.setTipoAlunoNormal(true);
if(tipo.getCodigoTipoAluno().equals(Globals.SIGES_TIPO_ALUNO_ERASMUS))
student.setTipoAlunoErasmus(true);
if(tipo.getCodigoTipoAluno().equals(Globals.SIGES_TIPO_ALUNO_TRABALHADOR_ESTUDANTE))
student.setTipoAlunoTrabalhadorEstudante(true);
if(tipo.getCodigoTipoAluno().equals(Globals.SIGES_TIPO_ALUNO_BOLSEIRO))
student.setTipoAlunoBolseiro(true);
if(tipo.getCodigoTipoAluno().equals(Globals.SIGES_TIPO_ALUNO_BOMBEIRO))
student.setTipoAlunoBombeiro(true);
if(tipo.getCodigoTipoAluno().equals(Globals.SIGES_TIPO_ALUNO_DEFICIENTE))
student.setTipoAlunoDeficiente(true);
if(tipo.getCodigoTipoAluno().equals(Globals.SIGES_TIPO_ALUNO_DIRIGENTE_ASSOCIATIVO))
student.setTipoAlunoDirigenteAssociativo(true);
if(tipo.getCodigoTipoAluno().equals(Globals.SIGES_TIPO_ALUNO_MILITAR))
student.setTipoAlunoMilitar(true);
if(tipo.getCodigoTipoAluno().equals(Globals.SIGES_TIPO_ALUNO_VASCODAGAMA))
student.setTipoAlunoVascodagama(true);
}
}
}
 
/*private CourseUnit tryFindCourseUnitWithOutTurma(DefaultLogMessages logMessages, String cdDuracao, String codigo,String codigoCurso,String cdLectivo,String cdTurma)
/branches/v3/impl/src/java/pt/estgp/estgweb/services/sigesimports/oracle/dao/AlunoDao.java
79,7 → 79,13
if (conn == null) {
conn = getCurrentConnection();
}
PreparedStatement catCMD = conn.prepareStatement("SELECT DISTINCT CSE.T_ALUNOS.CD_ALUNO AS CD_ALUNO FROM CSE.T_ALUNOS INNER JOIN (CSE.T_INSCRI INNER JOIN CSE.T_TBDISCIP ON CSE.T_INSCRI.CD_DISCIP = CSE.T_TBDISCIP.CD_DISCIP) ON CSE.T_ALUNOS.CD_ALUNO = CSE.T_INSCRI.CD_ALUNO WHERE (((CSE.T_TBDISCIP.CD_INSTITUIC)=" + codigoInstituicao + ") AND ((CSE.T_INSCRI.CD_LECTIVO)='" + ano + "') AND ((CSE.T_ALUNOS.CD_SITUA_PAR)=1) AND ((CSE.T_INSCRI.CD_STATUS)<>5))");
PreparedStatement catCMD = conn.prepareStatement("SELECT DISTINCT " +
" CSE.T_ALUNOS.CD_ALUNO AS CD_ALUNO " +
"FROM CSE.T_ALUNOS " +
"INNER JOIN (CSE.T_INSCRI INNER JOIN CSE.T_TBDISCIP ON CSE.T_INSCRI.CD_DISCIP = CSE.T_TBDISCIP.CD_DISCIP) ON CSE.T_ALUNOS.CD_ALUNO = CSE.T_INSCRI.CD_ALUNO " +
"WHERE (((CSE.T_TBDISCIP.CD_INSTITUIC)=" + codigoInstituicao + ") AND ((CSE.T_INSCRI.CD_LECTIVO)='" + ano + "') " +
/*AND ((CSE.T_ALUNOS.CD_SITUA_PAR)=1)*/
" AND ((CSE.T_INSCRI.CD_STATUS)<>5))");
ResultSet aReader = catCMD.executeQuery();
while (aReader.next()) {
codigos.add(getDecimal("CD_ALUNO", aReader));
101,12 → 107,19
if (conn == null) {
conn = getCurrentConnection();
}
PreparedStatement catCMD = conn.prepareStatement("SELECT * FROM " + getTable() + " INNER JOIN SIGES.T_INDIVIDUO on SIGES.T_INDIVIDUO.ID_INDIVIDUO = CSE.T_ALUNOS.ID_INDIVIDUO where CD_SITUA_PAR = 1 AND " + getIdColumn() + "=" + codigo);
PreparedStatement catCMD = conn.prepareStatement("SELECT * FROM " + getTable() + " " +
"INNER JOIN SIGES.T_INDIVIDUO on SIGES.T_INDIVIDUO.ID_INDIVIDUO = CSE.T_ALUNOS.ID_INDIVIDUO " +
"where /*CD_SITUA_PAR = 1 AND*/ " + getIdColumn() + "=" + codigo);
ResultSet aReader = catCMD.executeQuery();
 
 
if (aReader.next()) {
Aluno a = load(aReader);
a.disciplinasInscrito = loadDiscilpinasInscrito(codigo, codigoInstituicao, ano);
a.historicos = getHistorico(codigo);
 
obtainTiposAlunoRepresentados(codigo, ano, conn, a);
 
aReader.close();
return a;
}
119,6 → 132,34
return null;
}
 
private void obtainTiposAlunoRepresentados(Integer codigo, String ano, Connection conn, Aluno a) throws SQLException {
PreparedStatement tiposAluno = conn.prepareStatement(
"SELECT DISTINCT CSE.T_TIPALUNO.CD_TIP_ALU AS CD_TIP_ALU, CSE.T_TBTIPALU.DS_TIP_ALU AS DS_TIP_ALU " +
" FROM CSE.T_TIPALUNO " +
" LEFT OUTER JOIN CSE.T_TBTIPALU ON CSE.T_TIPALUNO.CD_TIP_ALU = CSE.T_TBTIPALU.CD_TIP_ALU " +
" where CSE.T_TIPALUNO.CD_ALUNO = " + codigo + " " +
" AND CSE.T_TIPALUNO.CD_LECTIVO = '" + ano + "'");
 
 
ResultSet aReaderTiposAluno = tiposAluno.executeQuery();
a.setTiposAlunosRepresentados(new ArrayList<Aluno.TipoAluno>());
while(aReaderTiposAluno.next())
{
 
Integer cdTipAluno = getDecimal("CD_TIP_ALU",aReaderTiposAluno);
if(cdTipAluno != null && cdTipAluno > 0)
{
Aluno.TipoAluno tipoAluno = new Aluno.TipoAluno();
tipoAluno.setCodigoTipoAluno(""+cdTipAluno);
tipoAluno.setDescTipoAluno(getString("DS_TIP_ALU", aReaderTiposAluno));
a.getTiposAlunosRepresentados().add(tipoAluno);
}
 
}
aReaderTiposAluno.close();
tiposAluno.close();
}
 
/*Mudar a lista para uma lista de Códigos com pelo menos CD_LECTIVO, CD_DISCIP, CD_CURSO, CD_TURMA*/
/*Do lado do Baco as Disciplinas são criadas uma por (CD_LECTIVO, CODIGO, CURSO, SEMESTRE) ficam anexadas todas as turmas encontradas*/
/* O Serviço de Leituras de Sumarios pede apenas os detalhe_aula com codigos de turma igual ao pedido e CD_LECTIVO = actual */
137,15 → 178,19
" CSE.T_INSCRI.CD_TURMA_S, " +
" CSE.T_INSCRI.CD_TURMA_C, " +
" CSE.T_INSCRI.CD_TURMA_O, " +
" CSE.T_INSCRI.CD_TURMA_E " +
" FROM CSE.T_INSCRI INNER JOIN CSE.T_TBDISCIP ON CSE.T_INSCRI.CD_DISCIP = CSE.T_TBDISCIP.CD_DISCIP" +
" CSE.T_INSCRI.CD_TURMA_E " +
" FROM CSE.T_INSCRI INNER JOIN CSE.T_TBDISCIP ON CSE.T_INSCRI.CD_DISCIP = CSE.T_TBDISCIP.CD_DISCIP " +
//" INNER JOIN CSE.T_CURSOS ON CSE.T_CURSOS.CD_CURSO = CSE.T_INSCRI.CD_CURSO " +
 
" WHERE CSE.T_INSCRI.CD_ALUNO = " + codigo + " " +
" AND" +
" CSE.T_TBDISCIP.CD_INSTITUIC= " + codigoInstituicao + " AND " +
" CSE.T_INSCRI.CD_LECTIVO='" + ano + "' AND " +
" CSE.T_INSCRI.CD_STATUS<>5 AND " +
" (CSE.T_INSCRI.CD_TIPDIS = 2 OR CSE.T_INSCRI.CD_TIPDIS = 1 OR CSE.T_INSCRI.CD_TIPDIS = 6) ");
" (CSE.T_INSCRI.CD_TIPDIS = 2 OR CSE.T_INSCRI.CD_TIPDIS = 1 OR CSE.T_INSCRI.CD_TIPDIS = 6) "
 
 
);
//CD_TIPDISC = 1 Inscricoes normais
//CD_TIPDISC = 2 Nao conta para media
//CD_TIPDISC = 3 Qualitativa
165,6 → 210,7
d.cdTipoDisciplina = getDecimal("CD_TIPDIS", aReader);
d.cdDuracao = getString("CD_DURACAO", aReader);
d.cdTurma = getString("CD_TURMA", aReader);
 
if(getString("CD_TURMA_P", aReader) != null)
{
d.outraTurma = getString("CD_TURMA_P", aReader);
/branches/v3/impl/src/java/pt/estgp/estgweb/services/sigesimports/oracle/domain/Disciplina.java
18,6 → 18,13
public String outraTurma;
public String outraTurmaCode;
 
public String codigoTipoAlunoT;
public String codigoTipoAlunoTP;
 
public String descTipoAlunoT;
public String descTipoAlunoTP;
 
 
public ArrayList<String> turmasDocente = new ArrayList<String>();
 
 
79,6 → 86,39
this.tipologiasTdocTurma = tipologiasTdocTurma;
}
 
 
public String getCodigoTipoAlunoT() {
return codigoTipoAlunoT;
}
 
public void setCodigoTipoAlunoT(String codigoTipoAlunoT) {
this.codigoTipoAlunoT = codigoTipoAlunoT;
}
 
public String getCodigoTipoAlunoTP() {
return codigoTipoAlunoTP;
}
 
public void setCodigoTipoAlunoTP(String codigoTipoAlunoTP) {
this.codigoTipoAlunoTP = codigoTipoAlunoTP;
}
 
public String getDescTipoAlunoT() {
return descTipoAlunoT;
}
 
public void setDescTipoAlunoT(String descTipoAlunoT) {
this.descTipoAlunoT = descTipoAlunoT;
}
 
public String getDescTipoAlunoTP() {
return descTipoAlunoTP;
}
 
public void setDescTipoAlunoTP(String descTipoAlunoTP) {
this.descTipoAlunoTP = descTipoAlunoTP;
}
 
public void setCodigo(Integer codigo) {
this.codigo = codigo;
}
/branches/v3/impl/src/java/pt/estgp/estgweb/services/sigesimports/oracle/domain/Aluno.java
21,6 → 21,7
public String usernameNetpa;
public ArrayList<Disciplina> disciplinasInscrito;
public ArrayList<AlunoHistorico> historicos;
public ArrayList<TipoAluno> tiposAlunosRepresentados;
 
public Aluno()
{
29,6 → 30,14
//
}
 
public ArrayList<TipoAluno> getTiposAlunosRepresentados() {
return tiposAlunosRepresentados;
}
 
public void setTiposAlunosRepresentados(ArrayList<TipoAluno> tiposAlunosRepresentados) {
this.tiposAlunosRepresentados = tiposAlunosRepresentados;
}
 
public Integer getCodigo() {
return codigo;
}
80,4 → 89,27
public ArrayList<AlunoHistorico> getHistoricos() {
return historicos;
}
 
public static class TipoAluno
{
public String codigoTipoAluno;
public String descTipoAluno;
 
 
public String getCodigoTipoAluno() {
return codigoTipoAluno;
}
 
public void setCodigoTipoAluno(String codigoTipoAluno) {
this.codigoTipoAluno = codigoTipoAluno;
}
 
public String getDescTipoAluno() {
return descTipoAluno;
}
 
public void setDescTipoAluno(String descTipoAluno) {
this.descTipoAluno = descTipoAluno;
}
}
}
/branches/v3/impl/src/java/pt/estgp/estgweb/domain/dao/impl/QuestionarioPedagogicoCursoAfetoDaoImpl.java
109,6 → 109,24
return (Long) result;
return 0;
}
public long countAlunosComRespostas(long cursoAfetoId)
{
Query q = AbstractDao.getCurrentSession().createQuery("SELECT " +
" count(distinct a.aluno.id) AS respostasAlunos " +
"from " + QuestionarioPedagogicoCursoAfeto.class.getName() + " c " +
"JOIN c.unidadesAfetas u " +
"JOIN u.tipologiasRequisitadas t " +
"JOIN t.alunosRequisitados a " +
"JOIN a.respostaRequisitada rR " +
"JOIN rR.resposta r " +
"WHERE c.id = :id ");
 
q.setLong("id",cursoAfetoId);
Object result = q.uniqueResult();
if(result != null)
return (Long) result;
return 0;
}
 
 
}
/branches/v3/impl/src/doc/siges/ModeloDeInformacaoPAE-EmVigor.docx
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/v3/impl/src/hbm/pt/estgp/estgweb/domain/GenericUser.hbm.xml
106,9 → 106,38
<meta attribute="scope-class">public abstract</meta>
<property name="localRemovedSubscribedUnits" type="string"/>
<property name="localSubscribedUnits" type="string"/>
<property name="tipoAlunoTrabalhadorEstudante" type="boolean">
<column name="tipoAlunoTrabalhadorEstudante" default="false"/>
</property>
<property name="tipoAlunoErasmus" type="boolean">
<column name="tipoAlunoErasmus" default="false"/>
</property>
<property name="tipoAlunoNormal" type="boolean">
<column name="tipoAlunoNormal" default="false"/>
</property>
<property name="tipoAlunoBolseiro" type="boolean">
<column name="tipoAlunoBolseiro" default="false"/>
</property>
<property name="tipoAlunoMilitar" type="boolean">
<column name="tipoAlunoMilitar" default="false"/>
</property>
<property name="tipoAlunoDirigenteAssociativo" type="boolean">
<column name="tipoAlunoDirigenteAssociativo" default="false"/>
</property>
<property name="tipoAlunoDeficiente" type="boolean">
<column name="tipoAlunoDeficiente" default="false"/>
</property>
<property name="tipoAlunoBombeiro" type="boolean">
<column name="tipoAlunoBombeiro" default="false"/>
</property>
<property name="tipoAlunoVascodagama" type="boolean">
<column name="tipoAlunoVascodagama" default="false"/>
</property>
<property name="propinasEmDia" type="boolean" >
<column name="propinasEmDia" default="false"/>
</property>
 
 
<property name="propinasEmDiaYear" type="string" >
<column name="propinasEmDiaYear" length="10"/>
</property>
/branches/v3/impl/src/web/user/questionarios/pedagogicoEstudante/questionarioDashBoard.jsp
95,6 → 95,7
<th>Código</th>
<th>Curso</th>
<th>Unidades</th>
<th>Alunos Que Responderam</th>
<th>Respondidos</th>
<th>Por Responder</th>
<th>Total</th>
106,6 → 107,7
{
QuestionarioPedagogicoCursoAfeto cursoAfeto = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().load(cursoId);
long respostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countRespostas(cursoId);
long alunosComRespostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countAlunosComRespostas(cursoId);
request.setAttribute("cursoAfeto",cursoAfeto);
%>
<tr>
118,6 → 120,7
</a>
 
</td>
<td><label class="label <%=alunosComRespostasCurso > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=alunosComRespostasCurso%></label></td>
<td><label class="label <%=respostasCurso > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=respostasCurso%></label></td>
<td><label class="label label-danger" style="font-size: 1em"><%=cursoAfeto.getStatRespostasRequisitadas() - respostasCurso%></label></td>
<td><label class="label label-info" style="font-size: 1em"><%=cursoAfeto.getStatRespostasRequisitadas()%></label></td>