Package com.lgx8.gateway.entities

Examples of com.lgx8.gateway.entities.Orders


    }
   
    if(hd_zt!=null&&hd_zt.length()!=0&&!hd_zt.equals("")){
      sb.append(" and dhzt='"+hd_zt+"'");
    }
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
   
    if(rtUser!=null&&rtUser.getUsertype()!=User.USER_TYPE_NORMAL){
      String hql = "";
      if(rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
        long _mid = rtUser.getOrganizationid();
        hql = "from ChargeIndex where ifnull(deleteflag,'0')='0' and merchantid="+_mid+sb.toString()+" order by dhtjrq desc";
      }else if(rtUser.getUsertype()!=User.USER_TYPE_GSYG&&rtUser.getUsertype()!=User.USER_TYPE_MERCHANT){
        long _orid = rtUser.getOrganizationid();
        hql = "from ChargeIndex where ifnull(deleteflag,'0')='0' and dhorid="+_orid+sb.toString()+" order by dhtjrq desc";
      }else{
        hql = "from ChargeIndex where ifnull(deleteflag,'0')='0' "+sb.toString()+" order by dhtjrq desc";
      }
      PageList list = rechargeRebateService.getPageListRebateByConditions(hql, new Object[]{}, pr);
View Full Code Here


    return null;
  }
 
  @RequestMapping("/rebate/hdtjinit.do")
  public String hdtjInitPage(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    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

    return "/management/rebate/create_hdqb";
  }
 
  @RequestMapping("/rebate/hdtjsave.do")
  public String hdtjSavePage(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    String dhjf = request.getParameter("dhqb");
    String dhfs = request.getParameter("dhfs");
    ChargeIndex ci = null;
    if(rtUser!=null&&rtUser.getUsertype()!=User.USER_TYPE_GSYG&&rtUser.getUsertype()!=User.USER_TYPE_NORMAL){
      ci = new ChargeIndex();
      ci.setDhfs(dhfs);
      ci.setDhtjr(rtUser);
      ci.setDhtjrq(new Date());
      ci.setDhjfs(Double.parseDouble(dhjf));
      ci.setDhzt(ChargeIndex.CHARGEINDEX_DHZT_INIT);
      if(rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
        Merchant _m = merchantDao.getMerchantById(rtUser.getOrganizationid());
        ci.setDhlx(ChargeIndex.CHARGEINDEX_DHLX_MERCHANT);
        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);
View Full Code Here

  @RequestMapping("/rebate/confirmchargeindex.do")
  public String confirmChargeIndex(HttpServletRequest request,HttpServletResponse response){
    String sysid = request.getParameter("id");
    String confirm = request.getParameter("confirm");
    long id = sysid==null?0l:Long.parseLong(sysid);
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    ChargeIndex ci = null;
    if(rtUser!=null&&rtUser.getUsertype()==User.USER_TYPE_GSYG&&id!=0){
      ci = chargeIndexDao.getChargeIndex(id);
      if(ci!=null){
        String lx = ci.getDhlx();
        if(lx.equals(ChargeIndex.CHARGEINDEX_DHLX_MERCHANT)){
          Merchant _m = ci.getMerchantId();
View Full Code Here

          HSSFRow rowdata = sheet.createRow(n);
          int i = (n-1)+((t-1)*number);
          if(i < size)
          {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
            Scorecard card = cards.get(i);
            HSSFCell cell0 = rowdata.createCell(0);
            HSSFRichTextString text0 = new HSSFRichTextString(card.getCard());
            cell0.setCellValue(text0);
            cell0.setCellStyle(styledata);
           
            HSSFCell cell1 = rowdata.createCell(1);
//            HSSFRichTextString text1 = new HSSFRichTextString(card.getPassword());
            cell1.setCellValue(card.getPassword());
            cell1.setCellStyle(styledata);
           
            HSSFCell cell2 = rowdata.createCell(2);
//            HSSFRichTextString text2 = new HSSFRichTextString(card.getScore().toString());
            cell2.setCellValue(card.getScore());
            cell2.setCellStyle(styledata);
           
            HSSFCell cell3 = rowdata.createCell(3);
            HSSFRichTextString text3 = new HSSFRichTextString(sdf.format(card.getEffectiveTimeStart()));
            cell3.setCellValue(text3);
            cell3.setCellStyle(styledata);
           
            HSSFCell cell4 = rowdata.createCell(4);
            HSSFRichTextString text4 = new HSSFRichTextString(sdf.format(card.getEffectiveTimeEnd()));
            cell4.setCellValue(text4);
            cell4.setCellStyle(styledata);
          }
        }
      }
View Full Code Here

  /**
   * @param args
   */
  public static void main(String[] args) {
    User user = new User();
    user.setUsername("czt");
    user.setPassword("czt");
    user.setEmail("www15119258@qq.com");
    user.setRegistertime(new Date());
    user.setLastlogin(new Date());
    user.setNickname("苍之涛");
    user.setTruename("李晖");
    user.setSex(User.SEX_NULL);
    user.setIp("127.0.0.1");
    user.setMobile("15015531354");
   
   
    ApplicationContext ac = new ClassPathXmlApplicationContext("ApplicationContext.xml");
   
    IUserCardService userCardService = (IUserCardService) ac.getBean("userCardService");
//    userCardService.createUser(user);
//   
    user = userCardService.findUser("username", "czt");
   
    System.out.println(user.getCard().getScore());
   
//    IConfigDao dao = (IConfigDao) ac.getBean("configDao");
//    System.out.println(dao.findGatewayConfig());
   
  }
View Full Code Here

    this.xfhy = xfhy;
  }
  public String toJSON() {
    JSONObject jObj = new JSONObject();
    Merchant _mr = getMerchant();
    User _u = getXfhy();
    try {
      jObj.put("id", getID());
      jObj.put("xfsjmc", _mr==null?"":_mr.getSJMC());
      jObj.put("hyxm", _u==null?"":_u.getUsername());
      jObj.put("hynickName", _u==null?"":_u.getTruename());
      jObj.put("hych", _u==null?"":(_u.getCard()==null?"":_u.getCard().getId()));
      jObj.put("xfje", getXFJE());
      jObj.put("zsjf", getHDJFS());
      jObj.put("xfsj", getXFSJ());
      //jObj.put("", arg1)
    } catch (JSONException e) {
View Full Code Here

  }
 
  public String toJSON(){
    JSONObject jObj = new JSONObject();
    Merchant _m = getMerchant();
    User _czyh = getCZYHBH();
    User _u = getCZQDR();
    try {
      jObj.put("id", getID());
      jObj.put("user_id", _czyh!=null?"":_czyh.getId());
      jObj.put("user_name", _czyh==null?"":_czyh.getUsername());
      jObj.put("merchat_id", _m==null?"":_m.getID());
      jObj.put("m_name", _m==null?"":_m.getSJMC());
      jObj.put("czlx", changetoCN(getRESERVATION01()));
      jObj.put("czje", getCZJE());
      jObj.put("dhjf", getCZDHJFS());
      jObj.put("czsj", getCZSJ());
      jObj.put("czzt", changeToCN(getCzzt()));
      jObj.put("czqdr", _u==null?"":_u.getUsername());
      jObj.put("czqrrq", getCzqdrq());
    } catch (JSONException e) {
      e.printStackTrace();
    }
    return jObj.toString();
View Full Code Here

    car.setScore(score);
    car.setPassword(password);
    this.getHibernateTemplate().persist(car);
   
    String md5Passwd = EncryptUtil.toMD5(password);
    User user = new User();
    user.setPassword(md5Passwd);
    user.setLocked(false);
    user.setEnabled(true);
    user.setOpener(opener);
    user.setParent(parent);
    user.setUsertype(usertype);
    user.setParenttype(parenttype);
    user.setOrganizationid(organizationid);
    user.setRegistertime(new Date());
    user.setCard(car);
    user.setUsername(card);
    user.setLastlogin(new Date());
    if(mobile != null && !"".equals(mobile))
      user.setMobile(mobile);
    if(email != null && !"".equals(email))
      user.setEmail(email);
    this.getHibernateTemplate().persist(user);

    return car;
  }
View Full Code Here

    user.setMobile("15015531354");
   
   
    ApplicationContext ac = new ClassPathXmlApplicationContext("ApplicationContext.xml");
   
    IUserCardService userCardService = (IUserCardService) ac.getBean("userCardService");
//    userCardService.createUser(user);
//   
    user = userCardService.findUser("username", "czt");
   
    System.out.println(user.getCard().getScore());
   
//    IConfigDao dao = (IConfigDao) ac.getBean("configDao");
//    System.out.println(dao.findGatewayConfig());
View Full Code Here

TOP

Related Classes of com.lgx8.gateway.entities.Orders

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.