From 8a13bcf707c7d5adb45ed54305549c81c3c48e9a Mon Sep 17 00:00:00 2001 From: wenjy Date: Tue, 3 Dec 2024 09:49:08 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E6=B7=BB=E5=8A=A0=E6=8A=A5?= =?UTF-8?q?=E8=AD=A6=E6=95=B0=E6=8D=AE=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SlnMesnac.Business/AutoModeBusiness.cs | 45 ++++--- SlnMesnac.Business/FixedPointBusiness.cs | 45 ++++--- SlnMesnac.Business/InspModeBusiness.cs | 45 ++++--- SlnMesnac.Business/ManualModeBusiness.cs | 35 ------ SlnMesnac.Business/base/BaseBusiness.cs | 62 +++++++++- SlnMesnac.Model/domain/base_alarm_info.cs | 115 ++++++++++++++++++ SlnMesnac.Model/domain/record_busbar_alarm.cs | 113 +++++++++++++++++ .../service/IBase_alarm_infoService.cs | 13 ++ .../service/IRecord_busbar_alarmService.cs | 13 ++ .../Impl/Base_alarm_infoServiceImpl.cs | 14 +++ .../Impl/Record_busbar_alarmServiceImpl.cs | 14 +++ SlnMesnac.WPF/appsettings.json | 4 +- 12 files changed, 419 insertions(+), 99 deletions(-) delete mode 100644 SlnMesnac.Business/ManualModeBusiness.cs create mode 100644 SlnMesnac.Model/domain/base_alarm_info.cs create mode 100644 SlnMesnac.Model/domain/record_busbar_alarm.cs create mode 100644 SlnMesnac.Repository/service/IBase_alarm_infoService.cs create mode 100644 SlnMesnac.Repository/service/IRecord_busbar_alarmService.cs create mode 100644 SlnMesnac.Repository/service/Impl/Base_alarm_infoServiceImpl.cs create mode 100644 SlnMesnac.Repository/service/Impl/Record_busbar_alarmServiceImpl.cs diff --git a/SlnMesnac.Business/AutoModeBusiness.cs b/SlnMesnac.Business/AutoModeBusiness.cs index c46ac02..4c3df07 100644 --- a/SlnMesnac.Business/AutoModeBusiness.cs +++ b/SlnMesnac.Business/AutoModeBusiness.cs @@ -55,7 +55,7 @@ namespace SlnMesnac.Business public delegate void GimbaRotationControl(string wPanPos, string wTiltPos, string wZoomPos); public event GimbaRotationControl GimbaRotationControlEvent; - public AutoModeBusiness(SerilogHelper log, PlcAbsractFactory plc, Ibase_cabinet_infoServices base_Cabinet_InfoServices, Ibase_busbar_infoServices base_Busbar_InfoServices, Irecord_busbar_tempServices record_busbar_TempServices, AppConfig appConfig) : base(log, plc, base_Cabinet_InfoServices, base_Busbar_InfoServices) + public AutoModeBusiness(SerilogHelper log, PlcAbsractFactory plc, Ibase_cabinet_infoServices base_Cabinet_InfoServices, Ibase_busbar_infoServices base_Busbar_InfoServices, Irecord_busbar_tempServices record_busbar_TempServices, Ibase_alarm_infoServices base_Alarm_InfoServices, AppConfig appConfig, Irecord_busbar_alarmServices record_Busbar_AlarmServices) : base(log, plc, base_Cabinet_InfoServices, base_Busbar_InfoServices, base_Alarm_InfoServices, record_Busbar_AlarmServices) { _record_busbar_TempServices = record_busbar_TempServices; _appConfig = appConfig; @@ -244,11 +244,10 @@ namespace SlnMesnac.Business } //这里采集数据 - _log.Info($"5S后开始测温"); - Task.Delay(5000).Wait(); + _log.Info($"2S后开始测温"); + Task.Delay(2000).Wait(); _log.Info($"温度测量完成,最高温度:{_realTemperatureInfo.fMaxTemperature};最低温度:{_realTemperatureInfo.fMinTemperature};平均温度:{_realTemperatureInfo.fAverageTemperature};温差:{_realTemperatureInfo.fTemperatureDiff}"); this.SaveBusbarTemp(busbar.busbarCode, busbar.cabinetCode, _realTemperatureInfo,busbar.isPictures); - Task.Delay(1000).Wait(); //if (!_plc.writeFloatByAddress("VD1524", 0)) //{ @@ -329,22 +328,28 @@ namespace SlnMesnac.Business recordTime = DateTime.Now, }; - if (realTemperatureInfo.fMaxTemperature > 65) - { - record.isAlarm = 1; - string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; - record.filePath = sJpegPicFileName ; - CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); - } - else - { - if (isPictures == 1) - { - string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; - record.filePath = sJpegPicFileName; - CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); - } - } + //if (realTemperatureInfo.fMaxTemperature > 65) + //{ + // record.isAlarm = 1; + // string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; + // record.filePath = sJpegPicFileName ; + // CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); + //} + //else + //{ + // if (isPictures == 1) + // { + // string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; + // record.filePath = sJpegPicFileName; + // CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); + // } + //} + + string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; + record.filePath = sJpegPicFileName; + CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); + + base.JudgBusbarIsAlarm((int)busbarCode, ref record); var res = _record_busbar_TempServices.Insert(record); diff --git a/SlnMesnac.Business/FixedPointBusiness.cs b/SlnMesnac.Business/FixedPointBusiness.cs index dbec7ec..e14cec9 100644 --- a/SlnMesnac.Business/FixedPointBusiness.cs +++ b/SlnMesnac.Business/FixedPointBusiness.cs @@ -39,7 +39,7 @@ namespace SlnMesnac.Business private readonly Irecord_busbar_tempServices _record_busbar_TempServices; - public FixedPointBusiness(SerilogHelper log, PlcAbsractFactory plc, Ibase_cabinet_infoServices base_Cabinet_InfoServices, Ibase_busbar_infoServices base_Busbar_InfoServices, Irecord_busbar_tempServices record_busbar_TempServices) : base(log, plc, base_Cabinet_InfoServices, base_Busbar_InfoServices) + public FixedPointBusiness(SerilogHelper log, PlcAbsractFactory plc, Ibase_cabinet_infoServices base_Cabinet_InfoServices, Ibase_busbar_infoServices base_Busbar_InfoServices, Irecord_busbar_tempServices record_busbar_TempServices, Ibase_alarm_infoServices base_Alarm_InfoServices, Irecord_busbar_alarmServices record_Busbar_AlarmServices) : base(log, plc, base_Cabinet_InfoServices, base_Busbar_InfoServices, base_Alarm_InfoServices, record_Busbar_AlarmServices) { _record_busbar_TempServices = record_busbar_TempServices; } @@ -170,11 +170,10 @@ namespace SlnMesnac.Business GimbaRotationControlEvent?.Invoke(busbar.wPanPos, busbar.wTiltPos, busbar.wZoomPos); } - _log.Info($"5S后开始测温"); - Task.Delay(5000).Wait(); + _log.Info($"2S后开始测温"); + Task.Delay(2000).Wait(); _log.Info($"温度测量完成,最高温度:{_realTemperatureInfo.fMaxTemperature};最低温度:{_realTemperatureInfo.fMinTemperature};平均温度:{_realTemperatureInfo.fAverageTemperature};温差:{_realTemperatureInfo.fTemperatureDiff}"); this.SaveBusbarTemp(busbar.busbarCode, busbar.cabinetCode, _realTemperatureInfo, busbar.isPictures); - Task.Delay(1000).Wait(); } /// @@ -200,22 +199,28 @@ namespace SlnMesnac.Business recordTime = DateTime.Now, }; - if (realTemperatureInfo.fMaxTemperature > 65) - { - record.isAlarm = 1; - string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; - record.filePath = sJpegPicFileName; - CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); - } - else - { - if (isPictures == 1) - { - string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; - record.filePath = sJpegPicFileName; - CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); - } - } + //if (realTemperatureInfo.fMaxTemperature > 65) + //{ + // record.isAlarm = 1; + // string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; + // record.filePath = sJpegPicFileName; + // CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); + //} + //else + //{ + // if (isPictures == 1) + // { + // string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; + // record.filePath = sJpegPicFileName; + // CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); + // } + //} + + string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; + record.filePath = sJpegPicFileName; + CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); + + base.JudgBusbarIsAlarm((int)busbarCode, ref record); var res = _record_busbar_TempServices.Insert(record); diff --git a/SlnMesnac.Business/InspModeBusiness.cs b/SlnMesnac.Business/InspModeBusiness.cs index 0c28d5b..f5e9dc6 100644 --- a/SlnMesnac.Business/InspModeBusiness.cs +++ b/SlnMesnac.Business/InspModeBusiness.cs @@ -49,7 +49,7 @@ namespace SlnMesnac.Business public delegate void GimbaRotationControl(string wPanPos, string wTiltPos, string wZoomPos); public event GimbaRotationControl GimbaRotationControlEvent; - public InspModeBusiness(SerilogHelper log, PlcAbsractFactory plc, Ibase_cabinet_infoServices base_Cabinet_InfoServices, Ibase_busbar_infoServices base_Busbar_InfoServices, Irecord_inspection_cabinetServices service, Irecord_busbar_tempServices irecord_Busbar_TempServices) : base(log, plc, base_Cabinet_InfoServices, base_Busbar_InfoServices) + public InspModeBusiness(SerilogHelper log, PlcAbsractFactory plc, Ibase_cabinet_infoServices base_Cabinet_InfoServices, Ibase_busbar_infoServices base_Busbar_InfoServices, Irecord_inspection_cabinetServices service, Irecord_busbar_tempServices irecord_Busbar_TempServices,Ibase_alarm_infoServices base_Alarm_InfoServices, Irecord_busbar_alarmServices record_Busbar_AlarmServices) : base(log, plc, base_Cabinet_InfoServices, base_Busbar_InfoServices, base_Alarm_InfoServices, record_Busbar_AlarmServices) { _record_busbar_TempServices = irecord_Busbar_TempServices; _service = service; @@ -186,11 +186,10 @@ namespace SlnMesnac.Business } //这里采集数据 - _log.Info($"5S后开始测温"); - Task.Delay(5000).Wait(); + _log.Info($"2S后开始测温"); + Task.Delay(2000).Wait(); _log.Info($"温度测量完成,最高温度:{_realTemperatureInfo.fMaxTemperature};最低温度:{_realTemperatureInfo.fMinTemperature};平均温度:{_realTemperatureInfo.fAverageTemperature};温差:{_realTemperatureInfo.fTemperatureDiff}"); this.SaveBusbarTemp(busbar.busbarCode, busbar.cabinetCode, _realTemperatureInfo, busbar.isPictures); - Task.Delay(1000).Wait(); if (busbar.isRotate == 1) { @@ -266,22 +265,28 @@ namespace SlnMesnac.Business recordTime = DateTime.Now, }; - if (realTemperatureInfo.fMaxTemperature > 65) - { - record.isAlarm = 1; - string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; - record.filePath = sJpegPicFileName; - CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); - } - else - { - if (isPictures == 1) - { - string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; - record.filePath = sJpegPicFileName; - CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); - } - } + //if (realTemperatureInfo.fMaxTemperature > 65) + //{ + // record.isAlarm = 1; + // string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; + // record.filePath = sJpegPicFileName; + // CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); + //} + //else + //{ + // if (isPictures == 1) + // { + // string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; + // record.filePath = sJpegPicFileName; + // CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); + // } + //} + + string sJpegPicFileName = $"{cabinetCode}_{busbarCode}_{DateTime.Now.ToString("yyyyMMddHHmmssffff")}.jpg"; + record.filePath = sJpegPicFileName; + CaptureAlarmPictureEvent?.Invoke(sJpegPicFileName); + + base.JudgBusbarIsAlarm((int)busbarCode, ref record); var res = _record_busbar_TempServices.Insert(record); diff --git a/SlnMesnac.Business/ManualModeBusiness.cs b/SlnMesnac.Business/ManualModeBusiness.cs deleted file mode 100644 index 167bd8a..0000000 --- a/SlnMesnac.Business/ManualModeBusiness.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -#region << 版 本 注 释 >> -/*-------------------------------------------------------------------- -* 版权所有 (c) 2024 WenJY 保留所有权利。 -* CLR版本:4.0.30319.42000 -* 机器名称:T14-GEN3-7895 -* 命名空间:SlnMesnac.Business -* 唯一标识:04146a2b-c51d-4164-8c51-158a99301078 -* -* 创建者:WenJY -* 电子邮箱: -* 创建时间:2024-11-07 9:52:46 -* 版本:V1.0.0 -* 描述: -* -*-------------------------------------------------------------------- -* 修改人: -* 时间: -* 修改说明: -* -* 版本:V1.0.0 -*--------------------------------------------------------------------*/ -#endregion << 版 本 注 释 >> -namespace SlnMesnac.Business -{ - /// - /// 手动模式 - /// - internal class ManualModeBusiness - { - } -} diff --git a/SlnMesnac.Business/base/BaseBusiness.cs b/SlnMesnac.Business/base/BaseBusiness.cs index b18cdb8..fcce2c6 100644 --- a/SlnMesnac.Business/base/BaseBusiness.cs +++ b/SlnMesnac.Business/base/BaseBusiness.cs @@ -1,4 +1,5 @@ using Serilog; +using SlnMesnac.Model.dto; using SlnMesnac.Plc; using SlnMesnac.Repository; using SlnMesnac.Repository.service; @@ -41,16 +42,21 @@ namespace SlnMesnac.Business.@base public readonly Ibase_cabinet_infoServices _ibase_Cabinet_InfoServices; public readonly Ibase_busbar_infoServices _ibase_Busbar_InfoServices; - + private readonly Ibase_alarm_infoServices _ibase_Alarm_InfoServices; + private readonly Irecord_busbar_alarmServices _iRecord_Busbar_AlarmServices; public bool isFlag = false; - public BaseBusiness(SerilogHelper log,PlcAbsractFactory plc, Ibase_cabinet_infoServices base_Cabinet_InfoServices, Ibase_busbar_infoServices base_Busbar_InfoServices) + public BaseBusiness(SerilogHelper log,PlcAbsractFactory plc, Ibase_cabinet_infoServices base_Cabinet_InfoServices, + Ibase_busbar_infoServices base_Busbar_InfoServices, Ibase_alarm_infoServices base_Alarm_InfoServices, + Irecord_busbar_alarmServices record_Busbar_AlarmServices) { _log = log; _plc = plc; _ibase_Cabinet_InfoServices = base_Cabinet_InfoServices; _ibase_Busbar_InfoServices = base_Busbar_InfoServices; + _ibase_Alarm_InfoServices = base_Alarm_InfoServices; + _iRecord_Busbar_AlarmServices = record_Busbar_AlarmServices; } /// @@ -122,5 +128,57 @@ namespace SlnMesnac.Business.@base { busbarInfos = _ibase_Busbar_InfoServices.Query(x=>x.cabinetCode == cabinetCode && x.isChecked == 1 && x.isInsp == isInsp).ToList(); } + + public void JudgBusbarIsAlarm(int busbarCode,ref record_busbar_temp busbarTemp) + { + try + { + var alarmInfos = _ibase_Alarm_InfoServices.Query(x => x.busbarCode == busbarCode).ToList(); + + if (alarmInfos != null) + { + foreach (var alarm in alarmInfos) + { + record_busbar_alarm busbarAlarm = new record_busbar_alarm(); + if (alarm.judgMethod == 1) //大于 + { + if (busbarTemp.tempMax < alarm.alarmValue) //取反为正常数据 + { + continue; + } + } + else if (alarm.judgMethod == 2) //小于 + { + if (busbarTemp.tempMax > alarm.alarmValue) //取反为正常数据 + { + continue; + } + } + else + { + continue; + } + + busbarAlarm.busbarCode = busbarTemp.busbarCode; + busbarAlarm.cabinetCode = busbarTemp.cabinetCode; + busbarAlarm.tempMax = busbarTemp.tempMax; + busbarAlarm.tempMin = busbarTemp.tempMin; + busbarAlarm.tempAvg = busbarTemp.tempAvg; + busbarAlarm.tempDiff = busbarTemp.tempDiff; + busbarAlarm.filePath = busbarTemp.filePath; + busbarAlarm.alarmType = alarm.alarmType; + busbarAlarm.alarmValue = alarm.alarmValue; + busbarAlarm.recordTime = DateTime.Now; + _iRecord_Busbar_AlarmServices.Insert(busbarAlarm); + + busbarTemp.isAlarm = 1; + } + } + } + catch(Exception e) + { + throw new InvalidOperationException($"测温数据判断异常:{e.Message}"); + } + } } } diff --git a/SlnMesnac.Model/domain/base_alarm_info.cs b/SlnMesnac.Model/domain/base_alarm_info.cs new file mode 100644 index 0000000..94eccc0 --- /dev/null +++ b/SlnMesnac.Model/domain/base_alarm_info.cs @@ -0,0 +1,115 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace SlnMesnac.Repository +{ + /// + ///报警信息 + /// + [SugarTable("base_alarm_info")] + public partial class base_alarm_info + { + public base_alarm_info(){ + + + } + /// + /// Desc:标识 + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,ColumnName="obj_id")] + public int objId {get;set;} + + /// + /// Desc:母排编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="busbar_code")] + public int? busbarCode {get;set;} + + /// + /// Desc:报警别名 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="alarm_alias")] + public string alarmAlias {get;set;} + + /// + /// Desc:报警内容 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="alarm_content")] + public string alarmContent {get;set;} + + /// + /// Desc:报警类型 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="alarm_type")] + public int? alarmType {get;set;} + + /// + /// Desc:报警阈值 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="alarm_value")] + public decimal? alarmValue {get;set;} + + /// + /// Desc:判断方式:1-大于;2-小于 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="judg_method")] + public int? judgMethod {get;set;} + + /// + /// Desc:是否启用:1-是;0-否;;0-否 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(ColumnName="is_flag")] + public int? isFlag {get;set;} + + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_by")] + public string createdBy {get;set;} + + /// + /// Desc:创建时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="created_time")] + public DateTime? createdTime {get;set;} + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_by")] + public string updatedBy {get;set;} + + /// + /// Desc:更新时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="updated_time")] + public DateTime? updatedTime {get;set;} + + } +} diff --git a/SlnMesnac.Model/domain/record_busbar_alarm.cs b/SlnMesnac.Model/domain/record_busbar_alarm.cs new file mode 100644 index 0000000..96c17f2 --- /dev/null +++ b/SlnMesnac.Model/domain/record_busbar_alarm.cs @@ -0,0 +1,113 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace SlnMesnac.Repository +{ + /// + ///巡检报警记录 + /// + [SugarTable("record_busbar_alarm")] + public partial class record_busbar_alarm + { + public record_busbar_alarm(){ + + + } + /// + /// Desc:租户号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="objId")] + public int? objid {get;set;} + + /// + /// Desc:母排编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="busbar_code")] + public int? busbarCode {get;set;} + + /// + /// Desc:电柜编号 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="cabinet_code")] + public int? cabinetCode {get;set;} + + /// + /// Desc:最高温度 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="temp_max")] + public decimal? tempMax {get;set;} + + /// + /// Desc:最低温度 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="temp_min")] + public decimal? tempMin {get;set;} + + /// + /// Desc:平均温度 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="temp_avg")] + public decimal? tempAvg {get;set;} + + /// + /// Desc:温差 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="temp_diff")] + public decimal? tempDiff {get;set;} + + /// + /// 报警阈值 + /// + [SugarColumn(ColumnName = "alarm_value")] + public decimal? alarmValue { get; set; } + + /// + /// Desc:图像路径 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="file_path")] + public string filePath {get;set;} + + /// + /// Desc:报警类型 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="alarm_type")] + public int? alarmType {get;set;} + + /// + /// Desc:是否标识:1-是;0-否 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="is_flag")] + public int? isFlag {get;set;} + + /// + /// Desc:记录时间 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName="record_time")] + public DateTime? recordTime {get;set;} + + } +} diff --git a/SlnMesnac.Repository/service/IBase_alarm_infoService.cs b/SlnMesnac.Repository/service/IBase_alarm_infoService.cs new file mode 100644 index 0000000..06184f9 --- /dev/null +++ b/SlnMesnac.Repository/service/IBase_alarm_infoService.cs @@ -0,0 +1,13 @@ +using SlnMesnac.Model.domain; +using SlnMesnac.Repository.service.@base; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SlnMesnac.Repository.service +{ + public interface Ibase_alarm_infoServices: IBaseService + { + + } +} \ No newline at end of file diff --git a/SlnMesnac.Repository/service/IRecord_busbar_alarmService.cs b/SlnMesnac.Repository/service/IRecord_busbar_alarmService.cs new file mode 100644 index 0000000..68e6727 --- /dev/null +++ b/SlnMesnac.Repository/service/IRecord_busbar_alarmService.cs @@ -0,0 +1,13 @@ +using SlnMesnac.Model.domain; +using SlnMesnac.Repository.service.@base; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SlnMesnac.Repository.service +{ + public interface Irecord_busbar_alarmServices: IBaseService + { + + } +} \ No newline at end of file diff --git a/SlnMesnac.Repository/service/Impl/Base_alarm_infoServiceImpl.cs b/SlnMesnac.Repository/service/Impl/Base_alarm_infoServiceImpl.cs new file mode 100644 index 0000000..89be8bf --- /dev/null +++ b/SlnMesnac.Repository/service/Impl/Base_alarm_infoServiceImpl.cs @@ -0,0 +1,14 @@ +using SlnMesnac.Model.domain; +using SlnMesnac.Repository.service.@base; +using System; +using System.Collections.Generic; + +namespace SlnMesnac.Repository.service.Impl +{ + public class base_alarm_infoServiceImpl : BaseServiceImpl, Ibase_alarm_infoServices + { + public base_alarm_infoServiceImpl(Repository repository):base(repository) + { + } + } +} \ No newline at end of file diff --git a/SlnMesnac.Repository/service/Impl/Record_busbar_alarmServiceImpl.cs b/SlnMesnac.Repository/service/Impl/Record_busbar_alarmServiceImpl.cs new file mode 100644 index 0000000..8dc6462 --- /dev/null +++ b/SlnMesnac.Repository/service/Impl/Record_busbar_alarmServiceImpl.cs @@ -0,0 +1,14 @@ +using SlnMesnac.Model.domain; +using SlnMesnac.Repository.service.@base; +using System; +using System.Collections.Generic; + +namespace SlnMesnac.Repository.service.Impl +{ + public class record_busbar_alarmServiceImpl : BaseServiceImpl, Irecord_busbar_alarmServices + { + public record_busbar_alarmServiceImpl(Repository repository):base(repository) + { + } + } +} \ No newline at end of file diff --git a/SlnMesnac.WPF/appsettings.json b/SlnMesnac.WPF/appsettings.json index e40b46a..b3eb2e0 100644 --- a/SlnMesnac.WPF/appsettings.json +++ b/SlnMesnac.WPF/appsettings.json @@ -28,8 +28,8 @@ { "configId": 1, "plcType": "SiemensPlc", - "plcIp": "127.0.0.1", - //"plcIp": "192.168.2.1", + //"plcIp": "127.0.0.1", + "plcIp": "192.168.2.1", "plcPort": 102, "plcKey": "iot", "isFlage": "true"