lcl преди 1 месец
родител
ревизия
b9b41dec22
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      AppStart/Helper/LeaderCompPrizeHelper.cs

+ 1 - 1
AppStart/Helper/LeaderCompPrizeHelper.cs

@@ -133,7 +133,7 @@ namespace MySystem
                         item.Amt += Amt;
                     }
                 }
-                rootsql = "select user_id,logout_num*10000 logout_num from kxs_user_logout_trade where total_type=1 and trade_month='" + PreMonthString + "'";
+                rootsql = "select user_id,logout_num*10000 from kxs_user_logout_trade where id in (select min(id) from kxs_user_logout_trade where total_type=1 group by user_id)";
                 function.WriteLog(rootsql, "领导人达标奖励日志");
                 dt = CustomerSqlConn.dtable(rootsql, MysqlConn.JavaStatSqlConnStr);
                 foreach(DataRow dr in dt.Rows)