/** * 销售合同列表的实例 * * @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; }
/** * 得到物资销售单价信息的实例 * * @param request jsp请求 * @return 返回物资销售单价信息的实例 */ public static B_Sale_CheckAccount getInstance(HttpServletRequest request) { B_Sale_CheckAccount b_Sale_CheckAccountBean = null; HttpSession session = request.getSession(true); synchronized (session) { String beanName = "b_Sale_CheckAccountBean"; // 名称-值对应 b_Sale_CheckAccountBean = (B_Sale_CheckAccount) session.getAttribute(beanName); if (b_Sale_CheckAccountBean == null) { LoginBean loginBean = LoginBean.getInstance(request); String fgsID = loginBean.getFirstDeptID(); b_Sale_CheckAccountBean = new B_Sale_CheckAccount(fgsID); // 调用构造函数 b_Sale_CheckAccountBean.loginName = loginBean.getUserName(); b_Sale_CheckAccountBean.personid = loginBean.getUserID(); session.setAttribute(beanName, b_Sale_CheckAccountBean); } } return b_Sale_CheckAccountBean; }
/** * 得到客户信誉额度信息的实例 * * @param request jsp请求 * @param isApproveStat 是否在审批状态 * @return 返回报价资料信息的实例 */ public static B_CustomerProductDiscount getInstance(HttpServletRequest request) { B_CustomerProductDiscount xs_khcpzkbean = null; HttpSession session = request.getSession(true); synchronized (session) { String beanName = "xs_khcpzkbean"; xs_khcpzkbean = (B_CustomerProductDiscount) session.getAttribute(beanName); // 判断该session是否有该bean的实例 if (xs_khcpzkbean == null) { LoginBean loginBean = LoginBean.getInstance(request); xs_khcpzkbean = new B_CustomerProductDiscount(); xs_khcpzkbean.fgsid = loginBean.getFirstDeptID(); xs_khcpzkbean.loginId = loginBean.getUserID(); xs_khcpzkbean.loginName = loginBean.getUserName(); xs_khcpzkbean.user = loginBean.getUser(); // 设置格式化的字段 xs_khcpzkbean.dsxs_khcpzkTable.setColumnFormat("zk", loginBean.getPriceFormat()); xs_khcpzkbean.dsxs_khcpzkTable.setColumnFormat("dj", loginBean.getPriceFormat()); xs_khcpzkbean.dsxs_khcpzkTable.setColumnFormat("bj", loginBean.getPriceFormat()); session.setAttribute(beanName, xs_khcpzkbean); } } return xs_khcpzkbean; }