xxe пре 2 година
родитељ
комит
39b218936b
10 измењених фајлова са 83 додато и 10 уклоњено
  1. +2
    -0
      HKCardOUT/Bootstrapper.cs
  2. +7
    -0
      HKCardOUT/CardHandle.cs
  3. +16
    -0
      HKCardOUT/DTO/FoodDto.cs
  4. +1
    -0
      HKCardOUT/Helper/DataBus.cs
  5. +19
    -3
      HKCardOUT/Logic/RemoteService.cs
  6. +2
    -2
      HKCardOUT/ViewModels/AdWindowViewModel.cs
  7. +18
    -2
      HKCardOUT/Views/AdWindow.xaml
  8. +15
    -0
      HKCardOUT/Views/AdWindow.xaml.cs
  9. +1
    -1
      HKCardOUT/Views/RootView.xaml.cs
  10. +2
    -2
      HKCardOUT/options.json

+ 2
- 0
HKCardOUT/Bootstrapper.cs Прегледај датотеку

@@ -82,6 +82,7 @@ namespace HKCardOUT
RemoteService.PullShopInfo();
//初始化表
DbContext.InitTable();
//服务器拉取数据
ServiceQueryExcute.QueryExcute.ExtuteMQ<CardHandle, string>("CardStutasChanged", MQEnum.Push);
ServiceQueryExcute.QueryExcute.ExtuteMQ<TimeHandle, string>("TimeChanged", MQEnum.Push);
//服务器拉取数据
@@ -89,6 +90,7 @@ namespace HKCardOUT
DataBus.UserListDto = HKLib.Interfaces.HKLibHelper.GetUserListSync("");
RemoteService.GetCardStuatas();
DataBus.saleLogDtos = new System.Collections.Concurrent.ConcurrentQueue<DTO.SaleLogDto>();
RemoteService.GetFoodMenus();
base.Configure();
}



+ 7
- 0
HKCardOUT/CardHandle.cs Прегледај датотеку

@@ -27,4 +27,11 @@ namespace HKCardOUT
DataBus.Times = msg.ToModel<TimeSpilte>();
}
}
public class TestHandle : IAccept
{
public void AcceptMQ<T>(string msg)
{
var X = msg;
}
}
}

+ 16
- 0
HKCardOUT/DTO/FoodDto.cs Прегледај датотеку

@@ -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; }
}
}

+ 1
- 0
HKCardOUT/Helper/DataBus.cs Прегледај датотеку

@@ -43,6 +43,7 @@ namespace HKCardOUT.Helper
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 FoodDto Menu { get; set; }
}
public class ApiRoute
{


+ 19
- 3
HKCardOUT/Logic/RemoteService.cs Прегледај датотеку

@@ -48,9 +48,6 @@ namespace HKCardOUT.Logic
/// </summary>
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 =>
{
t.NodePath = ApiRoute.GetTime;
@@ -141,5 +138,24 @@ namespace HKCardOUT.Logic
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;
}
}
}

+ 2
- 2
HKCardOUT/ViewModels/AdWindowViewModel.cs Прегледај датотеку

@@ -111,7 +111,7 @@ namespace HKCardOUT.ViewModels
.Select(x => x.Name).FirstOrDefault();


if (BindScreen == 2)
if (BindScreen == 0)
{
LInfo = data.Location == "6" ? data : new ScreenInfoDto();
RInfo = data.Location == "5" ? data : new ScreenInfoDto();
@@ -147,7 +147,7 @@ namespace HKCardOUT.ViewModels
LMsg = HKControl.Main.GetInstance.GetIsSwipe(6) ? "设备正常" : "设备异常";
RMsg = HKControl.Main.GetInstance.GetIsSwipe(5) ? "设备正常" : "设备异常";
}
if (BindScreen == 0)
if (BindScreen == 2)
{
LInfo = data.Location == "4" ? data : new ScreenInfoDto();
RInfo = data.Location == "3" ? data : new ScreenInfoDto();


+ 18
- 2
HKCardOUT/Views/AdWindow.xaml Прегледај датотеку

@@ -27,7 +27,6 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width=".2*" />
</Grid.ColumnDefinitions>

<Border BorderBrush="Black" BorderThickness="1">
<StackPanel HorizontalAlignment="Center">
<TextBlock Style="{StaticResource Lbl}" Text="{Binding LGate}" />
@@ -67,6 +66,24 @@
<RowDefinition Height=".3*" />
<RowDefinition Height=".7*" />
</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" />
</Grid>
<Border
@@ -106,6 +123,5 @@
</ListBox>
</StackPanel>
</Border>

</Grid>
</Window>

+ 15
- 0
HKCardOUT/Views/AdWindow.xaml.cs Прегледај датотеку

@@ -43,6 +43,21 @@ namespace HKCardOUT.Views
{
(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);
};
this.Closed += (sender, ev) =>


+ 1
- 1
HKCardOUT/Views/RootView.xaml.cs Прегледај датотеку

@@ -16,7 +16,7 @@ namespace HKCardOUT.Views
public RootView()
{
InitializeComponent();
TurnOn();
//TurnOn();
if (!StartEXE.IsExistKey("HKCardOUT"))
{
var Paths = "D:\\HK刷卡端正式环境\\HKCardOUT.exe";


+ 2
- 2
HKCardOUT/options.json Прегледај датотеку

@@ -21,9 +21,9 @@
//取消单卡刷卡限制
"Cancel": false,
//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": "host=47.108.65.220;username=root;password=pwd",
//"MQ": "host=47.108.65.220;username=root;password=pwd",
//超级卡
"Admin": [ 666, 888, 999 ],
//刷卡间隔


Loading…
Откажи
Сачувај