package com.desfate.chart.ui.old.OTC.datas;


import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;

/**
 * 竞价和混合的盘面数据，最开始设计说是一模一样，所以弄成了一个，
 * 结果后来有些不一样了，最好是拆开为2个
 * 特点： 1.有量2.竞价有涨跌停，混合没有
 *
 * @author yongzq
 */
public class BidQuoteDay extends QuoteDayBase {

    private BidQuoteDay() {
        init();
    }

    public BidQuoteDay(int exchangeCode, String goodsCode) {
        this.setExchangeCode(exchangeCode);
        this.setGoodsCode(goodsCode);
        init();
    }

    // 现量
    private String lastVolume;

    // 保存前一笔价格
    private String prePrice;

    // 卖2
    private String ask2;

    // 卖3
    private String ask3;

    // 卖4
    private String ask4;

    // 卖5
    private String ask5;
    private String ask6;
    private String ask7;
    private String ask8;
    private String ask9;
    private String ask10;

    // 卖量1
    private String askVolume;

    // 卖量2
    private String askVolume2;

    // 卖量3
    private String askVolume3;

    // 卖量4
    private String askVolume4;

    // 卖量5
    private String askVolume5;
    // 卖量5
    private String askVolume6;
    // 卖量5
    private String askVolume7;
    // 卖量5
    private String askVolume8;
    // 卖量5
    private String askVolume9;
    // 卖量5
    private String askVolume10;

    // 买2
    private String bid2;

    // 买3
    private String bid3;

    // 买4
    private String bid4;

    // 买5
    private String bid5;
    private String bid6;
    private String bid7;
    private String bid8;
    private String bid9;
    private String bid10;

    // 买量1
    private String bidVolume;

    // 买量2
    private String bidVolume2;

    // 买量3
    private String bidVolume3;

    // 买量4
    private String bidVolume4;

    // 买量5
    private String bidVolume5;
    private String bidVolume6;
    private String bidVolume7;
    private String bidVolume8;
    private String bidVolume9;
    private String bidVolume10;

    // 总量
    private String totalVolume;

    // 总成交额
    private String totalTurnover;

    // 总买盘
    private String totalBidVolume;

    // 总卖盘
    private String totalAskVolume;

    // 委比
    private String committee;

    // 持仓
    private String holdVolume;

    // 涨停
    private String limitHigh;

    // 跌停
    private String limitLow;

    // 换手率
    private String changeVolumeRange;

    // 昨持仓
    private String preHoldVolume;

    // 行权价
    private String strikePrice;

    // 交易日
    private String exchangeTime;

    // 权力金 就是last

    // 认购期权权利金1
    private String callOptionPremiums;
    // 认购期权权利金2
    private String callOptionPremiums2;
    // 认购期权权利金3
    private String callOptionPremiums3;
    // 认购期权权利金4
    private String callOptionPremiums4;
    // 认购期权权利金5
    private String callOptionPremiums5;

    //认沽期权权利金1
    private String putOptionPremiums;
    //认沽期权权利金2
    private String putOptionPremiums2;
    //认沽期权权利金3
    private String putOptionPremiums3;
    //认沽期权权利金4
    private String putOptionPremiums4;
    //认沽期权权利金5
    private String putOptionPremiums5;

    //买订单号1
    public String strBidOrder;
    //买订单号2
    public String strBidOrder2;
    //买订单号3
    public String strBidOrder3;
    //买订单号4
    public String strBidOrder4;
    //买订单号5
    public String strBidOrder5;
    public String strBidOrder6;
    public String strBidOrder7;
    public String strBidOrder8;
    public String strBidOrder9;
    public String strBidOrder10;

    //卖订单号1
    public String strAskOrder;
    //卖订单号2
    public String strAskOrder2;
    //卖订单号3
    public String strAskOrder3;
    //卖订单号4
    public String strAskOrder4;
    //卖订单号5
    public String strAskOrder5;
    public String strAskOrder6;
    public String strAskOrder7;
    public String strAskOrder8;
    public String strAskOrder9;
    public String strAskOrder10;

    // 买单量
    public String bidOrderVolume;
    public String bidOrderVolume2;
    public String bidOrderVolume3;
    public String bidOrderVolume4;
    public String bidOrderVolume5;
    public String bidOrderVolume6;
    public String bidOrderVolume7;
    public String bidOrderVolume8;
    public String bidOrderVolume9;
    public String bidOrderVolume10;

    // 卖单量
    public String askOrderVolume;
    public String askOrderVolume2;
    public String askOrderVolume3;
    public String askOrderVolume4;
    public String askOrderVolume5;
    public String askOrderVolume6;
    public String askOrderVolume7;
    public String askOrderVolume8;
    public String askOrderVolume9;
    public String askOrderVolume10;

    public String nonTotalVolume;//非交易成交总量
    public String nonTotalHolderVolume;//非交易总持仓量
    public String nonTotalTurnover;//非交易成交总金额
    public String nonTotallot;//非交易成交总数
    public String markPrice;//MARKPRICE
    public String fundsRate;//FUNDSRATE

    /**
     * 库存量
     */
    private String Inventory = "";


    // 价格变动标志1涨 2跌 ,0表示没变，和上一口价格比
    private int raisedFlag = -1;

    // 涨跌，1涨 2跌，0表示没变 和昨收比
    private int upDown = -1;

    public String getPrePrice() {
        if (prePrice == null || "".equals(prePrice)) {
            prePrice = "0";
        }
        return prePrice;
    }

    public void setPrePrice(String prePrice) {
        this.prePrice = prePrice;
    }

    public String getAsk2() {
        if (ask2 == null || ask2.equals("") || ask2.equals("null")) {
            ask2 = "0";
        }
        return ask2;
    }

    public String getInventory() {
        if (!isEmpty(Inventory)) {
            Inventory = "0";
        }
        return Inventory;
    }

    public static boolean isEmpty(String str) {
        return !(str == null || str.equals("") || str.equals("null"));
    }

    public void setInventory(String inventory) {
        Inventory = inventory;
    }

    public void setAsk2(String ask2) {
        this.ask2 = ask2;
    }

    public String getAsk3() {
        if (ask3 == null || ask3.equals("") || ask3.equals("null")) {
            ask3 = "0";
        }
        return ask3;
    }

    public void setAsk3(String ask3) {
        this.ask3 = ask3;
    }

    public String getAsk4() {
        if (ask4 == null || ask4.equals("") || ask4.equals("null")) {
            ask4 = "0";
        }
        return ask4;
    }

    public void setAsk4(String ask4) {
        this.ask4 = ask4;
    }

    public String getAsk5() {
        if (ask5 == null || ask5.equals("") || ask5.equals("null")) {
            ask5 = "0";
        }
        return ask5;
    }

    public void setAsk5(String ask5) {
        this.ask5 = ask5;
    }

    public String getLastVolume() {
        if (lastVolume == null || lastVolume.equals("") || lastVolume.equals("null")) {
            lastVolume = "0";
        }
        return lastVolume;
    }

    public void setLastVolume(String lastVolume) {
        this.lastVolume = lastVolume;
    }

    public String getAskVolume() {
        if (askVolume == null || askVolume.equals("") || askVolume.equals("null")) {
            askVolume = "0";
        }
        return askVolume;
    }

    public void setAskVolume(String askVolume) {
        this.askVolume = askVolume;
    }

    public String getAskVolume2() {
        if (askVolume2 == null || askVolume2.equals("") || askVolume2.equals("null")) {
            askVolume2 = "0";
        }
        return askVolume2;
    }

    public void setAskVolume2(String askVolume2) {
        this.askVolume2 = askVolume2;
    }

    public String getAskVolume3() {
        if (askVolume3 == null || askVolume3.equals("") || askVolume3.equals("null")) {
            askVolume3 = "0";
        }
        return askVolume3;
    }

    public void setAskVolume3(String askVolume3) {
        this.askVolume3 = askVolume3;
    }

    public String getAskVolume4() {
        if (askVolume4 == null || askVolume4.equals("") || askVolume4.equals("null")) {
            askVolume4 = "0";
        }
        return askVolume4;
    }

    public void setAskVolume4(String askVolume4) {
        this.askVolume4 = askVolume4;
    }

    public String getAskVolume5() {
        if (askVolume5 == null || askVolume5.equals("") || askVolume5.equals("null")) {
            askVolume5 = "0";
        }
        return askVolume5;
    }

    public void setAskVolume5(String askVolume5) {
        this.askVolume5 = askVolume5;
    }

    public String getBid2() {
        if (bid2 == null || bid2.equals("") || bid2.equals("null")) {
            bid2 = "0";
        }
        return bid2;
    }

    public void setBid2(String bid2) {
        this.bid2 = bid2;
    }

    public String getBid3() {
        if (bid3 == null || bid3.equals("") || bid3.equals("null")) {
            bid3 = "0";
        }
        return bid3;
    }

    public void setBid3(String bid3) {
        this.bid3 = bid3;
    }

    public String getBid4() {
        if (bid4 == null || bid4.equals("") || bid4.equals("null")) {
            bid4 = "0";
        }
        return bid4;
    }

    public void setBid4(String bid4) {
        this.bid4 = bid4;
    }

    public String getBid5() {
        if (bid5 == null || bid5.equals("") || bid5.equals("null")) {
            bid5 = "0";
        }
        return bid5;
    }

    public void setBid5(String bid5) {
        this.bid5 = bid5;
    }

    public String getBidVolume() {
        if (bidVolume == null || bidVolume.equals("") || bidVolume.equals("null")) {
            bidVolume = "0";
        }
        return bidVolume;
    }

    public void setBidVolume(String bidVolume) {
        this.bidVolume = bidVolume;
    }

    public String getBidVolume2() {
        if (bidVolume2 == null || bidVolume2.equals("") || bidVolume2.equals("null")) {
            bidVolume2 = "0";
        }
        return bidVolume2;
    }

    public void setBidVolume2(String bidVolume2) {
        this.bidVolume2 = bidVolume2;
    }

    public String getBidVolume3() {
        if (bidVolume3 == null || bidVolume3.equals("") || bidVolume3.equals("null")) {
            bidVolume3 = "0";
        }
        return bidVolume3;
    }

    public void setBidVolume3(String bidVolume3) {
        this.bidVolume3 = bidVolume3;
    }

    public String getBidVolume4() {
        if (bidVolume4 == null || bidVolume4.equals("") || bidVolume4.equals("null")) {
            bidVolume4 = "0";
        }
        return bidVolume4;
    }

    public void setBidVolume4(String bidVolume4) {
        this.bidVolume4 = bidVolume4;
    }

    public String getBidVolume5() {
        if (bidVolume5 == null || bidVolume5.equals("") || bidVolume5.equals("null")) {
            bidVolume5 = "0";
        }
        return bidVolume5;
    }

    public String getStrikePrice() {
        if (strikePrice == null || strikePrice.equals("") || strikePrice.equals("null")) {
            strikePrice = "0";
        }
        return strikePrice;
//        double v = Double.parseDouble(strikePrice) / Math.pow(10, getDecimalPlace());
//        return String.valueOf(v);
    }

    public String getExchangeTime() {
        return exchangeTime;
    }

    public void setExchangeTime(String exchangeTime) {
        this.exchangeTime = exchangeTime;
    }

    public void setStrikePrice(String strikePrice) {
        this.strikePrice = strikePrice;
    }

    public void setBidVolume5(String bidVolume5) {
        this.bidVolume5 = bidVolume5;
    }

    @Override
    public int getRaisedFlag() {
        return raisedFlag;
    }

    @Override
    public int getUpDown() {
        return upDown;
    }

    public void setRaisedFlag(int raisedFlag) {
        this.raisedFlag = raisedFlag;
    }

    public String getCommittee() {
        return committee;
    }

    public void setCommittee(String committee) {
        this.committee = committee;
    }

    /**
     * 根据实时行情去更新盘面
     */
    @Override
    public void inputQuote(QuoteTik quote) {
//		if (!quote.getSymbol().equals(this.getSymbol())) {
//			LogUtils.e("Quote", "input quote error!");
//			return;
//		}

        boolean settlementPlanValid = true;
        if (!settlementPlanValid) {
            return;
        }

        if (getLastTime() == null) {
            setLastTime(quote.getAtTime());
        }

        // 仅处理比当前行情更新的数据
        String price = quote.getValue(QuoteTikPart.Last);// fixme 如果是限价下单\或者是撤单触发的行情，不会带最新价
        if (price == null || !quote.getAtTime().before(getLastTime())) {
            updateFromTik(quote);
            updateTime(quote.getAtTime());
            updateByLast();
            updateOne();
        }
    }

    /**
     * 更新一些不用计算的字段 无脑直接赋值
     *
     * @param tik
     */
    private void updateFromTik(QuoteTik tik) {
        HashMap<Byte, Object> fields = tik.getFields();
        Iterator<Byte> item = fields.keySet().iterator();
        String bidQueueInfo = "";
        String askQueueInfo = "";
        String ask1 = "0", ask2 = "0", ask3 = "0", ask4 = "0", ask5 = "0";
        String ask6 = "0", ask7 = "0", ask8 = "0", ask9 = "0", ask10 = "0";
        String bid1 = "0", bid2 = "0", bid3 = "0", bid4 = "0", bid5 = "0";
        String bid6 = "0", bid7 = "0", bid8 = "0", bid9 = "0", bid10 = "0";
        String askVol1 = "0", askVol2 = "0", askVol3 = "0", askVol4 = "0", askVol5 = "0";
        String askVol6 = "0", askVol7 = "0", askVol8 = "0", askVol9 = "0", askVol10 = "0";
        String bidVol1 = "0", bidVol2 = "0", bidVol3 = "0", bidVol4 = "0", bidVol5 = "0";
        String bidVol6 = "0", bidVol7 = "0", bidVol8 = "0", bidVol9 = "0", bidVol10 = "0";
        while (item.hasNext()) {
            String value;
            Byte keyB = item.next();
            byte key = keyB.byteValue();

            switch (key) {
                case QuoteTikPart.LastVolume: // 现量，最新一笔的成交量
                    value = fields.get(keyB).toString();
                    setLastVolume(value);
                    break;

                case QuoteTikPart.Ask: // 卖1
                    ask1 = fields.get(keyB).toString();
                    setAsk(ask1);
                    break;

                case QuoteTikPart.Ask2: // 卖2
                    ask2 = fields.get(keyB).toString();
                    setAsk2(ask2);
                    break;

                case QuoteTikPart.Ask3: // 卖3
                    ask3 = fields.get(keyB).toString();
                    setAsk3(ask3);
                    break;

                case QuoteTikPart.Ask4: // 卖4
                    ask4 = fields.get(keyB).toString();
                    setAsk4(ask4);
                    break;

                case QuoteTikPart.Ask5: // 卖5
                    ask5 = fields.get(keyB).toString();
                    setAsk5(ask5);
                    break;

                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK6: // 卖5
                    ask6 = fields.get(keyB).toString();
                    setAsk6(ask6);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK7: // 卖5
                    ask7 = fields.get(keyB).toString();
                    setAsk7(ask7);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK8: // 卖5
                    ask8 = fields.get(keyB).toString();
                    setAsk8(ask8);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK9: // 卖5
                    ask9 = fields.get(keyB).toString();
                    setAsk9(ask9);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK10: // 卖5
                    ask10 = fields.get(keyB).toString();
                    setAsk10(ask10);
                    break;
                case QuoteTikPart.AskVolume: // 卖量1
                    askVol1 = fields.get(keyB).toString();
                    setAskVolume(askVol1);
                    break;

                case QuoteTikPart.AskVolume2: // 卖量2
                    askVol2 = fields.get(keyB).toString();
                    setAskVolume2(askVol2);
                    break;

                case QuoteTikPart.AskVolume3: // 卖量3
                    askVol3 = fields.get(keyB).toString();
                    setAskVolume3(askVol3);
                    break;

                case QuoteTikPart.AskVolume4: // 卖量4
                    askVol4 = fields.get(keyB).toString();
                    setAskVolume4(askVol4);
                    break;

                case QuoteTikPart.AskVolume5: // 卖量5
                    askVol5 = fields.get(keyB).toString();
                    setAskVolume5(askVol5);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME6: // 卖量5
                    askVol6 = fields.get(keyB).toString();
                    setAskVolume6(askVol6);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME7: // 卖量5
                    askVol7 = fields.get(keyB).toString();
                    setAskVolume7(askVol7);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME8: // 卖量5
                    askVol8 = fields.get(keyB).toString();
                    setAskVolume8(askVol8);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME9: // 卖量5
                    askVol9 = fields.get(keyB).toString();
                    setAskVolume9(askVol9);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME10: // 卖量5
                    askVol10 = fields.get(keyB).toString();
                    setAskVolume10(askVol10);
                    break;

                case QuoteTikPart.Bid: // 买1
                    bid1 = fields.get(keyB).toString();
                    setBid(bid1);
                    break;

                case QuoteTikPart.Bid2: // 买2
                    bid2 = fields.get(keyB).toString();
                    setBid2(bid2);
                    break;

                case QuoteTikPart.Bid3: // 买3
                    bid3 = fields.get(keyB).toString();
                    setBid3(bid3);
                    break;

                case QuoteTikPart.Bid4: // 买4
                    bid4 = fields.get(keyB).toString();
                    setBid4(bid4);
                    break;

                case QuoteTikPart.Bid5: // 买5
                    bid5 = fields.get(keyB).toString();
                    setBid5(bid5);
                    break;

                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID6: // 买5
                    bid6 = fields.get(keyB).toString();
                    setBid6(bid6);
                    break;

                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID7: // 买5
                    bid7 = fields.get(keyB).toString();
                    setBid7(bid7);
                    break;

                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID8: // 买5
                    bid8 = fields.get(keyB).toString();
                    setBid8(bid8);
                    break;

                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID9: // 买5
                    bid9 = fields.get(keyB).toString();
                    setBid9(bid9);
                    break;

                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID10: // 买5
                    bid10 = fields.get(keyB).toString();
                    setBid10(bid10);
                    break;

                case QuoteTikPart.BidVolume: // 买量1
                    bidVol1 = fields.get(keyB).toString();
                    setBidVolume(bidVol1);
                    break;

                case QuoteTikPart.BidVolume2: // 买量2
                    bidVol2 = fields.get(keyB).toString();
                    setBidVolume2(bidVol2);
                    break;

                case QuoteTikPart.BidVolume3: // 买量3
                    bidVol3 = fields.get(keyB).toString();
                    setBidVolume3(bidVol3);
                    break;

                case QuoteTikPart.BidVolume4: // 买量4
                    bidVol4 = fields.get(keyB).toString();
                    setBidVolume4(bidVol4);
                    break;

                case QuoteTikPart.BidVolume5: // 买量5
                    bidVol5 = fields.get(keyB).toString();
                    setBidVolume5(bidVol5);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME6: // 买量5
                    bidVol6 = fields.get(keyB).toString();
                    setBidVolume6(bidVol6);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME7: // 买量5
                    bidVol7 = fields.get(keyB).toString();
                    setBidVolume7(bidVol7);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME8: // 买量5
                    bidVol8 = fields.get(keyB).toString();
                    setBidVolume8(bidVol8);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME9: // 买量5
                    bidVol9 = fields.get(keyB).toString();
                    setBidVolume9(bidVol9);
                    break;
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME10: // 买量5
                    bidVol10 = fields.get(keyB).toString();
                    setBidVolume10
                            (bidVol10);
                    break;

                case QuoteTikPart.Last: // 现价
                    value = fields.get(keyB).toString();
                    if (value != null && !value.equals("") && Double.parseDouble(value) > 0) {
                        setPrice(value);
                    }
                    break;

                case QuoteTikPart.TotalTurnover: // 总成交额
                    value = fields.get(keyB).toString();
                    setTotalTurnover(value);
                    break;

                case QuoteTikPart.TotalVolume: // 总成交量
                    value = fields.get(keyB).toString();
                    setTotalVolume(value);
                    break;

                case QuoteTikPart.ChangePercent:
                    value = fields.get(keyB).toString();
                    setStrPctChange(value);
                    break;

                case QuoteTikPart.ChangeFromOpen:
                    value = fields.get(keyB).toString();
                    setStrChangeSinceOpen(value);
                    break;

                case QuoteTikPart.Change:
                    value = fields.get(keyB).toString();
                    setStrChange(value);
                    break;
                case QuoteTikPart.DecimalPlace: // 小数位
                    int decimalPlace = 0;
                    try {
                        decimalPlace = Integer.parseInt(String.valueOf(fields.get(keyB)));
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    setDecimalPlace(decimalPlace);
                    break;

                case QuoteTikPart.BidQueueInfo:// 买委托
                    bidQueueInfo = (String) fields.get(keyB);
                    setBidQueueInfo(bidQueueInfo);
                    break;
                case QuoteTikPart.AskQueueInfo:// 卖委托
                    askQueueInfo = (String) fields.get(keyB);
                    setAskQueueInfo(askQueueInfo);
                    break;
                case QuoteTikPart.Inventory: {// 库存量
                    String inventory = (String) fields.get(keyB);
                    setInventory(inventory);
                    break;
                }
                case QuoteTikPart.HoldVolume: {// 持仓量
                    Double holdVolume = (Double) fields.get(keyB);
                    setHoldVolume(String.valueOf(holdVolume));
                    break;
                }
                case QuoteTikPart.GoodsCode://商品代码
                    String goodsCode = (String) fields.get(keyB);
                    setGoodsCode(goodsCode);
                    break;
                case QuoteTikPart.Strike: {
                    String strikePrice = (String) fields.get(keyB);
                    System.out.println(strikePrice);
                    setStrikePrice(strikePrice);
                    break;
                }
                case QuoteTikPart.ExchangeTime: {
                    String time = (String) fields.get(keyB);
                    setExchangeTime(time);
                    break;
                }
                case QuoteTikPart.CallOptionPremiums: {//认购期权权利金1
                    String premiums = String.valueOf(fields.get(keyB));
                    setCallOptionPremiums(premiums);
                    break;
                }
                case QuoteTikPart.CallOptionPremiums2: {//认购期权权利金2
                    String premiums = String.valueOf(fields.get(keyB));
                    setCallOptionPremiums2(premiums);
                    break;
                }
                case QuoteTikPart.CallOptionPremiums3: {//认购期权权利金3
                    String premiums = String.valueOf(fields.get(keyB));
                    setCallOptionPremiums3(premiums);
                    break;
                }
                case QuoteTikPart.CallOptionPremiums4: {//认购期权权利金4
                    String premiums = String.valueOf(fields.get(keyB));
                    setCallOptionPremiums4(premiums);
                    break;
                }
                case QuoteTikPart.CallOptionPremiums5: {//认购期权权利金5
                    String premiums = String.valueOf(fields.get(keyB));
                    setCallOptionPremiums5(premiums);
                    break;
                }
                case QuoteTikPart.PutOptionPremiums: {//认沽期权权利金1
                    String putPreminus = String.valueOf(fields.get(keyB));
                    setPutOptionPremiums(putPreminus);
                    break;
                }
                case QuoteTikPart.PutOptionPremiums2: {//认沽期权权利金2
                    String putPreminus = String.valueOf(fields.get(keyB));
                    setPutOptionPremiums2(putPreminus);
                    break;
                }
                case QuoteTikPart.PutOptionPremiums3: {//认沽期权权利金3
                    String putPreminus = String.valueOf(fields.get(keyB));
                    setPutOptionPremiums3(putPreminus);
                    break;
                }
                case QuoteTikPart.PutOptionPremiums4: {//认沽期权权利金4
                    String putPreminus = String.valueOf(fields.get(keyB));
                    setPutOptionPremiums4(putPreminus);
                    break;
                }
                case QuoteTikPart.PutOptionPremiums5: {//认沽期权权利金5
                    String putPreminus = String.valueOf(fields.get(keyB));
                    setPutOptionPremiums5(putPreminus);
                    break;
                }
                case QuoteTikPart.strAskOrder: {// 卖订单号1
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder(order);
                    break;
                }
                case QuoteTikPart.strAskOrder2: {// 卖订单号2
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder2(order);
                    break;
                }
                case QuoteTikPart.strAskOrder3: {// 卖订单号3
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder3(order);
                    break;
                }
                case QuoteTikPart.strAskOrder4: {// 卖订单号4
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder4(order);
                    break;
                }
                case QuoteTikPart.strAskOrder5: {// 卖订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder5(order);
                    break;
                }
                case QuoteTikPart.strBidOrder: {// 买订单号1
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder(order);
                    break;
                }
                case QuoteTikPart.strBidOrder2: {// 买订单号2
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder2(order);
                    break;
                }
                case QuoteTikPart.strBidOrder3: {// 买订单号3
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder3(order);
                    break;
                }
                case QuoteTikPart.strBidOrder4: {// 买订单号4
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder4(order);
                    break;
                }
                case QuoteTikPart.strBidOrder5: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder5(order);
                    break;
                }

                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER6: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder6(order);
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER7: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder7(order);
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER8: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder8(order);
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER9: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder9(order);
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER10: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrBidOrder10(order);
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER6: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder6(order);
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER7: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder7(order);
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER8: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder8(order);
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER9: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder9(order);
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER10: {// 买订单号5
                    String order = String.valueOf(fields.get(keyB));
                    setStrAskOrder10(order);
                    break;
                }

                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL: {// 买订单量
                    setBidOrderVolume(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL2: {// 买订单量
                    setBidOrderVolume2(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL3: {// 买订单量
                    setBidOrderVolume3(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL4: {// 买订单量
                    setBidOrderVolume4(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL5: {// 买订单量
                    setBidOrderVolume5(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL6: {// 买订单量
                    setBidOrderVolume6(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL7: {// 买订单量
                    setBidOrderVolume7(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL8: {// 买订单量
                    setBidOrderVolume8(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL9: {// 买订单量
                    setBidOrderVolume9(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL10: {// 买订单量
                    setBidOrderVolume10(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL: {// 买订单量
                    setAskOrderVolume(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL2: {// 买订单量
                    setAskOrderVolume2(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL3: {// 买订单量
                    setAskOrderVolume3(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL4: {// 买订单量
                    setAskOrderVolume4(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL5: {// 买订单量
                    setAskOrderVolume5(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL6: {// 买订单量
                    setAskOrderVolume6(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL7: {// 买订单量
                    setAskOrderVolume7(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL8: {// 买订单量
                    setAskOrderVolume8(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL9: {// 买订单量
                    setAskOrderVolume9(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL10: {// 买订单量
                    setAskOrderVolume10(fields.get(keyB).toString());
                    break;
                }
                case QuoteTikPart.Highest: {//  如果行情里有这个数据，直接赋值给本地盘面 没有这个数据就不会下发
                    if (!"".equals(fields.get(keyB).toString()) && Double.parseDouble(fields.get(keyB).toString()) != 0) {
                        setHighest(fields.get(keyB).toString());
                    }
                }
                    break;
                case QuoteTikPart.Lowest: {// 如果行情里有这个数据，直接赋值给本地盘面，没有这个数据就不会下发
                    if (!"".equals(fields.get(keyB).toString()) && Double.parseDouble(fields.get(keyB).toString()) != 0) {
                        setLowest(fields.get(keyB).toString());
                    }
                    break;
                }
                case QuoteTikPart.Opened: {
                    if (!"".equals(fields.get(keyB).toString()) && Double.parseDouble(fields.get(keyB).toString()) != 0) {
                        setOpened(fields.get(keyB).toString());
                    }
                    break;
                }
            }
        }
        // 买卖五档、买卖委托队列，不数据固定推送范围，jiang.taibai 口述
//        if ("0".equals(ask1)) {
//            setAsk(ask1);
//        }
//        if ("0".equals(ask2)) {
//            setAsk2(ask2);
//        }
//        if ("0".equals(ask3)) {
//            setAsk3(ask3);
//        }
//        if ("0".equals(ask4)) {
//            setAsk4(ask4);
//        }
//        if ("0".equals(ask5)) {
//            setAsk5(ask5);
//        }
//
//        if ("0".equals(bid1)) {
//            setBid(bid1);
//        }
//        if ("0".equals(bid2)) {
//            setBid2(bid2);
//        }
//        if ("0".equals(bid3)) {
//            setBid3(bid3);
//        }
//        if ("0".equals(bid4)) {T
//            setBid4(bid4);
//        }
//        if ("0".equals(bid5)) {
//            setBid5(bid5);
//        }

//        if ("0".equals(askVol1)) {
//            setAskVolume(askVol1);
//        }
//        if ("0".equals(askVol2)) {
//            setAskVolume2(askVol2);
//        }
//        if ("0".equals(askVol3)) {
//            setAskVolume3(askVol3);
//        }
//        if ("0".equals(askVol4)) {
//            setAskVolume4(askVol4);
//        }
//        if ("0".equals(askVol5)) {
//            setAskVolume5(askVol5);
//        }
//
//        if ("0".equals(bidVol1)) {
//            setBidVolume(bidVol1);
//        }
//        if ("0".equals(bidVol2)) {
//            setBidVolume2(bidVol2);
//        }
//        if ("0".equals(bidVol3)) {
//            setBidVolume3(bidVol3);
//        }
//        if ("0".equals(bidVol4)) {
//            setBidVolume4(bidVol4);
//        }
//        if ("0".equals(bidVol5)) {
//            setBidVolume5(bidVol5);
//        }


//        if ("".equals(askQueueInfo)) {
//            setAskQueueInfo(askQueueInfo);
//        }
//        if ("".equals(bidQueueInfo)) {
//            setBidQueueInfo(bidQueueInfo);
//        }
    }

    /**
     * 更新某些计算字段
     */
    private void updateOne() {
        double totalBuy = 0;
        double totalSell = 0;
        // 计算总委买卖量以计算委比
        if (!getBidVolume().equals("0")) {
            totalBuy += Double.parseDouble(getBidVolume());
        }
        if (!getBidVolume2().equals("0")) {
            totalBuy += Double.parseDouble(getBidVolume2());
        }
        if (!getBidVolume3().equals("0")) {
            totalBuy += Double.parseDouble(getBidVolume3());
        }
        if (!getBidVolume4().equals("0")) {
            totalBuy += Double.parseDouble(getBidVolume4());
        }
        if (!getBidVolume5().equals("0")) {
            totalBuy += Double.parseDouble(getBidVolume5());
        }

        if (!getAskVolume().equals("0")) {
            totalSell += Double.parseDouble(getAskVolume());
        }
        if (!getAskVolume2().equals("0")) {
            totalSell += Double.parseDouble(getAskVolume2());
        }
        if (!getAskVolume3().equals("0")) {
            totalSell += Double.parseDouble(getAskVolume3());
        }
        if (!getAskVolume4().equals("0")) {
            totalSell += Double.parseDouble(getAskVolume4());
        }
        if (!getAskVolume5().equals("0")) {
            totalSell += Double.parseDouble(getAskVolume5());
        }

        if (totalBuy + totalSell != 0) {
            committee = ((totalBuy - totalSell) / (totalBuy + totalSell)) * 100 + "";
        } else {
            committee = "0";
        }

        // 计算振幅
        if (getHighest() != null && !getHighest().isEmpty() &&
                getLowest() != null && !getLowest().isEmpty() &&
                getPreClose() != null && !getPreClose().isEmpty()
                && Double.parseDouble(getPreClose()) > 0) {
            double highest = Double.parseDouble(getHighest());
            double lowest = Double.parseDouble(getLowest());
            double preClose = Double.parseDouble(getPreClose());
            if (preClose == 0) {
                setAmplitude("--");
            } else {
                setAmplitude(((highest - lowest) * 100) / preClose + "");
            }
        } else {
            setAmplitude("--");
        }

        double totalVolume = 0;
        double preHoldVolume = 0;
        try {
            totalVolume = Double.parseDouble(this.totalVolume);
            preHoldVolume = Double.parseDouble(this.preHoldVolume);
        } catch (Exception ex) {

        }
        if (preHoldVolume > 0) {
            this.changeVolumeRange = (totalVolume / preHoldVolume) * 100 + "";
        } else {
            this.changeVolumeRange = "0";
        }
    }

    /**
     * 更新一些根据现价变化而变化的字段
     */
    private void updateByLast() {
        if (getPrice().equals("0")) {
            return;
        }

        if (this.prePrice == null) {
            this.prePrice = getPrice();
        } else {
            // 更新价格变化方向标志
            if (Double.parseDouble(getPrice()) != 0) {//// FIXME: 2018/3/2 收到0 ，可以是因为委托单出发了行情

                if (Double.parseDouble(this.prePrice) < Double.parseDouble(getPrice())) {
                    this.raisedFlag = 1;
                } else if (Double.parseDouble(this.prePrice) > Double.parseDouble(getPrice())) {
                    this.raisedFlag = 2;
                } else {
                    this.raisedFlag = 0;
                }
            }
            this.prePrice = getPrice();
        }

        if (getPreClose() != null) {
            // 更新涨跌标志
            if (Double.parseDouble(getPrice()) > Double.parseDouble(getPreClose())) {
                this.upDown = 1;
            } else if (Double.parseDouble(getPrice()) < Double.parseDouble(getPreClose())) {
                this.upDown = 2;
            } else {
                this.upDown = 0;
            }
        }

        /**
         * 如果交易类型输入tradeTypes里面的，就不更新高低
         */
        double price = Double.parseDouble(getPrice());
        if (canUseQuote()) {
            if (getOpened() == null || getOpened().isEmpty() || Double.parseDouble(getOpened()) == 0) {
                setOpened(this.getPrice());
            }

            if (getHighest() == null || getHighest().isEmpty() || Double.parseDouble(getHighest()) == 0) {
                setHighest(this.getPrice());
            }
            if (getLowest() == null || getLowest().isEmpty() || Double.parseDouble(getLowest()) == 0) {
                setLowest(this.getPrice());
            }
            if (price > 0) {
                // 仅有限价大于0才更新高低价
                setHighest(price > Double.parseDouble(getHighest()) ? getPrice() : getHighest());
                setLowest(price < Double.parseDouble(getLowest()) ? getPrice() : getLowest());
            }
        }

        // 计算涨跌和涨幅
        if (getPrice() != null && !getPrice().isEmpty() && getPreClose() != null && !getPreClose().isEmpty()) {
            double preClose = Double.parseDouble(getPreClose());// 涨跌幅用昨结计算
            if (price == 0 || preClose == 0) {
                setUpDownValue("--");
                setUpDownRange("--");
            } else {
                setUpDownValue(price - preClose + "");
                setUpDownRange(((price - preClose) * 100) / preClose + "");
            }
        }
    }

    public String getTotalVolume() {
        if (totalVolume == null || totalVolume.isEmpty() || Double.parseDouble(totalVolume) <= 0) {
            return "0";
        }
        return totalVolume;
    }

    public void setTotalVolume(String totalVolume) {
        this.totalVolume = totalVolume;
    }

    public String getTotalTurnover() {
        if (totalTurnover == null || totalTurnover.equals("") || totalTurnover.equals("null")) {
            totalTurnover = "0";
        }
        return totalTurnover;
    }

    public void setTotalTurnover(String totalTurnover) {
        this.totalTurnover = totalTurnover;
    }

    public String getTotalBidVolume() {
        if (totalBidVolume == null || totalBidVolume.equals("") || totalBidVolume.equals("null")) {
            totalBidVolume = "0";
        }
        return totalBidVolume;
    }

    public void setTotalBidVolume(String totalBidVolume) {
        this.totalBidVolume = totalBidVolume;
    }

    public String getTotalAskVolume() {
        if (totalAskVolume == null || totalAskVolume.equals("") || totalAskVolume.equals("null")) {
            totalAskVolume = "0";
        }
        return totalAskVolume;
    }

    public void setTotalAskVolume(String totalAskVolume) {
        this.totalAskVolume = totalAskVolume;
    }


    public void setUpDown(int upDown) {
        this.upDown = upDown;
    }

    private void updateTime(Date atTime) {
        if (getLastTime().before(atTime)) {
            setLastTime(atTime);
        }

        if (getOpenTime() == null) {
            setOpenTime(atTime);
        }
    }

    public String getHoldVolume() {
        if (!isEmpty(holdVolume)) {
            holdVolume = "0";
        }
        return holdVolume;
    }

    public void setHoldVolume(String holdVolume) {
        this.holdVolume = holdVolume;
    }

    public String getLimitHigh() {
        if (limitHigh == null || limitHigh.equals("") || limitHigh.equals("null")) {
            limitHigh = "0";
        }
        return limitHigh;
    }

    public void setLimitHigh(String limitHigh) {
        this.limitHigh = limitHigh;
    }

    public String getLimitLow() {
        if (limitLow == null || limitLow.equals("") || limitLow.equals("null")) {
            limitLow = "0";
        }
        return limitLow;
    }

    public void setLimitLow(String limitLow) {
        this.limitLow = limitLow;
    }

    public String getChangeVolumeRange() {
        if (changeVolumeRange == null) {
            changeVolumeRange = "0";
        }
        return changeVolumeRange;
    }

    public void setChangeVolumeRange(String changeVolumeRange) {
        this.changeVolumeRange = changeVolumeRange;
    }

    public String getPreHoldVolume() {
        return preHoldVolume;
    }

    public void setPreHoldVolume(String preHoldVolume) {
        this.preHoldVolume = preHoldVolume;
    }

    /**
     * 将盘面数据直接存储
     *
     * @param tik
     * @return
     */
    public static BidQuoteDay toDayQuote(QuoteTik tik) {
//		if(tik.getAtTime() == null){
//			return null;
//		}
        BidQuoteDay quoteDay = new BidQuoteDay();
        quoteDay.setStrikePrice(tik.getStickPrice());

        quoteDay.setAsk(tik.getAsk());
        quoteDay.setAsk2(tik.getValue(QuoteTikPart.Ask2));
        quoteDay.setAsk3(tik.getValue(QuoteTikPart.Ask3));
        quoteDay.setAsk4(tik.getValue(QuoteTikPart.Ask4));
        quoteDay.setAsk5(tik.getValue(QuoteTikPart.Ask5));
        quoteDay.setAsk6(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK6));
        quoteDay.setAsk7(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK7));
        quoteDay.setAsk8(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK8));
        quoteDay.setAsk9(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK9));
        quoteDay.setAsk10(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK10));
        quoteDay.setBid(tik.getBid());
        quoteDay.setBid2(tik.getValue(QuoteTikPart.Bid2));
        quoteDay.setBid3(tik.getValue(QuoteTikPart.Bid3));
        quoteDay.setBid4(tik.getValue(QuoteTikPart.Bid4));
        quoteDay.setBid5(tik.getValue(QuoteTikPart.Bid5));
        quoteDay.setBid6(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID6));
        quoteDay.setBid7(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID7));
        quoteDay.setBid8(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID8));
        quoteDay.setBid9(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID9));
        quoteDay.setBid10(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID10));
        quoteDay.setAskVolume(tik.getValue(QuoteTikPart.AskVolume));
        quoteDay.setAskVolume2(tik.getValue(QuoteTikPart.AskVolume2));
        quoteDay.setAskVolume3(tik.getValue(QuoteTikPart.AskVolume3));
        quoteDay.setAskVolume4(tik.getValue(QuoteTikPart.AskVolume4));
        quoteDay.setAskVolume5(tik.getValue(QuoteTikPart.AskVolume5));
        quoteDay.setAskVolume6(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME6));
        quoteDay.setAskVolume7(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME7));
        quoteDay.setAskVolume8(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME8));
        quoteDay.setAskVolume9(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME9));
        quoteDay.setAskVolume10(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_VOLUME10));
        quoteDay.setBidVolume(tik.getValue(QuoteTikPart.BidVolume));
        quoteDay.setBidVolume2(tik.getValue(QuoteTikPart.BidVolume2));
        quoteDay.setBidVolume3(tik.getValue(QuoteTikPart.BidVolume3));
        quoteDay.setBidVolume4(tik.getValue(QuoteTikPart.BidVolume4));
        quoteDay.setBidVolume5(tik.getValue(QuoteTikPart.BidVolume5));
        quoteDay.setBidVolume6(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME6));
        quoteDay.setBidVolume7(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME7));
        quoteDay.setBidVolume8(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME8));
        quoteDay.setBidVolume9(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME9));
        quoteDay.setBidVolume10(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_VOLUME10));

        quoteDay.setStrAskOrder(tik.getValue(QuoteTikPart.strAskOrder));
        quoteDay.setStrAskOrder2(tik.getValue(QuoteTikPart.strAskOrder2));
        quoteDay.setStrAskOrder3(tik.getValue(QuoteTikPart.strAskOrder3));
        quoteDay.setStrAskOrder4(tik.getValue(QuoteTikPart.strAskOrder4));
        quoteDay.setStrAskOrder5(tik.getValue(QuoteTikPart.strAskOrder5));
        quoteDay.setStrAskOrder6(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER6));
        quoteDay.setStrAskOrder7(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER7));
        quoteDay.setStrAskOrder8(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER8));
        quoteDay.setStrAskOrder9(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER9));
        quoteDay.setStrAskOrder10(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDER10));

        quoteDay.setStrBidOrder(tik.getValue(QuoteTikPart.strBidOrder));
        quoteDay.setStrBidOrder2(tik.getValue(QuoteTikPart.strBidOrder2));
        quoteDay.setStrBidOrder3(tik.getValue(QuoteTikPart.strBidOrder3));
        quoteDay.setStrBidOrder4(tik.getValue(QuoteTikPart.strBidOrder4));
        quoteDay.setStrBidOrder5(tik.getValue(QuoteTikPart.strBidOrder5));
        quoteDay.setStrBidOrder6(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER6));
        quoteDay.setStrBidOrder7(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER7));
        quoteDay.setStrBidOrder8(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER8));
        quoteDay.setStrBidOrder9(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER9));
        quoteDay.setStrBidOrder10(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDER10));

        quoteDay.setBidOrderVolume(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL));
        quoteDay.setBidOrderVolume2(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL2));
        quoteDay.setBidOrderVolume3(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL3));
        quoteDay.setBidOrderVolume4(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL4));
        quoteDay.setBidOrderVolume5(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL5));
        quoteDay.setBidOrderVolume6(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL6));
        quoteDay.setBidOrderVolume7(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL7));
        quoteDay.setBidOrderVolume8(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL8));
        quoteDay.setBidOrderVolume9(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL9));
        quoteDay.setBidOrderVolume10(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_BID_ORDERVOL10));

        quoteDay.setAskOrderVolume(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL));
        quoteDay.setAskOrderVolume2(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL2));
        quoteDay.setAskOrderVolume3(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL3));
        quoteDay.setAskOrderVolume4(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL4));
        quoteDay.setAskOrderVolume5(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL5));
        quoteDay.setAskOrderVolume6(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL6));
        quoteDay.setAskOrderVolume7(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL7));
        quoteDay.setAskOrderVolume8(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL8));
        quoteDay.setAskOrderVolume9(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL9));
        quoteDay.setAskOrderVolume10(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_ASK_ORDERVOL10));

        quoteDay.setNonTotalVolume(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_NONTOTALVOLUME));
        quoteDay.setNonTotalHolderVolume(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_NONTOTALHOLDERVOLUME));
        quoteDay.setNonTotallot(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_NONTOTALLOT));
        quoteDay.setNonTotalTurnover(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_NONTOTALTURNOVER));
        quoteDay.setMarkPrice(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_MARKPRICE));
        quoteDay.setFundsRate(tik.getValue(QuoteTikPart.MI_QUOTE_FIELD_CODE_FUNDSRATE));

        quoteDay.setStrChange(tik.getValue(QuoteTikPart.Change));
        quoteDay.setStrPctChange(tik.getValue(QuoteTikPart.ChangePercent));
        quoteDay.setStrChangeSinceOpen(tik.getValue(QuoteTikPart.ChangeFromOpen));

        quoteDay.setBidQueueInfo(tik.getValue(QuoteTikPart.BidQueueInfo));
        quoteDay.setAskQueueInfo(tik.getValue(QuoteTikPart.AskQueueInfo));

        quoteDay.setExchangeTime(tik.getValue(QuoteTikPart.ExchangeTime));

//		quoteDay.setDecimalPlace(Byte.parseByte(tik.getValue(QuoteTikPart.DecimalPlace)));
        quoteDay.setOpened(tik.getValue((byte) QuoteTikPart.Opened));
        quoteDay.setHighest(tik.getValue((byte) QuoteTikPart.Highest));
        quoteDay.setLowest(tik.getValue((byte) QuoteTikPart.Lowest));
        String last = tik.getValue(QuoteTikPart.Last);
        if (!(last == null || last.equals("") || last.equals("null") || Double.parseDouble(last) == 0)) {// 新行情，最新价没有变化的话，不会再下发。只要是下发了的，才算。
            quoteDay.setPrice(tik.getValue(QuoteTikPart.Last));
        }
        quoteDay.setPreClose(tik.getValue((byte) QuoteTikPart.PreClose));
        try {
            if (tik.getValue(QuoteTikPart.DecimalPlace) == null) {
                quoteDay.setDecimalPlace(0);
            } else {
                quoteDay.setDecimalPlace(Integer.parseInt(tik.getValue(QuoteTikPart.DecimalPlace)));
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        quoteDay.setOpenTime(tik.getAtTime());
        quoteDay.setPreHoldVolume(tik.getValue(QuoteTikPart.PreHoldVolume));
        quoteDay.setHoldVolume(tik.getValue(QuoteTikPart.HoldVolume));
        quoteDay.setInventory(tik.getValue(QuoteTikPart.Inventory));
        quoteDay.setGoodsCode(tik.getGoodsCode());
        double preSettle = 0;
        try {
            preSettle = Double.parseDouble(quoteDay.getPreSettle());
        } catch (Exception e) {
            // TODO: handle exception
        }

//        if (preSettle > 0) {
//            quoteDay.setPreClose(preSettle + "");
//        } else {
            quoteDay.setPreClose(tik.getValue((byte) QuoteTikPart.PreClose));
//        }

        quoteDay.setLastTime(tik.getAtTime());
        quoteDay.setTotalTurnover(tik.getValue(QuoteTikPart.TotalTurnover));
        quoteDay.setTotalVolume(tik.getValue(QuoteTikPart.TotalVolume));
        quoteDay.setLastVolume(tik.getValue(QuoteTikPart.LastVolume));
        quoteDay.setSettle(tik.getValue(QuoteTikPart.Settle));
        quoteDay.setPreSettle(tik.getValue(QuoteTikPart.PreSettle));
        quoteDay.setStrPctChange(tik.getValue(QuoteTikPart.ChangePercent));
        quoteDay.setStrChange(tik.getValue(QuoteTikPart.Change));
        quoteDay.setStrChangeSinceOpen(tik.getValue(QuoteTikPart.ChangeFromOpen));
        quoteDay.setHoldVolume(tik.getValue(QuoteTikPart.HoldVolume));
        quoteDay.setLimitLow(tik.getValue(QuoteTikPart.LimitLow));
        quoteDay.setLimitHigh(tik.getValue(QuoteTikPart.LimitHigh));
        if (quoteDay.getPreClose() != null && quoteDay.getPrice() != null) {
            if (Double.parseDouble(quoteDay.getPrePrice()) == 0) {
                // 没有最新价
                quoteDay.setUpDown(0);
            } else {
                // 跌
                if (Double.parseDouble(quoteDay.getPreClose()) > Double.parseDouble(quoteDay.getPrice())) {
                    quoteDay.setUpDown(2);
                }
                // 涨
                if (Double.parseDouble(quoteDay.getPreClose()) < Double.parseDouble(quoteDay.getPrice())) {
                    quoteDay.setUpDown(1);
                }
            }
        }

        double price = Double.parseDouble(quoteDay.getPrice());
        if (quoteDay.getPrice() != null && !quoteDay.getPrice().isEmpty() && quoteDay.getPreClose() != null && !quoteDay.getPreClose().isEmpty()) {
            double preClose = Double.parseDouble(quoteDay.getPreClose());// 涨跌幅用昨结计算
            if (price == 0 || preClose == 0) {
                quoteDay.setUpDownValue("--");
                quoteDay.setUpDownRange("--");
            } else {
                quoteDay.setUpDownValue(price - preClose + "");
                quoteDay.setUpDownRange(((price - preClose) * 100) / preClose + "");
            }
        }

        // 计算振幅
        if (quoteDay.getHighest() != null && !quoteDay.getHighest().isEmpty() &&
                quoteDay.getLowest() != null && !quoteDay.getLowest().isEmpty() &&
                quoteDay.getPreClose() != null && !quoteDay.getPreClose().isEmpty()
                && Double.parseDouble(quoteDay.getPreClose()) > 0) {
            double highest = Double.parseDouble(quoteDay.getHighest());
            double lowest = Double.parseDouble(quoteDay.getLowest());
            double preClose = Double.parseDouble(quoteDay.getPreClose());
            if (preClose == 0) {
                quoteDay.setAmplitude("--");
            } else {
                quoteDay.setAmplitude(((highest - lowest) * 100) / preClose + "");
            }
        } else {
            quoteDay.setAmplitude("--");
        }

        // 计算委比
        quoteDay.updateOne();
        return quoteDay;
    }

    /**
     * 合并盘面
     */
    @Override
    public void inputDayQuote(QuoteTik tik) {
        BidQuoteDay quoteDay = toDayQuote(tik);

        if (quoteDay.getLastTime() == null) {
            // 如果盘面时间为空，一般为刚结算，未开市那段时间，这时候，只有涨跌停昨收，昨结等有值
            setLimitHigh(quoteDay.getLimitHigh());
            setLimitLow(quoteDay.getLimitLow());
            setSettle(quoteDay.getSettle());
            setPreSettle(quoteDay.getPreSettle());
            setStrPctChange(quoteDay.getStrPctChange());
            setPreHoldVolume(quoteDay.getPreHoldVolume());
            setChangeVolumeRange(quoteDay.getChangeVolumeRange());
            double preSettle = 0;
            try {
                preSettle = Double.parseDouble(quoteDay.getPreSettle());
            } catch (Exception e) {
                // TODO: handle exception
            }

//            if (preSettle > 0) {
//                setPreClose(quoteDay.getPreSettle());
//            } else {
                setPreClose(quoteDay.getPreClose());
//            }
            return;
        }

        double price = Double.parseDouble(getPrice());
        if (quoteDay.getLastTime() != null && getLastTime() != null && quoteDay.getLastTime().before(getLastTime())) {
            // 如果请求回来的盘面时间，比本地的实时行情时间还早，赋值以下几个字段然后返回
            if (quoteDay.getOpened() != null) {
                setOpened(quoteDay.getOpened());
            }

            if (quoteDay.getHighest() != null) {
                double preHighest = Double.parseDouble(quoteDay.getHighest());
                double cruHighest = Double.parseDouble(getHighest());
                setHighest((cruHighest > preHighest ? cruHighest : preHighest) + "");
            }
            if (quoteDay.getLowest() != null) {
                double preLowest = Double.parseDouble(quoteDay.getLowest());
                double cruLowest = Double.parseDouble(quoteDay.getLowest());
                setLowest((cruLowest < preLowest ? cruLowest : preLowest) + "");
            }

            if (quoteDay.getOpenTime() != null) {
                setOpenTime(quoteDay.getOpenTime());
            }
            setPreSettle(quoteDay.getPreSettle());
            setStrPctChange(quoteDay.getStrPctChange());
            double preSettle = 0;
            try {
                preSettle = Double.parseDouble(quoteDay.getPreSettle());
            } catch (Exception e) {
                // TODO: handle exception
            }
            // 有可能在这里才得到昨持仓，所以要计算一次换手率
            setPreHoldVolume(quoteDay.getPreHoldVolume());
            double totalVolume = 0;
            double preHoldVolume = 0;
            try {
                totalVolume = Double.parseDouble(this.totalVolume);
                preHoldVolume = Double.parseDouble(this.preHoldVolume);
            } catch (Exception ex) {

            }
            if (preHoldVolume > 0) {
                this.changeVolumeRange = (totalVolume / preHoldVolume) * 100 + "";
            } else {
                this.changeVolumeRange = "0";
            }

//            if (preSettle == 0) {
//                setPreClose(quoteDay.getPreSettle());
//            } else {
                setPreClose(quoteDay.getPreClose());
//            }

            setSettle(quoteDay.getSettle());

            // 计算涨跌和涨幅  要在昨收赋值后做
            if (getPrice() != null && !getPrice().isEmpty() && getPreClose() != null && !getPreClose().isEmpty()) {
                double preClose = Double.parseDouble(getPreClose()); // 涨跌幅用昨结计算
                if (price == 0 || preClose == 0) {
                    setUpDownValue("--");
                    setUpDownRange("--");
                } else {
                    setUpDownValue(price - preClose + "");
                    setUpDownRange(((price - preClose) * 100) / preClose + "");
                }
            }

            // 计算振幅
            if (getHighest() != null && !getHighest().isEmpty() &&
                    getLowest() != null && !getLowest().isEmpty() &&
                    getPreClose() != null && !getPreClose().isEmpty()) {
                double highest = Double.parseDouble(getHighest());
                double lowest = Double.parseDouble(getLowest());
                double preClose = Double.parseDouble(getPreClose());
                if (preClose == 0) {
                    setAmplitude("--");
                } else {
                    setAmplitude(((highest - lowest) * 100) / preClose + "");
                }
            } else {
                setAmplitude("--");
            }
            return;
        }

        if (quoteDay.getOpened() != null) {
            setOpened(quoteDay.getOpened());
        }

        if (quoteDay.getOpenTime() != null) {
            setOpenTime(quoteDay.getOpenTime());
        }
        if (quoteDay.getAsk() != null) {
            setAsk(quoteDay.getAsk());
        }
        if (quoteDay.getAsk2() != null) {
            setAsk2(quoteDay.getAsk2());
        }
        if (quoteDay.getAsk3() != null) {
            setAsk3(quoteDay.getAsk3());
        }
        if (quoteDay.getBidQueueInfo() != null) {
            setBidQueueInfo(quoteDay.getBidQueueInfo());
        }
        if (quoteDay.getAskQueueInfo() != null) {
            setAskQueueInfo(quoteDay.getAskQueueInfo());
        }
//		quoteDay.setBidQueueInfo(tik.getValue(QuoteTikPart.BidQueueInfo));
//		quoteDay.setAskQueueInfo(tik.getValue(QuoteTikPart.AskQueueInfo));
        if (quoteDay.getAsk4() != null) {
            setAsk4(quoteDay.getAsk4());
        }
        if (quoteDay.getAsk5() != null) {
            setAsk5(quoteDay.getAsk5());
        }

        if (quoteDay.getAsk6() != null) {
            setAsk6(quoteDay.getAsk6());
        }

        if (quoteDay.getAsk7() != null) {
            setAsk7(quoteDay.getAsk7());
        }

        if (quoteDay.getAsk8() != null) {
            setAsk8(quoteDay.getAsk8());
        }

        if (quoteDay.getAsk9() != null) {
            setAsk9(quoteDay.getAsk9());
        }
        if (quoteDay.getAsk10() != null) {
            setAsk10(quoteDay.getAsk10());
        }
        if (quoteDay.getAskVolume() != null) {
            setAskVolume(quoteDay.getAskVolume());
        }
        if (quoteDay.getAskVolume2() != null) {
            setAskVolume2(quoteDay.getAskVolume2());
        }
        if (quoteDay.getAskVolume3() != null) {
            setAskVolume3(quoteDay.getAskVolume3());
        }
        if (quoteDay.getAskVolume4() != null) {
            setAskVolume4(quoteDay.getAskVolume4());
        }
        if (quoteDay.getAskVolume5() != null) {
            setAskVolume5(quoteDay.getAskVolume5());
        }
        if (quoteDay.getAskVolume6() != null) {
            setAskVolume6(quoteDay.getAskVolume6());
        }
        if (quoteDay.getAskVolume7() != null) {
            setAskVolume7(quoteDay.getAskVolume7());
        }
        if (quoteDay.getAskVolume8() != null) {
            setAskVolume8(quoteDay.getAskVolume8());
        }
        if (quoteDay.getAskVolume9() != null) {
            setAskVolume9(quoteDay.getAskVolume9());
        }
        if (quoteDay.getAskVolume10() != null) {
            setAskVolume10(quoteDay.getAskVolume10());
        }
        if (quoteDay.getBid() != null) {
            setBid(quoteDay.getBid());
        }
        if (quoteDay.getBid2() != null) {
            setBid2(quoteDay.getBid2());
        }
        if (quoteDay.getBid3() != null) {
            setBid3(quoteDay.getBid3());
        }
        if (quoteDay.getBid4() != null) {
            setBid4(quoteDay.getBid4());
        }
        if (quoteDay.getBid5() != null) {
            setBid5(quoteDay.getBid5());
        }
        if (quoteDay.getBid6() != null) {
            setBid6(quoteDay.getBid6());
        }
        if (quoteDay.getBid7() != null) {
            setBid7(quoteDay.getBid7());
        }
        if (quoteDay.getBid8() != null) {
            setBid8(quoteDay.getBid8());
        }
        if (quoteDay.getBid9() != null) {
            setBid9(quoteDay.getBid9());
        }
        if (quoteDay.getBid10() != null) {
            setBid10(quoteDay.getBid10());
        }
        if (quoteDay.getBidVolume() != null) {
            setBidVolume(quoteDay.getBidVolume());
        }
        if (quoteDay.getBidVolume2() != null) {
            setBidVolume2(quoteDay.getBidVolume2());
        }
        if (quoteDay.getBidVolume3() != null) {
            setBidVolume3(quoteDay.getBidVolume3());
        }
        if (quoteDay.getBidVolume4() != null) {
            setBidVolume4(quoteDay.getBidVolume4());
        }
        if (quoteDay.getBidVolume5() != null) {
            setBidVolume5(quoteDay.getBidVolume5());
        }
        if (quoteDay.getBidVolume6() != null) {
            setBidVolume6(quoteDay.getBidVolume6());
        }
        if (quoteDay.getBidVolume7() != null) {
            setBidVolume7(quoteDay.getBidVolume7());
        }
        if (quoteDay.getBidVolume8() != null) {
            setBidVolume8(quoteDay.getBidVolume8());
        }
        if (quoteDay.getBidVolume9() != null) {
            setBidVolume9(quoteDay.getBidVolume9());
        }
        if (quoteDay.getBidVolume10() != null) {
            setBidVolume10(quoteDay.getBidVolume10());
        }
        if (quoteDay.getOpened() != null) {
            setOpened(quoteDay.getOpened());
        }
        if (quoteDay.getHighest() != null) {
            double preHighest = Double.parseDouble(quoteDay.getHighest());
            double cruHighest = Double.parseDouble(getHighest());
            setHighest((cruHighest > preHighest ? cruHighest : preHighest) + "");
        }
        if (quoteDay.getLowest() != null) {
            double preLowest = Double.parseDouble(quoteDay.getLowest());
            double cruLowest = Double.parseDouble(quoteDay.getLowest());
            setLowest((cruLowest < preLowest ? cruLowest : preLowest) + "");
        }
        if (quoteDay.getPrice() != null && Double.parseDouble(quoteDay.getPrice()) != 0) {
            setPrice(quoteDay.getPrice());
        }

        if (quoteDay.getLastVolume() != null && Double.parseDouble(quoteDay.getLastVolume()) != 0) {
            setLastVolume(quoteDay.getLastVolume());
        }

        if (quoteDay.getLastTime() != null) {
            if (getLastTime() == null || quoteDay.getLastTime().after(getLastTime())) {
                setLastTime(quoteDay.getLastTime());
            }
        }
        setPreSettle(quoteDay.getPreSettle());
        setStrPctChange(quoteDay.getStrPctChange());
        double preSettle = 0;
        try {
            preSettle = Double.parseDouble(quoteDay.getPreSettle());
        } catch (Exception e) {
            // TODO: handle exception
        }

//        if (preSettle > 0) {
//            setPreClose(quoteDay.getPreSettle());
//        } else {
            setPreClose(quoteDay.getPreClose());
//        }

        setSettle(quoteDay.getSettle());

        if (quoteDay.getTotalVolume() != null) {
            setTotalVolume(quoteDay.getTotalVolume());
        }

        if (quoteDay.getTotalTurnover() != null) {
            setTotalTurnover(quoteDay.getTotalTurnover());
        }

        if (quoteDay.getTotalAskVolume() != null) {
            setTotalAskVolume(quoteDay.getTotalAskVolume());
        }

        if (quoteDay.getTotalBidVolume() != null) {
            setTotalBidVolume(quoteDay.getTotalBidVolume());
        }

        if (!quoteDay.getLimitHigh().equals("0")) {
            setLimitHigh(limitHigh);
        }

        if (!quoteDay.getLimitLow().equals("0")) {
            setLimitLow(limitLow);
        }

        if (quoteDay.getPreHoldVolume() != null) {
            setPreHoldVolume(quoteDay.getPreHoldVolume());
        }

        setChangeVolumeRange(quoteDay.getChangeVolumeRange());

        // 计算涨跌和涨幅
        if (getPrice() != null && !getPrice().isEmpty() && getPreClose() != null && !getPreClose().isEmpty()) {
            double preClose = Double.parseDouble(getPreClose());// 涨跌幅用昨结计算
            if (price == 0 || preClose == 0) {
                setUpDownValue("--");
                setUpDownRange("--");
            } else {
                setUpDownValue(price - preClose + "");
                setUpDownRange(((price - preClose) * 100) / preClose + "");
            }
        }

        updateOne();
    }

    public String getCallOptionPremiums() {
        if (callOptionPremiums == null || callOptionPremiums.equals("") || callOptionPremiums.equals("null")) {
            callOptionPremiums = "0";
        }
        return callOptionPremiums;
    }

    public void setCallOptionPremiums(String callOptionPremiums) {
        this.callOptionPremiums = callOptionPremiums;
    }

    public String getCallOptionPremiums2() {
        if (callOptionPremiums2 == null || callOptionPremiums2.equals("") || callOptionPremiums2.equals("null")) {
            callOptionPremiums2 = "0";
        }
        return callOptionPremiums2;
    }

    public void setCallOptionPremiums2(String callOptionPremiums2) {
        this.callOptionPremiums2 = callOptionPremiums2;
    }

    public String getCallOptionPremiums3() {
        if (callOptionPremiums3 == null || callOptionPremiums3.equals("") || callOptionPremiums3.equals("null")) {
            callOptionPremiums3 = "0";
        }
        return callOptionPremiums3;
    }

    public void setCallOptionPremiums3(String callOptionPremiums3) {
        this.callOptionPremiums3 = callOptionPremiums3;
    }

    public String getCallOptionPremiums4() {
        if (callOptionPremiums4 == null || callOptionPremiums4.equals("") || callOptionPremiums4.equals("null")) {
            callOptionPremiums4 = "0";
        }
        return callOptionPremiums4;
    }

    public void setCallOptionPremiums4(String callOptionPremiums4) {
        this.callOptionPremiums4 = callOptionPremiums4;
    }

    public String getCallOptionPremiums5() {
        if (callOptionPremiums5 == null || callOptionPremiums5.equals("") || callOptionPremiums5.equals("null")) {
            callOptionPremiums5 = "0";
        }
        return callOptionPremiums5;
    }

    public void setCallOptionPremiums5(String callOptionPremiums5) {
        this.callOptionPremiums5 = callOptionPremiums5;
    }

    public String getPutOptionPremiums() {
        if (putOptionPremiums == null || putOptionPremiums.equals("") || putOptionPremiums.equals("null")) {
            putOptionPremiums = "0";
        }
        return putOptionPremiums;
    }

    public void setPutOptionPremiums(String putOptionPremiums) {
        this.putOptionPremiums = putOptionPremiums;
    }

    public String getPutOptionPremiums2() {
        if (putOptionPremiums2 == null || putOptionPremiums2.equals("") || putOptionPremiums2.equals("null")) {
            putOptionPremiums2 = "0";
        }
        return putOptionPremiums2;
    }

    public void setPutOptionPremiums2(String putOptionPremiums2) {
        this.putOptionPremiums2 = putOptionPremiums2;
    }

    public String getPutOptionPremiums3() {
        if (putOptionPremiums3 == null || putOptionPremiums3.equals("") || putOptionPremiums3.equals("null")) {
            putOptionPremiums3 = "0";
        }
        return putOptionPremiums3;
    }

    public void setPutOptionPremiums3(String putOptionPremiums3) {
        this.putOptionPremiums3 = putOptionPremiums3;
    }

    public String getPutOptionPremiums4() {
        if (putOptionPremiums4 == null || putOptionPremiums4.equals("") || putOptionPremiums4.equals("null")) {
            putOptionPremiums4 = "0";
        }
        return putOptionPremiums4;
    }

    public void setPutOptionPremiums4(String putOptionPremiums4) {
        this.putOptionPremiums4 = putOptionPremiums4;
    }

    public String getPutOptionPremiums5() {
        if (putOptionPremiums5 == null || putOptionPremiums5.equals("") || putOptionPremiums5.equals("null")) {
            putOptionPremiums5 = "0";
        }
        return putOptionPremiums5;
    }

    public void setPutOptionPremiums5(String putOptionPremiums5) {
        this.putOptionPremiums5 = putOptionPremiums5;
    }

    public String getStrBidOrder() {
        return strBidOrder;
    }

    public void setStrBidOrder(String strBidOrder) {
        this.strBidOrder = strBidOrder;
    }

    public String getStrBidOrder2() {
        return strBidOrder2;
    }

    public void setStrBidOrder2(String strBidOrder2) {
        this.strBidOrder2 = strBidOrder2;
    }

    public String getStrBidOrder3() {
        return strBidOrder3;
    }

    public void setStrBidOrder3(String strBidOrder3) {
        this.strBidOrder3 = strBidOrder3;
    }

    public String getStrBidOrder4() {
        return strBidOrder4;
    }

    public void setStrBidOrder4(String strBidOrder4) {
        this.strBidOrder4 = strBidOrder4;
    }

    public String getStrBidOrder5() {
        return strBidOrder5;
    }

    public void setStrBidOrder5(String strBidOrder5) {
        this.strBidOrder5 = strBidOrder5;
    }

    public String getStrAskOrder() {
        return strAskOrder;
    }

    public void setStrAskOrder(String strAskOrder) {
        this.strAskOrder = strAskOrder;
    }

    public String getStrAskOrder2() {
        return strAskOrder2;
    }

    public void setStrAskOrder2(String strAskOrder2) {
        this.strAskOrder2 = strAskOrder2;
    }

    public String getStrAskOrder3() {
        return strAskOrder3;
    }

    public void setStrAskOrder3(String strAskOrder3) {
        this.strAskOrder3 = strAskOrder3;
    }

    public String getStrAskOrder4() {
        return strAskOrder4;
    }

    public void setStrAskOrder4(String strAskOrder4) {
        this.strAskOrder4 = strAskOrder4;
    }

    public String getStrAskOrder5() {
        return strAskOrder5;
    }

    public void setStrAskOrder5(String strAskOrder5) {
        this.strAskOrder5 = strAskOrder5;
    }


    public String getAsk6() {
        if (!isEmpty(ask6)) {
            ask6 = "0";
        }
        return ask6;
    }

    public void setAsk6(String ask6) {
        this.ask6 = ask6;
    }

    public String getAsk7() {
        if (!isEmpty(ask7)) {
            ask7 = "0";
        }
        return ask7;
    }

    public void setAsk7(String ask7) {
        this.ask7 = ask7;
    }

    public String getAsk8() {
        if (!isEmpty(ask8)) {
            ask8 = "0";
        }
        return ask8;
    }

    public void setAsk8(String ask8) {
        this.ask8 = ask8;
    }

    public String getAsk9() {
        if (!isEmpty(ask9)) {
            ask9 = "0";
        }
        return ask9;
    }

    public void setAsk9(String ask9) {
        this.ask9 = ask9;
    }

    public String getAsk10() {
        if (!isEmpty(ask10)) {
            ask10 = "0";
        }
        return ask10;
    }

    public void setAsk10(String ask10) {
        this.ask10 = ask10;
    }

    public String getAskVolume6() {
        if (!isEmpty(askVolume6)) {
            askVolume6 = "0";
        }
        return askVolume6;
    }

    public void setAskVolume6(String askVolume6) {
        this.askVolume6 = askVolume6;
    }

    public String getAskVolume7() {
        if (!isEmpty(askVolume7)) {
            askVolume7 = "0";
        }
        return askVolume7;
    }

    public void setAskVolume7(String askVolume7) {
        this.askVolume7 = askVolume7;
    }

    public String getAskVolume8() {
        if (!isEmpty(askVolume8)) {
            askVolume8 = "0";
        }
        return askVolume8;
    }

    public void setAskVolume8(String askVolume8) {
        this.askVolume8 = askVolume8;
    }

    public String getAskVolume9() {
        if (!isEmpty(askVolume9)) {
            askVolume9 = "0";
        }
        return askVolume9;
    }

    public void setAskVolume9(String askVolume9) {
        this.askVolume9 = askVolume9;
    }

    public String getAskVolume10() {
        if (!isEmpty(askVolume10)) {
            askVolume10 = "0";
        }
        return askVolume10;
    }

    public void setAskVolume10(String askVolume10) {
        this.askVolume10 = askVolume10;
    }

    public String getBid6() {
        if (!isEmpty(bid6)) {
            bid6 = "0";
        }
        return bid6;
    }

    public void setBid6(String bid6) {
        this.bid6 = bid6;
    }

    public String getBid7() {
        if (!isEmpty(bid7)) {
            bid7 = "0";
        }
        return bid7;
    }

    public void setBid7(String bid7) {
        this.bid7 = bid7;
    }

    public String getBid8() {
        if (!isEmpty(bid8)) {
            bid8 = "0";
        }
        return bid8;
    }

    public void setBid8(String bid8) {
        this.bid8 = bid8;
    }

    public String getBid9() {
        if (!isEmpty(bid9)) {
            bid9 = "0";
        }
        return bid9;
    }

    public void setBid9(String bid9) {
        this.bid9 = bid9;
    }

    public String getBid10() {
        if (!isEmpty(bid10)) {
            bid10 = "0";
        }
        return bid10;
    }

    public void setBid10(String bid10) {
        this.bid10 = bid10;
    }

    public String getBidVolume6() {
        if (!isEmpty(bidVolume6)) {
            bidVolume6 = "0";
        }
        return bidVolume6;
    }

    public void setBidVolume6(String bidVolume6) {
        this.bidVolume6 = bidVolume6;
    }

    public String getBidVolume7() {
        if (!isEmpty(bidVolume7)) {
            bidVolume7 = "0";
        }
        return bidVolume7;
    }

    public void setBidVolume7(String bidVolume7) {
        this.bidVolume7 = bidVolume7;
    }

    public String getBidVolume8() {
        if (!isEmpty(bidVolume8)) {
            bidVolume8 = "0";
        }
        return bidVolume8;
    }

    public void setBidVolume8(String bidVolume8) {
        this.bidVolume8 = bidVolume8;
    }

    public String getBidVolume9() {
        if (!isEmpty(bidVolume9)) {
            bidVolume9 = "0";
        }
        return bidVolume9;
    }

    public void setBidVolume9(String bidVolume9) {
        this.bidVolume9 = bidVolume9;
    }

    public String getBidVolume10() {
        if (!isEmpty(bidVolume10)) {
            bidVolume10 = "0";
        }
        return bidVolume10;
    }

    public void setBidVolume10(String bidVolume10) {
        this.bidVolume10 = bidVolume10;
    }

    public String getBidOrderVolume() {
        if (!isEmpty(bidOrderVolume)) {
            bidOrderVolume = "0";
        }
        return bidOrderVolume;
    }

    public void setBidOrderVolume(String bidOrderVolume) {
        this.bidOrderVolume = bidOrderVolume;
    }

    public String getBidOrderVolume2() {
        if (!isEmpty(bidOrderVolume2)) {
            bidOrderVolume2 = "0";
        }
        return bidOrderVolume2;
    }

    public void setBidOrderVolume2(String bidOrderVolume2) {
        this.bidOrderVolume2 = bidOrderVolume2;
    }

    public String getBidOrderVolume3() {
        if (!isEmpty(bidOrderVolume3)) {
            bidOrderVolume3 = "0";
        }
        return bidOrderVolume3;
    }

    public void setBidOrderVolume3(String bidOrderVolume3) {
        this.bidOrderVolume3 = bidOrderVolume3;
    }

    public String getBidOrderVolume4() {
        if (!isEmpty(bidOrderVolume4)) {
            bidOrderVolume4 = "0";
        }
        return bidOrderVolume4;
    }

    public void setBidOrderVolume4(String bidOrderVolume4) {
        this.bidOrderVolume4 = bidOrderVolume4;
    }

    public String getBidOrderVolume5() {
        if (!isEmpty(bidOrderVolume5)) {
            bidOrderVolume5 = "0";
        }
        return bidOrderVolume5;
    }

    public void setBidOrderVolume5(String bidOrderVolume5) {
        this.bidOrderVolume5 = bidOrderVolume5;
    }

    public String getBidOrderVolume6() {
        if (!isEmpty(bidOrderVolume6)) {
            bidOrderVolume6 = "0";
        }
        return bidOrderVolume6;
    }

    public void setBidOrderVolume6(String bidOrderVolume6) {
        this.bidOrderVolume6 = bidOrderVolume6;
    }

    public String getBidOrderVolume7() {
        if (!isEmpty(bidOrderVolume7)) {
            bidOrderVolume7 = "0";
        }
        return bidOrderVolume7;
    }

    public void setBidOrderVolume7(String bidOrderVolume7) {
        this.bidOrderVolume7 = bidOrderVolume7;
    }

    public String getBidOrderVolume8() {
        if (!isEmpty(bidOrderVolume8)) {
            bidOrderVolume8 = "0";
        }
        return bidOrderVolume8;
    }

    public void setBidOrderVolume8(String bidOrderVolume8) {
        this.bidOrderVolume8 = bidOrderVolume8;
    }

    public String getBidOrderVolume9() {
        if (!isEmpty(bidOrderVolume9)) {
            bidOrderVolume9 = "0";
        }
        return bidOrderVolume9;
    }

    public void setBidOrderVolume9(String bidOrderVolume9) {
        this.bidOrderVolume9 = bidOrderVolume9;
    }

    public String getBidOrderVolume10() {
        if (!isEmpty(bidOrderVolume10)) {
            bidOrderVolume10 = "0";
        }
        return bidOrderVolume10;
    }

    public void setBidOrderVolume10(String bidOrderVolume10) {
        this.bidOrderVolume10 = bidOrderVolume10;
    }

    public String getAskOrderVolume() {
        if (!isEmpty(askOrderVolume)) {
            askOrderVolume = "0";
        }
        return askOrderVolume;
    }

    public void setAskOrderVolume(String askOrderVolume) {
        this.askOrderVolume = askOrderVolume;
    }

    public String getAskOrderVolume2() {
        if (!isEmpty(askOrderVolume2)) {
            askOrderVolume2 = "0";
        }
        return askOrderVolume2;
    }

    public void setAskOrderVolume2(String askOrderVolume2) {
        this.askOrderVolume2 = askOrderVolume2;
    }

    public String getAskOrderVolume3() {
        if (!isEmpty(askOrderVolume3)) {
            askOrderVolume3 = "0";
        }
        return askOrderVolume3;
    }

    public void setAskOrderVolume3(String askOrderVolume3) {
        this.askOrderVolume3 = askOrderVolume3;
    }

    public String getAskOrderVolume4() {
        if (!isEmpty(askOrderVolume4)) {
            askOrderVolume4 = "0";
        }
        return askOrderVolume4;
    }

    public void setAskOrderVolume4(String askOrderVolume4) {
        this.askOrderVolume4 = askOrderVolume4;
    }

    public String getAskOrderVolume5() {
        if (!isEmpty(askOrderVolume5)) {
            askOrderVolume5 = "0";
        }
        return askOrderVolume5;
    }

    public void setAskOrderVolume5(String askOrderVolume5) {
        this.askOrderVolume5 = askOrderVolume5;
    }

    public String getAskOrderVolume6() {
        if (!isEmpty(askOrderVolume6)) {
            askOrderVolume6 = "0";
        }
        return askOrderVolume6;
    }

    public void setAskOrderVolume6(String askOrderVolume6) {
        this.askOrderVolume6 = askOrderVolume6;
    }

    public String getAskOrderVolume7() {
        if (!isEmpty(askOrderVolume7)) {
            askOrderVolume7 = "0";
        }
        return askOrderVolume7;
    }

    public void setAskOrderVolume7(String askOrderVolume7) {
        this.askOrderVolume7 = askOrderVolume7;
    }

    public String getAskOrderVolume8() {
        if (!isEmpty(askOrderVolume8)) {
            askOrderVolume8 = "0";
        }
        return askOrderVolume8;
    }

    public void setAskOrderVolume8(String askOrderVolume8) {
        this.askOrderVolume8 = askOrderVolume8;
    }

    public String getAskOrderVolume9() {
        if (!isEmpty(askOrderVolume9)) {
            askOrderVolume9 = "0";
        }
        return askOrderVolume9;
    }

    public void setAskOrderVolume9(String askOrderVolume9) {
        this.askOrderVolume9 = askOrderVolume9;
    }

    public String getAskOrderVolume10() {
        if (!isEmpty(askOrderVolume10)) {
            askOrderVolume10 = "0";
        }
        return askOrderVolume10;
    }

    public void setAskOrderVolume10(String askOrderVolume10) {
        this.askOrderVolume10 = askOrderVolume10;
    }

    public String getNonTotalVolume() {
        return nonTotalVolume;
    }

    public void setNonTotalVolume(String nonTotalVolume) {
        this.nonTotalVolume = nonTotalVolume;
    }

    public String getNonTotalHolderVolume() {
        return nonTotalHolderVolume;
    }

    public void setNonTotalHolderVolume(String nonTotalHolderVolume) {
        this.nonTotalHolderVolume = nonTotalHolderVolume;
    }

    public String getNonTotalTurnover() {
        return nonTotalTurnover;
    }

    public void setNonTotalTurnover(String nonTotalTurnover) {
        this.nonTotalTurnover = nonTotalTurnover;
    }

    public String getNonTotallot() {
        return nonTotallot;
    }

    public void setNonTotallot(String nonTotallot) {
        this.nonTotallot = nonTotallot;
    }

    public String getMarkPrice() {
        return markPrice;
    }

    public void setMarkPrice(String markPrice) {
        this.markPrice = markPrice;
    }

    public String getFundsRate() {
        return fundsRate;
    }

    public void setFundsRate(String fundsRate) {
        this.fundsRate = fundsRate;
    }

    public String getStrBidOrder6() {
        return strBidOrder6;
    }

    public void setStrBidOrder6(String strBidOrder6) {
        this.strBidOrder6 = strBidOrder6;
    }

    public String getStrBidOrder7() {
        return strBidOrder7;
    }

    public void setStrBidOrder7(String strBidOrder7) {
        this.strBidOrder7 = strBidOrder7;
    }

    public String getStrBidOrder8() {
        return strBidOrder8;
    }

    public void setStrBidOrder8(String strBidOrder8) {
        this.strBidOrder8 = strBidOrder8;
    }

    public String getStrBidOrder9() {
        return strBidOrder9;
    }

    public void setStrBidOrder9(String strBidOrder9) {
        this.strBidOrder9 = strBidOrder9;
    }

    public String getStrBidOrder10() {
        return strBidOrder10;
    }

    public void setStrBidOrder10(String strBidOrder10) {
        this.strBidOrder10 = strBidOrder10;
    }

    public String getStrAskOrder6() {
        return strAskOrder6;
    }

    public void setStrAskOrder6(String strAskOrder6) {
        this.strAskOrder6 = strAskOrder6;
    }

    public String getStrAskOrder7() {
        return strAskOrder7;
    }

    public void setStrAskOrder7(String strAskOrder7) {
        this.strAskOrder7 = strAskOrder7;
    }

    public String getStrAskOrder8() {
        return strAskOrder8;
    }

    public void setStrAskOrder8(String strAskOrder8) {
        this.strAskOrder8 = strAskOrder8;
    }

    public String getStrAskOrder9() {
        return strAskOrder9;
    }

    public void setStrAskOrder9(String strAskOrder9) {
        this.strAskOrder9 = strAskOrder9;
    }

    public String getStrAskOrder10() {
        return strAskOrder10;
    }

    public void setStrAskOrder10(String strAskOrder10) {
        this.strAskOrder10 = strAskOrder10;
    }
}
