_Entrance__jsp.java 11.9 KB
/*
 * JSP generated by Resin-4.0.58 (built Fri, 24 Aug 2018 01:23:14 PDT)
 */

package _jsp._interface;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import weaver.general.Util;
import weaver.integration.entrance.bean.OutterLoginBean;
import weaver.integration.entrance.service.EntranceService;
import weaver.integration.entrance.service.IOutterSysServer;
import weaver.integration.entrance.service.OutterSysServer;
import weaver.integration.entrance.service.permission.IPermissionService;
import weaver.integration.entrance.service.permission.PermissionService;
import weaver.integration.entrance.utils.StringUtils;
import weaver.integration.entrance.exceptions.OtherParamsEncryptException;
import weaver.integration.entrance.exceptions.AccountOrPasswordEncryptException;
import weaver.integration.logging.LoggerFactory;
import weaver.integration.logging.Logger;
import com.alibaba.fastjson.JSONObject;
import weaver.hrm.User;
import weaver.hrm.HrmUserVarify;
import java.util.Map;
import java.util.HashMap;
import weaver.systeminfo.SystemEnv;
import java.util.Objects;

public class _Entrance__jsp extends com.caucho.jsp.JavaPage
{
  private static final java.util.HashMap<String,java.lang.reflect.Method> _jsp_functionMap = new java.util.HashMap<String,java.lang.reflect.Method>();
  private boolean _caucho_isDead;
  private boolean _caucho_isNotModified;
  private com.caucho.jsp.PageManager _jsp_pageManager;
  
  public void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response)
    throws java.io.IOException, javax.servlet.ServletException
  {
    javax.servlet.http.HttpSession session = request.getSession(true);
    com.caucho.server.webapp.WebApp _jsp_application = _caucho_getApplication();
    com.caucho.jsp.PageContextImpl pageContext = _jsp_pageManager.allocatePageContext(this, _jsp_application, request, response, null, session, 8192, true, false);

    TagState _jsp_state = null;

    try {
      _jspService(request, response, pageContext, _jsp_application, session, _jsp_state);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      _jsp_pageManager.freePageContext(pageContext);
    }
  }
  
  private void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response,
              com.caucho.jsp.PageContextImpl pageContext,
              javax.servlet.ServletContext application,
              javax.servlet.http.HttpSession session,
              TagState _jsp_state)
    throws Throwable
  {
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    final javax.el.ELContext _jsp_env = pageContext.getELContext();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    javax.servlet.jsp.tagext.JspTag _jsp_parent_tag = null;
    com.caucho.jsp.PageContextImpl _jsp_parentContext = pageContext;
    response.setContentType("text/html;charset=UTF-8");

    out.write(_jsp_string0, 0, _jsp_string0.length);
    weaver.conn.RecordSet rs;
    rs = (weaver.conn.RecordSet) pageContext.getAttribute("rs");
    if (rs == null) {
      rs = new weaver.conn.RecordSet();
      pageContext.setAttribute("rs", rs);
    }
    out.write(_jsp_string1, 0, _jsp_string1.length);
    weaver.conn.RecordSet RecordSet;
    RecordSet = (weaver.conn.RecordSet) pageContext.getAttribute("RecordSet");
    if (RecordSet == null) {
      RecordSet = new weaver.conn.RecordSet();
      pageContext.setAttribute("RecordSet", RecordSet);
    }
    out.write(_jsp_string1, 0, _jsp_string1.length);
    weaver.conn.RecordSet RecordSet1;
    RecordSet1 = (weaver.conn.RecordSet) pageContext.getAttribute("RecordSet1");
    if (RecordSet1 == null) {
      RecordSet1 = new weaver.conn.RecordSet();
      pageContext.setAttribute("RecordSet1", RecordSet1);
    }
    out.write(_jsp_string2, 0, _jsp_string2.length);
    

    Logger logger = LoggerFactory.getLogger();


    User user = HrmUserVarify.getUser(request,response);

    IPermissionService permissionService=new PermissionService();
    String operationType = permissionService.getOperationType(request);

    String sysid = Util.null2String(request.getParameter("id"));// \u7cfb\u7edf\u6807\u8bc6

    logger.info("sysid=========================" + sysid);
    logger.info("operationType=========================" + operationType);

    if ("".equals(operationType)) {
        // \u6743\u9650\u5224\u65ad
        // \u5f97\u5230\u6709\u6743\u9650\u67e5\u770b\u7684\u96c6\u6210\u767b\u5f55
        String access = permissionService.isAccess(sysid, request, response);
        if (!StringUtils.isBlank(access)){
            response.sendRedirect(access);
            return;
        }
    }

    EntranceService entranceService = new EntranceService();
    IOutterSysServer   outterSysServer = new OutterSysServer();
    OutterLoginBean loginBean = null;
    Map<String, Object> map = new HashMap<String, Object>();
    try {
        loginBean = entranceService.getLoginBean(outterSysServer, sysid, operationType, request, response);
        map = entranceService.getUrl(outterSysServer, loginBean, operationType, request, response);
        logger.info("map=========================" + JSONObject.toJSONString(map));
    } catch (ClassNotFoundException e) {
        
    out.write(_jsp_string3, 0, _jsp_string3.length);
    out.print(( SystemEnv.getHtmlLabelNames("508601",user.getLanguage()) ));
    out.write(_jsp_string4, 0, _jsp_string4.length);
    
    }catch (NoSuchMethodException e){
        e.printStackTrace();
        
    out.write(_jsp_string3, 0, _jsp_string3.length);
    out.print(( SystemEnv.getHtmlLabelNames("508602",user.getLanguage()) ));
    out.write(_jsp_string4, 0, _jsp_string4.length);
    
    }catch (IllegalAccessException e){
        
    out.write(_jsp_string3, 0, _jsp_string3.length);
    out.print((SystemEnv.getHtmlLabelNames("508603",user.getLanguage()) ));
    out.write(_jsp_string4, 0, _jsp_string4.length);
    
    }catch (InstantiationException e){
        
    out.write(_jsp_string3, 0, _jsp_string3.length);
    out.print(( SystemEnv.getHtmlLabelNames("508604",user.getLanguage())));
    out.write(_jsp_string4, 0, _jsp_string4.length);
    
    }catch (NoClassDefFoundError e){
        
    out.write(_jsp_string3, 0, _jsp_string3.length);
    out.print(( SystemEnv.getHtmlLabelNames("508605",user.getLanguage())));
    out.write(_jsp_string4, 0, _jsp_string4.length);
    
    }catch (OtherParamsEncryptException e) {
        
    out.write(_jsp_string3, 0, _jsp_string3.length);
    out.print(( SystemEnv.getHtmlLabelNames("508614",user.getLanguage())));
    out.write(_jsp_string4, 0, _jsp_string4.length);
    

    } catch (AccountOrPasswordEncryptException e) {
        
    out.write(_jsp_string3, 0, _jsp_string3.length);
    out.print(( SystemEnv.getHtmlLabelNames("508615",user.getLanguage())));
    out.write(_jsp_string4, 0, _jsp_string4.length);
    
    }catch (Exception e){
        
    out.write(_jsp_string5, 0, _jsp_string5.length);
    
    }

    if (Objects.nonNull(map)){
        if (map.get("isError")!= null&&"true".equals(map.get("isError"))){
            
    out.write(_jsp_string6, 0, _jsp_string6.length);
    out.print(( map.get("errorMsg") ));
    out.write(_jsp_string7, 0, _jsp_string7.length);
    
            return;
        }
        if (map.get("isRedirect")!=null && "true".equals(map.get("isRedirect"))){
            response.sendRedirect(map.get("redirectUrl").toString());
            return;
        }
        if (map.get("isRedirect")!=null && "false".equals(map.get("isRedirect"))){
            out.println(map.get("redirectUrl").toString());
            return;
        }
    }else {
        logger.error("map is null ====================================================");
    }


    out.write(_jsp_string8, 0, _jsp_string8.length);
  }

  private com.caucho.make.DependencyContainer _caucho_depends
    = new com.caucho.make.DependencyContainer();

  public java.util.ArrayList<com.caucho.vfs.Dependency> _caucho_getDependList()
  {
    return _caucho_depends.getDependencies();
  }

  public void _caucho_addDepend(com.caucho.vfs.PersistentDependency depend)
  {
    super._caucho_addDepend(depend);
    _caucho_depends.add(depend);
  }

  protected void _caucho_setNeverModified(boolean isNotModified)
  {
    _caucho_isNotModified = true;
  }

  public boolean _caucho_isModified()
  {
    if (_caucho_isDead)
      return true;

    if (_caucho_isNotModified)
      return false;

    if (com.caucho.server.util.CauchoSystem.getVersionId() != 6165118203484593848L)
      return true;

    return _caucho_depends.isModified();
  }

  public long _caucho_lastModified()
  {
    return 0;
  }

  public void destroy()
  {
      _caucho_isDead = true;
      super.destroy();
    TagState tagState;
  }

  public void init(com.caucho.vfs.Path appDir)
    throws javax.servlet.ServletException
  {
    com.caucho.vfs.Path resinHome = com.caucho.server.util.CauchoSystem.getResinHome();
    com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
    mergePath.addMergePath(appDir);
    mergePath.addMergePath(resinHome);
    com.caucho.loader.DynamicClassLoader loader;
    loader = (com.caucho.loader.DynamicClassLoader) getClass().getClassLoader();
    String resourcePath = loader.getResourcePathSpecificFirst();
    mergePath.addClassPath(resourcePath);
    com.caucho.vfs.Depend depend;
    depend = new com.caucho.vfs.Depend(appDir.lookup("interface/Entrance.jsp"), -1553480293015339322L, false);
    _caucho_depends.add(depend);
    loader.addDependency(depend);
  }

  final static class TagState {

    void release()
    {
    }
  }

  public java.util.HashMap<String,java.lang.reflect.Method> _caucho_getFunctionMap()
  {
    return _jsp_functionMap;
  }

  public void caucho_init(ServletConfig config)
  {
    try {
      com.caucho.server.webapp.WebApp webApp
        = (com.caucho.server.webapp.WebApp) config.getServletContext();
      init(config);
      if (com.caucho.jsp.JspManager.getCheckInterval() >= 0)
        _caucho_depends.setCheckInterval(com.caucho.jsp.JspManager.getCheckInterval());
      _jsp_pageManager = webApp.getJspApplicationContext().getPageManager();
      com.caucho.jsp.TaglibManager manager = webApp.getJspApplicationContext().getTaglibManager();
      com.caucho.jsp.PageContextImpl pageContext = new com.caucho.jsp.InitPageContextImpl(webApp, this);
    } catch (Exception e) {
      throw com.caucho.config.ConfigException.create(e);
    }
  }

  private final static char []_jsp_string7;
  private final static char []_jsp_string6;
  private final static char []_jsp_string3;
  private final static char []_jsp_string4;
  private final static char []_jsp_string8;
  private final static char []_jsp_string1;
  private final static char []_jsp_string0;
  private final static char []_jsp_string5;
  private final static char []_jsp_string2;
  static {
    _jsp_string7 = "\", function () {\r\n                        window.close();\r\n                    }, 420, 130);\r\n                </script>\r\n            ".toCharArray();
    _jsp_string6 = "\r\n                <script language=javascript>\r\n                    top.Dialog.alert(\"".toCharArray();
    _jsp_string3 = "\r\n        <script language=javascript>\r\n            top.Dialog.alert(\"".toCharArray();
    _jsp_string4 = "\", function () {\r\n                window.close();\r\n            }, 420, 130);\r\n        </script>\r\n        ".toCharArray();
    _jsp_string8 = "\r\n\r\n\r\n\r\n\r\n\r\n".toCharArray();
    _jsp_string1 = "\r\n".toCharArray();
    _jsp_string0 = "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n".toCharArray();
    _jsp_string5 = "\r\n        <script language=javascript>\r\n            top.Dialog.alert(\"\u7cfb\u7edf\u5f02\u5e38\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\", function () {\r\n                window.close();\r\n            }, 420, 130);\r\n        </script>\r\n        ".toCharArray();
    _jsp_string2 = "\r\n\r\n".toCharArray();
  }
}