1.相同物料同时出库 不同物料分批次出库 相邻两次亮灯颜色为绿色、蓝色、绿色、蓝色

This commit is contained in:
hehaibing-1996
2024-05-29 10:09:42 +08:00
parent 08850a2f15
commit 4958c58706
6 changed files with 32 additions and 10 deletions

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.BLL.Config
{
public static class LocalStatic
{
/// <summary>
/// 0x02绿色 0x04蓝色
/// </summary>
public static byte CurrentOutStoreColor = 0x02;
}
}

View File

@ -1496,6 +1496,9 @@ namespace WCS.BLL.HardWare
if (outOrderMatDetails != null && outOrderMatDetails.Count > 0)
{
//相邻物料亮不同颜色 这里绿色和蓝色互相切换
LocalStatic.CurrentOutStoreColor = LocalStatic.CurrentOutStoreColor == (byte)0x02 ? (byte)0x04 : (byte)0x02;
//存在待出库 然后之前又没亮灯的情况 => 继续分批次亮灯
Logs.Write($"发料单{OrderNumber},还有物料未出!", LogsType.Outstore);
var outOrderDetailCount = outOrderMatDetails.GroupBy(t => t.MatCode)

View File

@ -5,6 +5,7 @@ using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using TouchSocket.Core;
using WCS.BLL.Config;
using WCS.DAL.Db;
using WCS.DAL.DbModels;
@ -235,6 +236,15 @@ namespace WCS.BLL.HardWare
var data4 = outDataStr.Substring(0, 8);
GoInOutstoreModeData[3] = Convert.ToByte(data3, 2);
GoInOutstoreModeData[4] = Convert.ToByte(data4, 2);
if (LocalFile.Config.IsSameMatCodeOut)
{
GoInOutstoreModeData[5] = LocalStatic.CurrentOutStoreColor;
}
else
{
GoInOutstoreModeData[5] = 0x02;
}
}
tcpClient.Send(tcpClient.GenerateMessage(BoardId, GoInOutstoreModeData));
}

View File

@ -679,6 +679,9 @@ namespace WCS.BLL.Services.Service
//看是否是分批次出库的情况 分批次亮灯
if (LocalFile.Config.IsSameMatCodeOut)
{
//最先亮的颜色为绿色
LocalStatic.CurrentOutStoreColor = 0x02;
var outOrderDetailCount = outOrderMatDetails.GroupBy(t => t.MatCode)
.Select(o => new { count = o.Count(), bb = o })
.Where(o => o.count >= 2)

View File

@ -54,7 +54,6 @@ namespace WCS.BLL.Services.Service
Lists = records.ToList()
}
};
}
catch (Exception ex)
{

View File

@ -1,9 +0,0 @@
using WCS.BLL;
namespace WCS.WebApi
{
public static class LocalStatic
{
}
}