|
@@ -58,6 +58,7 @@ public class WifiTradeHelper
|
|
|
List<MySystem.ReadModels.Users> users = rdb.Users.Where(m => m.AuthFlag == 1).ToList();
|
|
|
List<string> PosSns = trades.Select(m => m.SnNo).ToList();
|
|
|
List<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => PosSns.Contains(m.PosSn)).ToList();
|
|
|
+ List<PosMerchantInfo> merList = db.PosMerchantInfo.Where(m => PosSns.Contains(m.KqMerNo)).ToList();
|
|
|
List<TradeDaySummary> statTrade = new List<TradeDaySummary>();
|
|
|
List<TradeDaySummaryBefore> statTradeBefore = new List<TradeDaySummaryBefore>();
|
|
|
List<TradeDaySummaryAfter> statTradeAfter = new List<TradeDaySummaryAfter>();
|
|
@@ -68,6 +69,7 @@ public class WifiTradeHelper
|
|
|
decimal TradeAmt = trade.TradeAmount / trade.Duration;
|
|
|
TradeAmt = PublicFunction.NumberFormat(TradeAmt);
|
|
|
PosMachinesTwo pos = posList.FirstOrDefault(m => m.PosSn == trade.SnNo) ?? new PosMachinesTwo();
|
|
|
+ PosMerchantInfo mer = merList.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PosMerchantInfo();
|
|
|
StatTrade(statTrade, users, pos.BuyUserId, pos.BrandId, Month.Replace("-", ""), TradeAmt);
|
|
|
if (pos.BindingTime < trade.CreateDate.Value.AddMonths(-9))
|
|
|
{
|
|
@@ -82,6 +84,16 @@ public class WifiTradeHelper
|
|
|
{
|
|
|
edit.DoMonths += 1;
|
|
|
edit.LastMonth = Month;
|
|
|
+
|
|
|
+ //推送wifi交易给java
|
|
|
+ PosPushDataNewHelper.Trade(new MySystem.SpModels.TradeRecord()
|
|
|
+ {
|
|
|
+ TradeSnNo = pos.PosSn,
|
|
|
+ MerNo = mer.KqMerNo,
|
|
|
+ TradeSerialNo = Guid.NewGuid().ToString(),
|
|
|
+ CreateDate = DateTime.Parse(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01 00:00:00"),
|
|
|
+ ProductType = pos.BrandId.ToString(),
|
|
|
+ });
|
|
|
}
|
|
|
SnNos.Add(trade.SnNo);
|
|
|
}
|