增加按键灯颜色显示

This commit is contained in:
hehaibing-1996
2025-03-21 14:46:11 +08:00
parent 84aa11ef30
commit 06697a2e1d
3 changed files with 10 additions and 7 deletions

View File

@ -108,13 +108,13 @@ namespace WCS.BLL.HardWare
switch (taskMode) switch (taskMode)
{ {
case (TaskModeEnum.): case (TaskModeEnum.):
module.GoInInstoreMode(TcpCleint); module.GoInInstoreMode(TcpCleint, firstTask.ButtonColor);
break; break;
case (TaskModeEnum.): case (TaskModeEnum.):
module.GoInOutstoreMode(TcpCleint); module.GoInOutstoreMode(TcpCleint, firstTask.ButtonColor);
break; break;
case (TaskModeEnum.): case (TaskModeEnum.):
module.GoInStocktakingMode(TcpCleint); module.GoInStocktakingMode(TcpCleint, firstTask.ButtonColor);
break; break;
default: default:
break; break;

View File

@ -116,8 +116,9 @@ namespace WCS.BLL.HardWare
/// 进入入库模式 /// 进入入库模式
/// </summary> /// </summary>
/// <param name="tcpClient"></param> /// <param name="tcpClient"></param>
public void GoInInstoreMode(TCPClient tcpClient) public void GoInInstoreMode(TCPClient tcpClient,ButtonColorEnum buttonColor)
{ {
GoInInstoreModeData[2] = (byte)buttonColor;
tcpClient.SendThenReturn(tcpClient.GenerateMessage(BoardId, GoInInstoreModeData)); tcpClient.SendThenReturn(tcpClient.GenerateMessage(BoardId, GoInInstoreModeData));
//SetCurrentMode(TaskModeEnum.入库模式); //SetCurrentMode(TaskModeEnum.入库模式);
} }
@ -135,8 +136,9 @@ namespace WCS.BLL.HardWare
/// 进入出库模式 /// 进入出库模式
/// </summary> /// </summary>
/// <param name="tcpClient"></param> /// <param name="tcpClient"></param>
public void GoInOutstoreMode(TCPClient tcpClient) public void GoInOutstoreMode(TCPClient tcpClient, ButtonColorEnum buttonColor)
{ {
GoInOutstoreModeData[2] = (byte)buttonColor;
tcpClient.SendThenReturn(tcpClient.GenerateMessage(BoardId, GoInOutstoreModeData)); tcpClient.SendThenReturn(tcpClient.GenerateMessage(BoardId, GoInOutstoreModeData));
//SetCurrentMode(TaskModeEnum.出库模式); //SetCurrentMode(TaskModeEnum.出库模式);
} }
@ -154,8 +156,9 @@ namespace WCS.BLL.HardWare
/// 进入盘点模式 /// 进入盘点模式
/// </summary> /// </summary>
/// <param name="tcpClient"></param> /// <param name="tcpClient"></param>
public void GoInStocktakingMode(TCPClient tcpClient) public void GoInStocktakingMode(TCPClient tcpClient, ButtonColorEnum buttonColor)
{ {
GoInStocktakingModeData[2] = (byte)buttonColor;
tcpClient.SendThenReturn(tcpClient.GenerateMessage(BoardId, GoInStocktakingModeData)); tcpClient.SendThenReturn(tcpClient.GenerateMessage(BoardId, GoInStocktakingModeData));
//SetCurrentMode(TaskModeEnum.盘点模式); //SetCurrentMode(TaskModeEnum.盘点模式);
} }

View File

@ -256,7 +256,7 @@ namespace WCS.BLL.Services.Service
t.MXL4Modules.ForEach(m => t.MXL4Modules.ForEach(m =>
{ {
//发送进入入库模式 //发送进入入库模式
m.GoInOutstoreMode(t.TcpCleint); m.GoInOutstoreMode(t.TcpCleint,DbModels.Task.ButtonColorEnum.);
//任务ID //任务ID
m.SendTaskId(7, t.TcpCleint); m.SendTaskId(7, t.TcpCleint);
m.SendMatCode("A7100200300", t.TcpCleint); m.SendMatCode("A7100200300", t.TcpCleint);