⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userbean.java

📁 以前做的一个j2ee的项目
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package gov.gdlt.ssgly.taxweb.mbean;

import java.math.BigDecimal;
import java.util.*;

import javax.faces.context.FacesContext;

import gov.gdlt.ssgly.taxcore.comm.bizdelegate.SsglyDelegate;
import gov.gdlt.ssgly.taxcore.comm.bizinterface.ISsglyService;
import gov.gdlt.ssgly.taxcore.comm.event.ResponseEvent;
import gov.gdlt.ssgly.taxcore.taxevent.flgl.*;
import gov.gdlt.ssgly.taxcore.taxevent.qxgl.*;
import gov.gdlt.ssgly.taxcore.taxevent.rwgl.*;
import gov.gdlt.ssgly.taxcore.taxevent.xxts.*;
import gov.gdlt.ssgly.taxweb.comm.util.WebUtil;
import gov.gdlt.ssgly.taxweb.mbean.qxgl.NodeValueObject;
import gov.gdlt.ssgly.taxweb.mbean.qxgl.TreeHelper;

/**
 * A session bean used for storage of user info during a session,
 * should be the only one session bean in the system.
 *
 * <p>Title: UserBean</p>
 * <p>Description: 税收管理员系统</p>
 * <p>Copyright: Copyright (c) 2005 广州市地方税务局</p>
 * <p>Company: 信息中心</p>
 * @author Lemon
 * @version 1.0
 * @since 2005.8.10.
 *
 * 加入分类信息
 * @author zyh
 * @since 2005.8.19
 *
 * 加入用户权限和用户名称信息
 * @author hjc
 * @since 2005.9.13
 */

public class UserBean {
    private String userID = "24401142201";
    private String password;
    private ArrayList flxxList; //存放所有分类列表
    //private boolean hasYjjl=false; //是否有预警记录标记(只记录当前分类的情况)
    private String userName;
    private ArrayList menuTreeNodeList; //存放该用户可以看到的功能菜单树列表
    private ArrayList taskMenuList; //存放该用户可以看到的任务菜单列表
    private String gxh; //存放个性化路径
    private BigDecimal nsrCount = new BigDecimal(0); //管户数
    private String jktcxtj; //监控台查询条件
    private BigDecimal curFl_xh; //当前分类序号
    private String curFl_mc; //当前分类名称
    private BigDecimal curFl_idx; //当前分类所处排位
    private String wcsqMessageScript = "";
    private String sessionId = null;
    private String swjgDm;
    private String swjgMc;
    private int tipsTime = 0;
    private String outputStr = ""; //输出串,用于作为执行某个方法时的返回消息

    public UserBean() {
    }

    public String getUserID() {
        return userID;
    }

    public void setJktcxtj(String jktcxtj) {
        this.jktcxtj = jktcxtj;
    }

    public String getJktcxtj() {
        return jktcxtj;
    }

    public void setUserID(String userID) {
        this.userID = userID;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setFlxxList(ArrayList flxxList) {
        this.flxxList = flxxList;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setGxh(String gxh) {
        this.gxh = gxh;
    }

    public void setNsrCount(BigDecimal nsrCount) {
        this.nsrCount = nsrCount;
    }

    public void setCurFl_xh(BigDecimal curFl_xh) {
        this.curFl_xh = curFl_xh;
    }

    public void setCurFl_mc(String curFl_mc) {
        this.curFl_mc = curFl_mc;
    }

    public void setCurFl_idx(BigDecimal curFl_idx) {
        this.curFl_idx = curFl_idx;
    }

    public void setWcsqMessageScript(String wcsqMessageScript) {
        this.wcsqMessageScript = wcsqMessageScript;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    } //    public void setHasYjjl(boolean hasYjjl) {

    public void setOutputStr(String outputStr) {
        this.outputStr = outputStr;
    } //    }

    public ArrayList getFlxxList() {
        return flxxList;
    }

    public String getUserName() {
        return userName;
    }

    public ArrayList getMenuTreeNodeList() {
        return menuTreeNodeList;
    }

    public String getGxh() {
//       FacesContext context = FacesContext.getCurrentInstance();
//       Map session = context.getExternalContext().getSessionMap();
//       gxh= (String)session.get("CSS_PATH")==null?"skin1":(String)session.get("CSS_PATH");
        return gxh;
    }

    public void getSkinFormOrcal() {
        if (this.userID == null || "".equals(this.userID)) {
            return;
        }

        QXGLuserReqEvent req = new QXGLuserReqEvent();
        req.setSwryDm(this.userID);
        req.setDealMethod("getSwryInfoByDm");
        try {
            ISsglyService service = new SsglyDelegate();
            ResponseEvent resp = service.invokeTask(req);

            QXGLuserResEvent resEvent = (QXGLuserResEvent) resp;
            ArrayList swryList = resEvent.getSwryVOList();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public BigDecimal getNsrCount() {
        return nsrCount;
    }

    public ArrayList getTaskMenuList() {
        return taskMenuList;
    }

    public BigDecimal getCurFl_xh() {
        return curFl_xh;
    }

    public String getCurFl_mc() {
        return curFl_mc;
    }

    public BigDecimal getCurFl_idx() {
        return curFl_idx;
    }

    public String getWcsqMessageScript() {
        // 避免多次显示提示信息
        String ret = this.wcsqMessageScript;
        this.wcsqMessageScript = null;
        return ret;
    }

    public String getSessionId() {
        /* 从parameterMap获取sessionId  */
        if (this.sessionId == null) {
            this.sessionId = (String) WebUtil.getParameterFromContextMap(
                    "sessionId");
        }
        return sessionId;
    }

    public String getSwjgDm() {
        return swjgDm;
    }

    public String getSwjgMc() {
        return swjgMc;
    }

    public String getOutputStr() {
        String tmp = outputStr;
        outputStr = ""; //reset;
        return tmp;
    }

    public XXTStipVO getTipsVo() throws Exception {
        XXTStipVO tipsVo = new XXTStipVO();
        Calendar now = Calendar.getInstance();
        XXTStipVO tipVo = new XXTStipVO();
        tipVo.setSwjg_dm(this.swjgDm);
        tipVo.setDay("01-01-" + now.get(Calendar.YEAR));
        XXTStipReqEvent reqevt = new XXTStipReqEvent();
        reqevt.setDealMethod("getSelfTips");
        reqevt.setTipvo(tipVo);
        ISsglyService service = new SsglyDelegate();
        if (this.tipsTime < 3) {
            XXTStipResEvent resevt = (XXTStipResEvent) service.invokeTask(
                    reqevt);
            if (resevt.getFlag() == 1) {
                tipsVo = resevt.getTipvo();
                this.tipsTime++;
            } else {
                System.out.println("读取提示信息失败!");
            }
        }
        return tipsVo;
    }

    //    public boolean isHasYjjl() {
//        return hasYjjl;
//    }

    public String checkLogin() throws Exception {

        /*FacesContext context = FacesContext.getCurrentInstance();
                 if (getUserName() != null && getUserName().equals("admin")) {
            if (getPassword() != null && getPassword().equals("password")) {
                Map sessionMap = context.getExternalContext().getSessionMap();
                sessionMap.put("loginPassed", "1");
                return "go_proceed";
            } else {
                return "go_login";
            }
                 } else {
            return "go_login";
                 }
         */
        /* 验证大集中核心系统传入的sessionId是否有效 */
        if (!validateSessionId()) {
            /* 系统管理员要求输入密码 */
            if ("24401002103".equals(this.userID) ||
                "24401001966".equals(this.userID)) {
                if (!"aaa111".equals(this.password)) {
                    return "go_login";
                }
            } else {
                if (!"111222".equals(this.password)) {
                    return "go_login";
                }
            }
        }
        FacesContext context = FacesContext.getCurrentInstance();
        Map sessionMap = context.getExternalContext().getSessionMap();
        sessionMap.put("loginPassed", "1");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -