Ejemplo n.º 1
0
 /// <summary>
 /// 加载汇流箱设备总电流最大值统计数据
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult CurrentCount(int id, string YYYYMMDDHH)
 {
     int year = int.Parse(YYYYMMDDHH.Substring(0, 4));
     int month = int.Parse(YYYYMMDDHH.Substring(4, 2));
     int day = int.Parse(YYYYMMDDHH.Substring(6, 2));
     DeviceDataCount ddc = new DeviceDataCount() { deviceId = id, deviceTable = TableUtil.DEVICE, monitorCode = MonitorType.MIC_BUSBAR_TOTALCURRENT, year = year, day = day, month = month };
     DeviceDataCount dayddc = DeviceDataCountService.GetInstance().Get(ddc);
     DeviceDataCount monthddc = DeviceDataCountService.GetInstance().GetMonthMax(ddc);
     DeviceDataCount yearddc = DeviceDataCountService.GetInstance().GetYearMax(ddc);
     ViewData["dayddc"] = dayddc;
     ViewData["monthddc"] = monthddc;
     ViewData["yearddc"] = yearddc;
     return View();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 加载设备日功率统计数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult PowerCount(int id, string startYYYYMMDDHH, string endYYYYMMDDHH)
        {
            int year = int.Parse(startYYYYMMDDHH.Substring(0, 4));
            int month = int.Parse(startYYYYMMDDHH.Substring(4, 2));
            int day1 = int.Parse(startYYYYMMDDHH.Substring(6, 2));
            int day2 = int.Parse(endYYYYMMDDHH.Substring(6, 2));
            DeviceDataCount ddc1 = new DeviceDataCount() { deviceId = id, deviceTable = TableUtil.DEVICE, monitorCode = MonitorType.MIC_INVERTER_TOTALYGPOWER, year = year, day = day1, month = month };
            DeviceDataCount ddc2 = new DeviceDataCount() { deviceId = id, deviceTable = TableUtil.DEVICE, monitorCode = MonitorType.MIC_INVERTER_TOTALYGPOWER, year = year, day = day2, month = month };
            DeviceDataCount dayddc1 = DeviceDataCountService.GetInstance().Get(ddc1);
            DeviceDataCount dayddc2 = DeviceDataCountService.GetInstance().Get(ddc2);

            DeviceDataCount ddc = ddc1;
            DeviceDataCount dayddc = dayddc1;
            if (dayddc1 != null && dayddc2 != null)
            {
                //取最大一天的
                if (dayddc1.maxValue >= dayddc2.maxValue)
                {
                    ddc = ddc1;
                    dayddc = dayddc1;
                }
                else
                {
                    ddc = ddc2;
                    dayddc = dayddc2;
                }
            }
            else if (dayddc1 != null && dayddc2 == null)
            {
                ddc = ddc1;
                dayddc = dayddc1;
            }
            else if (dayddc1 == null && dayddc2 != null)
            {
                ddc = ddc2;
                dayddc = dayddc2;
            }

            DeviceDataCount monthddc = DeviceDataCountService.GetInstance().GetMonthMax(ddc);
            DeviceDataCount yearddc = DeviceDataCountService.GetInstance().GetYearMax(ddc);
            ViewData["dayddc"] = dayddc;
            ViewData["monthddc"] = monthddc;
            ViewData["yearddc"] = yearddc;
            return View();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 取得采集器日数据列表
        /// </summary>
        /// <returns></returns>
        public void GetCollectorDaydataList()
        {
            //如果没有数据则直接返回,增加for2.0协议,分包发送消息的情况
            if (!messageHeader.hasData) return;
            //将单元头部的发电量加入历史测点数据map中,然后统一处理
            if (!messageHeader.issub)//只有电站数据加入者两个电站测点
            {
                if(messageHeader.DayEnergy!=null)
                    historyMonitorMap[MonitorType.PLANT_MONITORITEM_ENERGY_CODE] = messageHeader.DayEnergy;
                if(messageHeader.Power!=null)
                    historyMonitorMap[MonitorType.PLANT_MONITORITEM_POWER_CODE] = messageHeader.Power;
            }
            int collectorID = GetCollectorId();
            //根据历史测点数据构建设备天数据
            //这里需要改进为依据设备时间,防止设备数据的时间和采集器的时间是不一致的
            CollectorDayData mdd;
            string mapObjectKey;
            //遍历测点数据
            foreach (int key in historyMonitorMap.Keys)
            {
                mapObjectKey = CacheKeyUtil.buildCollectorDayDataKey(collectorID, messageHeader.year + messageHeader.month, int.Parse(messageHeader.day), key);
                if (!collectordayDataMap.ContainsKey(mapObjectKey))
                {
                    //先从缓存中取得
                    mdd = CollectorDayDataService.GetInstance().getCollectorDayData(collectorID, key, int.Parse(messageHeader.day), int.Parse(messageHeader.year), int.Parse(messageHeader.month));
                    if (mdd == null)
                        mdd = new CollectorDayData() { collectorID = collectorID, sendDay = int.Parse(messageHeader.day), monitorCode = key, yearmonth = messageHeader.year + messageHeader.month };
                    collectordayDataMap[mapObjectKey] = mdd;
                }
                else {
                    mdd = collectordayDataMap[mapObjectKey];
                }
                float newValue = historyMonitorMap[key]==null?0:float.Parse(historyMonitorMap[key].ToString());
                string tmpStr = "#" + messageHeader.hour + messageHeader.minute + messageHeader.second + ":" + newValue;
                if (mdd.dataContent != null)
                {//避免数据串有重复数据过大
                    if (!mdd.dataContent.Contains(tmpStr))
                        mdd.dataContent += tmpStr;
                }
                else
                {
                    mdd.dataContent = tmpStr;
                }
                mdd.sendtime = messageHeader.TimeNow;
                mdd.localAcceptTime = DateTime.Now;
                mdd.yearmonth = messageHeader.year + messageHeader.month;
                mdd.changed = true;
                //add by qhb in 20121028 for 会写到memcahced 以便持久化能取到改数据.采集器天数据集中缓存处有点问题,和设备天数据一样的问题。
                //导致曲线数据有丢失现象
                try
                {
                    MemcachedClientSatat.getInstance().Set(mapObjectKey, mdd);
                }
                catch (Exception e) {
                    Console.WriteLine("set collector day data to memecached error:" + e.Message);
                    //出现错误,可能是mdd太大,所以整理下mdd,去掉重复数据,减少size,因为memached内存有2m限制
                }
                //将功率和关照的最大发生时间记录下来.稍后优化下
                if (key == MonitorType.PLANT_MONITORITEM_POWER_CODE)
                {
                    //if (collectorID >= 189 && collectorID < 199)
                    //{
                    //    LogUtil.writeline(messageHeader.TimeNow + "-" + newValue);
                    //}
                    //LogUtil.warn("collectorDataCount = new DeviceDataCount(): collectorID is " + collectorID + "-" + messageHeader.year.ToString() + messageHeader + "");
                    collectorDataCount = new DeviceDataCount() { deviceId = collectorID, monitorCode = key, year = int.Parse(messageHeader.year), month = int.Parse(messageHeader.month), day = int.Parse(messageHeader.day), deviceTable = TableUtil.PLANT, maxValue = newValue, maxTime = messageHeader.TimeNow, localAcceptTime = DateTime.Now };
                }

            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 加载电站日功率统计数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult PowerCount(int id, string startYYYYMMDDHH, string endYYYYMMDDHH)
        {
            Plant plant = PlantService.GetInstance().GetPlantInfoById(id);
            int year = int.Parse(startYYYYMMDDHH.Substring(0, 4));
            int month = int.Parse(startYYYYMMDDHH.Substring(4, 2));
            int day1 = int.Parse(startYYYYMMDDHH.Substring(6, 2));
            int day2 = int.Parse(endYYYYMMDDHH.Substring(6, 2));
            DeviceDataCount ddc1 = new DeviceDataCount() { deviceId = id, deviceTable = TableUtil.PLANT, monitorCode = MonitorType.PLANT_MONITORITEM_POWER_CODE, year = year, day = day1, month = month };
            DeviceDataCount ddc2 = new DeviceDataCount() { deviceId = id, deviceTable = TableUtil.PLANT, monitorCode = MonitorType.PLANT_MONITORITEM_POWER_CODE, year = year, day = day2, month = month };

            DeviceDataCount dayddc1 = DeviceDataCountService.GetInstance().Get(ddc1);
            DeviceDataCount dayddc2 = DeviceDataCountService.GetInstance().Get(ddc2);
            DeviceDataCount ddc = ddc1;
            DeviceDataCount dayddc = dayddc1;
            if (dayddc1 != null && dayddc2 != null)
            {
                //取最大一天的
                if (dayddc1.maxValue >= dayddc2.maxValue)
                {
                    ddc = ddc1;
                    dayddc = dayddc1;
                }
                else
                {
                    ddc = ddc2;
                    dayddc = dayddc2;
                }
            }
            else if (dayddc1 != null && dayddc2 == null)
            {
                ddc = ddc1;
                dayddc = dayddc1;
            }
            else if (dayddc1 == null && dayddc2 != null)
            {
                ddc = ddc2;
                dayddc = dayddc2;
            }

            DeviceDataCount monthddc = DeviceDataCountService.GetInstance().GetMonthMax(ddc);
            DeviceDataCount yearddc = DeviceDataCountService.GetInstance().GetYearMax(ddc);
            ViewData["dayddc"] = dayddc;
            ViewData["monthddc"] = monthddc;
            ViewData["yearddc"] = yearddc;
            ViewData["plant"] = plant;
            FillPlantYears(id.ToString());
            return View();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 合并某个电站的所有采集器的值记录
        /// </summary>
        /// <param name="plantId"></param>
        /// <param name="plantRecordList"></param>
        private void mergeRecord2Cache(string countCacheKey, DeviceDataCount collectorDataCount)
        {
            IDictionary<string, float> maxDictionary = new Dictionary<string, float>();
            //平滑用,统一标准坐标
            string daystr = collectorDataCount.year.ToString("00") + collectorDataCount.month.ToString("00") + collectorDataCount.day.ToString("00");
            string[] tmpIc = base.getXseriesFromYYYYMMDDHH(daystr + "00", daystr+"23", 5).ToArray();
            //给电站的采集器集合增加为完整的所有的采集器集合,以便每次都能统计所有采集器累计的最大发生值

            Plant plant = PlantService.GetInstance().GetPlantInfoById(collectorDataCount.deviceId);
            if (plant == null) return;
            string tmpcachkey = "";
            IList<Hashtable> plantRecordList = new List<Hashtable>();
            foreach (PlantUnit unit in plant.allFactUnits)
            {
                tmpcachkey = CacheKeyUtil.buildCollectorDataCountKey(collectorDataCount.year, collectorDataCount.month, collectorDataCount.day, unit.collectorID, collectorDataCount.monitorCode);
                //取得采集器日统计记录
                object obj = MemcachedClientSatat.getInstance().Get(tmpcachkey);
                if (obj == null) continue;
                plantRecordList.Add((Hashtable)obj);
            }

            foreach (Hashtable tmpMap in plantRecordList)
            {
                //先平滑
                base.FirstHandleChartData(tmpIc, tmpMap);
                foreach(string key in tmpMap.Keys){
                    if (maxDictionary.ContainsKey(key))
                    {
                        maxDictionary[key] = maxDictionary[key] + (float)tmpMap[key];
                    }
                    else {
                        maxDictionary[key] = (float)tmpMap[key];
                    }
                }
            }

            //取得所有时间点中最大值
            float maxValue = 0 ;
            string maxTimeKey = "000000";
            float tmpValue;
            foreach (string key in maxDictionary.Keys) {
                tmpValue = maxDictionary[key];
                if (tmpValue > maxValue) {
                    maxValue = tmpValue;
                    maxTimeKey = key;
                }
            }
            //
            collectorDataCount.maxTime = new DateTime(collectorDataCount.maxTime.Year, collectorDataCount.maxTime.Month, collectorDataCount.maxTime.Day, int.Parse(maxTimeKey.Substring(2, 2)), int.Parse(maxTimeKey.Substring(4,2)),0);
            collectorDataCount.maxValue = maxValue;
            LogUtil.writeline("plant max count" + collectorDataCount.deviceId + "-" + collectorDataCount.maxTime + "-" + maxValue);
            Cache(collectorDataCount);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 取得采集器日数据列表
        /// </summary>
        /// <returns></returns>
        public void GetCollectorDaydataList()
        {
            //将单元头部的发电量加入历史测点数据map中,然后统一处理
            historyMonitorMap[MonitorType.PLANT_MONITORITEM_ENERGY_CODE] = messageHeader.DayEnergy ;
            historyMonitorMap[MonitorType.PLANT_MONITORITEM_POWER_CODE] = messageHeader.Power;

            int collectorID = GetCollectorId();
            //根据历史测点数据构建设备天数据
            //这里需要改进为依据设备时间,防止设备数据的时间和采集器的时间是不一致的
            CollectorDayData mdd;
            string mapObjectKey;
            //遍历测点数据
            foreach (int key in historyMonitorMap.Keys)
            {
                mapObjectKey = CacheKeyUtil.buildCollectorDayDataKey(collectorID, messageHeader.year + messageHeader.month, int.Parse(messageHeader.day), key);
                if (!collectordayDataMap.ContainsKey(mapObjectKey))
                {
                    //先从缓存中取得
                    mdd = CollectorDayDataService.GetInstance().getCollectorDayData(collectorID, key, int.Parse(messageHeader.day), int.Parse(messageHeader.year), int.Parse(messageHeader.month));
                    if (mdd == null)
                        mdd = new CollectorDayData() { collectorID = collectorID, sendDay = int.Parse(messageHeader.day), monitorCode = key, yearmonth = messageHeader.year + messageHeader.month };
                    collectordayDataMap[mapObjectKey] = mdd;
                }
                else {
                    mdd = collectordayDataMap[mapObjectKey];
                }
                float newValue = historyMonitorMap[key]==null?0:float.Parse(historyMonitorMap[key].ToString());
                mdd.dataContent += "#" + messageHeader.hour + messageHeader.minute + messageHeader.second + ":" + newValue;
                mdd.sendtime = messageHeader.TimeNow;
                mdd.localAcceptTime = DateTime.Now;
                mdd.yearmonth = messageHeader.year + messageHeader.month;
                mdd.changed = true;
                //将功率和关照的最大发生时间记录下来.稍后优化下
                if (key == MonitorType.PLANT_MONITORITEM_POWER_CODE)
                {
                    //if (collectorID >= 189 && collectorID < 199)
                    //{
                    //    LogUtil.writeline(messageHeader.TimeNow + "-" + newValue);
                    //}
                    collectorDataCount = new DeviceDataCount() { deviceId = collectorID, monitorCode = key, year = int.Parse(messageHeader.year), month = int.Parse(messageHeader.month), day = int.Parse(messageHeader.day), deviceTable = TableUtil.PLANT, maxValue = newValue, maxTime = messageHeader.TimeNow, localAcceptTime = DateTime.Now };
                }

            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 修改自定义报表
 /// </summary>
 /// <returns>设备表ID</returns>
 public int Update(DeviceDataCount customReport)
 {
     return _ReportGroupDao.Update(customReport);
 }
Ejemplo n.º 8
0
        /// <summary>
        /// 缓存单个统计对象
        /// </summary>
        /// <param name="deviceDataCount"></param>
        private void Cache(DeviceDataCount deviceDataCount)
        {
            if (deviceDataCount.year == 0 || string.IsNullOrEmpty(deviceDataCount.deviceTable))
            {
                return;
            }
            string cacheKey = CacheKeyUtil.buildDeviceDataCountKey(deviceDataCount.year, deviceDataCount.month, deviceDataCount.day, deviceDataCount.deviceId, deviceDataCount.monitorCode);
            DeviceDataCount ddc = null;
            object obj = MemcachedClientSatat.getInstance().Get(cacheKey);
            if (obj != null && !string.IsNullOrEmpty(obj.ToString()))//存在即修改
            {
                ddc = (DeviceDataCount)obj;
                if (ddc.maxValue < deviceDataCount.maxValue)
                {
                    ddc.maxValue = deviceDataCount.maxValue;
                    ddc.maxTime = deviceDataCount.maxTime;
                    ddc.localAcceptTime = DateTime.Now;
                    mcs.Set(cacheKey, ddc);
                }
            }
            else
            {
                //modify by hbqian for 如果原来数据有则用数据库的恢复到memcached at 2013-07-25 start
                //这里代码好像有问题,如果memcached重启了重数据库获取后不能用数据库的放到memcached中而是把新对象放到数据库了 造成了
                //数据库同一天有多笔数据出现
                //below is orign code start
                //DeviceDataCount ddc = _ReportGroupDao.Get(deviceDataCount);

                //if (ddc != null && deviceDataCount.maxValue < ddc.maxValue)
                //{
                //    deviceDataCount.maxValue = ddc.maxValue;
                //    deviceDataCount.maxTime = ddc.maxTime;
                //}

                //deviceDataCount.localAcceptTime = DateTime.Now;
                //mcs.Add(cacheKey, deviceDataCount);
                //above is origin code end
                //modify to new start
                ddc = _ReportGroupDao.Get(deviceDataCount);

                if (ddc != null)
                {
                    if (deviceDataCount.maxValue > ddc.maxValue)
                    {
                        ddc.maxValue = deviceDataCount.maxValue;
                        ddc.maxTime = deviceDataCount.maxTime;
                    }
                }
                else {
                    ddc = deviceDataCount;
                }

                ddc.localAcceptTime = DateTime.Now;
                mcs.Add(cacheKey, ddc);
                //modify to new end
                //modify by hbqian for 如果原来数据有则用数据库的恢复到memcached at 2013-07-25 end
            }
            if (!persistentListKey.Contains(cacheKey)) persistentListKey.Add(cacheKey);
            //设置取得天的最大时间后重新设置月度最大
            //重新设置持久化信息,前面的ddc里面会丢失非持久化属性
            ddc.year = deviceDataCount.year;
            ddc.deviceTable = deviceDataCount.deviceTable;
            SetMonthMax(ddc);
            //设置取得天的最大时间后重新设置年度最大
            SetYearMax(ddc);
        }
Ejemplo n.º 9
0
 /// <summary>
 /// 插入自定义报表
 /// </summary>
 /// <returns>设备表ID</returns>
 public int Remove(DeviceDataCount customReport)
 {
     return _ReportGroupDao.Remove(customReport);
 }
Ejemplo n.º 10
0
        /// <summary>
        /// 设置年度的最大值发生时间
        /// modify by hbqian for memcached没有数据则从数据库的放入memcached at 2013-07-25
        /// 另外参数用每天最大时间的传入而不是实时最大,如果memcached中期实时最大就不是每天最大了
        /// </summary>
        /// <param name="deviceDataCount"></param>
        /// <returns></returns>
        public void SetYearMax(DeviceDataCount deviceDataCount)
        {
            string cacheKey = CacheKeyUtil.buildDeviceDataCountYearKey(deviceDataCount.year, deviceDataCount.deviceId, deviceDataCount.monitorCode);
            object obj = MemcachedClientSatat.getInstance().Get(cacheKey);
            DeviceDataCount ddc;
            if (obj == null || string.IsNullOrEmpty(obj.ToString()))
            {
                ddc = _ReportGroupDao.GetYearMax(deviceDataCount);
                if (ddc != null)
                {
                    if (deviceDataCount.maxValue > ddc.maxValue)
                    {
                        ddc.maxValue = deviceDataCount.maxValue;
                        ddc.maxTime = deviceDataCount.maxTime;

                    }
                }
                else
                    ddc = deviceDataCount;

                MemcachedClientSatat.getInstance().Add(cacheKey, ddc, DateTime.Now.AddDays(7));
            }
            else
            {
                ddc = (DeviceDataCount)obj;
                if (deviceDataCount.maxValue > ddc.maxValue)
                {
                    ddc.maxValue = deviceDataCount.maxValue;
                    ddc.maxTime = deviceDataCount.maxTime;
                    MemcachedClientSatat.getInstance().Set(cacheKey, ddc);
                }
            }
        }
Ejemplo n.º 11
0
 /// <summary>
 /// 插入自定义报表
 /// </summary>
 /// <returns>设备表ID</returns>
 public int Insert(DeviceDataCount customReport)
 {
     return _ReportGroupDao.Insert(customReport);
 }
Ejemplo n.º 12
0
 /// <summary>
 /// 取得年度的最大值发生时间
 /// </summary>
 /// <param name="deviceDataCount"></param>
 /// <returns></returns>
 public DeviceDataCount GetYearMax(DeviceDataCount deviceDataCount)
 {
     string cacheKey = CacheKeyUtil.buildDeviceDataCountYearKey(deviceDataCount.year, deviceDataCount.deviceId, deviceDataCount.monitorCode);
     object obj = MemcachedClientSatat.getInstance().Get(cacheKey);
     if (obj == null || string.IsNullOrEmpty(obj.ToString()))
     {
         DeviceDataCount ddc = _ReportGroupDao.GetYearMax(deviceDataCount);
         if (ddc != null)
         {
             MemcachedClientSatat.getInstance().Add(cacheKey, ddc);
         }
         return ddc;
     }
     else
     {
         return (DeviceDataCount)obj;
     }
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 取得电站某个测点最大发生时间和值
 /// </summary>
 /// <param name="plantId">电站id</param>
 /// <param name="monitorCode">测点代码,参见MonitorType.cs,比如:MonitorType.PLANT_MONITORITEM_POWER_CODE</param>
 /// <param name="year">年</param>
 /// <param name="month">月</param>
 /// <param name="day">日</param>
 /// <returns></returns>
 public DeviceDataCount GetPlantMax(int plantId, int monitorCode, int year, int month, int day)
 {
     DeviceDataCount ddc = new DeviceDataCount() { deviceId = plantId, deviceTable = TableUtil.PLANT, monitorCode = monitorCode, year = year, day = day, month = month };
     return this.Get(ddc);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// 取得电站或设备某个测点最大发生时间和值
 /// </summary>
 /// <param name="deviceDataCount"></param>
 /// <returns></returns>
 public DeviceDataCount Get(DeviceDataCount deviceDataCount)
 {
     string cacheKey = CacheKeyUtil.buildDeviceDataCountKey(deviceDataCount.year, deviceDataCount.month, deviceDataCount.day, deviceDataCount.deviceId, deviceDataCount.monitorCode);
     object obj = MemcachedClientSatat.getInstance().Get(cacheKey);
     //暂时注释 待部署新的解析服务后 再放开
     if (obj!=null && !string.IsNullOrEmpty(obj.ToString()))
         return (DeviceDataCount)obj;
     else
     {
         DeviceDataCount ddc = _ReportGroupDao.Get(deviceDataCount);
         if (ddc != null)
             MemcachedClientSatat.getInstance().Add(cacheKey,ddc);
         return ddc;
     }
 }
Ejemplo n.º 15
0
        /// <summary>
        /// 缓存单个统计对象
        /// </summary>
        /// <param name="deviceDataCount"></param>
        private void Cache(DeviceDataCount deviceDataCount)
        {
            string cacheKey = CacheKeyUtil.buildDeviceDataCountKey(deviceDataCount.year, deviceDataCount.month, deviceDataCount.day, deviceDataCount.deviceId, deviceDataCount.monitorCode);

            object obj = MemcachedClientSatat.getInstance().Get(cacheKey);
            if (obj != null && !string.IsNullOrEmpty(obj.ToString()))//存在即修改
            {
                DeviceDataCount ddc = (DeviceDataCount)obj;
                if (ddc.maxValue < deviceDataCount.maxValue)
                {
                    ddc.maxValue = deviceDataCount.maxValue;
                    ddc.maxTime = deviceDataCount.maxTime;
                    ddc.localAcceptTime = DateTime.Now;
                    mcs.Set(cacheKey, ddc);
                }
            }
            else
            {
                DeviceDataCount ddc = _ReportGroupDao.Get(deviceDataCount);

                if (ddc != null && deviceDataCount.maxValue < ddc.maxValue)
                {
                    deviceDataCount.maxValue = ddc.maxValue;
                    deviceDataCount.maxTime = ddc.maxTime;
                }

                deviceDataCount.localAcceptTime = DateTime.Now;
                mcs.Add(cacheKey, deviceDataCount);
            }
            if (!persistentListKey.Contains(cacheKey)) persistentListKey.Add(cacheKey);
            //设置月度最大
            SetMonthMax(deviceDataCount);
            //设置年度最大
            SetYearMax(deviceDataCount);
        }