Example #1
0
 protected override void ChangeDatabase(IServiceProvider serviceProvider, string tableName)
 {
     using (FlowContext context = serviceProvider.GetRequiredService <FlowContext>())
     {
         try
         {
             context.ChangeVehicleTable(tableName);
             context.ChangeBikeTable(tableName);
             context.ChangePedestrainTable(tableName);
             _logger.LogInformation((int)LogEvent.分支切换, $"切换视频结构化数据表成功 {tableName}");
         }
         catch (MySqlException ex)
         {
             _logger.LogError((int)LogEvent.分支切换, ex, "切换视频结构化数据表失败");
         }
     }
 }
Example #2
0
        /// <summary>
        /// 初始化数据库
        /// </summary>
        private async void InitDb()
        {
            _logger.LogInformation((int)LogEvent.系统, "初始化数据库");

            DateTime minTime = TimePointConvert.CurrentTimePoint(BranchDbConvert.DateLevel);

            using (IServiceScope serviceScope = _serviceProvider.CreateScope())
            {
                using (FlowContext context = serviceScope.ServiceProvider.GetRequiredService <FlowContext>())
                {
                    if (context.Database.EnsureCreated())
                    {
                        #region 用户
                        _logger.LogInformation((int)LogEvent.系统, "创建管理员用户");
                        UserManager <IdentityUser> userManager = serviceScope.ServiceProvider.GetRequiredService <UserManager <IdentityUser> >();
                        await userManager.CreateAsync(new IdentityUser("admin"), "123456");

                        #endregion

                        #region 权限
                        _logger.LogInformation((int)LogEvent.系统, "创建权限");
                        IdentityUser adminUser = await userManager.FindByNameAsync("admin");

                        List <YumekoJabami.Models.Claim> claims = new List <YumekoJabami.Models.Claim>
                        {
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02000000", Descirption = "智慧交通视频检测系统"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02010000", Descirption = "设备管理"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02010100", Descirption = "设备信息维护"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02010200", Descirption = "设备位置维护"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02010300", Descirption = "国标网关设置"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02010400", Descirption = "校时配置"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02010500", Descirption = "设备操作"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02010600", Descirption = "设备运行状态"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02010700", Descirption = "视频信息维护"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02010800", Descirption = "视频位置维护"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02020000", Descirption = "数据分析"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02020100", Descirption = "通行信息查询"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02020200", Descirption = "流量数据分析"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02020300", Descirption = "IO数据监测"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02020400", Descirption = "流量分布查询"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02020500", Descirption = "拥堵趋势分析"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02020600", Descirption = "状态时间统计"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02020700", Descirption = "交通状态分析"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02030000", Descirption = "系统设置"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02030100", Descirption = "路口维护"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02030200", Descirption = "路段维护"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02030300", Descirption = "用户管理"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02030400", Descirption = "角色管理"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02030600", Descirption = "字典管理"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02030700", Descirption = "参数管理"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02030800", Descirption = "日志查询"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02030900", Descirption = "系统监控"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02040000", Descirption = "状况监测"
                            },
                            new YumekoJabami.Models.Claim {
                                Type = ClaimTypes.Webpage, Value = "02040100", Descirption = "应用检测"
                            },
                        };
                        context.TrafficClaims.AddRange(claims);
                        foreach (YumekoJabami.Models.Claim claim in claims)
                        {
                            await userManager.AddClaimAsync(adminUser, new System.Security.Claims.Claim(claim.Type, claim.Value));
                        }
                        #endregion

                        #region 字典
                        _logger.LogInformation((int)LogEvent.系统, "创建字典");
                        List <Code> flowCodes = new List <Code>();

                        flowCodes.AddRange(Enum.GetValues(typeof(LogEvent))
                                           .Cast <LogEvent>()
                                           .Select(e => new Code {
                            Key = typeof(LogEvent).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.Add(new Code
                        {
                            Key         = "LogLevel",
                            Value       = (int)LogLevel.Debug,
                            Description = "调试"
                        });

                        flowCodes.Add(new Code
                        {
                            Key         = "LogLevel",
                            Value       = (int)LogLevel.Information,
                            Description = "消息"
                        });

                        flowCodes.Add(new Code
                        {
                            Key         = "LogLevel",
                            Value       = (int)LogLevel.Warning,
                            Description = "警告"
                        });

                        flowCodes.Add(new Code
                        {
                            Key         = "LogLevel",
                            Value       = (int)LogLevel.Error,
                            Description = "错误"
                        });


                        flowCodes.AddRange(Enum.GetValues(typeof(ChannelType))
                                           .Cast <ChannelType>()
                                           .Select(e => new Code {
                            Key = typeof(ChannelType).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(DeviceModel))
                                           .Cast <DeviceModel>()
                                           .Select(e => new Code {
                            Key = typeof(DeviceModel).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(DeviceStatus))
                                           .Cast <DeviceStatus>()
                                           .Select(e => new Code {
                            Key = typeof(DeviceStatus).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(RtspProtocol))
                                           .Cast <RtspProtocol>()
                                           .Select(e => new Code {
                            Key = typeof(RtspProtocol).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(SectionDirection))
                                           .Cast <SectionDirection>()
                                           .Select(e => new Code {
                            Key = typeof(SectionDirection).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(SectionType))
                                           .Cast <SectionType>()
                                           .Select(e => new Code {
                            Key = typeof(SectionType).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(Age))
                                           .Cast <Age>()
                                           .Select(e => new Code {
                            Key = typeof(Age).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(NonVehicle))
                                           .Cast <NonVehicle>()
                                           .Select(e => new Code {
                            Key = typeof(NonVehicle).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(CarColor))
                                           .Cast <CarColor>()
                                           .Select(e => new Code {
                            Key = typeof(CarColor).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(CarType))
                                           .Cast <CarType>()
                                           .Select(e => new Code {
                            Key = typeof(CarType).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(FlowDirection))
                                           .Cast <FlowDirection>()
                                           .Select(e => new Code {
                            Key = typeof(FlowDirection).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.Add(new Code
                        {
                            Key         = "VehicleType",
                            Value       = (int)FlowType.轮车,
                            Description = FlowType.轮车.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "VehicleType",
                            Value       = (int)FlowType.卡车,
                            Description = FlowType.卡车.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "VehicleType",
                            Value       = (int)FlowType.客车,
                            Description = FlowType.客车.ToString()
                        });

                        flowCodes.Add(new Code
                        {
                            Key         = "VehicleType",
                            Value       = (int)FlowType.轿车,
                            Description = FlowType.轿车.ToString()
                        });

                        flowCodes.Add(new Code
                        {
                            Key         = "VehicleType",
                            Value       = (int)FlowType.面包车,
                            Description = FlowType.面包车.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "BikeType",
                            Value       = (int)FlowType.自行车,
                            Description = FlowType.自行车.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "BikeType",
                            Value       = (int)FlowType.摩托车,
                            Description = FlowType.摩托车.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "PedestrainType",
                            Value       = (int)FlowType.行人,
                            Description = FlowType.行人.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowType",
                            Value       = (int)FlowType.平均速度,
                            Description = FlowType.平均速度.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowType",
                            Value       = (int)FlowType.车头时距,
                            Description = FlowType.车头时距.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowType",
                            Value       = (int)FlowType.车头间距,
                            Description = FlowType.车头间距.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowType",
                            Value       = (int)FlowType.时间占有率,
                            Description = FlowType.时间占有率.ToString()
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowType",
                            Value       = (int)FlowType.空间占有率,
                            Description = FlowType.空间占有率.ToString()
                        });

                        flowCodes.AddRange(Enum.GetValues(typeof(LaneDirection))
                                           .Cast <LaneDirection>()
                                           .Select(e => new Code {
                            Key = typeof(LaneDirection).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(LaneType))
                                           .Cast <LaneType>()
                                           .Select(e => new Code {
                            Key = typeof(LaneType).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(PlateType))
                                           .Cast <PlateType>()
                                           .Select(e => new Code {
                            Key = typeof(PlateType).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(Sex))
                                           .Cast <Sex>()
                                           .Select(e => new Code {
                            Key = typeof(Sex).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(TrafficStatus))
                                           .Cast <TrafficStatus>()
                                           .Select(e => new Code {
                            Key = typeof(TrafficStatus).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(UpperColor))
                                           .Cast <UpperColor>()
                                           .Select(e => new Code {
                            Key = typeof(UpperColor).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.AddRange(Enum.GetValues(typeof(VideoStructType))
                                           .Cast <VideoStructType>()
                                           .Select(e => new Code {
                            Key = typeof(VideoStructType).Name, Value = (int)e, Description = e.ToString()
                        }));

                        flowCodes.Add(new Code
                        {
                            Key         = "FlowDateLevel",
                            Value       = (int)DateTimeLevel.Minute,
                            Description = "一分钟"
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowDateLevel",
                            Value       = (int)DateTimeLevel.FiveMinutes,
                            Description = "五分钟"
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowDateLevel",
                            Value       = (int)DateTimeLevel.FifteenMinutes,
                            Description = "十五分钟"
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowDateLevel",
                            Value       = (int)DateTimeLevel.Hour,
                            Description = "小时"
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowDateLevel",
                            Value       = (int)DateTimeLevel.Day,
                            Description = "天"
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "FlowDateLevel",
                            Value       = (int)DateTimeLevel.Month,
                            Description = "月"
                        });

                        flowCodes.Add(new Code
                        {
                            Key         = "CongestionDateLevel",
                            Value       = (int)DateTimeLevel.Hour,
                            Description = "小时"
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "CongestionDateLevel",
                            Value       = (int)DateTimeLevel.Day,
                            Description = "天"
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "CongestionDateLevel",
                            Value       = (int)DateTimeLevel.Month,
                            Description = "月"
                        });

                        flowCodes.Add(new Code
                        {
                            Key         = "StatusTimeDateLevel",
                            Value       = (int)DateTimeLevel.Hour,
                            Description = "小时"
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "StatusTimeDateLevel",
                            Value       = (int)DateTimeLevel.Day,
                            Description = "天"
                        });
                        flowCodes.Add(new Code
                        {
                            Key         = "StatusTimeDateLevel",
                            Value       = (int)DateTimeLevel.Month,
                            Description = "月"
                        });
                        context.Codes.AddRange(flowCodes);

                        #endregion

                        context.Version.Add(new TrafficVersion
                        {
                            Version = Assembly.GetExecutingAssembly().GetName().Version.ToString()
                        });
                        context.SaveChanges();
                    }
                    else
                    {
                        try
                        {
                            LaneFlow laneFlow = context.LaneFlows_One.OrderByDescending(f => f.Id).FirstOrDefault();
                            if (laneFlow != null &&
                                TimePointConvert.CurrentTimePoint(BranchDbConvert.DateLevel, laneFlow.DateTime) != minTime)
                            {
                                context.ChangeDatabase(BranchDbConvert.GetTableName(laneFlow.DateTime));
                            }

                            VideoVehicle vehicle = context.Vehicles.OrderByDescending(v => v.Id).FirstOrDefault();
                            if (vehicle != null &&
                                TimePointConvert.CurrentTimePoint(BranchDbConvert.DateLevel, vehicle.DateTime) != minTime)
                            {
                                context.ChangeVehicleTable(BranchDbConvert.GetTableName(vehicle.DateTime));
                            }

                            VideoBike bike = context.Bikes.OrderByDescending(v => v.Id).FirstOrDefault();
                            if (bike != null &&
                                TimePointConvert.CurrentTimePoint(BranchDbConvert.DateLevel, bike.DateTime) != minTime)
                            {
                                context.ChangeBikeTable(BranchDbConvert.GetTableName(bike.DateTime));
                            }

                            VideoPedestrain pedestrain = context.Pedestrains.OrderByDescending(v => v.Id).FirstOrDefault();
                            if (pedestrain != null &&
                                TimePointConvert.CurrentTimePoint(BranchDbConvert.DateLevel, pedestrain.DateTime) != minTime)
                            {
                                context.ChangePedestrainTable(BranchDbConvert.GetTableName(pedestrain.DateTime));
                            }
                        }
                        catch (MySqlException)
                        {
                        }
                    }
                }
            }
        }
        public static void CreateData(IServiceProvider serviceProvider, List <FlowDevice> devices, DataCreateMode mode, DateTime startDate, DateTime endDate, bool initDatabase = false)
        {
            if (initDatabase)
            {
                using (FlowContext context = serviceProvider.CreateScope().ServiceProvider.GetRequiredService <FlowContext>())
                {
                    context.Database.EnsureDeleted();
                    context.Database.EnsureCreated();
                }
            }

            DateTime         minTime = TimePointConvert.CurrentTimePoint(BranchDbConvert.DateLevel, startDate);
            DateTime         maxTime = TimePointConvert.NextTimePoint(BranchDbConvert.DateLevel, minTime);
            VideoBranchBlock branch  = new VideoBranchBlock(serviceProvider);

            branch.Open(minTime, maxTime);
            Random random = new Random();

            for (DateTime date = startDate; date <= endDate; date = date.AddDays(1))
            {
                int value = 1;
                for (int i = 0; i < 1440; ++i)
                {
                    DateTime startTime = startDate.AddMinutes(i);
                    foreach (FlowDevice device in devices)
                    {
                        foreach (var relation in device.FlowDevice_FlowChannels)
                        {
                            foreach (Lane lane in relation.Channel.Lanes)
                            {
                                VideoVehicle    videoVehicle;
                                VideoBike       bike;
                                VideoPedestrain pedestrain;
                                if (mode == DataCreateMode.Fixed)
                                {
                                    videoVehicle = new VideoVehicle
                                    {
                                        DataId      = lane.DataId,
                                        DateTime    = new DateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, 0),
                                        Image       = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p\r\nLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P\r\nT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAkACoDASEA\r\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\r\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\r\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\r\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\r\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\r\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\r\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\r\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpWXAw\r\nenaq8gVepAq0SV32/wB4fnUDAdiDTGRlaNh9T+dSBvSDPTrjpTwba1toBdWJlnlUsVP8I/GmIYs+\r\nl4+bSnX6N/8AXqIrpV3J5NqlxBclSUBRsOR7nigZmKxkQMylTyCD2I60nFAjdhsIbq7Erq3mICUI\r\nJwD2JFTNbaurY/twrjpmyX5v1zUsaAwa4Rxq0eR62R5+tQuPEeQFvdJLg8eZE4/rQgMKK0uWv724\r\nu54PtJfE8MWdqnsR9RT/ACz6H8qoRd1bVptEEE8SQu8wYIkjY3Yx0OaxZviNerFgQWfmE4OA7bPc\r\n/wD66mwy4fHVoyIV1bD7RvH2QlQfbvUcXj2TczPp8NwycCVJNm4euG6UWGTaZcNq1tdauYxCLiXa\r\nEDZwB61YwaZJh/EuRo10srj5EcgdutS6c1hd2kHn6LphJRckQkE8A+tMZtxeF9AlSF20mAGTOQrO\r\nB/Os7xp4Z0bSfDVxc2NkscygBX3MSvPbJpAL4MHm+Cogxx++bOO/Irof7Ph/vP8AmP8ACmI//9k=",
                                        Feature     = "",
                                        CarType     = 1,
                                        CarBrand    = "brand" + 1,
                                        CarColor    = 1,
                                        PlateNumber = "京A0000" + 1,
                                        PlateType   = 1
                                    };
                                    bike = new VideoBike
                                    {
                                        DataId   = lane.DataId,
                                        DateTime = new DateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, 0),
                                        Image    = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p\r\nLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P\r\nT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAkACoDASEA\r\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\r\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\r\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\r\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\r\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\r\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\r\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\r\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpWXAw\r\nenaq8gVepAq0SV32/wB4fnUDAdiDTGRlaNh9T+dSBvSDPTrjpTwba1toBdWJlnlUsVP8I/GmIYs+\r\nl4+bSnX6N/8AXqIrpV3J5NqlxBclSUBRsOR7nigZmKxkQMylTyCD2I60nFAjdhsIbq7Erq3mICUI\r\nJwD2JFTNbaurY/twrjpmyX5v1zUsaAwa4Rxq0eR62R5+tQuPEeQFvdJLg8eZE4/rQgMKK0uWv724\r\nu54PtJfE8MWdqnsR9RT/ACz6H8qoRd1bVptEEE8SQu8wYIkjY3Yx0OaxZviNerFgQWfmE4OA7bPc\r\n/wD66mwy4fHVoyIV1bD7RvH2QlQfbvUcXj2TczPp8NwycCVJNm4euG6UWGTaZcNq1tdauYxCLiXa\r\nEDZwB61YwaZJh/EuRo10srj5EcgdutS6c1hd2kHn6LphJRckQkE8A+tMZtxeF9AlSF20mAGTOQrO\r\nB/Os7xp4Z0bSfDVxc2NkscygBX3MSvPbJpAL4MHm+Cogxx++bOO/Irof7Ph/vP8AmP8ACmI//9k=",
                                        Feature  = "",
                                        BikeType = (int)NonVehicle.自行车
                                    };
                                    pedestrain = new VideoPedestrain
                                    {
                                        DataId     = lane.DataId,
                                        DateTime   = new DateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, 0),
                                        Image      = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p\r\nLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P\r\nT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAkACoDASEA\r\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\r\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\r\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\r\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\r\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\r\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\r\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\r\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpWXAw\r\nenaq8gVepAq0SV32/wB4fnUDAdiDTGRlaNh9T+dSBvSDPTrjpTwba1toBdWJlnlUsVP8I/GmIYs+\r\nl4+bSnX6N/8AXqIrpV3J5NqlxBclSUBRsOR7nigZmKxkQMylTyCD2I60nFAjdhsIbq7Erq3mICUI\r\nJwD2JFTNbaurY/twrjpmyX5v1zUsaAwa4Rxq0eR62R5+tQuPEeQFvdJLg8eZE4/rQgMKK0uWv724\r\nu54PtJfE8MWdqnsR9RT/ACz6H8qoRd1bVptEEE8SQu8wYIkjY3Yx0OaxZviNerFgQWfmE4OA7bPc\r\n/wD66mwy4fHVoyIV1bD7RvH2QlQfbvUcXj2TczPp8NwycCVJNm4euG6UWGTaZcNq1tdauYxCLiXa\r\nEDZwB61YwaZJh/EuRo10srj5EcgdutS6c1hd2kHn6LphJRckQkE8A+tMZtxeF9AlSF20mAGTOQrO\r\nB/Os7xp4Z0bSfDVxc2NkscygBX3MSvPbJpAL4MHm+Cogxx++bOO/Irof7Ph/vP8AmP8ACmI//9k=",
                                        Feature    = "",
                                        Age        = (int)Age.儿童,
                                        Sex        = (int)Sex.女,
                                        UpperColor = (int)UpperColor.红
                                    };
                                }
                                else if (mode == DataCreateMode.Sequence)
                                {
                                    int temp = value;
                                    value       += 1;
                                    videoVehicle = new VideoVehicle
                                    {
                                        DataId      = lane.DataId,
                                        DateTime    = new DateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, 0),
                                        Image       = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p\r\nLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P\r\nT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAkACoDASEA\r\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\r\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\r\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\r\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\r\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\r\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\r\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\r\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpWXAw\r\nenaq8gVepAq0SV32/wB4fnUDAdiDTGRlaNh9T+dSBvSDPTrjpTwba1toBdWJlnlUsVP8I/GmIYs+\r\nl4+bSnX6N/8AXqIrpV3J5NqlxBclSUBRsOR7nigZmKxkQMylTyCD2I60nFAjdhsIbq7Erq3mICUI\r\nJwD2JFTNbaurY/twrjpmyX5v1zUsaAwa4Rxq0eR62R5+tQuPEeQFvdJLg8eZE4/rQgMKK0uWv724\r\nu54PtJfE8MWdqnsR9RT/ACz6H8qoRd1bVptEEE8SQu8wYIkjY3Yx0OaxZviNerFgQWfmE4OA7bPc\r\n/wD66mwy4fHVoyIV1bD7RvH2QlQfbvUcXj2TczPp8NwycCVJNm4euG6UWGTaZcNq1tdauYxCLiXa\r\nEDZwB61YwaZJh/EuRo10srj5EcgdutS6c1hd2kHn6LphJRckQkE8A+tMZtxeF9AlSF20mAGTOQrO\r\nB/Os7xp4Z0bSfDVxc2NkscygBX3MSvPbJpAL4MHm+Cogxx++bOO/Irof7Ph/vP8AmP8ACmI//9k=",
                                        Feature     = "",
                                        CarType     = 1,
                                        CarBrand    = "brand" + temp,
                                        CarColor    = 1,
                                        PlateNumber = "京A0000" + 1,
                                        PlateType   = 1
                                    };
                                    bike = new VideoBike
                                    {
                                        DataId   = lane.DataId,
                                        DateTime = new DateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, 0),
                                        Image    = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p\r\nLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P\r\nT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAkACoDASEA\r\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\r\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\r\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\r\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\r\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\r\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\r\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\r\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpWXAw\r\nenaq8gVepAq0SV32/wB4fnUDAdiDTGRlaNh9T+dSBvSDPTrjpTwba1toBdWJlnlUsVP8I/GmIYs+\r\nl4+bSnX6N/8AXqIrpV3J5NqlxBclSUBRsOR7nigZmKxkQMylTyCD2I60nFAjdhsIbq7Erq3mICUI\r\nJwD2JFTNbaurY/twrjpmyX5v1zUsaAwa4Rxq0eR62R5+tQuPEeQFvdJLg8eZE4/rQgMKK0uWv724\r\nu54PtJfE8MWdqnsR9RT/ACz6H8qoRd1bVptEEE8SQu8wYIkjY3Yx0OaxZviNerFgQWfmE4OA7bPc\r\n/wD66mwy4fHVoyIV1bD7RvH2QlQfbvUcXj2TczPp8NwycCVJNm4euG6UWGTaZcNq1tdauYxCLiXa\r\nEDZwB61YwaZJh/EuRo10srj5EcgdutS6c1hd2kHn6LphJRckQkE8A+tMZtxeF9AlSF20mAGTOQrO\r\nB/Os7xp4Z0bSfDVxc2NkscygBX3MSvPbJpAL4MHm+Cogxx++bOO/Irof7Ph/vP8AmP8ACmI//9k=",
                                        Feature  = "",
                                        BikeType = (temp % 2 == 0 ? 2 : 3)
                                    };
                                    pedestrain = new VideoPedestrain
                                    {
                                        DataId     = lane.DataId,
                                        DateTime   = new DateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, 0),
                                        Image      = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p\r\nLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P\r\nT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAkACoDASEA\r\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\r\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\r\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\r\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\r\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\r\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\r\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\r\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpWXAw\r\nenaq8gVepAq0SV32/wB4fnUDAdiDTGRlaNh9T+dSBvSDPTrjpTwba1toBdWJlnlUsVP8I/GmIYs+\r\nl4+bSnX6N/8AXqIrpV3J5NqlxBclSUBRsOR7nigZmKxkQMylTyCD2I60nFAjdhsIbq7Erq3mICUI\r\nJwD2JFTNbaurY/twrjpmyX5v1zUsaAwa4Rxq0eR62R5+tQuPEeQFvdJLg8eZE4/rQgMKK0uWv724\r\nu54PtJfE8MWdqnsR9RT/ACz6H8qoRd1bVptEEE8SQu8wYIkjY3Yx0OaxZviNerFgQWfmE4OA7bPc\r\n/wD66mwy4fHVoyIV1bD7RvH2QlQfbvUcXj2TczPp8NwycCVJNm4euG6UWGTaZcNq1tdauYxCLiXa\r\nEDZwB61YwaZJh/EuRo10srj5EcgdutS6c1hd2kHn6LphJRckQkE8A+tMZtxeF9AlSF20mAGTOQrO\r\nB/Os7xp4Z0bSfDVxc2NkscygBX3MSvPbJpAL4MHm+Cogxx++bOO/Irof7Ph/vP8AmP8ACmI//9k=",
                                        Feature    = "",
                                        Age        = (int)Age.儿童,
                                        Sex        = (temp % 2 == 0 ? 1 : 2),
                                        UpperColor = (int)UpperColor.红
                                    };
                                }
                                else
                                {
                                    videoVehicle = new VideoVehicle
                                    {
                                        DataId      = lane.DataId,
                                        DateTime    = new DateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, 0),
                                        Image       = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p\r\nLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P\r\nT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAkACoDASEA\r\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\r\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\r\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\r\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\r\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\r\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\r\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\r\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpWXAw\r\nenaq8gVepAq0SV32/wB4fnUDAdiDTGRlaNh9T+dSBvSDPTrjpTwba1toBdWJlnlUsVP8I/GmIYs+\r\nl4+bSnX6N/8AXqIrpV3J5NqlxBclSUBRsOR7nigZmKxkQMylTyCD2I60nFAjdhsIbq7Erq3mICUI\r\nJwD2JFTNbaurY/twrjpmyX5v1zUsaAwa4Rxq0eR62R5+tQuPEeQFvdJLg8eZE4/rQgMKK0uWv724\r\nu54PtJfE8MWdqnsR9RT/ACz6H8qoRd1bVptEEE8SQu8wYIkjY3Yx0OaxZviNerFgQWfmE4OA7bPc\r\n/wD66mwy4fHVoyIV1bD7RvH2QlQfbvUcXj2TczPp8NwycCVJNm4euG6UWGTaZcNq1tdauYxCLiXa\r\nEDZwB61YwaZJh/EuRo10srj5EcgdutS6c1hd2kHn6LphJRckQkE8A+tMZtxeF9AlSF20mAGTOQrO\r\nB/Os7xp4Z0bSfDVxc2NkscygBX3MSvPbJpAL4MHm+Cogxx++bOO/Irof7Ph/vP8AmP8ACmI//9k=",
                                        Feature     = "",
                                        CarType     = random.Next(1, 21),
                                        CarBrand    = "brand" + random.Next(1, 100),
                                        CarColor    = random.Next(1, 13),
                                        PlateNumber = "京A0000" + random.Next(1, 9),
                                        PlateType   = random.Next(1, 29)
                                    };
                                    bike = new VideoBike
                                    {
                                        DataId   = lane.DataId,
                                        DateTime = new DateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, 0),
                                        Image    = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p\r\nLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P\r\nT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAkACoDASEA\r\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\r\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\r\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\r\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\r\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\r\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\r\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\r\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpWXAw\r\nenaq8gVepAq0SV32/wB4fnUDAdiDTGRlaNh9T+dSBvSDPTrjpTwba1toBdWJlnlUsVP8I/GmIYs+\r\nl4+bSnX6N/8AXqIrpV3J5NqlxBclSUBRsOR7nigZmKxkQMylTyCD2I60nFAjdhsIbq7Erq3mICUI\r\nJwD2JFTNbaurY/twrjpmyX5v1zUsaAwa4Rxq0eR62R5+tQuPEeQFvdJLg8eZE4/rQgMKK0uWv724\r\nu54PtJfE8MWdqnsR9RT/ACz6H8qoRd1bVptEEE8SQu8wYIkjY3Yx0OaxZviNerFgQWfmE4OA7bPc\r\n/wD66mwy4fHVoyIV1bD7RvH2QlQfbvUcXj2TczPp8NwycCVJNm4euG6UWGTaZcNq1tdauYxCLiXa\r\nEDZwB61YwaZJh/EuRo10srj5EcgdutS6c1hd2kHn6LphJRckQkE8A+tMZtxeF9AlSF20mAGTOQrO\r\nB/Os7xp4Z0bSfDVxc2NkscygBX3MSvPbJpAL4MHm+Cogxx++bOO/Irof7Ph/vP8AmP8ACmI//9k=",
                                        Feature  = "",
                                        BikeType = random.Next(2, 3)
                                    };
                                    pedestrain = new VideoPedestrain
                                    {
                                        DataId     = lane.DataId,
                                        DateTime   = new DateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, 0),
                                        Image      = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p\r\nLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P\r\nT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAkACoDASEA\r\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\r\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\r\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\r\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\r\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\r\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\r\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\r\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDpWXAw\r\nenaq8gVepAq0SV32/wB4fnUDAdiDTGRlaNh9T+dSBvSDPTrjpTwba1toBdWJlnlUsVP8I/GmIYs+\r\nl4+bSnX6N/8AXqIrpV3J5NqlxBclSUBRsOR7nigZmKxkQMylTyCD2I60nFAjdhsIbq7Erq3mICUI\r\nJwD2JFTNbaurY/twrjpmyX5v1zUsaAwa4Rxq0eR62R5+tQuPEeQFvdJLg8eZE4/rQgMKK0uWv724\r\nu54PtJfE8MWdqnsR9RT/ACz6H8qoRd1bVptEEE8SQu8wYIkjY3Yx0OaxZviNerFgQWfmE4OA7bPc\r\n/wD66mwy4fHVoyIV1bD7RvH2QlQfbvUcXj2TczPp8NwycCVJNm4euG6UWGTaZcNq1tdauYxCLiXa\r\nEDZwB61YwaZJh/EuRo10srj5EcgdutS6c1hd2kHn6LphJRckQkE8A+tMZtxeF9AlSF20mAGTOQrO\r\nB/Os7xp4Z0bSfDVxc2NkscygBX3MSvPbJpAL4MHm+Cogxx++bOO/Irof7Ph/vP8AmP8ACmI//9k=",
                                        Feature    = "",
                                        Age        = (int)Age.儿童,
                                        Sex        = (int)Sex.女,
                                        UpperColor = random.Next(1, 9)
                                    };
                                }
                                branch.Post(videoVehicle);
                                branch.Post(bike);
                                branch.Post(pedestrain);
                            }
                        }
                    }
                }
            }

            DateTime currentTime = TimePointConvert.CurrentTimePoint(BranchDbConvert.DateLevel, DateTime.Now);

            branch.Close();
            if (currentTime != minTime)
            {
                using (FlowContext context = serviceProvider.GetRequiredService <FlowContext>())
                {
                    context.ChangeBikeTable(BranchDbConvert.GetTableName(minTime));
                    context.ChangePedestrainTable(BranchDbConvert.GetTableName(minTime));
                    context.ChangeVehicleTable(BranchDbConvert.GetTableName(minTime));
                }
            }
        }