use of edu.cornell.kfs.concur.batch.report.ConcurBatchReportLineValidationErrorItem in project cu-kfs by CU-CommunityApps.
the class ConcurRequestExtractReportServiceImpl method writeValidationErrorSubReport.
protected void writeValidationErrorSubReport(ConcurRequestExtractBatchReportData reportData) {
LOG.debug("writeValidationErrorSubReport, entered");
String rowFormat = "%-24s %-24s %-36s %-36s %-14s";
String hdrRowFormat = "%-24s %-24s %-36s %-36s %-14s";
Object[] headerArgs = { "Report ID", "Employee ID", "Last Name", "First Name", "Middle Initial" };
Object[] headerBreak = { "---------", "-----------", "---------", "----------", "--------------" };
if (CollectionUtils.isEmpty(reportData.getValidationErrorFileLines())) {
getReportWriterService().setNewPage(false);
getReportWriterService().writeSubTitle(getReportValidationErrorsSubTitle());
getReportWriterService().writeNewLines(1);
getReportWriterService().writeFormattedMessageLine(ConcurConstants.RequestExtractReport.NO_RECORDS_WITH_VALIDATION_ERRORS_MESSAGE);
} else {
getReportWriterService().writeSubTitle(getReportValidationErrorsSubTitle());
getReportWriterService().writeNewLines(1);
getReportWriterService().writeFormattedMessageLine(hdrRowFormat, headerBreak);
getReportWriterService().writeFormattedMessageLine(hdrRowFormat, headerArgs);
getReportWriterService().writeFormattedMessageLine(hdrRowFormat, headerBreak);
for (ConcurBatchReportLineValidationErrorItem errorItem : reportData.getValidationErrorFileLines()) {
getReportWriterService().writeFormattedMessageLine(rowFormat, errorItem.getReportId(), errorItem.getEmployeeId(), errorItem.getLastName(), errorItem.getFirstName(), errorItem.getMiddleInitial());
getReportWriterService().writeNewLines(1);
writeErrorItemMessages(errorItem.getItemErrorResults());
getReportWriterService().writeNewLines(2);
}
}
}
use of edu.cornell.kfs.concur.batch.report.ConcurBatchReportLineValidationErrorItem in project cu-kfs by CU-CommunityApps.
the class ConcurCashAdvancePdpFeedFileServiceImpl method updateReportDataWithFileLineValidationError.
private void updateReportDataWithFileLineValidationError(ConcurRequestExtractBatchReportData reportData, ConcurRequestExtractRequestDetailFileLine detailFileLine) {
ConcurBatchReportLineValidationErrorItem errorDetails = new ConcurBatchReportLineValidationErrorItem(detailFileLine.getRequestId(), detailFileLine.getEmployeeId(), detailFileLine.getLastName(), detailFileLine.getFirstName(), detailFileLine.getMiddleInitial(), detailFileLine.getValidationResult().getMessages());
reportData.getValidationErrorFileLines().add(errorDetails);
}
use of edu.cornell.kfs.concur.batch.report.ConcurBatchReportLineValidationErrorItem in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractCollectorBatchBuilder method reportUnprocessedLine.
protected void reportUnprocessedLine(ConcurStandardAccountingExtractDetailLine saeLine, String errorMessage) {
ConcurBatchReportLineValidationErrorItem errorItem = new ConcurBatchReportLineValidationErrorItem(saeLine, errorMessage);
reportData.addValidationErrorFileLine(errorItem);
}
use of edu.cornell.kfs.concur.batch.report.ConcurBatchReportLineValidationErrorItem in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractValidationServiceImpl method validateAccountingLine.
private boolean validateAccountingLine(ConcurStandardAccountingExtractDetailLine line, ConcurStandardAccountingExtractBatchReportData reportData) {
if (!getConcurStandardAccountingExtractCashAdvanceService().isCashAdvanceLine(line)) {
ConcurAccountInfo accountingInformation = buildConcurAccountingInformation(line);
ValidationResult validationResults = buildValidationResult(accountingInformation, false);
if (validationResults.isNotValid()) {
reportData.addValidationErrorFileLine(new ConcurBatchReportLineValidationErrorItem(line, validationResults.getMessages()));
}
return validationResults.isValid();
} else {
LOG.debug("validateAccountingLine, found a cash advance line, no need to validate");
return true;
}
}
use of edu.cornell.kfs.concur.batch.report.ConcurBatchReportLineValidationErrorItem in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractValidationServiceImpl method validateAddressIfCheckPayment.
private boolean validateAddressIfCheckPayment(ConcurStandardAccountingExtractDetailLine line, ConcurStandardAccountingExtractBatchReportData reportData) {
boolean valid = true;
String validationMessage = getConcurEmployeeInfoValidationService().getAddressValidationMessageIfCheckPayment(line.getEmployeeId());
if (StringUtils.isNotBlank(validationMessage)) {
valid = false;
reportData.addValidationErrorFileLine(new ConcurBatchReportLineValidationErrorItem(line, validationMessage));
}
return valid;
}
Aggregations