Esempio n. 1
0
  /**
   * 销售合同列表的实例
   *
   * @param request jsp请求
   * @param isApproveStat 是否在审批状态
   * @return 返回销售合同列表的实例
   */
  public static B_ImportOrder getInstance(HttpServletRequest request) {
    B_ImportOrder b_ImportOrderBean = null;
    HttpSession session = request.getSession(true);
    synchronized (session) {
      String beanName = "b_ImportOrderBean";
      b_ImportOrderBean = (B_ImportOrder) session.getAttribute(beanName);
      if (b_ImportOrderBean == null) {
        // 引用LoginBean
        LoginBean loginBean = LoginBean.getInstance(request);

        b_ImportOrderBean = new B_ImportOrder();
        b_ImportOrderBean.qtyFormat = loginBean.getQtyFormat();
        b_ImportOrderBean.priceFormat = loginBean.getPriceFormat();
        b_ImportOrderBean.sumFormat = loginBean.getSumFormat();

        b_ImportOrderBean.fgsid = loginBean.getFirstDeptID();
        b_ImportOrderBean.loginId = loginBean.getUserID();
        b_ImportOrderBean.loginName = loginBean.getUserName();

        b_ImportOrderBean.user = loginBean.getUser();
        session.setAttribute(beanName, b_ImportOrderBean);
      }
    }
    return b_ImportOrderBean;
  }