You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.8 KiB
57 lines
1.8 KiB
2 years ago
|
/*
|
||
|
* Copyright (C), 2018-2022
|
||
|
* Project: starter11
|
||
|
* FileName: ReportWriteService
|
||
|
* Author:
|
||
|
* Date: 2022/9/13 12:08
|
||
|
*/
|
||
|
package com.fr.plugin.ajhig.service;
|
||
|
|
||
|
import com.fanruan.api.i18n.I18nKit;
|
||
|
import com.fr.decision.system.session.TimeoutDefaultSessionException;
|
||
|
import com.fr.intelli.record.Focus;
|
||
|
import com.fr.intelli.record.Original;
|
||
|
import com.fr.plugin.context.PluginContexts;
|
||
|
import com.fr.stable.fun.Authorize;
|
||
|
import com.fr.stable.fun.Service;
|
||
|
import com.fr.web.core.*;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
||
|
import static com.fr.plugin.ajhig.provider.LocaleFinder.PLUGIN_ID;
|
||
|
|
||
|
/**
|
||
|
* <Function Description><br>
|
||
|
* <ReportWriteService>
|
||
|
*
|
||
|
* @author
|
||
|
* @since 1.0.0
|
||
|
*/
|
||
|
@Authorize(callSignKey = PLUGIN_ID)
|
||
|
public class ReportWriteService implements Service {
|
||
|
|
||
|
private static final ActionCMD[] actions = {
|
||
|
new ImpWCSVAction()
|
||
|
};
|
||
|
|
||
|
@Override
|
||
|
public String actionOP() {
|
||
|
return "ajhig_write";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
@Focus(id = PLUGIN_ID, text = "Plugin-ajhig", source = Original.PLUGIN)
|
||
|
public void process(HttpServletRequest request, HttpServletResponse response, String op, String sessionID) throws Exception {
|
||
|
ReportSessionIDInfor sessionIDInfor = SessionPoolManager.getSessionIDInfor(sessionID, ReportSessionIDInfor.class);
|
||
|
if (sessionIDInfor == null) {
|
||
|
throw new TimeoutDefaultSessionException();
|
||
|
}
|
||
|
if (PluginContexts.currentContext() == null || !PluginContexts.currentContext().isAvailable()) {
|
||
|
ErrorHandlerHelper.getErrorHandler().error(request, response, I18nKit.getLocText("Plugin-ajhig_Licence_Expired"));
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
WebActionsDispatcher.dealForActionCMD(request, response, sessionID, actions);
|
||
|
}
|
||
|
}
|