注塑定点配送换成左右轮着来
This commit is contained in:
@@ -267,6 +267,18 @@ namespace Tnb.ProductionMgr
|
||||
bool? cs01 = await _redisData.TryGetValueByKeyField<bool?>("YTCS", "AllowAgvEmptyOut_CS01");
|
||||
bool? cs03 = await _redisData.TryGetValueByKeyField<bool?>("YTCS", "AllowAgvEmptyOut_CS03");
|
||||
string startLocationCode = cs01==true ? "ZSSSXCTU01" : cs03==true ? "ZSSSXCTU02" : "";
|
||||
if (cs01==true && cs03==true)
|
||||
{
|
||||
string last_fixed_point_delivery = _redisData.Exists("last_fixed_point_delivery") ? _redisData.Get<string>("last_fixed_point_delivery") : "";
|
||||
if (string.IsNullOrEmpty(last_fixed_point_delivery))
|
||||
{
|
||||
startLocationCode = "ZSSSXCTU01";
|
||||
}
|
||||
else
|
||||
{
|
||||
startLocationCode = "ZSSSXCTU01ZSSSXCTU02".Replace(last_fixed_point_delivery, "");
|
||||
}
|
||||
}
|
||||
if (startLocationCode.IsEmpty())
|
||||
{
|
||||
Log.Error($"输送线无空载具");
|
||||
@@ -289,6 +301,7 @@ namespace Tnb.ProductionMgr
|
||||
msg += $"{equipment.name}注塑定点配送成功,";
|
||||
Log.Information($"【FixedPointDelivery】{equipment.name}注塑定点配送成功");
|
||||
_redisData.Set($"{eqpDaq.equip_code}_{eqpDaq.label_name}_flag", true, TimeSpan.FromMinutes(20));
|
||||
_redisData.Set($"last_fixed_point_delivery", startLocationCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user