瀏覽代碼

修复领导人达标奖问题

lcl 9 月之前
父節點
當前提交
1d82521176
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      AppStart/Helper/LeaderCompPrizeHelper.cs

+ 8 - 8
AppStart/Helper/LeaderCompPrizeHelper.cs

@@ -105,10 +105,10 @@ namespace MySystem
                     {
                         TradeAmount += mpmaindb.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 1).Sum(m => m.TotalAmount) * 4;
                     }
-                    check = mpmaindb.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 1);
+                    check = mpmaindb.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 0);
                     if (check)
                     {
-                        TradeAmount += mpmaindb.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 1).Sum(m => m.TotalAmount);
+                        TradeAmount += mpmaindb.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 0).Sum(m => m.TotalAmount);
                     }
                     //码牌团队交易额(银联)
                     check = mpmaindb2.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 1);
@@ -116,10 +116,10 @@ namespace MySystem
                     {
                         TradeAmount += mpmaindb2.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 1).Sum(m => m.TotalAmount) * 4;
                     }
-                    check = mpmaindb2.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 1);
+                    check = mpmaindb2.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 0);
                     if (check)
                     {
-                        TradeAmount += mpmaindb2.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 1).Sum(m => m.TotalAmount);
+                        TradeAmount += mpmaindb2.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.IsAct == 0).Sum(m => m.TotalAmount);
                     }
                     //广电卡扶持期按1万/张计入职级
                     check = readdb.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.BrandId == 14);
@@ -127,10 +127,10 @@ namespace MySystem
                     {
                         int ActCount = readdb.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.BrandId == 14).Sum(m => m.ActiveBuddyMerStatus);
                         ActCount += UserDataDbconn.Instance.GetSimActTradeAmt(UserId, month, "Team");
-                        if(readdb.UserSimActSummary.Any(m => m.UserId == UserId && m.Kind == 1))
-                        {
-                            ActCount -= readdb.UserSimActSummary.Where(m => m.UserId == UserId && m.Kind == 1).Sum(m => m.ActCount);
-                        }
+                        // if(readdb.UserSimActSummary.Any(m => m.UserId == UserId && m.Kind == 1))
+                        // {
+                        //     ActCount -= readdb.UserSimActSummary.Where(m => m.UserId == UserId && m.Kind == 1).Sum(m => m.ActCount);
+                        // }
                         TradeAmount += ActCount * 10000;
                     }
                     sql += "insert into LeaderCompTradeStat (CreateDate,UserId,StatMonth,TradeAmount) values (now(), " + UserId + ", '" + month + "-" + checkMonth + "', " + TradeAmount + ");\n";