@@ -82,6 +82,7 @@ namespace HKCardOUT | |||||
RemoteService.PullShopInfo(); | RemoteService.PullShopInfo(); | ||||
//初始化表 | //初始化表 | ||||
DbContext.InitTable(); | DbContext.InitTable(); | ||||
//服务器拉取数据 | |||||
ServiceQueryExcute.QueryExcute.ExtuteMQ<CardHandle, string>("CardStutasChanged", MQEnum.Push); | ServiceQueryExcute.QueryExcute.ExtuteMQ<CardHandle, string>("CardStutasChanged", MQEnum.Push); | ||||
ServiceQueryExcute.QueryExcute.ExtuteMQ<TimeHandle, string>("TimeChanged", MQEnum.Push); | ServiceQueryExcute.QueryExcute.ExtuteMQ<TimeHandle, string>("TimeChanged", MQEnum.Push); | ||||
//服务器拉取数据 | //服务器拉取数据 | ||||
@@ -89,6 +90,7 @@ namespace HKCardOUT | |||||
DataBus.UserListDto = HKLib.Interfaces.HKLibHelper.GetUserListSync(""); | DataBus.UserListDto = HKLib.Interfaces.HKLibHelper.GetUserListSync(""); | ||||
RemoteService.GetCardStuatas(); | RemoteService.GetCardStuatas(); | ||||
DataBus.saleLogDtos = new System.Collections.Concurrent.ConcurrentQueue<DTO.SaleLogDto>(); | DataBus.saleLogDtos = new System.Collections.Concurrent.ConcurrentQueue<DTO.SaleLogDto>(); | ||||
RemoteService.GetFoodMenus(); | |||||
base.Configure(); | base.Configure(); | ||||
} | } | ||||
@@ -27,4 +27,11 @@ namespace HKCardOUT | |||||
DataBus.Times = msg.ToModel<TimeSpilte>(); | DataBus.Times = msg.ToModel<TimeSpilte>(); | ||||
} | } | ||||
} | } | ||||
public class TestHandle : IAccept | |||||
{ | |||||
public void AcceptMQ<T>(string msg) | |||||
{ | |||||
var X = msg; | |||||
} | |||||
} | |||||
} | } |
@@ -0,0 +1,16 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace DTO | |||||
{ | |||||
public class FoodDto | |||||
{ | |||||
public List<SubFoodDto> GateFood { get; set; } | |||||
} | |||||
public class SubFoodDto | |||||
{ | |||||
public string GateId { get; set; } | |||||
public List<string> Foods { get; set; } | |||||
} | |||||
} |
@@ -43,6 +43,7 @@ namespace HKCardOUT.Helper | |||||
public static Dictionary<string, AdWindow> AdStatus { get; set; } = new Dictionary<string, AdWindow>(); | public static Dictionary<string, AdWindow> AdStatus { get; set; } = new Dictionary<string, AdWindow>(); | ||||
public static List<UserListDto> UserListDto { get; set; } | public static List<UserListDto> UserListDto { get; set; } | ||||
public static ConcurrentQueue<SaleLogDto> saleLogDtos { get; set; } | public static ConcurrentQueue<SaleLogDto> saleLogDtos { get; set; } | ||||
public static FoodDto Menu { get; set; } | |||||
} | } | ||||
public class ApiRoute | public class ApiRoute | ||||
{ | { | ||||
@@ -48,9 +48,6 @@ namespace HKCardOUT.Logic | |||||
/// </summary> | /// </summary> | ||||
public static void SyncTime() | public static void SyncTime() | ||||
{ | { | ||||
/* | |||||
{"statusCode":200,"data":{"isSuccess":true,"msg":null,"data":{"amStartTime":"17:50","amEndTime":"17:50","pmStartTime":"17:50","pmEndTime":"17:50","atStartTime":"17:50","atEndTime":"17:50"}},"succeeded":true,"errors":null,"extras":null,"timestamp":1665654784093} | |||||
*/ | |||||
var data = IHttpMultiClient.HttpMulti.AddNode(t => | var data = IHttpMultiClient.HttpMulti.AddNode(t => | ||||
{ | { | ||||
t.NodePath = ApiRoute.GetTime; | t.NodePath = ApiRoute.GetTime; | ||||
@@ -141,5 +138,24 @@ namespace HKCardOUT.Logic | |||||
DataBus.StoreInfo = SyncStatic.ReadFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "StoreInfo.json")).ToModel<StoreInfoResponse>(); | DataBus.StoreInfo = SyncStatic.ReadFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "StoreInfo.json")).ToModel<StoreInfoResponse>(); | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取菜单 | |||||
/// </summary> | |||||
public static void GetFoodMenus() | |||||
{ | |||||
var dtos = new FoodDto | |||||
{ | |||||
GateFood = new List<SubFoodDto>() | |||||
}; | |||||
SubFoodDto dto1 = new SubFoodDto | |||||
{ | |||||
GateId = "2edbe98d-019c-4c3c-87d8-6876aa866233", | |||||
Foods = new List<string> { | |||||
"红烧狮子头","蒜苔肉丝","回锅肉","蒜泥白肉","炒白菜","炒茄子" | |||||
} | |||||
}; | |||||
dtos.GateFood.Add(dto1); | |||||
DataBus.Menu = dtos; | |||||
} | |||||
} | } | ||||
} | } |
@@ -111,7 +111,7 @@ namespace HKCardOUT.ViewModels | |||||
.Select(x => x.Name).FirstOrDefault(); | .Select(x => x.Name).FirstOrDefault(); | ||||
if (BindScreen == 2) | |||||
if (BindScreen == 0) | |||||
{ | { | ||||
LInfo = data.Location == "6" ? data : new ScreenInfoDto(); | LInfo = data.Location == "6" ? data : new ScreenInfoDto(); | ||||
RInfo = data.Location == "5" ? data : new ScreenInfoDto(); | RInfo = data.Location == "5" ? data : new ScreenInfoDto(); | ||||
@@ -147,7 +147,7 @@ namespace HKCardOUT.ViewModels | |||||
LMsg = HKControl.Main.GetInstance.GetIsSwipe(6) ? "设备正常" : "设备异常"; | LMsg = HKControl.Main.GetInstance.GetIsSwipe(6) ? "设备正常" : "设备异常"; | ||||
RMsg = HKControl.Main.GetInstance.GetIsSwipe(5) ? "设备正常" : "设备异常"; | RMsg = HKControl.Main.GetInstance.GetIsSwipe(5) ? "设备正常" : "设备异常"; | ||||
} | } | ||||
if (BindScreen == 0) | |||||
if (BindScreen == 2) | |||||
{ | { | ||||
LInfo = data.Location == "4" ? data : new ScreenInfoDto(); | LInfo = data.Location == "4" ? data : new ScreenInfoDto(); | ||||
RInfo = data.Location == "3" ? data : new ScreenInfoDto(); | RInfo = data.Location == "3" ? data : new ScreenInfoDto(); | ||||
@@ -27,7 +27,6 @@ | |||||
<ColumnDefinition Width="*" /> | <ColumnDefinition Width="*" /> | ||||
<ColumnDefinition Width=".2*" /> | <ColumnDefinition Width=".2*" /> | ||||
</Grid.ColumnDefinitions> | </Grid.ColumnDefinitions> | ||||
<Border BorderBrush="Black" BorderThickness="1"> | <Border BorderBrush="Black" BorderThickness="1"> | ||||
<StackPanel HorizontalAlignment="Center"> | <StackPanel HorizontalAlignment="Center"> | ||||
<TextBlock Style="{StaticResource Lbl}" Text="{Binding LGate}" /> | <TextBlock Style="{StaticResource Lbl}" Text="{Binding LGate}" /> | ||||
@@ -67,6 +66,24 @@ | |||||
<RowDefinition Height=".3*" /> | <RowDefinition Height=".3*" /> | ||||
<RowDefinition Height=".7*" /> | <RowDefinition Height=".7*" /> | ||||
</Grid.RowDefinitions> | </Grid.RowDefinitions> | ||||
<StackPanel> | |||||
<Grid> | |||||
<Grid.ColumnDefinitions> | |||||
<ColumnDefinition /> | |||||
<ColumnDefinition /> | |||||
</Grid.ColumnDefinitions> | |||||
<TextBlock | |||||
x:Name="one" | |||||
FontSize="30" | |||||
Style="{StaticResource Lbl}" /> | |||||
<TextBlock | |||||
x:Name="two" | |||||
Grid.Column="1" | |||||
FontSize="30" | |||||
Style="{StaticResource Lbl}" /> | |||||
</Grid> | |||||
</StackPanel> | |||||
<view2:WebView2 x:Name="view2" Grid.Row="1" /> | <view2:WebView2 x:Name="view2" Grid.Row="1" /> | ||||
</Grid> | </Grid> | ||||
<Border | <Border | ||||
@@ -106,6 +123,5 @@ | |||||
</ListBox> | </ListBox> | ||||
</StackPanel> | </StackPanel> | ||||
</Border> | </Border> | ||||
</Grid> | </Grid> | ||||
</Window> | </Window> |
@@ -43,6 +43,21 @@ namespace HKCardOUT.Views | |||||
{ | { | ||||
(this.DataContext as AdWindowViewModel).InitData(bindScreen); | (this.DataContext as AdWindowViewModel).InitData(bindScreen); | ||||
} | } | ||||
if (bindScreen == 2) | |||||
{ | |||||
this.one.Text = "4号档口"; | |||||
this.two.Text = "3号档口"; | |||||
} | |||||
if (bindScreen == 1) | |||||
{ | |||||
this.one.Text = "2号档口"; | |||||
this.two.Text = "1号档口"; | |||||
} | |||||
if (bindScreen == 0) | |||||
{ | |||||
this.one.Text = "6号档口"; | |||||
this.two.Text = "5号档口"; | |||||
} | |||||
InitView2(input); | InitView2(input); | ||||
}; | }; | ||||
this.Closed += (sender, ev) => | this.Closed += (sender, ev) => | ||||
@@ -16,7 +16,7 @@ namespace HKCardOUT.Views | |||||
public RootView() | public RootView() | ||||
{ | { | ||||
InitializeComponent(); | InitializeComponent(); | ||||
TurnOn(); | |||||
//TurnOn(); | |||||
if (!StartEXE.IsExistKey("HKCardOUT")) | if (!StartEXE.IsExistKey("HKCardOUT")) | ||||
{ | { | ||||
var Paths = "D:\\HK刷卡端正式环境\\HKCardOUT.exe"; | var Paths = "D:\\HK刷卡端正式环境\\HKCardOUT.exe"; | ||||
@@ -21,9 +21,9 @@ | |||||
//取消单卡刷卡限制 | //取消单卡刷卡限制 | ||||
"Cancel": false, | "Cancel": false, | ||||
//MQ测试地址 内网无法访问需要用正式的MQ地址 | //MQ测试地址 内网无法访问需要用正式的MQ地址 | ||||
//"MQ": "host=10.2.1.21:5672;username=guest;password=guest" | |||||
"MQ": "host=10.2.1.21:5672;username=guest;password=guest", | |||||
//MQ正式地址 | //MQ正式地址 | ||||
"MQ": "host=47.108.65.220;username=root;password=pwd", | |||||
//"MQ": "host=47.108.65.220;username=root;password=pwd", | |||||
//超级卡 | //超级卡 | ||||
"Admin": [ 666, 888, 999 ], | "Admin": [ 666, 888, 999 ], | ||||
//刷卡间隔 | //刷卡间隔 | ||||