|
- using DTO;
- using HKCardOUT.Logic.Model;
- using HKCardOUT.Views;
- using HKLib.Dto;
- using Logic.RemoteModel;
- using System;
- using System.Collections.Concurrent;
- using System.Collections.Generic;
- using System.Globalization;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Data;
- using XExten.Advance.StaticFramework;
-
- namespace HKCardOUT.Helper
- {
- public class DataBus
- {
- private static string _ConnectionString;
- public static string ConnectionString
- {
- get => _ConnectionString;
- set
- {
- var Route = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DATA");
- _ConnectionString = $"DataSource={SyncStatic.CreateFile(Path.Combine(SyncStatic.CreateDir(Route), value))}";
- }
- }
- public static bool NetWordState { get; set; } = false;
- public static string Cron { get; set; }
- public static bool StartDevice { get; set; }
- public static bool Cancel { get; set; }
- public static string StoreId { get; set; }
- public static string TenantId { get; set; }
- public static string COM { get; set; }
- public static string SaasRoute { get; set; }
- public static int Span { get; set; }
- public static int Count { get; set; }
- public static List<string> Admin { get; set; }
- public static TimeSpilte Times { get; set; }
- public static StoreInfoResponse StoreInfo { get; set; }
- public static Dictionary<string, AdWindow> AdStatus { get; set; } = new Dictionary<string, AdWindow>();
- public static List<UserListDto> UserListDto { get; set; }
- public static ConcurrentQueue<SaleLogDto> saleLogDtos { get; set; }
-
- public static ConcurrentDictionary<string, ConcurrentQueue<SaleLogDto>> SaleLogDtoList { get; set; } = new ConcurrentDictionary<string, ConcurrentQueue<SaleLogDto>>();
-
- public static ConcurrentQueue<SaleLog> Entitys { get; set; }
- public static FoodDto Menu { get; set; }
- public static List<GateSetUp> RangeCtrl { get; set; }
- }
- public class ApiRoute
- {
- public static string GetTime = DataBus.SaasRoute + "api/one-card/eat-time-interval";
- /// <summary>
- /// 获取所有卡
- /// </summary>
- public static string CheckCardStatus = DataBus.SaasRoute + "api/one-card/card-list";
- /// <summary>
- /// 同步消费记录
- /// </summary>
- public static string SyncSaleLog = DataBus.SaasRoute + "api/member-helper/memberconsumptionorrecharge";
- /// <summary>
- /// 批量消费记录
- /// </summary>
- public static string SyncSaleLogList = DataBus.SaasRoute + "api/member-helper/memberconsumptionorrechargelist";
- /// <summary>
- /// 获取店铺信息
- /// </summary>
- public static string PullShopInfo = DataBus.SaasRoute + $"api/StoreHelper/GeBasisGateList?StoreId={DataBus.StoreId}";
- /// <summary>
- /// 区域控制
- /// </summary>
- public static string RangCtrl = DataBus.SaasRoute + $"api/StoreHelper/GetBasisGateSetUp?StoreId={DataBus.StoreId}";
- /// <summary>
- /// 菜品数据
- /// </summary>
- public static string FoodCtrl = DataBus.SaasRoute + $"api/StoreHelper/GetBasisGateFoodList?StoreId={DataBus.StoreId}";
- }
- public class HKConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return (bool)value ? "启用" : "禁用";
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return value;
- }
- }
- public class MemoryBus
- {
- public static List<CardStutas> CardStatus { get; set; } = new List<CardStutas>();
- public static List<SaleLog> CardRecord { get; set; } = new List<SaleLog>();
- }
- }
|