Ejemplo n.º 1
0
 /** 初始化投注信息 */
 public void initBet() {
   betAndGift.setIsSellWays("1"); // 多注投
   betAndGift.setSessionid(sessionId);
   betAndGift.setPhonenum(phonenum);
   betAndGift.setUserno(userno);
   betAndGift.setBettype("bet"); // 投注为bet,赠彩为gift
   betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti    倍数   投注的倍数
   betAndGift.setBatchnum("" + iProgressQishu); // batchnum    追号期数 默认为1(不追号)
   betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno()));
   betAndGift.setAmount(
       ""
           + addView.getSize()
               * iProgressBeishu
               * betAndGift.getAmt()
               * 100); // amount      金额 单位为分(总金额)
   //		betAndGift.setBet_code(ballOne.getZhuma(balls, iProgressBeishu));
   betAndGift.setBet_code(addView.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
   lotno = PublicMethod.toLotno(betAndGift.getLotno());
   betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno()));
 }
Ejemplo n.º 2
0
  /** /** 对合买对象进行赋值 */
  public void setPojo() {
    RWSharedPreferences pre = new RWSharedPreferences(JoinStartActivity.this, "addInfo");
    sessionId = pre.getStringValue("sessionid");
    phonenum = pre.getStringValue("phonenum");
    userno = pre.getStringValue("userno");
    betAndGift.setBettype("startcase");
    betAndGift.setTotalAmt(betAndGift.getAmount());
    if (betAndGift.getIssuper().equals("0")) {
      betAndGift.setOneAmount("300");
    } else {
      betAndGift.setOneAmount("200");
    }
    betAndGift.setSafeAmt(isNull(PublicMethod.toFen(isNull(safeEdit.getText().toString()))));
    betAndGift.setBuyAmt(isNull(PublicMethod.toFen(isNull(buyEdit.getText().toString()))));
    betAndGift.setMinAmt(PublicMethod.toFen(isNull(minEdit.getText().toString())));
    betAndGift.setCommisionRation(commisionRation);
    betAndGift.setVisibility(visible);
    betAndGift.setDescription(descriptionEdit.getText().toString());
    betAndGift.setSessionid(sessionId);
    betAndGift.setPhonenum(phonenum);
    betAndGift.setUserno(userno);
    if (!Constants.type.equals("zc")) {
      betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti 倍数 投注的倍数
    }
    betAndGift.setBatchnum("" + iProgressQishu); // batchnum 追号期数 默认为1(不追号)
    if (!Constants.type.equals("zc")) {
      betAndGift.setIsSellWays("1");
      betAndGift.setAmount("" + addview.getAllAmt() * iProgressBeishu * 100);
      betAndGift.setBet_code(addview.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
    } else {
      betAndGift.setIsSellWays("");

      betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti 倍数 投注的倍数
      //			int amount = Integer.valueOf(betAndGift.getAmount()) * iProgressBeishu;
      String zhuShu = String.valueOf(mZhushu * iProgressBeishu);
      String amount = String.valueOf(mZhushu * iProgressBeishu * 200);
      betAndGift.setAmount(amount);
      betAndGift.setZhushu(zhuShu);
    }
  }