初始化CRICS
This commit is contained in:
48
RCUHost/RCUHostCommon/tools.cs
Normal file
48
RCUHost/RCUHostCommon/tools.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Common;
|
||||
using CommonEntity;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace RCUHost.RCUHostCommon
|
||||
{
|
||||
public class tools
|
||||
{
|
||||
public static void LanJieData(string Key11, string hotelCode)
|
||||
{
|
||||
var Key = "UDPPackage_" + Key11.ToString();
|
||||
|
||||
UDPPackageCount LLL = null;
|
||||
DataTongJi.TotalCount.TryGetValue(Key, out LLL);
|
||||
if (LLL != null)
|
||||
{
|
||||
var dic = LLL.FenLei;
|
||||
LLL.Count = LLL.Count + 1;
|
||||
long hotel_count = 0;
|
||||
if (dic.TryGetValue(hotelCode, out hotel_count))
|
||||
{
|
||||
dic[hotelCode] = dic[hotelCode] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
dic.TryAdd(hotelCode, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UDPPackageCount u = new UDPPackageCount();
|
||||
u.Count = 1;
|
||||
|
||||
var list = new ConcurrentDictionary<string, long>();
|
||||
list.TryAdd(hotelCode, 1);
|
||||
|
||||
u.FenLei = list;
|
||||
|
||||
DataTongJi.TotalCount.TryAdd(Key, u);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user