Commit 78962761 authored by Fabiano Sluzarski's avatar Fabiano Sluzarski

Maven update, ResearchGroup class created, Subscription class created,

subscription not finished, added advisees statement to search the
defense date with start year and end year and on the report of advisees
statement added column defense date for concluded students.
parent ed75892e
......@@ -3,7 +3,7 @@
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
......
File mode changed from 100644 to 100755
......@@ -31,7 +31,7 @@
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
......@@ -39,12 +39,12 @@
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.ajdt.ui.ajnature</nature>
<nature>com.springsource.sts.roo.core.nature</nature>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
log 100644 → 100755
File mode changed from 100644 to 100755
......@@ -62,7 +62,12 @@
</pluginRepositories>
<dependencies>
<!-- General dependencies for standard applications -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<artifactId>solr-solrj</artifactId>
<groupId>org.apache.solr</groupId>
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -83,7 +83,7 @@ public class Professor extends Person {
int todayYear = ReportUtil.getTodayDate().get(Calendar.YEAR);
PdfPTable table = null;
if (status.equals("Ativa")) {
if (status.equals("Ativa") || status.equals("Concluida")) {
float[] colsWidth = {3f, 1f};
table = new PdfPTable(colsWidth);
}
......@@ -135,6 +135,14 @@ public class Professor extends Person {
document.add(Chunk.NEWLINE);
document.add(new Paragraph(""));
if (status.equals("Concluida")) {
PdfPCell cell = new PdfPCell(new Paragraph("Nome do(a) Aluno(a)", ReportUtil.getTableTitleTextFont()));
table.addCell(cell);
cell = new PdfPCell(new Paragraph("Data de Defesa", ReportUtil.getTableTitleTextFont()));
table.addCell(cell);
}
for (Registration r: l) {
PdfPCell cell = new PdfPCell(new Paragraph(r.getStudent().getName(), ReportUtil.getTableTextFont()));
table.addCell(cell);
......@@ -149,6 +157,13 @@ public class Professor extends Person {
}
table.addCell(cell);
}
else if (status.equals("Concluida")) {
Calendar c = ReportUtil.convertDateToCalendar(r.getDefenseDate());
int month = c.get(Calendar.MONTH) + 1;
String date = c.get(Calendar.DAY_OF_MONTH) + "/" + month + "/" + c.get(Calendar.YEAR);
cell = new PdfPCell(new Paragraph(date, ReportUtil.getTableTextFont()));
table.addCell(cell);
}
}
document.add(table);
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -154,6 +154,19 @@ public class Registration {
" and advisor = "+advisor+" order by start_date DESC" , Registration.class).getResultList();
}
public static Object findRegistrationsPerAdvisorAndYear(String advisor, String regKind, String regStatus, String startYear, String endYear) {
String sql = "";
if (!startYear.isEmpty())
sql = sql + " and (extract (year from defense_date) > " + startYear + " or extract (year from defense_date) = " + startYear + ")";
if (!endYear.isEmpty())
sql = sql + " and (extract (year from defense_date) < " + endYear + " or extract (year from defense_date) = " + endYear + ")";
return entityManager().createNativeQuery(
"SELECT * FROM registration r where "+
" reg_status = '" + regStatus + "'"+
" and reg_kind = '" + regKind + "'"+
" and advisor = " + advisor + sql + " order by start_date DESC" , Registration.class).getResultList();
}
public static Collection<Registration> findAllActiveRegistrations() {
return entityManager().createNativeQuery(
"SELECT * FROM registration r, person p where "+
......
......@@ -3,7 +3,9 @@ package br.ufpr.c3sl.sapos.models.scholar;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotNull;
import org.springframework.roo.addon.entity.RooEntity;
......@@ -24,6 +26,9 @@ public class ResearchField {
@ManyToMany (mappedBy = "researchFields")
private Set<Person> people = new HashSet<Person>();
@OneToMany(cascade = CascadeType.ALL, mappedBy = "researchField")
private Set<ResearchGroup> researchGroups = new HashSet<ResearchGroup>();
}
......@@ -3,10 +3,10 @@
package br.ufpr.c3sl.sapos.models.scholar;
import br.ufpr.c3sl.sapos.models.people.Person;
import java.lang.String;
import java.util.Set;
import br.ufpr.c3sl.sapos.models.people.Person;
privileged aspect ResearchField_Roo_JavaBean {
public String ResearchField.getName() {
......@@ -33,4 +33,12 @@ privileged aspect ResearchField_Roo_JavaBean {
this.people = people;
}
public java.util.Set<ResearchGroup> ResearchField.getResearchGroups() {
return this.researchGroups;
}
public void ResearchField.setResearchGroups(java.util.Set<ResearchGroup> researchGroups) {
this.researchGroups = researchGroups;
}
}
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
This diff is collapsed.
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
This diff is collapsed.
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
This diff is collapsed.
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755