|
|
@@ -136,7 +136,43 @@ namespace BPASmartClient.MorkS |
|
|
|
goodName = res.MorkOrder.GoodsName; |
|
|
|
SortNum = res.MorkOrder.SortNum.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
EventBus.EventBus.GetInstance().Publish(new OrderStatusChangedEvent() { SortNum = SortNum, GoodName = goodName, Status = oRDER_STATUS, SubOrderId = subid, deviceClientType = DeviceType }); |
|
|
|
|
|
|
|
var index = DataServer.GetInstance.morkS.MakeOrder.FindIndex(p => p.SortNum == SortNum); |
|
|
|
if (index >= 0 && index < DataServer.GetInstance.morkS.MakeOrder.Count) |
|
|
|
{ |
|
|
|
if (oRDER_STATUS == ORDER_STATUS.COMPLETED_COOK) |
|
|
|
{ |
|
|
|
DataServer.GetInstance.morkS.MakeOrder.RemoveAt(index); |
|
|
|
DataServer.GetInstance.morkS.MakeOrderOver.Add(new OrderMakeModel() |
|
|
|
{ |
|
|
|
Status = oRDER_STATUS, |
|
|
|
GoodName = goodName, |
|
|
|
SortNum = SortNum, |
|
|
|
StopTime = DateTime.Now.ToString("HH:mm:ss") |
|
|
|
}); |
|
|
|
} |
|
|
|
else if (oRDER_STATUS == ORDER_STATUS.COMPLETED_TAKE) |
|
|
|
{ |
|
|
|
var temp = DataServer.GetInstance.morkS.MakeOrderOver.FirstOrDefault(p => p.SortNum == SortNum); |
|
|
|
if (temp != null) DataServer.GetInstance.morkS.MakeOrderOver.Remove(temp); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
DataServer.GetInstance.morkS.MakeOrder.ElementAt(index).Status = oRDER_STATUS; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
DataServer.GetInstance.morkS.MakeOrder.Add(new OrderMakeModel() |
|
|
|
{ |
|
|
|
Status = oRDER_STATUS, |
|
|
|
GoodName = goodName, |
|
|
|
SortNum = SortNum, |
|
|
|
StartTime = DateTime.Now.ToString("HH:mm:ss") |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void GetStatus(string key, Action<object> action) |
|
|
@@ -152,6 +188,16 @@ namespace BPASmartClient.MorkS |
|
|
|
|
|
|
|
public override void ReadData() |
|
|
|
{ |
|
|
|
DataServer.GetInstance.morkS.Alarm.Clear(); |
|
|
|
alarms.ForEach(item => |
|
|
|
{ |
|
|
|
DataServer.GetInstance.morkS.Alarm.Add(new AlarmModel() |
|
|
|
{ |
|
|
|
AlarmTime = $"{item.Date} {item.Time}", |
|
|
|
AlarmMs = item.Info |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
GetStatus("M230.0", new Action<object>((obj) => |
|
|
|
{ |
|
|
|
if (obj is bool[] bools && bools.Length > 0 && bools.Length <= 24) |
|
|
@@ -213,6 +259,11 @@ namespace BPASmartClient.MorkS |
|
|
|
mORKS.TurntableUpLimit = bools[13]; |
|
|
|
mORKS.FeedComplete = bools[14]; |
|
|
|
mORKS.TurntableMoveInPlace = bools[15]; |
|
|
|
DataServer.GetInstance.morkS.MorkS_Temp = mORKS.TemperatureReached; |
|
|
|
DataServer.GetInstance.morkS.Morks_SiloMeasUp = mORKS.TurntableUpLimit; |
|
|
|
DataServer.GetInstance.morkS.Morks_SiloMeasDown = mORKS.TurntableLowerLimit; |
|
|
|
DataServer.GetInstance.morkS.MorkS_NoBowMeas1 = mORKS.MissingBowl; |
|
|
|
DataServer.GetInstance.morkS.MorkS_NoBowMeas2 = mORKS.MissingBowlSignal2; |
|
|
|
} |
|
|
|
|
|
|
|
})); |
|
|
@@ -245,6 +296,7 @@ namespace BPASmartClient.MorkS |
|
|
|
for (int i = 0; i < 6; i++) |
|
|
|
{ |
|
|
|
mORKS.CookNoodlesComplete[i] = bools[i]; |
|
|
|
DataServer.GetInstance.morkS.Morks_NoodleUpOrDown[i] = bools[i]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -254,6 +306,7 @@ namespace BPASmartClient.MorkS |
|
|
|
{ |
|
|
|
if (obj is ushort[] UshortValue && UshortValue.Length > 0 && UshortValue.Length <= 1) |
|
|
|
mORKS.TurntableFeedbackloc = UshortValue[0]; |
|
|
|
DataServer.GetInstance.morkS.MorkS_BinLocation = mORKS.TurntableFeedbackloc; |
|
|
|
})); |
|
|
|
} |
|
|
|
|
|
|
|