1.该订单最后一个货架结束入库
This commit is contained in:
@ -449,9 +449,28 @@ namespace WCS.BLL.HardWare
|
||||
|
||||
CurrentOutStoreMatSNs.Clear();
|
||||
WarningLight.CloseLight(TcpCleint);
|
||||
//this.CurrentMode = Mode.待机模式;
|
||||
SetCurrentMode(Mode.待机模式);
|
||||
Logs.Write($"货架【{ShelfCode}】,结束退出出库", LogsType.Outstore);
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
//判断是否是当前订单最后一个出库货架
|
||||
var isOuting = ShelfManager.Shelves.Where(t => t.CurrentMode == Mode.出库模式 && t.OrderNumber == OrderNumber)
|
||||
.Any();
|
||||
//WebSocket通知前台以更新左侧出库单列表的状态
|
||||
if (!isOuting )
|
||||
{
|
||||
#region WebSocket
|
||||
var messageMode = new WebSocketMessageModel()
|
||||
{
|
||||
IsWarning = false,
|
||||
ClientIp = WebSocketIpAddress,
|
||||
WarningType = WarningTypeEnum.通知刷新出库单列表,
|
||||
};
|
||||
WarningManager.SendWarning(messageMode);
|
||||
#endregion
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -1551,6 +1570,7 @@ namespace WCS.BLL.HardWare
|
||||
{
|
||||
GoOutOutstore();
|
||||
});
|
||||
|
||||
//看是否是分批次出库的情况 分批次亮灯
|
||||
Task.Run(async () =>
|
||||
{
|
||||
@ -1628,7 +1648,6 @@ namespace WCS.BLL.HardWare
|
||||
shelf.GoInOutstore(matDetails, outOrder);
|
||||
shelf.OrderNumber = outOrder.OrderNumber;
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -34,17 +34,18 @@ namespace WCS.BLL.Manager
|
||||
};
|
||||
});
|
||||
|
||||
DbHelp.dbLog = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
ConnectionString = LocalFile.Config.LogDbPath,
|
||||
DbType = DbType.SqlServer,//[Sqlite]安装[System.Data.SQLite];
|
||||
IsAutoCloseConnection = true
|
||||
}, db =>
|
||||
{
|
||||
db.Aop.OnError = ex =>
|
||||
{
|
||||
};
|
||||
});
|
||||
//sqlserver保存接口日志时因为每个字段要限制长度,当接口返回内容长度过长会报错
|
||||
//DbHelp.dbLog = new SqlSugarScope(new ConnectionConfig()
|
||||
//{
|
||||
// ConnectionString = LocalFile.Config.LogDbPath,
|
||||
// DbType = DbType.SqlServer,//[Sqlite]安装[System.Data.SQLite];
|
||||
// IsAutoCloseConnection = true
|
||||
//}, db =>
|
||||
//{
|
||||
// db.Aop.OnError = ex =>
|
||||
// {
|
||||
// };
|
||||
//});
|
||||
|
||||
AuthDbHelp.db = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
|
@ -82,6 +82,30 @@ namespace WCS.BLL.Tool
|
||||
return data.ToArray();
|
||||
}
|
||||
|
||||
public static byte[] Query()
|
||||
{
|
||||
byte[] data2 = new byte[4];
|
||||
data2[0] = 0xff;
|
||||
data2[1] = 0x03;
|
||||
data2[2] = 0x00;
|
||||
data2[3] = 0x06;
|
||||
byte[] senddata2 = Tool.Helper.Crc16(data2, data2.Length, true);
|
||||
return senddata2;
|
||||
}
|
||||
|
||||
public static byte[] SetId()
|
||||
{
|
||||
byte[] data2 = new byte[6];
|
||||
data2[0] = 0xff;
|
||||
data2[1] = 0x04;
|
||||
data2[2] = 0x00;
|
||||
data2[3] = 0x08;
|
||||
data2[4] = 0x03;
|
||||
data2[5] = 0x01;
|
||||
byte[] senddata2 = Tool.Helper.Crc16(data2, data2.Length, true);
|
||||
return senddata2;
|
||||
}
|
||||
|
||||
//出库库位灯亮灯
|
||||
public static byte[] OutstoreLight(List<int> board_id, string lightcolor,int status)
|
||||
{
|
||||
@ -201,7 +225,8 @@ namespace WCS.BLL.Tool
|
||||
data1[4] = (byte)lightid;
|
||||
data1[5] = 0x03;
|
||||
data1[6] = 0x02;
|
||||
data1[7] = 0x02;
|
||||
//data1[7] = 0x02;
|
||||
data1[7] = 0x00;
|
||||
byte[] senddata1 = Tool.Helper.Crc16(data1, data1.Length, true);
|
||||
return senddata1;
|
||||
}
|
||||
|
@ -56,11 +56,13 @@ namespace WCS.Model.WebSocketModel
|
||||
进入盘点未响应 = 12,
|
||||
确认盘点未响应 = 13,
|
||||
退出盘点未响应 = 14,
|
||||
|
||||
//通知类
|
||||
恢复正常 = 50,
|
||||
通知刷新出库 = 51,
|
||||
通知刷新盘点 = 52,
|
||||
通知刷新盟讯盘点 = 53,
|
||||
通知前台结束入库 = 54,
|
||||
通知刷新出库单列表 = 55,
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using WCS.BLL.HardWare;
|
||||
using WCS.BLL.Manager;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.BLL.Tool;
|
||||
using WCS.Model;
|
||||
|
||||
namespace WebApi.Controllers
|
||||
@ -141,9 +142,12 @@ namespace WebApi.Controllers
|
||||
//TODO:<3A><><EFBFBD><EFBFBD> <20><><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>
|
||||
try
|
||||
{
|
||||
var aa = Helper.Query();
|
||||
var bb = Helper.SetId();
|
||||
return await _instoreService.queryInstoreStatusSingle(request);
|
||||
//ShelfManager.
|
||||
//
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ namespace WCS.WebApi.Controllers
|
||||
var logRecord = new SystemApiLogRecord()
|
||||
{
|
||||
DeviceIp = context?.Connection?.RemoteIpAddress?.ToString(),
|
||||
RequestUrl = context.Request?.Path,
|
||||
RequestUrl = context.Request?.Path.ToString(),
|
||||
RequestBody = requestBody,
|
||||
QueryString = context.Request?.QueryString.ToString(),
|
||||
IsResponse = true,
|
||||
|
@ -281,6 +281,10 @@ namespace 货架标准上位机.ViewModel
|
||||
{
|
||||
DataGridItemSource = new ObservableCollection<OutOrderMatDetailModel>(Result.Data);
|
||||
OrderStatus = Result.Message;
|
||||
if (OrderStatus == OutOrderStatus.全部发料.ToString())
|
||||
{
|
||||
//全部发料就默认所有货架结束了这个单子
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -15,8 +15,6 @@
|
||||
<RowDefinition Height="0.9*"></RowDefinition>
|
||||
<RowDefinition Height="0.9*"></RowDefinition>
|
||||
<RowDefinition Height="9*"></RowDefinition>
|
||||
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" Margin="0" Background="AliceBlue" Padding="0">
|
||||
@ -28,12 +26,9 @@
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<Button Style="{StaticResource ButtonSuccess}" hc:BorderElement.CornerRadius="15"
|
||||
Grid.Column="3" MinHeight="45" FontSize="28" Content="完整发料" FontFamily="{StaticResource IconFont}"
|
||||
Command="{Binding BtnStartCommand}"
|
||||
>
|
||||
Command="{Binding BtnStartCommand}">
|
||||
</Button>
|
||||
<Button Style="{StaticResource ButtonWarning}" hc:BorderElement.CornerRadius="15"
|
||||
Grid.Column="4" MinHeight="45" FontSize="28" Content="取消发料" FontFamily="{StaticResource IconFont}"
|
||||
|
@ -105,6 +105,13 @@ namespace 货架标准上位机
|
||||
OutVentoryView.viewModel.RefreshDataGridItemSource();
|
||||
client.Send(e.DataFrame.ToText());
|
||||
break;
|
||||
case WarningTypeEnum.通知刷新出库单列表:
|
||||
if (LocalFile.Config.IsMx)
|
||||
MXOutInventoryView.viewModel.RefreshOutOrderList(MXOutInventoryView.viewModel.SelectedOutOrderNumber);
|
||||
else
|
||||
OutVentoryView.viewModel.RefreshOutOrderList(MXOutInventoryView.viewModel.SelectedOutOrderNumber);
|
||||
client.Send(e.DataFrame.ToText());
|
||||
break;
|
||||
case WarningTypeEnum.通知刷新盘点:
|
||||
StockTakingView.viewModel.RefreshDataGridItemSource();
|
||||
client.Send(e.DataFrame.ToText());
|
||||
|
Reference in New Issue
Block a user