Package com.lgx8.management.entities

Examples of com.lgx8.management.entities.Organization


    response.setCharacterEncoding("UTF-8");
   
    String id = request.getParameter("id");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    gatewayService.deleteProductProperty(Long.parseLong(id));
   
    pw.write("1");
  }
View Full Code Here


   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    String categoryId = request.getParameter("categoryId");
   
    if(categoryId == null || "".equals(categoryId) || "null".equals(categoryId))
    {
      categoryId = "0";
    }else
    {
      Template temp = getConfiguration().getTemplate("listGatewayCategoryDetail.ftl");
     
      GatewayCategory category = gatewayService.findGatewayCategoryById(Integer.parseInt(categoryId));
     
      root.put("category", category);
     
      List<GatewayCategoryDetail> details = gatewayService.findGatewayCategoryDetailByCategoryId(Integer.parseInt(categoryId));
     
      root.put("details", details);
     
      /* 将模板和数据模型合并 */
      Writer out = response.getWriter();
View Full Code Here

    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    Template temp = getConfiguration().getTemplate("product/ProductDetail.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    String id = request.getParameter("id");
    long lid = -1;
    try {
      lid = Long.parseLong(id);
    } catch (Exception e1) {
      lid = -1;
    }
   
    Product product = gatewayService.findProductById(lid);
    if(product!=null) {
      root.put("product", product);
      root.put("Product_List_Url", Constants.PRODUCT_LIST_URL);
     
      List<Brand> brands = gatewayService.findBrand();
      if(brands!=null&&brands.size()>0) {
        root.put("brands", brands);
      }
     
      List<ProductProperty> colorSelect = gatewayService.findProductPropertyByCategoryId(Constants.PROPERTYCOLOR);
      if(colorSelect!=null&&colorSelect.size()>0) {
        root.put("colorSelect", colorSelect);
      }
     
      List<ProductProperty> coltheSizeSelect = gatewayService.findProductPropertyByCategoryId(Constants.PROPERTYCLOTHESIZE);
      if(coltheSizeSelect!=null&&coltheSizeSelect.size()>0) {
        root.put("coltheSizeSelect", coltheSizeSelect);
      }
     
      List<ProductProperty> shoeSizeSelect = gatewayService.findProductPropertyByCategoryId(Constants.PROPERTYSHOESIZE);
      if(shoeSizeSelect!=null&&shoeSizeSelect.size()>0) {
        root.put("shoeSizeSelect", shoeSizeSelect);
      }
     
      List<FareWay> farewaySelect = gatewayService.findFare();
      if(farewaySelect!=null&&farewaySelect.size()>0) {
        root.put("farewaySelect", farewaySelect);
      }
     
      List<IPObject> iPObjects = gatewayService.findAllIPObject();
      root.put("iPObjects", iPObjects);
     
      String color = product.getColor();
      String[] colors = color.split(";");
      Map<String, String> colorMap = new HashMap<String, String>();
View Full Code Here

  /**
   * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
    String id = request.getParameter("id");
    String categoryId = request.getParameter("categoryId");
    String categoryType = request.getParameter("type");
    String areaNode = request.getParameter("areaNode");
    String entityId = request.getParameter("entityId");
    String entityUrl = request.getParameter("entityUrl");
    String otherUrl = request.getParameter("otherUrl");
    String entityName = request.getParameter("entityName");
    String url = request.getParameter("url");
    String layerOrder = request.getParameter("layerOrder");
    if((!"".equals(categoryType)&&categoryType != null) &&("".equals(id)||id == null) && categoryId != null)
    {
      GatewayCategory category = gatewayService.findGatewayCategoryById(Integer.parseInt(categoryId));
     
      if("".equals(areaNode)|| areaNode == null || "null".equals(areaNode))
      {
        areaNode = "";
      }
      gatewayService.saveGatewayCategoryDetail(category, entityId, entityUrl, entityName, layerOrder, Integer.parseInt(categoryType),areaNode,url,otherUrl);
      PrintWriter pw = response.getWriter();
     
      pw.write("1");
    }else if((!"".equals(categoryType)&&categoryType != null) && categoryId != null)
    {
View Full Code Here

  @RequestMapping("/initmodifyor.do")
  public String initOriganization(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    if(rtUser!=null){
      long _oid = rtUser.getOrganizationid();
      Organization or = organizationDao.getOrganizationById(_oid);
      request.setAttribute("organization", or);
      request.setAttribute("user", rtUser);
    }
    return "/management/organization/update_organization";
  }
View Full Code Here

      User u = userCardService.findUserById(Integer.parseInt(u_id));
      u.setUsername(userName);
      u.setPassword(EncryptUtil.toMD5(password_new));
      userCardService.updateUser(u);
      long _oid = u.getOrganizationid();
      Organization or = organizationDao.getOrganizationById(_oid);
      String sid = request.getSession().getId();
      request.getSession().removeAttribute(sid);
      request.setAttribute("user", u);
      request.setAttribute("organization", or);
      request.getSession().setAttribute(sid, new RunTimeUser(u));
View Full Code Here

    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    long _orid = 0;
    if(rtUser!=null){
      long _type = rtUser.getUsertype();
      if(_type==3){
        Organization _or = (Organization)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(_or!=null){
          _orid = _or.getID();
        }
      }
    }
    if(_orid!=0){
      String hql = "";
View Full Code Here

    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    long _orid = 0;
    if(rtUser!=null){
      long _type = rtUser.getUsertype();
      if(_type==3){
        Organization _or = (Organization)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(_or!=null){
          _orid = _or.getID();
        }
      }
    }
    if(_orid!=0){
      String hql = "";
View Full Code Here

    if(rtUser!=null&&rtUser.getUsertype()!=User.USER_TYPE_NORMAL&&
        rtUser.getUsertype()!=User.USER_TYPE_MERCHANT&&rtUser.getUsertype()!=User.USER_TYPE_TGSTATION){
      String hql = "";
      long _type = rtUser.getUsertype();
      if(_type==User.USER_TYPE_TGCENTER||_type==User.USER_TYPE_YYCENTER){
        Organization _or = (Organization)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(_or!=null){
          sb.append(" and jgssjg="+_or.getID());
        }
      }
      if(!sb.toString().equals("")){
        hql = " from Organization where DELETEFLAG = '0' and "+sb.toString().substring(4)+" order by jgtjsj desc";
      }else{
View Full Code Here

    String jgszdz = request.getParameter("JGSZDZ");
    String jglx = request.getParameter("JGLX");
    String ssjg = request.getParameter("SSJG");
    String posturl = request.getParameter("posturl");
    if (!StrUtil.isNullStr(jgid) && !"0".equals(jgid)) {
      Organization uo = organizationDao.getOrganizationById(Long.parseLong(jgid));
      uo.setJGMC(jgmc);
      uo.setJGSZDZ(jgszdz);
      uo.setJGDH(jgdh);
      uo.setJGSZQY(jgszqy);
      uo.setJGLX(jglx);
      //所属机构
      if(!StrUtil.isNullStr(ssjg) && !"0".equals(ssjg))
      {
        Organization so = organizationDao.getOrganizationById(Long.parseLong(ssjg));
        uo.setSsjg(so);
      }
     
      //负责人
      User u = null;
      if(!StrUtil.isNullStr(jgfzr))
      {
        u = userDao.findUserByUserName(jgfzr);
        if(uo.getJgfzr() != null)
        {
          if(u.getId() != uo.getJgfzr().getId())
          {
            u.setUsertype(Long.parseLong(jglx));
          }
          uo.setJgfzr(u);
        }
      }
     
     
     
     
      organizationDao.updateOrganization(uo);
      if (!StrUtil.isNullStr(posturl)){
        return new ModelAndView(posturl).addObject("ErrMsg", "修改成功");
      }
      return new ModelAndView(new RedirectView("../page/management/organization/list_organization.jsp"));
    }
    Organization org = new Organization();
    org.setJGMC(jgmc);
    org.setJGDH(jgdh);
    org.setJGSZDZ(jgszdz);
    org.setJGSZQY(jgszqy);
    org.setJGLX(jglx);
    org.setJGTJR(rtUser);
    org.setJGTJSJ(new Date());
    org.setDELETEFLAG("0");
   
    User u = null;
   
    if(!StrUtil.isNullStr(jgfzr))
    {
      u = userDao.findUserByUserName(jgfzr);
     
      u.setUsertype(Long.parseLong(jglx));
     
      org.setJgfzr(u);
    }
   
    if(!StrUtil.isNullStr(ssjg) && !"0".equals(ssjg))
    {
      Organization sj = organizationDao.getOrganizationById(Long.parseLong(ssjg));
      org.setSsjg(sj);
    }
   
    organizationDao.createOrganization(org);
   
View Full Code Here

TOP

Related Classes of com.lgx8.management.entities.Organization

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.