From 8228682d2dd2dc13cc0c91df5c192d9a39eada29 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 22 Mar 2024 19:31:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=82=E6=95=B0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=8A=B6=E6=80=81=E8=8E=B7=E5=8F=96sn?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/nms_cxy/service/config.impl.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/modules/nms_cxy/service/config.impl.go b/src/modules/nms_cxy/service/config.impl.go index 5f68477..1c03bc0 100644 --- a/src/modules/nms_cxy/service/config.impl.go +++ b/src/modules/nms_cxy/service/config.impl.go @@ -71,9 +71,13 @@ func (s *ConfigImpl) ConfigUploadOSS(neType string) error { // // 请参考NRM数据模型规范中类型为“R”的参数。 func (s *ConfigImpl) ConfigParamQuery(neInfo neModel.NeInfo, operPara []string) map[string]any { - fmt.Println(neInfo) - fmt.Println(operPara) resultMap := map[string]any{} + + neState, err := neService.NeState(neInfo) + if err != nil { + return resultMap + } + for _, key := range operPara { // 网络设备的全网唯一标识 RW if key == "Ruid" { @@ -93,11 +97,11 @@ func (s *ConfigImpl) ConfigParamQuery(neInfo neModel.NeInfo, operPara []string) } // 设备序列号 if key == "SerialNumber" { - resultMap["SerialNumber"] = "-" + resultMap["SerialNumber"] = neState["sn"] } // 硬件版本 if key == "HardwareVersion" { - resultMap["HardwareVersion"] = "-" + resultMap["HardwareVersion"] = neState["version"] } // 运行时长 if key == "RunTime" { @@ -131,7 +135,7 @@ func (s *ConfigImpl) ConfigParamQuery(neInfo neModel.NeInfo, operPara []string) } // 系统当前版本 if key == "CurrentSoftwareVersion" { - resultMap["CurrentSoftwareVersion"] = "-" + resultMap["CurrentSoftwareVersion"] = neState["version"] } // 系统备份版本 if key == "BackupSoftwareVersion" { @@ -158,11 +162,11 @@ func (s *ConfigImpl) ConfigParamQuery(neInfo neModel.NeInfo, operPara []string) } // 最大注册用户数 if key == "MaxUser" { - resultMap["MaxUser"] = 0 + resultMap["MaxUser"] = neState["capability"] } // 相对容量 if key == "RelativeCapacity" { - resultMap["RelativeCapacity"] = 0 + resultMap["RelativeCapacity"] = neState["capability"] } // 最大支持基站数 if key == "MaxGnbNum" {