新增单灯颜色控制

This commit is contained in:
陶坤
2024-05-23 16:26:30 +08:00
parent 4e42986c17
commit 452c434c89

View File

@ -665,7 +665,7 @@ namespace WCS.BLL.Services.Service
for (int i = 0; i < si.Count; i++)
{
TCPClient tCPClient = TCPClientManager.GetTCPClientByIPHost(si[i].ClientIp);
byte[] warnlightOn = Helper.OutstoreWarnLight(si[i].LightId,"无",1,0);
byte[] warnlightOn = Helper.OutstoreWarnLight(si[i].LightId,LightColor,1,0);
tCPClient.Send(warnlightOn);
Thread.Sleep(100);
}
@ -955,6 +955,16 @@ namespace WCS.BLL.Services.Service
//需要出库的货架名
List<string> StoreCode = new List<string>();
//库位灯灭灯
string LightColor = "无";
try
{
List<OrderLight> ol = DbHelp.db.Queryable<OrderLight>().Where(it => it.OrderNumber == request.OrderNumber).ToList();
LightColor = ol[0].LightColor;
}
catch (Exception ee)
{
Logs.Write("查询出库单据:"+request.OrderNumber+"对应库位灯颜色失败,"+ ee.Message);
}
Dictionary<string, List<int>> dict = new Dictionary<string, List<int>>();
foreach (OutOrderMatDetail oomd in outOrderMatDetails)
{
@ -990,7 +1000,7 @@ namespace WCS.BLL.Services.Service
{
string sendIP = v.Key;
TCPClient tCPClient = TCPClientManager.GetTCPClientByIPHost(sendIP);
byte[] lightOn = Helper.OutstoreLight(v.Value, "无",0);
byte[] lightOn = Helper.OutstoreLight(v.Value, LightColor,0);
tCPClient.Send(lightOn);
Thread.Sleep(100);
}
@ -1015,7 +1025,7 @@ namespace WCS.BLL.Services.Service
for (int i = 0; i < si.Count; i++)
{
TCPClient tCPClient = TCPClientManager.GetTCPClientByIPHost(si[i].ClientIp);
byte[] warnlightOn = Helper.OutstoreWarnLight(si[i].LightId, "无", 0, 0);
byte[] warnlightOn = Helper.OutstoreWarnLight(si[i].LightId, LightColor, 0, 0);
tCPClient.Send(warnlightOn);
Thread.Sleep(100);
}