Rev 1926 | Rev 1994 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1926 | Rev 1984 | ||
---|---|---|---|
Line 505... | Line 505... | ||
505 | return reportDocument.toJson(); |
505 | return reportDocument.toJson(); |
506 | } |
506 | } |
507 | 507 | ||
508 | /* Ler o relatorio */ |
508 | /* Ler o relatorio */ |
509 | 509 | ||
510 | public 1.5.0/docs/api/java/lang/String.html">String loadCourseReportDoc(UserSession session, 1.5.0/docs/api/java/lang/String.html">String year, 1.5.0/docs/api/java/lang/String.html">String courseCode) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
510 | public 1.5.0/docs/api/java/lang/String.html">String loadCourseReportDoc(/*UserSession session, */1.5.0/docs/api/java/lang/String.html">String year, 1.5.0/docs/api/java/lang/String.html">String courseCode) throws 1.5.0/docs/api/java/io/IOException.html">IOException { |
511 | 511 | ||
512 | List<CourseYear> courseYr = DaoFactory.getCourseYearDaoImpl().findCourseYear(courseCode, year); |
512 | List<CourseYear> courseYr = DaoFactory.getCourseYearDaoImpl().findCourseYear(courseCode, year); |
513 | 513 | ||
514 | 1.5.0/docs/api/java/lang/String.html">String courseReport = null; |
514 | 1.5.0/docs/api/java/lang/String.html">String courseReport = null; |
515 | if(!courseYr.isEmpty()){ |
515 | if(!courseYr.isEmpty()){ |
516 | courseReport = courseYr.get(0).getCourseReportDocument(); |
516 | courseReport = courseYr.get(0).getCourseReportDocument(); |
517 | } |
517 | } |
518 | 518 | ||
519 | if(courseReport == null){ |
519 | if(courseReport == null){ |
520 | CourseReportDocument report = null; |
- | |
521 | try{ |
520 | try{ |
522 | report = new CourseReportServices().createNewCourseReportDocument(courseCode, year); |
521 | courseReport = new CourseReportServices().createNewCourseReportDocument(courseCode, year).toJson(); |
523 | courseReport = report.toJson(); |
522 | /*saveCourseReportDoc(courseReport, session);*/ |
- | 523 | ||
524 | } catch (JSONException e) { |
524 | } catch (JSONException e) { |
525 | e.printStackTrace(); |
525 | e.printStackTrace(); |
526 | } |
526 | } |
527 | } |
527 | } |
528 | 528 |