|
@@ -1,5 +1,4 @@
|
|
|
-using Microsoft.OpenApi.Extensions;
|
|
|
-using Newtonsoft.Json;
|
|
|
+using Newtonsoft.Json;
|
|
|
using ServiceCenter;
|
|
|
using ServiceCenter.Extensions;
|
|
|
using ServiceCenter.Redis;
|
|
@@ -76,7 +75,12 @@ namespace WCS.Service.Systems
|
|
|
dev.D81 = TypeExtension.Mapper<WCS_BCR81, IBCR81>(d81.Data);
|
|
|
}
|
|
|
RedisHub.WMS.Set(item.Entity.Code, item.Data2.Mode);
|
|
|
- RedisHub.WMS.Set($"{nameof(EquipmentAlarm)}:{item.Entity.Code}", item.Data3.Alarm);
|
|
|
+ RedisHub.WMS.Set($"{nameof(EquipmentAlarm)}:{item.Entity.Code}", JsonConvert.SerializeObject(new EquipmentAlarm()
|
|
|
+ {
|
|
|
+ Code = item.Entity.Code,
|
|
|
+ Msg = item.Data3.Alarm.ToString(),
|
|
|
+ Time = DateTime.Now
|
|
|
+ }));
|
|
|
|
|
|
DevList.Add(dev);
|
|
|
}
|
|
@@ -94,7 +98,12 @@ namespace WCS.Service.Systems
|
|
|
D537 = TypeExtension.Mapper<WCS_SRM537, ISRM537>(item.Data3),
|
|
|
};
|
|
|
RedisHub.WMS.Set(item.Entity.Code, item.Data2.AutoStatus);
|
|
|
- RedisHub.WMS.Set($"{nameof(EquipmentAlarm)}:{item.Entity.Code}", item.Data3.Alarm);
|
|
|
+ RedisHub.WMS.Set($"{nameof(EquipmentAlarm)}:{item.Entity.Code}", JsonConvert.SerializeObject(new EquipmentAlarm()
|
|
|
+ {
|
|
|
+ Code = item.Entity.Code,
|
|
|
+ Msg = item.Data3.Alarm.ToString(),
|
|
|
+ Time = DateTime.Now
|
|
|
+ }));
|
|
|
srmList.Add(dev);
|
|
|
}
|
|
|
pack.SRMDatas = new DeviceDataCollection<SRMData>(DateTime.Now, srmList.ToArray());
|