From 025d011e8d3c69de03b49ded864e7921502747c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E7=9D=BF?= <774114798@qq.com> Date: Fri, 29 Nov 2024 10:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=94=9F=E6=88=90=E7=9A=84?= =?UTF-8?q?=E8=80=80=E6=98=9F=E6=95=B0=E6=8D=AE=E6=9D=A5=E6=BA=90=E5=88=86?= =?UTF-8?q?=E5=BC=80=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EquipmentInfo/EquipmentInfoExAppService.cs | 1 - .../SecondaryCircuitLogicExpressionAppService.cs | 7 ++++++- .../YunDa.SOMS.DataTransferObject.csproj | 1 - .../YunDa.SOMS.Web.MVC/appsettings.development.json | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/EquipmentInfo/EquipmentInfoExAppService.cs b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/EquipmentInfo/EquipmentInfoExAppService.cs index 6fc6bc5..3adb498 100644 --- a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/EquipmentInfo/EquipmentInfoExAppService.cs +++ b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/EquipmentInfo/EquipmentInfoExAppService.cs @@ -500,7 +500,6 @@ namespace YunDa.ISAS.Application.GeneralInformation .Where(t => t.DataSourceCategory == dataSourceCategory) .Where(t => t.IsActive) .ToList(); - var duplicateIds = telemeterings .GroupBy(t => $"{t.DeviceAddress}_{t.CPUSector}_{t.DispatcherAddress}_{(int)t.DataSourceCategory}") .Where(g => g.Count() > 1) // 找出重复的标识符 diff --git a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/SecondaryCircuitInfo/SecondaryCircuitLogicExpressionAppService.cs b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/SecondaryCircuitInfo/SecondaryCircuitLogicExpressionAppService.cs index 3ad9fe3..18014de 100644 --- a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/SecondaryCircuitInfo/SecondaryCircuitLogicExpressionAppService.cs +++ b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/SecondaryCircuitInfo/SecondaryCircuitLogicExpressionAppService.cs @@ -85,7 +85,11 @@ namespace YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo .Where(t => t.SecondaryCircuitId == input.SecondaryCircuitId).FirstOrDefault(); if (secondaryCircuitProtectionDevice != null) { - var dispatchaddr = _telemeteringConfigurationRepository.GetAll().Where(t => t.DataSourceCategory == DataSourceCategoryEnum.None).Select(t => t.DispatcherAddress).Max() + 1; + int dispatchaddr = 1; + if (_telemeteringConfigurationRepository.GetAll().Where(t => t.DataSourceCategory == DataSourceCategoryEnum.None).Count()>0) + { + dispatchaddr =(int) _telemeteringConfigurationRepository.GetAll().Where(t => t.DataSourceCategory == DataSourceCategoryEnum.None)?.Select(t => t.DispatcherAddress)?.Max() + 1; + } var telemetering = InsertTelemetering(secondaryCircuitProtectionDevice, entity.Name, dispatchaddr); var telemeteringId = await _telemeteringConfigurationRepository.InsertAndGetIdAsync(telemetering); if (telemeteringId!=default) @@ -168,6 +172,7 @@ namespace YunDa.ISAS.Application.GeneralInformation.SecondaryCircuitInfo YesContent = "故障", NoContent = "消失", UnsurenessContent = "不定", + DataSourceCategory = DataSourceCategoryEnum.None, IsCommStatus = false, TransformerSubstationId = secondaryCircuitProtectionDevice.ProtectionDevice.TransformerSubstationId, }; diff --git a/src/YunDa.Application/YunDa.ISAS.DataTransferObject/YunDa.SOMS.DataTransferObject.csproj b/src/YunDa.Application/YunDa.ISAS.DataTransferObject/YunDa.SOMS.DataTransferObject.csproj index 5872830..b5c4e54 100644 --- a/src/YunDa.Application/YunDa.ISAS.DataTransferObject/YunDa.SOMS.DataTransferObject.csproj +++ b/src/YunDa.Application/YunDa.ISAS.DataTransferObject/YunDa.SOMS.DataTransferObject.csproj @@ -24,7 +24,6 @@ - diff --git a/src/YunDa.Web/YunDa.SOMS.Web.MVC/appsettings.development.json b/src/YunDa.Web/YunDa.SOMS.Web.MVC/appsettings.development.json index e84721d..f4c3c9c 100644 --- a/src/YunDa.Web/YunDa.SOMS.Web.MVC/appsettings.development.json +++ b/src/YunDa.Web/YunDa.SOMS.Web.MVC/appsettings.development.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "MysqlSetting": "server=127.0.0.1;port=3306;uid=root;pwd=123456; Database=soms_sys_db;SslMode=none;Pooling=False;", + "MysqlSetting": "server=192.168.110.229;port=3306;uid=root;pwd=123456; Database=soms_sys_db;SslMode=none;Pooling=False;", "ISMS_BASESqlServerSetting": "Server=192.168.110.161;User ID=sa;Password=sa;Database=ISMS_BASE;Trusted_Connection=False;TrustServerCertificate=True", "ISMS_YcSqlServerSetting": "Server=192.168.110.161;User ID=sa;Password=sa;Database=ISMS_Yc;Trusted_Connection=False;TrustServerCertificate=True", "ISMS_DataSqlServerSetting": "Server=192.168.110.161;User ID=sa;Password=sa;Database=ISMS_Data;Trusted_Connection=False;TrustServerCertificate=True", @@ -8,7 +8,7 @@ "ISMS_ReportServerTempDBSqlServerSetting": "Server=192.168.110.161;User ID=sa;Password=sa;Database=ReportServerTempDB;Trusted_Connection=False;TrustServerCertificate=True", "MongoDBSetting": { - "Host": "127.0.0.1", + "Host": "192.168.110.229", "Port": "37017", "DatabaseName": "isas_mongodb", "IsAuth": "false", @@ -16,7 +16,7 @@ "PassWord": "123456" }, "RedisSetting": { - "Host": "127.0.0.1", + "Host": "192.168.110.229", "Port": "36379", "Auth": "yunda123", "Name": "",