|
|
@@ -1504,9 +1504,9 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
string start = "";
|
|
|
string end = "";
|
|
|
|
|
|
- string condition = " and Status>-1";
|
|
|
+ string condition = " and Status>-1 and AuthFlag >0";
|
|
|
string con = " and Status>-1";
|
|
|
- // string cons = " and Status>=-1";
|
|
|
+ string cons = " and Status>=-1";
|
|
|
string sort = "Id desc";
|
|
|
//创客编号
|
|
|
if (!string.IsNullOrEmpty(MakerCode))
|
|
|
@@ -1516,6 +1516,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
if (ParentId > 0)
|
|
|
{
|
|
|
condition += " and ParentUserId=" + ParentId + " or Id=" + ParentId;
|
|
|
+ cons += " and UserId=" + ParentId;
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(CreateDateData))
|
|
|
{
|
|
|
@@ -1523,10 +1524,12 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
start = datelist[0].Replace("-", "");
|
|
|
end = datelist[1].Replace("-", "");
|
|
|
con += " and TradeDate>='" + start + "' and TradeDate<='" + end + "'";
|
|
|
+ cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') >=" + start + " and DATE_FORMAT(BindingTime,'%Y%m%d') <=" + end;
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(BrandSelect.ToString()) && BrandId > 0)
|
|
|
{
|
|
|
con += " and BrandId='" + BrandId + "'";
|
|
|
+ cons += " and BrandId='" + BrandId + "'";
|
|
|
}
|
|
|
|
|
|
Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Users", Fields, sort, "True", page, limit, condition);
|
|
|
@@ -1549,9 +1552,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
dic["JfAmtwd"] = Convert.ToDecimal(Info["JfAmtwd"].ToString());
|
|
|
dic["JCountwd"] = Convert.ToInt32(Info["JCountwd"].ToString());
|
|
|
dic["YAmtwd"] = Convert.ToDecimal(Info["YAmtwd"].ToString());
|
|
|
-
|
|
|
- dic["BCount"] = Info["BCount"].ToString();
|
|
|
- dic["ACount"] = Info["ACount"].ToString();
|
|
|
+ dic["TBCount"] = Info["TBCount"].ToString();
|
|
|
+ dic["TACount"] = Info["TACount"].ToString();
|
|
|
+ // dic["BCount"] = Info["BCount"].ToString();
|
|
|
+ // dic["ACount"] = Info["ACount"].ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -1572,22 +1576,27 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
int JCountwd = 0;
|
|
|
decimal YAmtwd = 0;
|
|
|
|
|
|
- // //团队
|
|
|
- // //扶持期
|
|
|
- // decimal TotalAmtfc1 = 0;
|
|
|
- // decimal DAmtfc1 = 0;
|
|
|
- // decimal JAmtfc1 = 0;
|
|
|
- // decimal JfAmtfc1 = 0;
|
|
|
- // int JCountfc1 = 0;
|
|
|
- // decimal YAmtfc1 = 0;
|
|
|
-
|
|
|
- // //稳定期
|
|
|
- // decimal TotalAmtwd1 = 0;
|
|
|
- // decimal DAmtwd1 = 0;
|
|
|
- // decimal JAmtwd1 = 0;
|
|
|
- // decimal JfAmtwd1 = 0;
|
|
|
- // int JCountwd1 = 0;
|
|
|
- // decimal YAmtwd1 = 0;
|
|
|
+ //团队
|
|
|
+ //扶持期
|
|
|
+ decimal TotalAmtfc1 = 0;
|
|
|
+ decimal DAmtfc1 = 0;
|
|
|
+ decimal JAmtfc1 = 0;
|
|
|
+ decimal JfAmtfc1 = 0;
|
|
|
+ int JCountfc1 = 0;
|
|
|
+ decimal YAmtfc1 = 0;
|
|
|
+
|
|
|
+ //稳定期
|
|
|
+ decimal TotalAmtwd1 = 0;
|
|
|
+ decimal DAmtwd1 = 0;
|
|
|
+ decimal JAmtwd1 = 0;
|
|
|
+ decimal JfAmtwd1 = 0;
|
|
|
+ int JCountwd1 = 0;
|
|
|
+ decimal YAmtwd1 = 0;
|
|
|
+
|
|
|
+ int PBCount = 0;
|
|
|
+ int PACount = 0;
|
|
|
+ int TBCount = 0;
|
|
|
+ int TACount = 0;
|
|
|
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
Dictionary<string, object> other = new Dictionary<string, object>();
|
|
|
@@ -1653,67 +1662,90 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
|
|
|
- // DataTable dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // TotalAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dt.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // DAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitTradeAmt),Sum(HelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dt.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // JAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dts.Rows[0][1].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // JfAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(HelpNoonDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // JCountfc1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // YAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
-
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(NotHelpNoonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // TotalAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // DAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitTradeAmt),Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // JAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dts.Rows[0][1].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // JfAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // JCountwd1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
- // dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
- // if (dts.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // YAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
- // }
|
|
|
+ //TODO: 统计激活绑定数(个人)
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId= '" + ParentId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ PBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT SUM(DirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='self' AND UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ PACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ //TODO: 统计激活绑定数(团队)
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId IN (SELECT Id FROM Users WHERE ParentNav LIKE '%," + ParentId + ",%' OR Id=" + ParentId + ")" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ TBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT SUM(NonDirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='team' AND UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ TACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+
|
|
|
+ DataTable dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ TotalAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ DAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitTradeAmt),Sum(HelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ JAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dts.Rows[0][1].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ JfAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(HelpNoonDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ JCountfc1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(HelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ YAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(NotHelpNoonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ TotalAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ DAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitTradeAmt),Sum(NotHelpDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ JAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString())) - Convert.ToDecimal(function.CheckNum(dts.Rows[0][1].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitCapTradeAmt) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ JfAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectDebitCapNum) from TradeDaySummary where QueryCount=0 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ JCountwd1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dts = OtherMySqlConn.dtable("select Sum(NotHelpNonDirectTradeAmt) from TradeDaySummary where QueryCount=1 and SeoTitle='team' and UserId= '" + ParentId + "'" + con);
|
|
|
+ if (dts.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ YAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
|
|
|
other.Add("TotalAmtfc", TotalAmtfc);
|
|
|
other.Add("DAmtfc", DAmtfc);
|
|
|
@@ -1729,19 +1761,24 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
other.Add("JCountwd", JCountwd);
|
|
|
other.Add("YAmtwd", YAmtwd);
|
|
|
|
|
|
- // other.Add("TotalAmtfc1", TotalAmtfc1);
|
|
|
- // other.Add("DAmtfc1", DAmtfc1);
|
|
|
- // other.Add("JAmtfc1", JAmtfc1);
|
|
|
- // other.Add("JfAmtfc1", JfAmtfc1);
|
|
|
- // other.Add("JCountfc1", JCountfc1);
|
|
|
- // other.Add("YAmtfc1", YAmtfc1);
|
|
|
-
|
|
|
- // other.Add("TotalAmtwd1", TotalAmtwd1);
|
|
|
- // other.Add("DAmtwd1", DAmtwd1);
|
|
|
- // other.Add("JAmtwd1", JAmtwd1);
|
|
|
- // other.Add("JfAmtwd1", JfAmtwd1);
|
|
|
- // other.Add("JCountwd1", JCountwd1);
|
|
|
- // other.Add("YAmtwd1", YAmtwd1);
|
|
|
+ other.Add("TotalAmtfc1", TotalAmtfc1);
|
|
|
+ other.Add("DAmtfc1", DAmtfc1);
|
|
|
+ other.Add("JAmtfc1", JAmtfc1);
|
|
|
+ other.Add("JfAmtfc1", JfAmtfc1);
|
|
|
+ other.Add("JCountfc1", JCountfc1);
|
|
|
+ other.Add("YAmtfc1", YAmtfc1);
|
|
|
+
|
|
|
+ other.Add("TotalAmtwd1", TotalAmtwd1);
|
|
|
+ other.Add("DAmtwd1", DAmtwd1);
|
|
|
+ other.Add("JAmtwd1", JAmtwd1);
|
|
|
+ other.Add("JfAmtwd1", JfAmtwd1);
|
|
|
+ other.Add("JCountwd1", JCountwd1);
|
|
|
+ other.Add("YAmtwd1", YAmtwd1);
|
|
|
+
|
|
|
+ other.Add("PBCount", PBCount);
|
|
|
+ other.Add("PACount", PACount);
|
|
|
+ other.Add("TBCount", TBCount);
|
|
|
+ other.Add("TACount", TACount);
|
|
|
db.Dispose();
|
|
|
obj.Add("other", other);
|
|
|
|
|
|
@@ -1752,12 +1789,14 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
string condition = " and Status>-1";
|
|
|
string cons = " and Status>=-1";
|
|
|
+ string con = " and Status>=-1";
|
|
|
|
|
|
//产品类型
|
|
|
if (!string.IsNullOrEmpty(BrandId.ToString()) && BrandId > 0)
|
|
|
{
|
|
|
condition += " and BrandId =" + BrandId;
|
|
|
cons += " and BrandId =" + BrandId;
|
|
|
+ con += " and BrandId =" + BrandId;
|
|
|
}
|
|
|
//创客Id
|
|
|
if (!string.IsNullOrEmpty(UserId.ToString()))
|
|
|
@@ -1769,12 +1808,14 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
condition += " and TradeDate >=" + Convert.ToInt32(sTradeDate);
|
|
|
cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') >=" + Convert.ToInt32(sTradeDate);
|
|
|
+ con += " and TradeDate >=" + Convert.ToInt32(sTradeDate);
|
|
|
}
|
|
|
//结束时间
|
|
|
if (!string.IsNullOrEmpty(eTradeDate))
|
|
|
{
|
|
|
condition += " and TradeDate <=" + Convert.ToInt32(eTradeDate);
|
|
|
cons += " and DATE_FORMAT(BindingTime,'%Y%m%d') <=" + Convert.ToInt32(eTradeDate);
|
|
|
+ con += " and TradeDate <=" + Convert.ToInt32(eTradeDate);
|
|
|
}
|
|
|
|
|
|
//扶持期
|
|
|
@@ -1795,6 +1836,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
int BCount = 0;
|
|
|
int ACount = 0;
|
|
|
+ int PBCount = 0;
|
|
|
+ int PACount = 0;
|
|
|
+ int TBCount = 0;
|
|
|
+ int TACount = 0;
|
|
|
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
Dictionary<string, object> obj = new Dictionary<string, object>();
|
|
|
@@ -1859,16 +1904,38 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND UserId= '" + UserId + "'" + cons);
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT SUM(NonDirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='team' AND UserId= '" + UserId + "'" + cons);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
BCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
- dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE ActivationState=1 AND UserId= '" + UserId + "'" + cons);
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT SUM(NonDirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='team' AND UserId= '" + UserId + "'" + cons);
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
ACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
}
|
|
|
+ //TODO: 统计激活绑定数(个人)
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId= '" + UserId + "'" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ PBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT SUM(DirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='self' AND UserId= '" + UserId + "'" + con);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ PACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ //TODO: 统计激活绑定数(团队)
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT COUNT(0) count FROM PosMachinesTwo WHERE BindingState=1 AND BuyUserId IN (SELECT Id FROM Users WHERE ParentNav LIKE '%," + UserId + ",%' OR Id=" + UserId + ")" + cons);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ TBCount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
+ dt = OtherMySqlConn.dtable("SELECT SUM(NonDirectDebitCapNum) sum FROM UserTradeDaySummary WHERE SeoTitle='team' AND UserId= '" + UserId + "'" + con);
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ TACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][0].ToString()));
|
|
|
+ }
|
|
|
|
|
|
|
|
|
obj.Add("TotalAmtfc", TotalAmtfc);
|
|
|
@@ -1887,6 +1954,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
obj.Add("BCount", BCount);
|
|
|
obj.Add("ACount", ACount);
|
|
|
+ obj.Add("PBCount", PBCount);
|
|
|
+ obj.Add("PACount", PACount);
|
|
|
+ obj.Add("TBCount", TBCount);
|
|
|
+ obj.Add("TACount", TACount);
|
|
|
db.Dispose();
|
|
|
return obj;
|
|
|
}
|