Beispiel #1
0
        public static void RaiseOltAlarm(string conn, OMC omc, Task task)
        {
            string oltName = SQLUtil.GetOlt(conn, task.OltID);

            if (oltName == null || oltName == "")
            {
                oltName = task.OltID;
            }
            StringBuilder sb = new StringBuilder();

            sb.Append("insert into ftth_activealarm (CompanyNo,CITYNAME,SVRNAME,description,raisetime,Severity,ftthTaskID,type,neid) values(");
            sb.Append("'" + omc.Manufacturer + "',");
            sb.Append("'" + omc.City + "',");
            sb.Append("'" + omc.OmcName + "',");
            sb.Append("'" + omc.OmcName + " " + oltName + " 与OMC连接中断',");
            sb.Append("'" + DateTime.Now.ToString() + "',");
            sb.Append("1,");
            sb.Append("'" + task.TaskID + "',");
            sb.Append("'olt',");
            sb.Append("'" + oltName + "')");
            SqlHelper.ExecuteNonQuery(conn, CommandType.Text, sb.ToString());
        }
Beispiel #2
0
        public static string ParseErrorDescToString(ErrorDesc desc, Task task, string error, string conn)
        {
            string oltName = SQLUtil.GetOlt(conn, task.OltID);

            if (oltName == null || oltName == "")
            {
                oltName = task.OltID;
            }
            switch (desc)
            {
            //            BbAlreadyExist,                        //宽带业务已存在
            //BbImsSvlanOrCvlanUnlike,               //宽带业务与现网不一致
            //SvlanOrCvlanException,                 //svlan or cvlan 业务流 异常
            //ImsSvlanOrCvlanUnlike,                 //语音业务与现网不一致
            //ImsPortAlreadyExist,                   //IMS端口被占用
            case ErrorDesc.OltNotExist:
                return("数据错误:Olt " + oltName + " IP录入错误");

            case ErrorDesc.OltOffline:
                return("数据错误:Olt " + oltName + " 与OMC网络中断");

            case ErrorDesc.PonNotExist:
                return("数据错误:Olt " + oltName + " Pon口 " + task.PonID + " 不存在");

            case ErrorDesc.OnuAlreadyExist:
                return("数据错误:OnuID " + task.OnuID + " 已存在");

            case ErrorDesc.OnuNotExist:
                return("数据错误:Onu " + task.OnuID + " 不存在");

            case ErrorDesc.OnuTypeNotExist:
                return("数据错误:Onu型号 " + task.OnuType + " 网管数据配置模型未建");

            case ErrorDesc.OnuTypeError:
                return("数据错误:Onu型号 " + task.OnuType + " 错误");

            case ErrorDesc.SvlanError:
                //
                return("数据错误:Olt " + oltName + " Pon口 " +
                       task.PonID + " Svlan " + task.Svlan.ToString() +
                       " 或 Cvlan " + task.Cvlan.ToString() + " 不在olt vlan透传范围内,请核查");

            case ErrorDesc.BbAlreadyExist:
                return("数据错误:ONU " + task.OnuID + " 中已绑定宽带业务,请核查网管数据" + error);

            case ErrorDesc.BbNotExist:
                return("数据错误:ONU " + task.OnuID + " 中未绑定宽带业务,请核查资源");

            case ErrorDesc.BbSvlanOrCvlanUnlike:
                return("数据错误:宽带业务流与现网不一致,请核查资源" + error);

            case ErrorDesc.SvlanOrCvlanException:
                return("数据错误:ONU " + task.OnuID + " 中存在异常业务流,请核查网管数据" + error);

            case ErrorDesc.ImsSvlanOrCvlanUnlike:
                return("数据错误:语音业务流与现网不一致,请核查资源" + error);

            case ErrorDesc.ImsPortAlreadyExist:
                return("数据错误:ONU端口被占用" + error);

            case ErrorDesc.ImsPortUnlike:
                return("数据错误:语音端口信息与现网不一致,请核查资源" + error);

            case ErrorDesc.ImsNotExist:
                return("数据错误:ONU " + task.OnuID + " 中未绑定语音业务,请核查资源");

            case ErrorDesc.InformationException:
                return("数据异常:" + error);

            case ErrorDesc.Unknown:
                return(string.Empty);

            default:
                return(string.Empty);
            }
        }