|
|
@ -174,7 +174,7 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
RefreshWeight(realtimeStatusList);
|
|
|
|
RefreshWeight(realtimeStatusList);
|
|
|
|
|
|
|
|
|
|
|
|
//开关机时间采集
|
|
|
|
//开关机时间采集
|
|
|
|
machineStatusDtos.ForEach(x => OeeCollection(x));
|
|
|
|
machineStatusDtos.ForEach(x => OeeCollection(x,1));
|
|
|
|
//报警采集
|
|
|
|
//报警采集
|
|
|
|
machineStatusDtos.ForEach(x => MachineWarnCollection(x));
|
|
|
|
machineStatusDtos.ForEach(x => MachineWarnCollection(x));
|
|
|
|
|
|
|
|
|
|
|
@ -260,7 +260,7 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
/// OEE设备关机采集
|
|
|
|
/// OEE设备关机采集
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="machineStatusDto"></param>
|
|
|
|
/// <param name="machineStatusDto"></param>
|
|
|
|
private void OeeCollection(MachineStatusDto machineStatusDto)
|
|
|
|
private void OeeCollection(MachineStatusDto machineStatusDto,int shutType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -272,8 +272,8 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DmsRecordShutDown newRecord = new DmsRecordShutDown();
|
|
|
|
DmsRecordShutDown newRecord = new DmsRecordShutDown();
|
|
|
|
newRecord.DeviceId = machineStatusDto.deviceId;
|
|
|
|
newRecord.DeviceId = machineStatusDto.deviceId;
|
|
|
|
newRecord.ShutType = 1;
|
|
|
|
newRecord.ShutType = shutType;
|
|
|
|
newRecord.ShutReason = "正常停机";
|
|
|
|
newRecord.ShutReason = shutType==1 ? "正常停机" : "报警停机";
|
|
|
|
newRecord.ShutBeginTime = DateTime.Now;
|
|
|
|
newRecord.ShutBeginTime = DateTime.Now;
|
|
|
|
newRecord.CreateBy = "SlnMesnac";
|
|
|
|
newRecord.CreateBy = "SlnMesnac";
|
|
|
|
newRecord.CreateTime = DateTime.Now;
|
|
|
|
newRecord.CreateTime = DateTime.Now;
|
|
|
@ -376,6 +376,8 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
|
|
|
|
|
|
|
#region 停止当前设备
|
|
|
|
#region 停止当前设备
|
|
|
|
StopAndMessageWarn(machineStatusDto.warnStatus);
|
|
|
|
StopAndMessageWarn(machineStatusDto.warnStatus);
|
|
|
|
|
|
|
|
//添加报警停机记录
|
|
|
|
|
|
|
|
OeeCollection(machineStatusDto, 2);
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|