DuGuYang 3 лет назад
Родитель
Сommit
39ee2ed18f

+ 80 - 3
Areas/Admin/Controllers/MainServer/UsersController.cs

@@ -1561,6 +1561,14 @@ 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["TotalAmtyl"] = Convert.ToDecimal(Info["TotalAmtyl"].ToString()) + Convert.ToDecimal(Info["YAmtyl"].ToString());
+                dic["DAmtyl"] = Convert.ToDecimal(Info["DAmtyl"].ToString());
+                dic["JAmtyl"] = Convert.ToDecimal(Info["JAmtyl"].ToString());
+                dic["JfAmtyl"] = Convert.ToDecimal(Info["JfAmtyl"].ToString());
+                dic["JCountyl"] = Convert.ToInt32(Info["JCountyl"].ToString());
+                dic["YAmtyl"] = Convert.ToDecimal(Info["YAmtyl"].ToString());
+
                 dic["TBCount"] = Info["TBCount"].ToString();
                 dic["TACount"] = Info["TACount"].ToString();
                 // dic["BCount"] = Info["BCount"].ToString();
@@ -1585,6 +1593,14 @@ namespace MySystem.Areas.Admin.Controllers
             int JCountwd = 0;
             decimal YAmtwd = 0;
 
+            //盈利期
+            decimal TotalAmtyl = 0;
+            decimal DAmtyl = 0;
+            decimal JAmtyl = 0;
+            decimal JfAmtyl = 0;
+            int JCountyl = 0;
+            decimal YAmtyl = 0;
+
             //团队
             //扶持期
             decimal TotalAmtfc1 = 0;
@@ -1602,13 +1618,21 @@ namespace MySystem.Areas.Admin.Controllers
             int JCountwd1 = 0;
             decimal YAmtwd1 = 0;
 
+            //盈利期
+            decimal TotalAmtyl1 = 0;
+            decimal DAmtyl1 = 0;
+            decimal JAmtyl1 = 0;
+            decimal JfAmtyl1 = 0;
+            int JCountyl1 = 0;
+            decimal YAmtyl1 = 0;
+
             int PBCount = 0;
             int PACount = 0;
             int TBCount = 0;
             int TACount = 0;
 
             Dictionary<string, object> other = new Dictionary<string, object>();
-            DataTable dt = OtherMySqlConn.dtable("SELECT Sum(HelpDirectTradeAmt + HelpDirectDebitTradeAmt),Sum(if (QueryCount = 0,HelpDirectTradeAmt,0)),Sum(if (QueryCount = 0,HelpDirectDebitTradeAmt - HelpDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpDirectDebitCapNum,0)),Sum(if (QueryCount = 1,HelpDirectTradeAmt,0)),Sum(NotHelpDirectTradeAmt + NotHelpDirectDebitTradeAmt),Sum(if (QueryCount = 0,NotHelpDirectTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpDirectDebitTradeAmt - NotHelpDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpDirectDebitCapNum,0)),Sum(if (QueryCount = 1,NotHelpDirectTradeAmt,0))from TradeDaySummary where SeoTitle = 'self' and UserId =" + ParentId + "" + con);
+            DataTable dt = OtherMySqlConn.dtable("SELECT Sum(HelpDirectTradeAmt + HelpDirectDebitTradeAmt),Sum(if (QueryCount = 0,HelpDirectTradeAmt,0)),Sum(if (QueryCount = 0,HelpDirectDebitTradeAmt - HelpDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpDirectDebitCapNum,0)),Sum(if (QueryCount = 1,HelpDirectTradeAmt,0)),Sum(NotHelpDirectTradeAmt + NotHelpDirectDebitTradeAmt),Sum(if (QueryCount = 0,NotHelpDirectTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpDirectDebitTradeAmt - NotHelpDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpDirectDebitCapNum,0)),Sum(if (QueryCount = 1,NotHelpDirectTradeAmt,0)),Sum(ProfitDirectTradeAmt + ProfitDirectDebitTradeAmt),Sum(if (QueryCount = 0,ProfitDirectTradeAmt,0)),Sum(if (QueryCount = 0,ProfitDirectDebitTradeAmt - ProfitDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,ProfitDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,ProfitDirectDebitCapNum,0)),Sum(if (QueryCount = 1,ProfitDirectTradeAmt,0))from TradeDaySummary where SeoTitle = 'self' and UserId =" + ParentId + "" + con);
             if (dt.Rows.Count > 0)
             {
                 TotalAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
@@ -1617,12 +1641,20 @@ namespace MySystem.Areas.Admin.Controllers
                 JfAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][3].ToString()));
                 JCountfc = Convert.ToInt32(function.CheckInt(dt.Rows[0][4].ToString()));
                 YAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][5].ToString()));
+
                 TotalAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][6].ToString()));
                 DAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][7].ToString()));
                 JAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][8].ToString()));
                 JfAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][9].ToString()));
                 JCountwd = Convert.ToInt32(function.CheckInt(dt.Rows[0][10].ToString()));
                 YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][11].ToString()));
+
+                TotalAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][12].ToString()));
+                DAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][13].ToString()));
+                JAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][14].ToString()));
+                JfAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][15].ToString()));
+                JCountyl = Convert.ToInt32(function.CheckInt(dt.Rows[0][16].ToString()));
+                YAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][17].ToString()));
             }
             //统计激活数(个人、团队)
             dt = OtherMySqlConn.dtable("SELECT SUM(if(SeoTitle='self',ActiveBuddyMerStatus,0)),SUM(if(SeoTitle='team',ActiveBuddyMerStatus,0)) FROM UserTradeMonthSummary WHERE UserId= " + ParentId + "" + cons);
@@ -1632,7 +1664,7 @@ namespace MySystem.Areas.Admin.Controllers
                 TACount = Convert.ToInt32(function.CheckNum(dt.Rows[0][1].ToString()));
             }
 
-            DataTable dts = OtherMySqlConn.dtable("SELECT Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,HelpNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitTradeAmt - HelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,HelpNonDirectTradeAmt,0)),Sum(NotHelpNonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,NotHelpNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitTradeAmt - NotHelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,NotHelpNonDirectTradeAmt,0))from TradeDaySummary where SeoTitle = 'team' and UserId =" + ParentId + "" + con);
+            DataTable dts = OtherMySqlConn.dtable("SELECT Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,HelpNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitTradeAmt - HelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,HelpNonDirectTradeAmt,0)),Sum(NotHelpNonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,NotHelpNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitTradeAmt - NotHelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,NotHelpNonDirectTradeAmt,0)),Sum(ProfitNonDirectTradeAmt + ProfitNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,ProfitNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,ProfitNonDirectDebitTradeAmt - ProfitNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,ProfitNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,ProfitNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,ProfitNonDirectTradeAmt,0))from TradeDaySummary where SeoTitle = 'team' and UserId =" + ParentId + "" + con);
             if (dts.Rows.Count > 0)
             {
                 TotalAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][0].ToString()));
@@ -1641,12 +1673,20 @@ namespace MySystem.Areas.Admin.Controllers
                 JfAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][3].ToString()));
                 JCountfc1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][4].ToString()));
                 YAmtfc1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][5].ToString()));
+
                 TotalAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][6].ToString()));
                 DAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][7].ToString()));
                 JAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][8].ToString()));
                 JfAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][9].ToString()));
                 JCountwd1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][10].ToString()));
                 YAmtwd1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][11].ToString()));
+
+                TotalAmtyl1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][12].ToString()));
+                DAmtyl1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][13].ToString()));
+                JAmtyl1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][14].ToString()));
+                JfAmtyl1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][15].ToString()));
+                JCountyl1 = Convert.ToInt32(function.CheckInt(dts.Rows[0][16].ToString()));
+                YAmtyl1 = Convert.ToDecimal(function.CheckNum(dts.Rows[0][17].ToString()));
             }
 
             other.Add("TotalAmtfc", TotalAmtfc);
@@ -1663,6 +1703,13 @@ namespace MySystem.Areas.Admin.Controllers
             other.Add("JCountwd", JCountwd);
             other.Add("YAmtwd", YAmtwd);
 
+            other.Add("TotalAmtyl", TotalAmtyl);
+            other.Add("DAmtyl", DAmtyl);
+            other.Add("JAmtyl", JAmtyl);
+            other.Add("JfAmtyl", JfAmtyl);
+            other.Add("JCountyl", JCountyl);
+            other.Add("YAmtyl", YAmtyl);
+
             other.Add("TotalAmtfc1", TotalAmtfc1);
             other.Add("DAmtfc1", DAmtfc1);
             other.Add("JAmtfc1", JAmtfc1);
@@ -1677,6 +1724,13 @@ namespace MySystem.Areas.Admin.Controllers
             other.Add("JCountwd1", JCountwd1);
             other.Add("YAmtwd1", YAmtwd1);
 
+            other.Add("TotalAmtyl1", TotalAmtyl1);
+            other.Add("DAmtyl1", DAmtyl1);
+            other.Add("JAmtyl1", JAmtyl1);
+            other.Add("JfAmtyl1", JfAmtyl1);
+            other.Add("JCountyl1", JCountyl1);
+            other.Add("YAmtyl1", YAmtyl1);
+
             other.Add("PBCount", PBCount);
             other.Add("PACount", PACount);
             other.Add("TBCount", TBCount);
@@ -1735,6 +1789,14 @@ namespace MySystem.Areas.Admin.Controllers
             int JCountwd = 0;
             decimal YAmtwd = 0;
 
+            //盈利期
+            decimal TotalAmtyl = 0;
+            decimal DAmtyl = 0;
+            decimal JAmtyl = 0;
+            decimal JfAmtyl = 0;
+            int JCountyl = 0;
+            decimal YAmtyl = 0;
+
             int BCount = 0;
             int ACount = 0;
             int PBCount = 0;
@@ -1743,7 +1805,7 @@ namespace MySystem.Areas.Admin.Controllers
             int TACount = 0;
 
             Dictionary<string, object> obj = new Dictionary<string, object>();
-            DataTable dt = OtherMySqlConn.dtable("SELECT Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,HelpNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitTradeAmt - HelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,HelpNonDirectTradeAmt,0)),Sum(NotHelpNonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,NotHelpNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitTradeAmt - NotHelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,NotHelpNonDirectTradeAmt,0))from TradeDaySummary where SeoTitle = 'team'" + condition);
+            DataTable dt = OtherMySqlConn.dtable("SELECT Sum(HelpNonDirectTradeAmt + HelpNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,HelpNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitTradeAmt - HelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,HelpNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,HelpNonDirectTradeAmt,0)),Sum(NotHelpNonDirectTradeAmt + NotHelpNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,NotHelpNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitTradeAmt - NotHelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,NotHelpNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,NotHelpNonDirectTradeAmt,0)),Sum(ProfitNonDirectTradeAmt + ProfitNonDirectDebitTradeAmt),Sum(if (QueryCount = 0,ProfitNonDirectTradeAmt,0)),Sum(if (QueryCount = 0,ProfitNonDirectDebitTradeAmt - ProfitNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,ProfitNonDirectDebitCapTradeAmt,0)),Sum(if (QueryCount = 0,ProfitNonDirectDebitCapNum,0)),Sum(if (QueryCount = 1,ProfitNonDirectTradeAmt,0))from TradeDaySummary where SeoTitle = 'team'" + condition);
             if (dt.Rows.Count > 0)
             {
                 TotalAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][0].ToString()));
@@ -1752,12 +1814,20 @@ namespace MySystem.Areas.Admin.Controllers
                 JfAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][3].ToString()));
                 JCountfc = Convert.ToInt32(function.CheckInt(dt.Rows[0][4].ToString()));
                 YAmtfc = Convert.ToDecimal(function.CheckNum(dt.Rows[0][5].ToString()));
+                
                 TotalAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][6].ToString()));
                 DAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][7].ToString()));
                 JAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][8].ToString()));
                 JfAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][9].ToString()));
                 JCountwd = Convert.ToInt32(function.CheckInt(dt.Rows[0][10].ToString()));
                 YAmtwd = Convert.ToDecimal(function.CheckNum(dt.Rows[0][11].ToString()));
+
+                TotalAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][12].ToString()));
+                DAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][13].ToString()));
+                JAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][14].ToString()));
+                JfAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][15].ToString()));
+                JCountyl = Convert.ToInt32(function.CheckInt(dt.Rows[0][16].ToString()));
+                YAmtyl = Convert.ToDecimal(function.CheckNum(dt.Rows[0][17].ToString()));
             }
             //统计激活数(个人、团队)
             dt = OtherMySqlConn.dtable("SELECT SUM(if(SeoTitle='team',ActiveBuddyMerStatus,0)) FROM UserTradeMonthSummary WHERE UserId= " + UserId + "" + cons);
@@ -1781,6 +1851,13 @@ namespace MySystem.Areas.Admin.Controllers
             obj.Add("JCountwd", JCountwd);
             obj.Add("YAmtwd", YAmtwd);
 
+            obj.Add("TotalAmtyl", TotalAmtyl);
+            obj.Add("DAmtyl", DAmtyl);
+            obj.Add("JAmtyl", JAmtyl);
+            obj.Add("JfAmtyl", JfAmtyl);
+            obj.Add("JCountyl", JCountyl);
+            obj.Add("YAmtyl", YAmtyl);
+
             obj.Add("BCount", BCount);
             obj.Add("ACount", ACount);
             obj.Add("PBCount", PBCount);

+ 4 - 0
Areas/Admin/Views/MainServer/Users/Children.cshtml

@@ -97,6 +97,8 @@
                     </br>
                     刷卡交易总额(稳)(元):<span style="color: #f00;" id="TotalAmtwd">0.00</span> | 贷记卡交易额(稳)(元):<span style="color: #f00;" id="DAmtwd">0.00</span> | 借记卡非封顶交易额(稳)(元):<span style="color: #f00;" id="JAmtwd">0.00</span> | 借记卡封顶交易额(稳)(元):<span style="color: #f00;" id="JfAmtwd">0.00</span> | 借记卡交易笔数(稳)(元):<span style="color: #f00;" id="JCountwd">0.00</span> | 云闪付小额交易额(稳)(元):<span style="color: #f00;" id="YAmtwd">0.00</span>
                     </br>
+                    刷卡交易总额(盈)(元):<span style="color: #f00;" id="TotalAmtyl">0.00</span> | 贷记卡交易额(盈)(元):<span style="color: #f00;" id="DAmtyl">0.00</span> | 借记卡非封顶交易额(盈)(元):<span style="color: #f00;" id="JAmtyl">0.00</span> | 借记卡封顶交易额(盈)(元):<span style="color: #f00;" id="JfAmtyl">0.00</span> | 借记卡交易笔数(盈)(元):<span style="color: #f00;" id="JCountyl">0.00</span> | 云闪付小额交易额(盈)(元):<span style="color: #f00;" id="YAmtyl">0.00</span>
+                    </br>
                     个人机具绑定总数:<span style="color: #f00;" id="PBCount">0</span> | 个人机具激活总数:<span style="color: #f00;" id="PACount">0</span> 
                     </br>
                     团队交易额:
@@ -105,6 +107,8 @@
                     </br>
                     刷卡交易总额(稳)(元):<span style="color: #f00;" id="TotalAmtwd1">0.00</span> | 贷记卡交易额(稳)(元):<span style="color: #f00;" id="DAmtwd1">0.00</span> | 借记卡非封顶交易额(稳)(元):<span style="color: #f00;" id="JAmtwd1">0.00</span> | 借记卡封顶交易额(稳)(元):<span style="color: #f00;" id="JfAmtwd1">0.00</span> | 借记卡交易笔数(稳)(元):<span style="color: #f00;" id="JCountwd1">0.00</span> | 云闪付小额交易额(稳)(元):<span style="color: #f00;" id="YAmtwd1">0.00</span>
                     </br>
+                    刷卡交易总额(盈)(元):<span style="color: #f00;" id="TotalAmtyl1">0.00</span> | 贷记卡交易额(盈)(元):<span style="color: #f00;" id="DAmtyl1">0.00</span> | 借记卡非封顶交易额(盈)(元):<span style="color: #f00;" id="JAmtyl1">0.00</span> | 借记卡封顶交易额(盈)(元):<span style="color: #f00;" id="JfAmtyl1">0.00</span> | 借记卡交易笔数(盈)(元):<span style="color: #f00;" id="JCountyl1">0.00</span> | 云闪付小额交易额(盈)(元):<span style="color: #f00;" id="YAmtyl1">0.00</span>
+                    </br>
                     团队机具绑定总数:<span style="color: #f00;" id="TBCount">0</span> | 团队机具激活总数:<span style="color: #f00;" id="TACount">0</span> 
                 
                 </blockquote>