Package com.lgx8.management.entities

Examples of com.lgx8.management.entities.Organization


    long _orid = 0;
    long _type = 0;
    if(rtUser!=null){
      _type = rtUser.getUsertype();
      if( _type == 4 || _type == 5){
        Organization _or = (Organization)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(_or!=null){
          _orid = _or.getID();
        }
      }
    }
    MerchantQueryForm  queryForm = new MerchantQueryForm();
    queryForm.setSJMC(sjmc);
View Full Code Here


   
    Dictionary d0 = dictionaryDao.findByKindAndCode("province", province);
    Dictionary d1 = dictionaryDao.findByKindAndCode("city", city);
    Dictionary d2 = dictionaryDao.findByKindAndCode("county", county);
   
    Organization o = null;
    if (!StrUtil.isNullStr(organization)) {
      o = organizationDao.getOrganizationById(Long.parseLong(organization));
    }
    User u = null;
    if (!StrUtil.isNullStr(SJFRDB)) {
//      u = userDao.findUser("username", new Object[]{SJFRDB});
     
      u = userDao.findUserByUserName(SJFRDB);
      u.setUsertype(User.USER_TYPE_MERCHANT);
    }
    if (!StrUtil.isNullStr(SJID) && !"0".equals(SJID)){
      Merchant mr = merchantDao.getMerchantById(Integer.parseInt(SJID));
      mr.setSJMC(SJMC);
      mr.setSJLX(SJLX);
      mr.setSFSHSM(SFSHSM);
      mr.setYYKSSJ(YYKSSJ);
      mr.setYYJSSJ(YYJSSJ);
      mr.setSJFWXJ(SJFWXJ);
      mr.setSJDZ(SJDZ);
      mr.setSJDHHM(SJDHHM);
      mr.setSJGSZCBH(SJGSZCBH);
      if(o != null)mr.setOrganization(o);
      if(o != null)mr.setAreaNode(o.getJGSZQY());
      mr.setSJFRDB(u);
      mr.setUser(rtUser);
      mr.setRESERVATION01(RESERVATION01);
      mr.setRESERVATION02(RESERVATION02);
      mr.setRESERVATION03(RESERVATION03);
      mr.setRESERVATION04(RESERVATION04);
      mr.setRESERVATION05(RESERVATION05);
      mr.setRESERVATION06(RESERVATION06);
      mr.setDELETEFLAG("0");
     
      mr.setProvince(d0 != null ? d0.getDETAIL():province);
      mr.setCity(d1 != null ? d1.getDETAIL():city);
      mr.setCounty(d2 != null ? d2.getDETAIL():county);
     
      merchantDao.updateMerchant(mr);
     
      u.setOrganizationid(mr.getID());
     
      userDao.updateUser(u);
    } else {
      Merchant mr = new Merchant();
      mr.setSJMC(SJMC);
      mr.setSJLX(SJLX);
      mr.setSFSHSM(SFSHSM);
      mr.setYYKSSJ(YYKSSJ);
      mr.setYYJSSJ(YYJSSJ);
      mr.setSJFWXJ(SJFWXJ);
      mr.setSJDZ(SJDZ);
      mr.setSJDHHM(SJDHHM);
      mr.setSJGSZCBH(SJGSZCBH);
      if(o != null)mr.setOrganization(o);
      if(o != null)mr.setAreaNode(o.getJGSZQY());
      mr.setSJFRDB(u);
      mr.setUser(rtUser);
      mr.setSJTJSJ(new Date());
      mr.setRESERVATION01(RESERVATION01);
      mr.setRESERVATION02(RESERVATION02);
View Full Code Here

    if(rtUser!=null&&rtUser.getUsertype()!=User.USER_TYPE_GSYG&&rtUser.getUsertype()!=User.USER_TYPE_NORMAL){
      if(rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
        Merchant _m = merchantDao.getMerchantById(rtUser.getOrganizationid());
        request.setAttribute("merchant", _m);
      }else{
        Organization _or = organizationDao.getOrganizationById(rtUser.getOrganizationid());
        request.setAttribute("organization", _or);
      }
    }
    return "/management/rebate/create_hdqb";
  }
View Full Code Here

        ci.setMerchantId(_m);
        double qbsl = _m.getFlqb();
        _m.setFlqb(qbsl-Double.parseDouble(dhjf));
        merchantDao.updateMerchant(_m);
      }else{
        Organization _or = organizationDao.getOrganizationById(rtUser.getOrganizationid());
        if(_or.getJGLX().equals("3")){
          ci.setDhlx(ChargeIndex.CHARGEINDEX_DHLX_TGZ);
        }
        if(_or.getJGLX().equals("4")){
          ci.setDhlx(ChargeIndex.CHARGEINDEX_DHLX_TGCENTER);
        }
        if(_or.getJGLX().equals("5")){
          ci.setDhlx(ChargeIndex.CHARGEINDEX_DHLX_YYCENTER);
        }
        ci.setDhorid(_or);
        double qbsl = _or.getFlqb();
        _or.setFlqb(qbsl-Double.parseDouble(dhjf));
        organizationDao.updateOrganization(_or);
      }
      chargeIndexDao.createChargeIndex(ci);
    }
    request.setAttribute("chargeindex", ci);
View Full Code Here

            }
            ci.setDhjes(ci.getDhjfs());
          }
          merchantDao.updateMerchant(_m);
        }else{
          Organization _or = ci.getDhorid();
          if(confirm.equals("0")){
            double flqb = _or.getFlqb();
            _or.setFlqb(flqb+ci.getDhjfs());
            ci.setDeleteflag("1");
          }else{
            ci.setDhjes(ci.getDhjfs());
          }
          organizationDao.updateOrganization(_or);
View Full Code Here

  }

  public Rechargehistory createCustmerXF(Merchant m, User user, double czje, double czjfs) {
    if(m!=null){
      Rebaterule re_rule = null;
      Organization _or = m.getOrganization();
      Rechargehistory recharge = new Rechargehistory();
      if(_or!=null){
        double flje = 0.0;
        if(_or.getJGLX().equals("2")){
          re_rule = rebateRuleDao.findRebateRuleByLx("01");
          double flqb = _or.getFlqb();
          if(re_rule!=null){
            flje = czjfs*re_rule.getFLLV();
            Rebate re = new Rebate();
            re.setFLED(flje);
            re.setFLSJ(new Date());
            re.setFLSYFBH(_or.getID());
            re.setFLLX("01");
            re.setRESERVATION01(m.getSJMC());
            re.setRESERVATION02(m.getID()+"");
            re.setRESERVATION03(_or.getJGMC());
            _or.setFlqb(flqb+flje);
            organizationDao.updateOrganization(_or);
            rebateDao.createRebate(re);
          }
        }
        if(_or.getJGLX().equals("3")){
          re_rule = rebateRuleDao.findRebateRuleByLx("02");
          double flqb = _or.getFlqb();
          if(re_rule!=null){
            flje = czjfs*re_rule.getFLLV();
            Rebate re = new Rebate();
            re.setFLED(flje);
            re.setFLSJ(new Date());
            re.setFLSYFBH(_or.getID());
            re.setFLLX("02");
            re.setRESERVATION01(m.getSJMC());
            re.setRESERVATION02(m.getID()+"");
            re.setRESERVATION03(_or.getJGMC());
            _or.setFlqb(flqb+flje);
            organizationDao.updateOrganization(_or);
            rebateDao.createRebate(re);
          }
        }
        if(_or.getJGLX().equals("4")){
          re_rule = rebateRuleDao.findRebateRuleByLx("03");
          double flqb = _or.getFlqb();
          if(re_rule!=null){
            flje = czjfs*re_rule.getFLLV();
            Rebate re = new Rebate();
            re.setFLED(flje);
            re.setFLSJ(new Date());
            re.setFLSYFBH(_or.getID());
            re.setFLLX("03");
            re.setRESERVATION01(m.getSJMC());
            re.setRESERVATION02(m.getID()+"");
            re.setRESERVATION03(_or.getJGMC());
            _or.setFlqb(flqb+flje);
            organizationDao.updateOrganization(_or);
            rebateDao.createRebate(re);
          }
        }
       
        Organization _por = _or.getSsjg();
        if(_por != null &&  _por.getJGLX().equals("5")){
          re_rule = rebateRuleDao.findRebateRuleByLx("04");
          double flqb = _por.getFlqb();
          if(re_rule!=null){
            flje = czjfs*re_rule.getFLLV();
            Rebate re = new Rebate();
            re.setFLED(flje);
            re.setFLSJ(new Date());
            re.setFLSYFBH(_por.getID());
            re.setFLLX("04");
            re.setRESERVATION01(m.getSJMC());
            re.setRESERVATION02(m.getID()+"");
            re.setRESERVATION03(_por.getJGMC());
            _por.setFlqb(flqb+flje);
            organizationDao.updateOrganization(_por);
            rebateDao.createRebate(re);
          }
        }
        recharge.setCZDHJFS(czjfs);
View Full Code Here

  }
 
  public void confirmRechargehistory(User u,Rechargehistory rh,String confirmLx){
    if(rh!=null&&rh.getCzzt()!=Rechargehistory.RECHARGEHISTORY_OVER){
      Merchant _m = rh.getMerchant();
      Organization _or = _m.getOrganization();
      if(confirmLx.equals("1")){
        rh.setCZQDR(u);
        rh.setCzqdrq(new Date());
        rh.setCzzt(Rechargehistory.RECHARGEHISTORY_OVER);
        double flje = 0.0;
        double czjfs=rh.getCZDHJFS();
        Rebaterule re_rule = null;
        if(_or != null&&!rh.getRESERVATION02().equals("02"))
        {
          if( _or.getJGLX().equals("2")){
            re_rule = rebateRuleDao.findRebateRuleByLx("01");
            double flqb = _or.getFlqb();
            if(re_rule!=null){
              flje = czjfs*re_rule.getFLLV();
              Rebate re = new Rebate();
              re.setFLED(flje);
              re.setFLSJ(new Date());
              re.setFLSYFBH(_or.getID());
              re.setFLLX("01");
              re.setRESERVATION01(_m.getSJMC());
              re.setRESERVATION02(_m.getID()+"");
              re.setRESERVATION03(_or.getJGMC());
              _or.setFlqb(flqb+flje);
              organizationDao.updateOrganization(_or);
              rebateDao.createRebate(re);
            }
          }
          if( _or.getJGLX().equals("3")){
            re_rule = rebateRuleDao.findRebateRuleByLx("02");
            double flqb = _or.getFlqb();
            if(re_rule!=null){
              flje = czjfs*re_rule.getFLLV();
              Rebate re = new Rebate();
              re.setFLED(flje);
              re.setFLSJ(new Date());
              re.setFLSYFBH(_or.getID());
              re.setFLLX("02");
              re.setRESERVATION01(_m.getSJMC());
              re.setRESERVATION02(_m.getID()+"");
              re.setRESERVATION03(_or.getJGMC());
              _or.setFlqb(flqb+flje);
              organizationDao.updateOrganization(_or);
              rebateDao.createRebate(re);
            }
          }
          if(_or.getJGLX().equals("4")){
            re_rule = rebateRuleDao.findRebateRuleByLx("03");
            double flqb = _or.getFlqb();
            if(re_rule!=null){
              flje = czjfs*re_rule.getFLLV();
              Rebate re = new Rebate();
              re.setFLED(flje);
              re.setFLSJ(new Date());
              re.setFLSYFBH(_or.getID());
              re.setFLLX("03");
              re.setRESERVATION01(_m.getSJMC());
              re.setRESERVATION02(_m.getID()+"");
              re.setRESERVATION03(_or.getJGMC());
              _or.setFlqb(flqb+flje);
              organizationDao.updateOrganization(_or);
              rebateDao.createRebate(re);
            }
          }
         
          Organization _por = _or.getSsjg();
          if(_por != null && _por.getJGLX().equals("5")){
            re_rule = rebateRuleDao.findRebateRuleByLx("04");
            double flqb = _por.getFlqb();
            if(re_rule!=null){
              flje = czjfs*re_rule.getFLLV();
              Rebate re = new Rebate();
              re.setFLED(flje);
              re.setFLSJ(new Date());
              re.setFLSYFBH(_por.getID());
              re.setFLLX("04");
              re.setRESERVATION01(_m.getSJMC());
              re.setRESERVATION02(_m.getID()+"");
              re.setRESERVATION03(_por.getJGMC());
              _por.setFlqb(flqb+flje);
              organizationDao.updateOrganization(_por);
              rebateDao.createRebate(re);
            }
          }
        }
View Full Code Here

      if(or!=null){
        orid = or.getID();
      }
    }
    if(type==3){
      Organization or = (Organization)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
      if(or!=null){
        orid = or.getID();
      }
    }
    //if usertype=6l该用户为员工查询所有usertype=1的用户
    UserQueryForm queryForm = new UserQueryForm();
    queryForm.setCardid(cardid);
View Full Code Here

        if(or!=null){
          orid = or.getID();
        }
      }
      if(type==3){
        Organization or = (Organization)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(or!=null){
          orid = or.getID();
        }
      }
    }
    if(orid!=0){
      User user = new User();
View Full Code Here

        {
          Merchant m = merchantDao.getMerchantById(u.getOrganizationid());
          u.setMerchantname(m.getSJMC());
        }else if(u.getUsertype() == 3)
        {
          Organization o = organizationDao.getOrganizationById(u.getOrganizationid());
          u.setMerchantname(o.getJGMC());
        }
      }
    }
   
    list.setDataList(users);
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.