diff --git a/WCS.BLL/Services/Service/OutstoreService.cs b/WCS.BLL/Services/Service/OutstoreService.cs index a83fb97..6195d59 100644 --- a/WCS.BLL/Services/Service/OutstoreService.cs +++ b/WCS.BLL/Services/Service/OutstoreService.cs @@ -887,7 +887,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); } @@ -1182,6 +1182,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) { @@ -1217,7 +1227,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); } @@ -1242,7 +1252,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); }