Parcourir la source

订单状态修改

master
pry il y a 2 ans
Parent
révision
6aa77fc822
4 fichiers modifiés avec 51 ajouts et 33 suppressions
  1. +15
    -15
      HBLConsole.Business/AbstractServer/Base.cs
  2. +7
    -7
      HBLConsole/App.config
  3. +6
    -0
      HBLConsole/View/OrderStatusView.xaml
  4. +23
    -11
      HBLConsole/ViewModel/ViewModelBase.cs

+ 15
- 15
HBLConsole.Business/AbstractServer/Base.cs Voir le fichier

@@ -49,20 +49,20 @@ namespace HBLConsole.Business.AbstractServer

private void GetMake()
{
try
{
string result = string.Empty;
string DeviceSeries=GVL.GeneralConfig.DeviceType.ToString();
string Version = "1.0.0.0";
var jsondata = new { DeviceSeries, Version };
string header = $"[{InternetInfo.StockServer}/GetItemInfo]_[{DateTime.Now.Ticks}]";
string url = $"{InternetInfo.StockServer}GetDeviceMake";
result = APIHelper.GetInstance.HttpRequest(url, header, jsondata, RequestType.POST);
}
catch (Exception ex)
{
MessageLog.GetInstance.ShowEx(ex.ToString());
}
try
{
string result = string.Empty;
string DeviceSeries = GVL.GeneralConfig.DeviceType.ToString();
string Version = "1.0.0.0";
var jsondata = new { DeviceSeries, Version };
string header = $"[{InternetInfo.StockServer}/GetItemInfo]_[{DateTime.Now.Ticks}]";
string url = $"{InternetInfo.StockServer}GetDeviceMake";
result = APIHelper.GetInstance.HttpRequest(url, header, jsondata, RequestType.POST);
}
catch (Exception ex)
{
MessageLog.GetInstance.ShowEx(ex.ToString());
}
}

/// <summary>
@@ -84,7 +84,7 @@ namespace HBLConsole.Business.AbstractServer
//string url = $"http://192.168.0.62:7000{InternetInfo.StockServer}/GetItemInfo";
string url = $"{InternetInfo.StockServer}GetItemInfo";

result = APIHelper.GetInstance.HttpRequest(url, header, jsondata, RequestType.POST);
result = APIHelper.GetInstance.HttpRequest(url, header, jsondata, RequestType.POST);
// result = APIHelper.GetInstance.HttpRequest("https://bpa.black-pa.com:21527/stock/GetItemInfo", header, jsondata, RequestType.POST);

if (PushType == 1)


+ 7
- 7
HBLConsole/App.config Voir le fichier

@@ -14,27 +14,27 @@
<!--<add key="ClientId" value="11"/>
<add key="deviceId" value="13"/>-->

<add key="ClientId" value="1420"/>
<add key="deviceId" value="16513"/>
<add key="ClientId" value="10"/>
<add key="deviceId" value="2"/>

<!--<add key="ApolloUri" value="http://111.9.47.105:28080/"/>
<!--<add key="ApolloUri" value="http://111.9.47.105:28080/"/>
<add key="OrderServiceUri" value="http://111.9.47.105:21527/order/"/>
<add key="StockServiceUri" value="http://111.9.47.105:21527/stock/"/>-->

<add key="ApolloUri" value="https://bpa.black-pa.com:28080/"/>
<add key="OrderServiceUri" value="https://bpa.black-pa.com:21527/order/"/>
<add key="StockServiceUri" value="https://bpa.black-pa.com:21527/stock/"/>
<!--<add key ="DeviceMakeUri" value="https://bpa.black-pa.com:21527/GetDeviceMake/"/>-->
<!--<add key ="DeviceMakeUri" value="https://bpa.black-pa.com:21527/GetDeviceMake/"/>-->

<!--http://111.9.47.105:21528/kitchen/-->
<add key="COM_Coffee" value="COM10"/>
<add key="BAUD_Coffee" value="115200"/>
<add key="COM_IceCream" value="COM5"/>
<add key="BAUD_IceCream" value="9600"/>
<add key="IceCream_CXB_Threshold" value="90"/>
<add key="COM_ICChip" value="COM6"/>
<add key="BAUD_IChip" value="9600"/>



+ 6
- 0
HBLConsole/View/OrderStatusView.xaml Voir le fichier

@@ -207,7 +207,9 @@
<RowDefinition />
</Grid.RowDefinitions>


<!--#region 表格标题栏设置-->

<Grid Background="#dd2AB2E7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*" />
@@ -274,9 +276,11 @@
Text="完成时间" />

</Grid>

<!--#endregion-->

<!--#region 表格数据显示-->

<ScrollViewer
Grid.Row="1"
HorizontalScrollBarVisibility="Hidden"
@@ -353,7 +357,9 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>

<!--#endregion-->

</Grid>
<!--#endregion-->



+ 23
- 11
HBLConsole/ViewModel/ViewModelBase.cs Voir le fichier

@@ -188,8 +188,17 @@ namespace HBLConsole.ViewModel
{
Application.Current.Dispatcher.Invoke(() =>
{
//orderStatusLists.Where(p=>p.OrderStatus==ORDER_STATUS.COOKING).ToList()?.ForEach(item=>
//{
// orderStatusLists.Remove(item);
//});
orderStatusLists.Clear();
WaitTakeMeal.Clear();
for (int i = 0; i < orderStatusLists.Count; i++)
{
GeneralConfig.morkOrderPushes.Enqueue(orderStatusLists.ElementAt(i).OrderPush);
}

});
}), "ClearOrders");

@@ -236,22 +245,25 @@ namespace HBLConsole.ViewModel
orderStatusLists.ElementAt(index).EndDate = DateTime.Now.ToString("HH:mm:ss");
TimeSpan timeSpan = DateTime.Now.Subtract(Convert.ToDateTime(orderStatusLists.ElementAt(index).StartDate));
orderStatusLists.ElementAt(index).CompleteDate = $"{timeSpan.TotalSeconds.ToString("0.00")} S";
WaitTakeMeal.Insert(0, orderStatusLists.ElementAt(index));
orderStatusLists.RemoveAt(index);
//压力测试时注释,正常使用需要取消注释
//WaitTakeMeal.Insert(0, orderStatusLists.ElementAt(index));
//orderStatusLists.RemoveAt(index);
});
}

break;
case ORDER_STATUS.COMPLETED_TAKE:
var re = WaitTakeMeal.FirstOrDefault(p => p.OrderPush.SuborderId == orderStatusChange.SuborderId);
if (re != null)
{
App.Current.Dispatcher.BeginInvoke((Action)delegate
{
WaitTakeMeal.Remove(re);
Json<KeepDataBase>.Data.orderLists.Remove(re);
});
}

//压力测试时注释,正常使用需要取消注释
//var re = WaitTakeMeal.FirstOrDefault(p => p.OrderPush.SuborderId == orderStatusChange.SuborderId);
//if (re != null)
//{
// App.Current.Dispatcher.BeginInvoke((Action)delegate
// {
// WaitTakeMeal.Remove(re);
// Json<KeepDataBase>.Data.orderLists.Remove(re);
// });
//}
break;
default:
break;


Chargement…
Annuler
Enregistrer