コード例 #1
0
  @Override
  public String execute() throws Exception {
    statementManager.initialise();

    selectedPeriod = PeriodType.createPeriodExternalId(selectionManager.getSelectedPeriodIndex());

    this.installPeriod();

    List<ExportReport> reports = new ArrayList<ExportReport>();

    for (String id : selectionManager.getListObject()) {
      reports.add(exportReportService.getExportReport(Integer.parseInt(id)));
    }

    resetDecimalFormatByLocale(Locale.GERMAN);
    applyPatternDecimalFormat(PATTERN_DECIMAL_FORMAT1);

    executeGenerateOutputFile(reports);

    this.complete();

    statementManager.destroy();

    return SUCCESS;
  }
コード例 #2
0
  public String execute() {
    DataElement dataElement = dataElementService.getDataElement(dataElementId);
    DataElementCategoryOptionCombo categoryOptionCombo =
        categoryService.getDataElementCategoryOptionCombo(categoryOptionComboId);
    Period period = PeriodType.createPeriodExternalId(periodId);
    OrganisationUnit source = organisationUnitService.getOrganisationUnit(organisationUnitId);

    DataValue dataValue =
        dataValueService.getDataValue(source, dataElement, period, categoryOptionCombo);

    boolean isMarked = dataValue.isFollowup();

    dataValue.setFollowup(!isMarked);

    dataValueService.updateDataValue(dataValue);

    message = !isMarked ? "marked" : "unmarked";

    log.info(!isMarked ? "Data value marked for follow-up" : "Data value unmarked for follow-up");

    return SUCCESS;
  }