From 452c434c89aa1207af32976878a918ca14bb7efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=B6=E5=9D=A4?= <997828819@qq.com> Date: Thu, 23 May 2024 16:26:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8D=95=E7=81=AF=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WCS.BLL/Services/Service/OutstoreService.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/WCS.BLL/Services/Service/OutstoreService.cs b/WCS.BLL/Services/Service/OutstoreService.cs index ff02410..1498139 100644 --- a/WCS.BLL/Services/Service/OutstoreService.cs +++ b/WCS.BLL/Services/Service/OutstoreService.cs @@ -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 StoreCode = new List(); //库位灯灭灯 + string LightColor = "无"; + try + { + List ol = DbHelp.db.Queryable().Where(it => it.OrderNumber == request.OrderNumber).ToList(); + LightColor = ol[0].LightColor; + } + catch (Exception ee) + { + Logs.Write("查询出库单据:"+request.OrderNumber+"对应库位灯颜色失败,"+ ee.Message); + } Dictionary> dict = new Dictionary>(); 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); }