ningshuxia
2022-10-27 7fcca8a8d63c4f02d421144888708e894c1ee381
Socket/IStation.DataDockingSocket4NT/control/SendControlJobHelper.cs
@@ -1,5 +1,4 @@
using IStation.DataDockingSocket.MsgHandle;
using IStation.Untity;
using IStation.Untity;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -52,21 +51,28 @@
                            NtLogHelper.Info("南通控制命令,数据序列化失败");
                            return true;
                        }
                        switch (paras.Type)
                        {//0代表关机 1代表开机
                            case 0:
                                ShunDownMsgHelper.StartJob(session);
                                break;//从辅助类中获取 关闭
                            case 1:
                                if (string.IsNullOrEmpty(paras.Paras))
                                    return false;
                                StartUpMsgHelper.StartJob(session);
                                break;//从辅助类中获取 开启
                        switch (paras.ControlType)
                        {
                            case Model.MonitorTestControlParas.eControlType.Stop:
                                {
                                    NtLogHelper.Info("Stop");
                                    //ShunDownMsgHelper.StartJob(session);
                                }
                                break;
                            case Model.MonitorTestControlParas.eControlType.Start:
                                {
                                    if (string.IsNullOrEmpty(paras.Context))
                                        return false;
                                    var context = Model.MonitorTestControlParas.StartContext.ToModel(paras.Context);
                                    if (context == null)
                                        return false;
                                    NtLogHelper.Info(paras.Context);
                                    // StartUpMsgHelper.StartJob(session);
                                }
                                break;
                            default:
                                return false;
                        }
                        return true;
                    }
                    catch (Exception ex)
@@ -77,9 +83,7 @@
                });
            });
        }
 
    }
}