1.该订单最后一个货架结束入库

This commit is contained in:
hehaibing-1996
2024-05-31 17:03:54 +08:00
parent 46321e340b
commit a87a93ea11
9 changed files with 78 additions and 21 deletions

View File

@ -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
{

View File

@ -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()
{

View File

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