コード例 #1
0
    private OpRes statDirectlyPlayer(MemberInfo minfo, string time, GMUser user)
    {
        string          cmd = "";
        ParamMemberInfo p   = new ParamMemberInfo();

        p.m_acc  = minfo.m_acc;
        p.m_time = time;
        OpRes res = m_generator.genSearchSql(p, user, ref cmd);

        if (res != OpRes.opres_success)
        {
            return(res);
        }

        Dictionary <string, object> data
            = user.sqlDb.queryOne(cmd, user.getMySqlServerID(), MySqlDbName.DB_XIANXIA);
        StatResultWinLoseItem sitem = m_result.addItem(data, minfo.m_acc, AccType.ACC_PLAYER);

        if (sitem != null)
        {
            sitem.m_agentRatio = minfo.m_agentRatio;
            sitem.m_washRatio  = minfo.m_washRatio;
        }
        return(OpRes.opres_success);
    }
コード例 #2
0
    private void setItem(Dictionary <string, object> data,
                         string acc,
                         int accType,
                         StatResultWinLoseItem item)
    {
        if (data == null)
        {
            return;
        }

        item.m_acc     = acc;
        item.m_accType = accType;
        if (!(data["playerIncomeSum"] is DBNull))
        {
            item.m_totalIncome = Convert.ToInt64(data["playerIncomeSum"]);
        }
        if (!(data["playerOutlaySum"] is DBNull))
        {
            item.m_totalOutlay = Convert.ToInt64(data["playerOutlaySum"]);
        }
        if (!(data["washCountSum"] is DBNull))
        {
            item.m_totalWashCount = Convert.ToInt64(data["washCountSum"]);
        }

        if (data.ContainsKey("date"))
        {
            if (!(data["date"] is DBNull))
            {
                item.m_time = Convert.ToDateTime(data["date"]);
            }
        }
    }
コード例 #3
0
    public StatResultWinLoseItem addItem(Dictionary <string, object> data, string acc, int accType)
    {
        if (data == null)
        {
            return(null);
        }

        StatResultWinLoseItem item = new StatResultWinLoseItem();

        m_detail.Add(item);

        setItem(data, acc, accType, item);
        return(item);
    }
 public string getCompanyProfitRatioStr()
 {
     return(StatResultWinLoseItem.getCompanyProfitRatioStr(m_outlayHandInCompany, m_agentHandInCompany));
 }
        public double m_washCountHandInCompany; // 交公司洗码量

        // 返回公司获利比
        public double getCompanyProfitRatio()
        {
            return(StatResultWinLoseItem.getCompanyProfitRatio(m_outlayHandInCompany, m_agentHandInCompany));
        }
        public void genTableDetailResult(Table table, OpRes res, GMUser user, ParamWinLose param,
                                         string[] head)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            int i = 0;

            // 表头
            for (i = 0; i < head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head[i];
            }

            URLParam uparam = new URLParam();

            uparam.m_url       = DefCC.ASPX_WIN_LOSE;
            uparam.m_text      = "明细";
            uparam.m_key       = "acc";
            uparam.m_className = "cLevelLink";
            StatResultWinLose qresult = (StatResultWinLose)user.getStatResult(StatType.statTypeWinLose);

            m_sum.reset();
            for (i = 0; i < qresult.m_detail.Count; i++)
            {
                tr = new TableRow();
                table.Rows.Add(tr);
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }

                StatResultWinLoseItem item = qresult.m_detail[i];
                uparam.m_value = item.m_acc;
                if (param.isDetailSubAgent())
                {
                    uparam.clearExParam(); uparam.addExParam("detail", param.m_detailType);
                    uparam.addExParam("time", param.m_time.TrimStart(' ').TrimEnd(' '));
                    m_content[0] = Tool.genHyperlink(uparam);
                }
                else
                {
                    m_content[0] = "";
                }

                m_content[1] = StrName.s_accountType[item.m_accType];                                 // 级别,账号类型
                m_content[2] = item.m_acc;                                                            // 账号
                m_content[3] = ItemHelp.toStrByComma(ItemHelp.showMoneyValue(item.m_totalOutlay));    // 总押注
                m_content[4] = ItemHelp.toStrByComma(ItemHelp.showMoneyValue(item.m_totalIncome));    // 总返还
                m_content[5] = ItemHelp.toStrByComma(item.getWinLoseMoney());                         // 总盈利
                m_content[6] = ItemHelp.toStrByComma(ItemHelp.showMoneyValue(item.m_totalWashCount)); // 洗码量

                if (param.isDetailSubAgent())
                {
                    m_content[7]  = item.getWashRatio().ToString();                          // 洗码比
                    m_content[8]  = ItemHelp.toStrByComma(item.getWashCommission());         // 洗码佣金
                    m_content[9]  = ItemHelp.toStrByComma(item.getTotalMoney());             // 总金额
                    m_content[10] = item.getAgentRatio().ToString();                         // 代理占成
                    m_content[11] = ItemHelp.toStrByComma(item.getAgentHandInCompany());     // 代理交公司
                    m_content[12] = ItemHelp.toStrByComma(item.getOutlayHandInCompany());    // 交公司投注
                    m_content[13] = ItemHelp.toStrByComma(item.getWashCountHandInCompany()); // 交公司洗码量
                    m_content[14] = item.getCompanyProfitRatioStr();                         // 公司获利比
                }
                else
                {
                    m_content[7] = item.getWashRatio().ToString();                  // 洗码比
                    m_content[8] = ItemHelp.toStrByComma(item.getWashCommission()); // 洗码佣金
                    m_content[9] = ItemHelp.toStrByComma(item.getTotalMoney());     // 总金额
                }

                for (int k = 0; k < head.Length; k++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[k];

                    if (k == 14)
                    {
                        setColor(td, td.Text);
                    }
                }

                m_sum.m_item.m_totalIncome    += item.m_totalIncome;
                m_sum.m_item.m_totalOutlay    += item.m_totalOutlay;
                m_sum.m_item.m_totalWashCount += item.m_totalWashCount;

                m_sum.m_washCommission         += item.getWashCommission();
                m_sum.m_totalMoney             += item.getTotalMoney();
                m_sum.m_agentHandInCompany     += item.getAgentHandInCompany();
                m_sum.m_outlayHandInCompany    += item.getOutlayHandInCompany();
                m_sum.m_washCountHandInCompany += item.getWashCountHandInCompany();
            }

            addFootSum(table, param.isDetailSubAgent());
        }