refactoring: новый энут для определения типа отчета
This commit is contained in:
parent
d1378a4cf4
commit
db8fd60495
2 changed files with 29 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ import ru.spcex.clearing.reports.reports.*;
|
|||
import ru.spcex.clearing.util.security.UserRoleVerification;
|
||||
import ru.spcex.clearing.validation.common.ValidationHelper;
|
||||
import ru.spcex.platform.enumeration.ReportBuilderType;
|
||||
import ru.spcex.platform.enumeration.ReportType;
|
||||
import ru.spcex.platform.enumeration.Task;
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
|
@ -305,7 +306,7 @@ public class ReportService extends QueueConsumer implements InitializingBean {
|
|||
Long sessionId = userRequest.getRequestPayload().getSessionId();
|
||||
Map<String, ReportBuilderType> outFilenames = createReportsForTask(sessionId, reportBuildersForGREP.values());
|
||||
|
||||
sendReportsToGateway(sessionId, outFilenames, "REPORT_KS_TMP");
|
||||
sendReportsToGateway(sessionId, outFilenames, ReportType.REPORT_KS_TMP.getKey());
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package ru.spcex.platform.enumeration;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
/**
|
||||
* Идентификатор отчета
|
||||
* todo сделать для них dictionary
|
||||
*/
|
||||
public enum ReportType implements IEnumKey {
|
||||
PFX64("PFX64"),
|
||||
PFX65("PFX65"),
|
||||
REPORT_KS_TMP("REPORT_KS_TMP"),
|
||||
REPORT_KS_FINAL("REPORT_KS_FINAL"),
|
||||
;
|
||||
|
||||
private final String key;
|
||||
|
||||
ReportType(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue