Commit e26c04c2 authored by Fabiano Sluzarski's avatar Fabiano Sluzarski
Browse files

List of the students concluded by period, alerts: - students with

defense date greater than 30 months; - total of active in the programs;
- grades from last semester empty.
parent c6e42a3a
package br.ufpr.c3sl.sapos.models.customization;
import java.util.Calendar;
import java.util.List;
import javax.validation.constraints.NotNull;
......@@ -10,6 +11,7 @@ import org.springframework.roo.addon.tostring.RooToString;
import br.ufpr.c3sl.sapos.models.scholar.Registration;
import br.ufpr.c3sl.sapos.models.scholar.StudentGrant;
import br.ufpr.c3sl.sapos.models.scholar.Transcript;
@RooJavaBean
@RooToString
......@@ -62,8 +64,26 @@ public class Configuration {
public static Object findLongTimeDefenseRegistration(){
return entityManager().createNativeQuery(
"select * from registration r where "+
"(extract (year from r.proposal_date) - extract (year from r.defense_date)) * 12 + (extract (month from r.proposal_date) - extract (month from r.defense_date)) > "
/*"(extract (month from r.proposal_date) - extract (month from r.defense_date)) > "*/+Configuration.findConfigValueByName("month.nb.defense.date.expiring"),Registration.class).getResultList();
"(r.defense_date - r.proposal_date)/30 > "+Configuration.findConfigValueByName("month.nb.defense.date.expiring"),Registration.class).getResultList();
}
//- avisar que notas do semestre anterior nao foram preenchidas
public static Object findLastPeriodBlankGrades(){
int year, month, period = 0;
Calendar c = Calendar.getInstance();
year = c.get(Calendar.YEAR);
month = c.get(Calendar.MONTH);
if (month < 6) {
year--;
period = 2;
}
if (month >= 6)
period = 1;
return entityManager().createNativeQuery(
"select * from transcript t, section_pos s, registration r, person p where t.grade IS NULL " +
"and t.transcript_section = s.id and s.section_year = "+year+" and s.period = "+period+
" and t.student = r.id and r.student = p.id order by p.name", Transcript.class).getResultList();
}
}
\ No newline at end of file
......@@ -224,6 +224,11 @@ public class Registration {
return count.longValue();
}
public static Object findConcludedRegistrationsByPeriod(String startDate, String endDate) {
return entityManager().createNativeQuery("select * from registration r, person p where r.reg_status = 'Concluida' and " +
"r.defense_date >= '"+startDate+"' and r.defense_date <= '"+endDate+"' and r.student = p.id order by p.name", Registration.class).getResultList();
}
public static Registration getAtiveRegistration(Student s) {
Registration reg = null;
......
......@@ -3,14 +3,13 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
import org.apache.solr.client.solrj.request.AbstractUpdateRequest;
import org.apache.solr.client.solrj.request.ContentStreamUpdateRequest;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
......@@ -27,9 +26,17 @@ import br.ufpr.c3sl.sapos.models.scholar.Registration;
public class ConfigurationController {
@RequestMapping(value = "alerts", method = RequestMethod.GET)
public String alert(Model model) {
Configuration cMaster = new Configuration();
Configuration cPhd = new Configuration();
cMaster.setValue(((Long) Registration.countTotalActivesRegKind("Mestrado")).toString());
cPhd.setValue(((Long) Registration.countTotalActivesRegKind("Doutorado")).toString());
model.addAttribute("activeMaster", cMaster);
model.addAttribute("activePhd", cPhd);
model.addAttribute("irregularGrants", Configuration.findActiveStudentIrregularGrants());
model.addAttribute("irregularRegistrations", Configuration.findIrregularRegistration());
model.addAttribute("expiredDefense", Configuration.findLongTimeDefenseRegistration());
model.addAttribute("endGrant", "");
model.addAttribute("gradeEmpty", Configuration.findLastPeriodBlankGrades());
return "configurations/alert";
}
......
......@@ -127,4 +127,17 @@ public class RegistrationController {
Registration.entrantsDataReportPdf(year, regKind, response);
}
@RequestMapping(value = "concludedbyperiod", method = RequestMethod.GET)
public String studentsConcludedByPeriod() {
return "registrations/concludedbyperiod";
}
@RequestMapping(value="concludedbyperiodlist",method = RequestMethod.GET)
public String studentsConcludedByPeriodList(@RequestParam(value = "startDate", required = false) String startDate,
@RequestParam(value = "endDate", required = false) String endDate,
Model model) {
model.addAttribute("registrations", Registration.findConcludedRegistrationsByPeriod(startDate, endDate));
return "registrations/liststudentsbasicinfo";
}
}
......@@ -9,6 +9,9 @@ label_br_ufpr_c3sl_sapos_models_customization_configuration_plural=Configuration
label_br_ufpr_c3sl_sapos_models_customization_configuration_value=Value
label_br_ufpr_c3sl_sapos_models_customization_configuration_version=Version
label_br_ufpr_c3sl_sapos_models_customization_configuration_master=Master
label_br_ufpr_c3sl_sapos_models_customization_configuration_phd=Phd
label_br_ufpr_c3sl_sapos_models_entities_bank=Bank
label_br_ufpr_c3sl_sapos_models_entities_bank_id=Id
label_br_ufpr_c3sl_sapos_models_entities_bank_name=Name
......
#Updated at Thu Mar 31 15:23:28 BRT 2011
#Thu Mar 31 15:23:28 BRT 2011
application_name=Sapos
application_name=Sapos
label_br_ufpr_c3sl_sapos_models_customization_configuration_master=Mestrado
label_br_ufpr_c3sl_sapos_models_customization_configuration_phd=Doutorado
label_br_ufpr_c3sl_sapos_models_entities_bank=Banco
label_br_ufpr_c3sl_sapos_models_entities_bank_id=Id
label_br_ufpr_c3sl_sapos_models_entities_bank_name=Nome
......
......@@ -11,6 +11,7 @@ global_menu_statement_courses=Ministered Courses statement
global_menu_candidates_to_grant=Candidates to grant
global_menu_blank_proposal=Open Proposal
global_menu_entrants_data=Entrants Data
global_menu_concluded_by_period=Concluded Logins
global_menu_find=Find by {0}
global_menu_statement=Statement
global_menu_history=History
......
......@@ -20,6 +20,7 @@ global_menu_statement_courses=Declara
global_menu_candidates_to_grant=Candidatos a bolsa
global_menu_blank_proposal=Proposta em Aberto
global_menu_entrants_data=Dados Ingressantes
global_menu_concluded_by_period=Login dos concluidos
global_generic={0}
global_menu_load_meeting_minutes=Carregar atas colegiado
global_menu_search_meeting_minutes=Procura atas colegiado
......
......@@ -11,9 +11,14 @@
<jsp:directive.attribute name="label" type="java.lang.String" required="false" rtexprvalue="true" description="The label used for this object, will default to a message bundle if not supplied" />
<jsp:directive.attribute name="render" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicate if the contents of this tag and all enclosed tags should be rendered (default 'true')" />
<jsp:directive.attribute name="openPane" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Control if the title pane is opened or closed by default (default: true)" />
<jsp:directive.attribute name="emptyLabels" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Set the value of the labels to empty (default: false)" />
<jsp:directive.attribute name="z" type="java.lang.String" required="false" description="Used for checking if element has been modified (to recalculate simply provide empty string value)" />
<c:if test="${empty render or render}">
<c:if test="${empty emptyLabels}">
<c:set var="emptyLabels" value="false" />
</c:if>
<c:if test="${empty label}">
<spring:message code="label_${fn:toLowerCase(fn:substringAfter(id,'_'))}" var="label" htmlEscape="false" />
</c:if>
......@@ -36,7 +41,10 @@
<c:set var="typeName" value="${fn:split(id,'_')[fn:length(fn:split(id,'_')) - 1]}" />
<spring:message arguments="${label}" code="entity_show" var="title_msg" htmlEscape="false" />
<c:if test="${not emptyLabels}">
<spring:message arguments="${label}" code="entity_show" var="title_msg" htmlEscape="false" />
</c:if>
<util:panel id="${id}" title="${title_msg}" openPane="${openPane}">
<c:choose>
<c:when test="${not empty object}">
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<div xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:page="urn:jsptagdir:/WEB-INF/tags/form" xmlns:table="urn:jsptagdir:/WEB-INF/tags/form/fields" version="2.0">
<div xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:page="urn:jsptagdir:/WEB-INF/tags/form" xmlns:table="urn:jsptagdir:/WEB-INF/tags/form/fields" xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields" version="2.0">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<b>Alunos ativos nos programas</b>
<page:show id="ps_br_ufpr_c3sl_sapos_models_customization_Configuration" object="${configurations}" path="/configurations" emptyLabels="true" create="false" delete="false" update="false" list="false" z="user-managed">
<field:display field="value" id="s_br_ufpr_c3sl_sapos_models_customization_Configuration_master" object="${activeMaster}" z="user-managed"/>
<field:display field="value" id="s_br_ufpr_c3sl_sapos_models_customization_Configuration_phd" object="${activePhd}" z="user-managed"/>
</page:show>
<br/><br/>
<b>Aluno reprovado com bolsa</b>
<page:list id="pl_br_ufpr_c3sl_sapos_models_scholar_StudentGrant" items="${irregularGrants}" emptyLabels="true" z="user-managed">
<table:table data="${irregularGrants}" id="l_br_ufpr_c3sl_sapos_models_scholar_StudentGrant" path="/studentgrants" z="user-managed">
<page:list id="pl_br_ufpr_c3sl_sapos_models_people_Student" items="${irregularGrants}" emptyLabels="true" z="user-managed">
<table:table data="${irregularGrants}" id="l_br_ufpr_c3sl_sapos_models_scholar_StudentGrant" path="/studentgrants" create="false" z="user-managed">
<table:column id="c_br_ufpr_c3sl_sapos_models_people_Person_name" property="registration.student.name" z="user-managed" navigation="true"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_startDate" property="startDate" z="m3Es7QJrs3CN06km6IRmGRPHdXQ="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_endDate" property="endDate" z="m3Es7QJrs3CN06km6IRmGRPHdXQ="/>
......@@ -15,10 +22,10 @@
</table:table>
</page:list>
<br/>
<br/><br/>
<b>Aluno com duas reprovações</b>
<page:list id="pl_br_ufpr_c3sl_sapos_models_scholar_Registration" items="${irregularRegistrations}" emptyLabels="true" z="user-managed">
<table:table data="${irregularRegistrations}" id="l_br_ufpr_c3sl_sapos_models_scholar_Registration" path="/registrations" z="user-managed">
<table:table data="${irregularRegistrations}" id="l_br_ufpr_c3sl_sapos_models_scholar_Registration" path="/registrations" create="false" z="user-managed">
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_student" navigation="true" property="student" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" property="regKind" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_advisors" navigation="true" property="advisor" z="/kn8I2wpm4baHtJNGOecElHBrW0="/>
......@@ -29,11 +36,11 @@
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regStatus" property="regStatus" z="ZylPJo9HTwXXaEuXJAnOaZPfxQw="/>
</table:table>
</page:list>
<!--
<br/>
<br/><br/>
<b>Data de defesa maior que o estipulado</b>
<page:list id="pl_br_ufpr_c3sl_sapos_models_scholar_Transcript" items="${expiredDefense}" emptyLabels="true" z="user-managed">
<table:table data="${expiredDefense}" id="l_br_ufpr_c3sl_sapos_models_scholar_Registration" path="/registrations" z="user-managed">
<page:list id="pl_br_ufpr_c3sl_sapos_models_scholar_SectionPos" items="${expiredDefense}" emptyLabels="true" z="user-managed">
<table:table data="${expiredDefense}" id="l_br_ufpr_c3sl_sapos_models_scholar_Registration" path="/registrations" create="false" z="user-managed">
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_student" navigation="true" property="student" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" property="regKind" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_advisors" navigation="true" property="advisor" z="/kn8I2wpm4baHtJNGOecElHBrW0="/>
......@@ -44,5 +51,33 @@
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regStatus" property="regStatus" z="ZylPJo9HTwXXaEuXJAnOaZPfxQw="/>
</table:table>
</page:list>
-->
<br/><br/>
<b>- mostrar perto da data final de bolsa</b>
<page:list id="pl_br_ufpr_c3sl_sapos_models_people_Staff" items="${endGrant}" emptyLabels="true" z="user-managed">
<table:table data="${endGrant}" id="l_br_ufpr_c3sl_sapos_models_scholar_StudentGrant" path="/studentgrants" create="false" z="user-managed">
<table:column id="c_br_ufpr_c3sl_sapos_models_people_Person_name" property="registration.student.name" z="user-managed" navigation="true"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_startDate" property="startDate" z="m3Es7QJrs3CN06km6IRmGRPHdXQ="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_endDate" property="endDate" z="m3Es7QJrs3CN06km6IRmGRPHdXQ="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_grantKind" property="grantKind" z="user-managed" navigation="true"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" property="registration.regKind" z="user-managed" navigation="true"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_observations" property="observations" z="WEPso84QxyU3N5DS52XaN68pVRc="/>
</table:table>
</page:list>
<br/><br/>
<b>Avaliações do semestre anterior com notas não preenchidas</b>
<page:list id="pl_br_ufpr_c3sl_sapos_models_scholar_Transcript" items="${gradeEmpty}" emptyLabels="true" z="XkBEOi8+LWqvFKK06b3mq90KI1U=">
<table:table data="${gradeEmpty}" id="l_br_ufpr_c3sl_sapos_models_scholar_Transcript" path="/transcripts" create="false" z="57/qLH4Y2mwQJG9RQk+tGXo2kpw=">
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_student" navigation="true" property="student.student.name" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" navigation="true" property="student.regKind" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_transcriptSection" navigation="true" property="transcriptSection.course.name" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Course_code" navigation="true" property="transcriptSection.course.code" z="9ecOZUPR3CIVL2XOtG9aRmLJzn4="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_concept" property="concept" z="BXtOb5eNDgQ2EdjEiJ8bBaXfZ0A=" nullvalue="Nulo"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_grade" property="grade" z="clivGE2OFc6Wld+CLitF/sAXddU="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_frequency" property="frequency" z="rLQfQM3aCKOI9biFAIRRtKNmVKs="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Transcript_situation" property="situation" z="iq+rXnC/oF96+jdqVt0v2XQMzZw=" nullvalue="Nulo"/>
</table:table>
</page:list>
</div>
......@@ -29,6 +29,7 @@
<menu:item id="i_registration_list" messageCode="global_menu_candidates_to_grant" url="/registrations/candidatestogrant" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_blank_proposal" url="/registrations/openproposaldate" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_entrants_data" url="/registrations/entrantsdata" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_concluded_by_period" url="/registrations/concludedbyperiod" z="user-managed"/>
</menu:category>
<menu:category id="c_transcript" z="a8v3h7EFS5CVeUqTWiTRDpYXXJg=">
<menu:item id="i_transcript_new" messageCode="global_menu_new" url="/transcripts?form" z="jWr28guoRI7FAdrnFd1qpcAYEGQ="/>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<div xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields" xmlns:form="urn:jsptagdir:/WEB-INF/tags/form" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:spring="http://www.springframework.org/tags" version="2.0">
<jsp:output omit-xml-declaration="yes"/>
<b>Concluidos por período</b>
<p></p>
<form name="concludedByPeriod" action="concludedbyperiodlist" method="get">
<field:datetime dateTimePattern="${studentGrant_startdate_date_format}" field="startDate" id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_startDate" z="user-managed" disableFormBinding="true"/>
<field:datetime dateTimePattern="${studentGrant_enddate_date_format}" field="endDate" id="c_br_ufpr_c3sl_sapos_models_scholar_StudentGrant_endDate" z="user-managed" disableFormBinding="true"/>
<input type="submit" value="Enviar" />
</form>
<form:dependency dependencies="${dependencies}" id="d_br_ufpr_c3sl_sapos_models_people_Student" render="${not empty dependencies}" z="gW+juyJp3mRm7nWlqYbCfkbtYVo="/>
</div>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<div xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:page="urn:jsptagdir:/WEB-INF/tags/form" xmlns:table="urn:jsptagdir:/WEB-INF/tags/form/fields" version="2.0">
<jsp:output omit-xml-declaration="yes"/>
<page:list id="pl_br_ufpr_c3sl_sapos_models_people_Student" items="${registrations}" z="x61ty86TOZ+JTCqaf5YvH3Kj2sA=">
<table:table data="${registrations}" id="l_br_ufpr_c3sl_sapos_models_scholar_Registration" path="/registrations" z="izP/twCuZG4G9mcJpiGRcM1CmLU=">
<table:column id="c_br_ufpr_c3sl_sapos_models_people_Person_name" property="student.name" z="user-managed" navigation="true"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_people_Person_cpf" property="student.cpf" z="user-managed" navigation="true"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_people_Person_userName" property="student.userName" z="user-managed" navigation="true"/>
</table:table>
</page:list>
</div>
......@@ -56,4 +56,12 @@
value="/WEB-INF/views/registrations/entrantsdata.jspx" />
</definition>
<definition extends="default" name="registrations/liststudentsbasicinfo">
<put-attribute name="body" value="/WEB-INF/views/registrations/liststudentsbasicinfo.jspx" />
</definition>
<definition extends="default" name="registrations/concludedbyperiod">
<put-attribute name="body" value="/WEB-INF/views/registrations/concludedbyperiod.jspx" />
</definition>
</tiles-definitions>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment