private void Ex()
        {
            var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");

            if (sss == UMessageBoxWantPassWord.CancelReturn)
            {
                return;
            }
            if (sss != UserInfo.UserLoginInfo.UserPassword)
            {
                UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                 UMessageBoxButton.Yes);
                return;
            }

            ExNavWithArgs(PrivilegesManage.Services.ViewIdAssign.UserInfoManageViewId, 1);
        }
示例#2
0
        private void Ex()
        {
            var grpInfo = this.Argu as Wlst.client.GroupItemsInfo.GroupItem;

            if (grpInfo == null)
            {
                LogInfo.Log("无法执行开灯命令,参数错误....");
                return;
            }
            if (Wlst.Sr.EquipmentInfoHolding.Services.Others.CloseLightSecondConfirm == 1)
            {
                if (
                    Cr.MessageBoxOverride.MessageBoxOverride.WlstMessageBox.View.WlstMessageBox.Show(
                        "您将要进行开关灯操作,是否继续?", WlstMessageBoxType.YesNo) == WlstMessageBoxResults.No)
                {
                    return;
                }
            }
            else if (Wlst.Sr.EquipmentInfoHolding.Services.Others.CloseLightSecondConfirm == 2)
            {
                var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                if (sss == UMessageBoxWantPassWord.CancelReturn)
                {
                    return;
                }
                if (sss != UserInfo.UserLoginInfo.UserPassword)
                {
                    UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                     UMessageBoxButton.Yes);
                    return;
                }
            }
            var gprId = grpInfo.GroupId;

            if (gprId < 1)
            {
                return;
            }
            //  var lst = Wlst.Sr.EquipmentGroupInfoHolding.Services.ServicesGrpMultiInfoHold .GetGrpTmlList(gprId);
            if (grpInfo.LstTml.Count == 0)
            {
                return;
            }
            var lstslt = new List <int>();

            foreach (var t in grpInfo.LstTml)
            {
                if (Wlst.Sr.EquipmentInfoHolding.Services.EquipmentDataInfoHold.InfoItems.ContainsKey(t) &&
                    Wlst.Sr.EquipmentInfoHolding.Services.EquipmentDataInfoHold.InfoItems [t].RtuStateCode == 2
                    )
                {
                    lstslt.Add(t);
                }
            }

            //var data = new OpenCloseLightData();
            //data.Open = 0; //# 开关灯指令 0 关 1 开
            //data.Loops.Add(LoopId);
            //int gid = Infrastructure.UtilityFunction.TickCount.EnvironmentTickCount;
            //SndOrderServer.OrderSnd(WJ3005Module.Services.EventIdAssign.CloseLight, lst, data, gid);

            var info = Wlst.Sr.ProtocolPhone.LxRtu.wst_cnt_order_rtu_open_close_light;   // .wlst_cnt_wj3090_order_open_close_light ;//.ServerPart.wlst_OpenCloseLight_clinet_order_opencloseLight  ;

            info.Args.Addr.AddRange(lstslt);
            info.WstRtuCntOrderOpenCloseLight.Loops.Add(LoopId);
            info.WstRtuCntOrderOpenCloseLight.IsOpen = 2;  //# 开关灯指令 0 关 1 开
            SndOrderServer.OrderSnd(info);


            LogInfo.Log(grpInfo.GroupName + " 分组关K" + LoopId + ",关灯命令已经发送");
            Wlst.Cr.CoreMims.ShowMsgInfo.ShowNewMsg.AddNewShowMsg(
                grpInfo.GroupId, grpInfo.GroupName, OperatrType.UserOperator, "分组关K" + LoopId);
        }
示例#3
0
        private void Ex()
        {
            var lst = this.Argu as List <int>;

            if (lst == null)
            {
                LogInfo.Log("无法执行混合开灯命令,无法定位参数,参数错误....");
                return;
            }



            var    lstslt = new List <int>();
            string name   = "";

            foreach (var t in lst)
            {
                if (
                    Wlst.Sr.EquipmentInfoHolding.Services.EquipmentDataInfoHold.InfoItems.
                    ContainsKey(t) &&
                    Wlst.Sr.EquipmentInfoHolding.Services.EquipmentDataInfoHold.InfoItems [t].
                    RtuStateCode == 2
                    )
                {
                    var infos = Wlst.Sr.EquipmentInfoHolding.Services.EquipmentDataInfoHold.InfoItems[t];
                    name = infos.RtuPhyId + " - " + infos.RtuName;
                    lstslt.Add(t);
                }
            }
            if (lst.Count == 0)
            {
                return;
            }
            if (lst.Count > 1)
            {
                name += "等," + lst.Count + "个终端";
            }
            if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 1)
            {
                if (
                    Cr.MessageBoxOverride.MessageBoxOverride.WlstMessageBox.View.WlstMessageBox.Show(
                        "您将要 对(" + name + ") 进行开关灯操作,是否继续?", WlstMessageBoxType.YesNo) == WlstMessageBoxResults.No)
                {
                    return;
                }
            }
            else if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 2)
            {
                var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                if (sss == UMessageBoxWantPassWord.CancelReturn)
                {
                    return;
                }
                if (sss != UserInfo.UserLoginInfo.UserPassword)
                {
                    UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                     UMessageBoxButton.Yes);
                    return;
                }
            }



            var info = Wlst.Sr.ProtocolPhone.LxRtu.wst_cnt_order_rtu_open_close_light;   // .wlst_cnt_wj3090_order_open_close_light ;//.ServerPart.wlst_OpenCloseLight_clinet_order_opencloseLight;

            info.Args.Addr.AddRange(lstslt);
            info.WstRtuCntOrderOpenCloseLight.Loops.Add(LoopId);
            info.WstRtuCntOrderOpenCloseLight.IsOpen = 1; //# 开关灯指令 0 关 1 开

            SndOrderServer.OrderSnd(info);


            LogInfo.Log("混合开关灯开K" + LoopId + ",开灯命令已经发送");
            Wlst.Cr.CoreMims.ShowMsgInfo.ShowNewMsg.AddNewShowMsg(
                0, "混合开关灯开K" + LoopId, OperatrType.UserOperator, "混合开关灯开K" + LoopId);
        }
示例#4
0
        private void ExCmdZcOrSnd(string str)
        {
            int x = 0;

            try
            {
                x = Convert.ToInt32(str);
            }
            catch (Exception ex)
            {
            }
            _lastexutettime = DateTime.Now.Ticks;
            LastExute       = x;

            if (x < 1)
            {
                return;
            }
            if (x > 15)
            {
                return;
            }
            if (x == 1)
            {
                if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 2)
                {
                    var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                    if (sss == UMessageBoxWantPassWord.CancelReturn)
                    {
                        return;
                    }
                    if (sss != UserInfo.UserLoginInfo.UserPassword)
                    {
                        UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                         UMessageBoxButton.Yes);
                        return;
                    }
                }
                else
                {
                    var sss = UMessageBoxWantSomefromUser.Show("上海五零盛同信息科技有限公司", "您将要进行开关灯操作,\r\n若确定请输入验证码:1234", "");
                    if (sss == UMessageBoxWantSomefromUser.CancelReturn)
                    {
                        return;
                    }

                    if (sss != "1234")
                    {
                        UMessageBox.Show("验证失败", "您输入的验证码与默认值不匹配,请检查......", UMessageBoxButton.Yes);
                        return;
                    }
                }
                //var sss = UMessageBoxWantSomefromUser.Show("输入验证码", "您将要进行开关灯操作,\r\n若确认请输入验证码:1234", "");
                //if (sss == UMessageBoxWantSomefromUser.CancelReturn)
                //{
                //    return;
                //}
                //if (sss != "1234")
                //{
                //    UMessageBox.Show("验证失败", "您输入的验证码与默认值不匹配,请检查......", UMessageBoxButton.Yes);
                //    return;
                //}
            }
            if (x == 4)
            {
                if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 2)
                {
                    var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                    if (sss == UMessageBoxWantPassWord.CancelReturn)
                    {
                        return;
                    }
                    if (sss != UserInfo.UserLoginInfo.UserPassword)
                    {
                        UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                         UMessageBoxButton.Yes);
                        return;
                    }
                }
                else
                {
                    var sss = UMessageBoxWantSomefromUser.Show("上海五零盛同信息科技有限公司", "您将要进行开关灯操作,\r\n若确定请输入验证码:1234", "");
                    if (sss == UMessageBoxWantSomefromUser.CancelReturn)
                    {
                        return;
                    }

                    if (sss != "1234")
                    {
                        UMessageBox.Show("验证失败", "您输入的验证码与默认值不匹配,请检查......", UMessageBoxButton.Yes);
                        return;
                    }
                }
                //var sss = UMessageBoxWantSomefromUser.Show("输入验证码", "您将要进行开关灯操作,\r\n若确认请输入验证码:1234", "");
                //if (sss == UMessageBoxWantSomefromUser.CancelReturn)
                //{
                //    return;
                //}
                //if (sss != "1234")
                //{
                //    UMessageBox.Show("验证失败", "您输入的验证码与默认值不匹配,请检查......", UMessageBoxButton.Yes);
                //    return;
                //}
            }
            SndCmdOrders(x);
        }
示例#5
0
        private void Ex()
        {
            if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 1)
            {
                if (
                    Cr.MessageBoxOverride.MessageBoxOverride.WlstMessageBox.View.WlstMessageBox.Show(
                        "您将要进行分合闸操作,是否继续?", WlstMessageBoxType.YesNo) == WlstMessageBoxResults.No)
                {
                    return;
                }
            }
            else if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 2)
            {
                var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                if (sss == UMessageBoxWantPassWord.CancelReturn)
                {
                    return;
                }
                if (sss != UserInfo.UserLoginInfo.UserPassword)
                {
                    UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                     UMessageBoxButton.Yes);
                    return;
                }
            }
            var equipment = Argu as Sr.EquipmentInfoHolding.Model.Wj9001Leak;// IIEquipmentInfo;

            if (equipment == null)
            {
                return;
            }
            int rtuId = equipment.RtuId;

            if (rtuId < 1)
            {
                return;
            }

            var nt    = Wlst.Sr.ProtocolPhone.LxLeak.wst_leak_order_zcOrSet;
            var order = new LeakOrders.LeakOrderItem();

            order.Op             = 3; //手动分合闸
            order.RtuId          = rtuId;
            order.OrderBreaktype = OpenClose;
            if (LeakLineId[0] == 10)
            {
                LeakLineId.Clear();
                for (int i = 1; i < 5; i++)
                {
                    LeakLineId.Add(i);
                }
                //if(equipment.WjLeakLines.Count ==4)
                //{
                //    for (int i = 1; i < 5; i++)
                //    {
                //        LeakLineId.Add(i);
                //    }
                //}
                //else
                //{
                //    if (equipment.WjLeakLines[5].LeakMode == 1)
                //    {
                //        for (int i = 1; i < 9; i++)
                //        {
                //            LeakLineId.Add(i);
                //        }
                //    }
                //    else
                //    {
                //        for (int i = 1; i < 5; i++)
                //        {
                //            LeakLineId.Add(i);
                //        }
                //    }
                //}

                if (equipment.WjLeakLines.Count > 4 && equipment.WjLeakLines[5].LeakMode == 1)
                {
                    for (int i = 5; i < 9; i++)
                    {
                        LeakLineId.Add(i);
                    }
                }
            }

            order.LeakLineId = LeakLineId;
            nt.WstLeakOrderZcOrSet.Item.Add(order);
            SndOrderServer.OrderSnd(nt);
        }
        private void Ex()
        {
            string lightIsAlwaysOnString = string.Empty;

            var terminalInfo = this.Argu as Wlst.Sr.EquipmentInfoHolding.Model.WjParaBase;

            if (terminalInfo == null)
            {
                LogInfo.Log("无法执行关灯命令,参数错误....");
                return;
            }
            //西安 特殊功能   城市代号为5 lvf 2018年4月12日13:07:15
            if (Wlst.Sr.EquipmentInfoHolding.Services.Others.CityNum == 5)
            {
                var areaId = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.GetRtuBelongArea(terminalInfo.RtuId);

                if (LoopId == 0)
                {
                    for (int i = 1; i < 9; i++)
                    {
                        var tmp =
                            Wlst.Sr.TimeTableSystem.Services.WeekTimeTableInfoService.
                            GetTmlLoopBandTimeTableTodayOpenCloseTimex
                                (areaId, terminalInfo.RtuId, i);

                        if (tmp != null)
                        {
                            if (tmp.TimeOnOff[0].Item2 == 1500)
                            {
                                lightIsAlwaysOnString = terminalInfo.RtuName + " 有长明灯K" + i + "回路 " + terminalInfo.GetLoopName(i);
                                break;
                            }
                        }
                    }
                }
                else
                {
                    var tmp =
                        Wlst.Sr.TimeTableSystem.Services.WeekTimeTableInfoService.
                        GetTmlLoopBandTimeTableTodayOpenCloseTimex
                            (areaId, terminalInfo.RtuId, LoopId);

                    if (tmp != null)
                    {
                        if (tmp.TimeOnOff[0].Item2 == 1500)
                        {
                            lightIsAlwaysOnString = terminalInfo.RtuName + " 有长明灯K" + LoopId + "回路 " +
                                                    terminalInfo.GetLoopName(LoopId);
                        }
                    }
                }
            }


            if (Wlst.Sr.EquipmentInfoHolding.Services.Others.CloseLightSecondConfirm == 0)
            {
                if (lightIsAlwaysOnString != string.Empty)
                {
                    if (
                        Cr.MessageBoxOverride.MessageBoxOverride.WlstMessageBox.View.WlstMessageBox.Show(
                            "您将要对 (" + terminalInfo.RtuPhyId + " - " + terminalInfo.RtuName + ") 进行关灯操作,是否继续?\n" + lightIsAlwaysOnString, WlstMessageBoxType.YesNo) ==
                        WlstMessageBoxResults.No)
                    {
                        return;
                    }
                }
            }
            else if (Wlst.Sr.EquipmentInfoHolding.Services.Others.CloseLightSecondConfirm == 1)
            {
                if (
                    Cr.MessageBoxOverride.MessageBoxOverride.WlstMessageBox.View.WlstMessageBox.Show(
                        "您将要对 (" + terminalInfo.RtuPhyId + " - " + terminalInfo.RtuName + ") 进行关灯操作,是否继续?\n" + lightIsAlwaysOnString, WlstMessageBoxType.YesNo) ==
                    WlstMessageBoxResults.No)
                {
                    return;
                }
            }
            else if (Wlst.Sr.EquipmentInfoHolding.Services.Others.CloseLightSecondConfirm == 2)
            {
                var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码\n" + lightIsAlwaysOnString, "");
                if (sss == UMessageBoxWantPassWord.CancelReturn)
                {
                    return;
                }
                if (sss != UserInfo.UserLoginInfo.UserPassword)
                {
                    UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                     UMessageBoxButton.Yes);
                    return;
                }
            }


            var rtuId = terminalInfo.RtuId;

            if (rtuId < 1)
            {
                return;
            }
            OrderServer.CloseLight(terminalInfo.RtuId, LoopId, lightIsAlwaysOnString != string.Empty ? true : false);

            //var args = new PublishEventArgs
            //{
            //    EventType = PublishEventType.Core,
            //    EventId = Sr.EquipmentInfoHolding.Services.EventIdAssign.UserOperateRtu,
            //};
            //args.AddParams(rtuId);
            //args.AddParams(OpType.RtuClose);
            //args.AddParams(LoopId);
            //args.AddParams(terminalInfo.RtuModel);
            //args.AddParams(null);
            //EventPublish.PublishEvent(args);

            //var arg = new List<int>();
            //arg.Add(rtuId);
            //var data = new OpenCloseLightData();
            //data.Open = 0; //# 开关灯指令 0 关 1 开
            //data.Loops.Add(LoopId);
            //int gid = Infrastructure.UtilityFunction.TickCount.EnvironmentTickCount;
            //SndOrderServer .OrderSnd(PPProtocol.EventIdAssign.CloseLight, arg, data, gid);
            //Wlst.Cr.Core.UtilityFunction.LogInfo.Log(terminalInfo .RtuName  + "  关K" + LoopId + ",关灯命令已经发送");
            // Wlst.Cr.CoreMims.ShowMsgInfo.ShowNewMsg.AddNewShowMsg(rtuId, terminalInfo.RtuName, LoopId,
            //                                                               PPProtocol.EventIdAssign.CloseLight , "关灯",
            //                                                               "等待", 1, null);
        }
        private void Ex()
        {
            var terminalInfo = this.Argu as Wlst.Sr.EquipmentInfoHolding.Model.WjParaBase;

            if (terminalInfo == null)
            {
                LogInfo.Log("无法执行开灯命令,参数错误....");
                return;
            }

            if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 1)
            {
                if (
                    Cr.MessageBoxOverride.MessageBoxOverride.WlstMessageBox.View.WlstMessageBox.Show(
                        "您将要对 (" + terminalInfo.RtuPhyId + " - " + terminalInfo.RtuName + ") 进行开灯操作,是否继续?", WlstMessageBoxType.YesNo) == WlstMessageBoxResults.No)
                {
                    return;
                }
            }
            else if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 2)
            {
                var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                if (sss == UMessageBoxWantPassWord.CancelReturn)
                {
                    return;
                }
                if (sss != UserInfo.UserLoginInfo.UserPassword)
                {
                    UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                     UMessageBoxButton.Yes);
                    return;
                }
            }
            var rtuId = terminalInfo.RtuId;

            if (rtuId < 1)
            {
                return;
            }

            OrderServer.OpenLight(rtuId, LoopId);

            //var args = new PublishEventArgs
            //{
            //    EventType = PublishEventType.Core,
            //    EventId = Sr.EquipmentInfoHolding.Services.EventIdAssign.UserOperateRtu,
            //};
            //args.AddParams(rtuId);
            //args.AddParams(OpType.RtuOpen );
            //args.AddParams(LoopId);
            //args.AddParams(terminalInfo.RtuModel);
            //args.AddParams(null);
            //EventPublish.PublishEvent(args);


            //var arg = new List<int>();
            //arg.Add(rtuId);

            //var data = new OpenCloseLightData();
            //data.Open = 1; //# 开关灯指令 0 关 1 开
            //data.Loops.Add(LoopId);
            //int gid = Infrastructure.UtilityFunction.TickCount.EnvironmentTickCount;
            //SndOrderServer .OrderSnd(PPProtocol.EventIdAssign.OpenLight, arg, data, gid);
            //Wlst.Cr.Core.UtilityFunction.LogInfo.Log(terminalInfo.RtuName + "  开K" + LoopId + ",开灯命令已经发送");
            // Wlst.Cr.CoreMims.ShowMsgInfo.ShowNewMsg.AddNewShowMsg(rtuId, terminalInfo.RtuName, LoopId,
            //                                                               PPProtocol.EventIdAssign.OpenLight, "开灯",
            //                                                               "等待", 1, null);
        }
示例#8
0
        private void Ex()
        {
            var info  = Wlst.Sr.ProtocolPhone.LxSluSgl.wst_slu_sgl_right_operator;
            var datax = new client.SluRightOperators.SluRightOperator();


            var ars1 = this.Argu as Tuple <int, int>;

            if (ars1 == null)
            {
                if ((int)this.Argu > 1700000 && (int)this.Argu < 1800000)
                {
                    var ars = Wlst.Sr.SlusglInfoHold.Services.SluSglInfoHold.MySlef.GetField((int)this.Argu);
                    if (ars == null)
                    {
                        return;
                    }
                    int sluId = ars.FieldId;

                    if (AddrType == 0)
                    {
                        return;
                    }

                    if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 1)
                    {
                        var str = "开灯";
                        if (OperatorId == 1)
                        {
                            str = "开灯";
                        }
                        if (OperatorId == 4)
                        {
                            str = "关灯";
                        }
                        if (OperatorId > 4)
                        {
                            if (OperatorId == 5)
                            {
                                str = "0%节能";
                            }
                            else
                            {
                                str = (OperatorId - 5) + "0%节能";
                            }
                        }

                        if (
                            Cr.MessageBoxOverride.MessageBoxOverride.WlstMessageBox.View.WlstMessageBox.Show(
                                "您将要进行" + str + "操作,是否继续?", WlstMessageBoxType.YesNo) == WlstMessageBoxResults.No)
                        {
                            return;
                        }
                    }
                    else if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 2)
                    {
                        var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                        if (sss == UMessageBoxWantPassWord.CancelReturn)
                        {
                            return;
                        }
                        if (sss != UserInfo.UserLoginInfo.UserPassword)
                        {
                            UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                             UMessageBoxButton.Yes);
                            return;
                        }
                    }

                    datax.SluId    = sluId;
                    datax.AddrType = 4;
                    datax.Addrs    = new List <int>();

                    var ctrllist = (from t in ars.CtrlLst orderby t.OrderId select t).ToList();
                    if (AddrType == 10)
                    {
                        foreach (var t in ctrllist)
                        {
                            datax.Addrs.Add(t.CtrlId);
                        }
                    }
                    else if (AddrType == 21)
                    {
                        foreach (var t in ctrllist)
                        {
                            if (t.OrderId % 2 == 1)
                            {
                                datax.Addrs.Add(t.CtrlId);
                            }
                        }
                    }
                    else if (AddrType == 20)
                    {
                        foreach (var t in ctrllist)
                        {
                            if (t.OrderId % 2 == 0)
                            {
                                datax.Addrs.Add(t.CtrlId);
                            }
                        }
                    }
                    ;


                    if (OperatorId < 5)
                    {
                        datax.CmdType = 4;
                        datax.CmdMix  = new List <int>()
                        {
                            OperatorId, OperatorId, OperatorId, OperatorId
                        };
                        datax.CmdPwmField = new client.SluRightOperators.SluRightOperator.CmdPwm()
                        {
                            LoopCanDo = new List <int>()
                            {
                            },
                            Scale = 0
                        };
                    }
                    else
                    {
                        datax.CmdType = 5;
                        datax.CmdMix  = new List <int>()
                        {
                        };
                        datax.CmdPwmField = new client.SluRightOperators.SluRightOperator.CmdPwm()
                        {
                            LoopCanDo = new List <int>()
                            {
                                1, 2, 3, 4
                            },
                            Scale = (OperatorId - 5) * 10                          //lvf 调光*10 2018年6月27日16:42:38
                        };
                    }

                    info.WstSluRightOperator.OperatorItems.Add(datax);
                    SndOrderServer.OrderSnd(info, 0, 0, true);
                }
            }
            else
            {
                var ars = Wlst.Sr.SlusglInfoHold.Services.SluSglFieldGrpHold.MySlef.Get(ars1.Item1, ars1.Item2);
                if (ars == null)
                {
                    Cr.MessageBoxOverride.MessageBoxOverride.WlstMessageBox.View.WlstMessageBox.Show(
                        "未分组控制器无法批量控制。", WlstMessageBoxType.Ok);
                    return;
                }
                int sluId = ars.FieldId;

                if (AddrType != 10)
                {
                    return;
                }


                if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 1)
                {
                    var str = "开灯";
                    if (OperatorId == 1)
                    {
                        str = "开灯";
                    }
                    if (OperatorId == 4)
                    {
                        str = "关灯";
                    }
                    if (OperatorId > 4)
                    {
                        if (OperatorId == 5)
                        {
                            str = "0%节能";
                        }
                        else
                        {
                            str = (OperatorId - 5) + "0%节能";
                        }
                    }

                    if (
                        Cr.MessageBoxOverride.MessageBoxOverride.WlstMessageBox.View.WlstMessageBox.Show(
                            "您将要进行" + str + "操作,是否继续?", WlstMessageBoxType.YesNo) == WlstMessageBoxResults.No)
                    {
                        return;
                    }
                }
                else if (Wlst.Sr.EquipmentInfoHolding.Services.Others.OpenCloseLightSecondConfirm == 2)
                {
                    var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");
                    if (sss == UMessageBoxWantPassWord.CancelReturn)
                    {
                        return;
                    }
                    if (sss != UserInfo.UserLoginInfo.UserPassword)
                    {
                        UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                         UMessageBoxButton.Yes);
                        return;
                    }
                }

                datax.SluId    = sluId;
                datax.AddrType = 4;
                datax.Addrs    = new List <int>();

                //var ctrllist = (from t in ars.CtrlLst orderby t select t).ToList();
                if (AddrType == 10)
                {
                    foreach (var t in ars.CtrlLst)
                    {
                        datax.Addrs.Add(t);
                    }
                }

                if (OperatorId < 5)
                {
                    datax.CmdType = 4;
                    datax.CmdMix  = new List <int>()
                    {
                        OperatorId, OperatorId, OperatorId, OperatorId
                    };
                    datax.CmdPwmField = new client.SluRightOperators.SluRightOperator.CmdPwm()
                    {
                        LoopCanDo = new List <int>()
                        {
                        },
                        Scale = 0
                    };
                }
                else
                {
                    datax.CmdType = 5;
                    datax.CmdMix  = new List <int>()
                    {
                    };
                    datax.CmdPwmField = new client.SluRightOperators.SluRightOperator.CmdPwm()
                    {
                        LoopCanDo = new List <int>()
                        {
                            1, 2, 3, 4
                        },
                        Scale = (OperatorId - 5) * 10  // lvf 调光 *10 2018年6月27日16:37:01
                    };
                }

                info.WstSluRightOperator.OperatorItems.Add(datax);
                SndOrderServer.OrderSnd(info, 0, 0, true);
            }
        }