From da297f042a4e46c645b3ed26db9a81012fbbb944 Mon Sep 17 00:00:00 2001 From: simon <panruising@163.com> Date: Sat, 27 Mar 2021 06:01:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E6=A0=B7=E5=93=81?= =?UTF-8?q?=E6=8A=A5=E8=AD=A6=E7=9A=84msg=20=E6=94=BE=E5=85=A5=20FLY.Thick?= =?UTF-8?q?.Base.Common.ERRNOs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FLY.Thick.Base/Common/ERRNO.cs | 6 +++- .../FLY.Thick.Base/Server/GetSample.cs | 30 +++++++++++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Project.FLY.Thick.Base/FLY.Thick.Base/Common/ERRNO.cs b/Project.FLY.Thick.Base/FLY.Thick.Base/Common/ERRNO.cs index cc6eaf8..bdc022e 100644 --- a/Project.FLY.Thick.Base/FLY.Thick.Base/Common/ERRNO.cs +++ b/Project.FLY.Thick.Base/FLY.Thick.Base/Common/ERRNO.cs @@ -30,6 +30,10 @@ namespace FLY.Thick.Base.Common public ERRNO BASE_ERRNO_TIMEGRIDADV = new ERRNO() { Code = 14, Descrption = "ADå¡ç‰ˆæœ¬å¤ªä½Ž,ä¸èƒ½å¯åŠ¨ [高级ADæ•°æ®]" }; public ERRNO SCAN_ERRNO_FATAL = new ERRNO() { Code = 20, Descrption = "扫æ异常,致命错误 å¿…é¡»åœæ¢æ‰«æ" }; public ERRNO SYNC_ERRNO_FATAL = new ERRNO() { Code = 21, Descrption = "åŒæ¥å¼‚常,致命错误 å¿…é¡»åœæ¢æ‰«æ" }; - public ERRNO MEASURE_SYNC_ERRNO_FATAL = new ERRNO() { Code = 22, Descrption = "测é‡åŒæ¥å‚数异常,致命错误 å¿…é¡»åœæ¢" }; + public ERRNO MEASURE_SYNC_ERRNO_FATAL = new ERRNO() { Code = 22, Descrption = "测é‡åŒæ¥å‚数异常,致命错误 å¿…é¡»åœæ¢" }; + + public ERRNO SAMPLE_ERRNO_Failure = new ERRNO() { Code = 60, Descrption = "æ ·å“å–æ ·å‡ºé”™" }; + + } } diff --git a/Project.FLY.Thick.Base/FLY.Thick.Base/Server/GetSample.cs b/Project.FLY.Thick.Base/FLY.Thick.Base/Server/GetSample.cs index 541c7db..85dfc39 100644 --- a/Project.FLY.Thick.Base/FLY.Thick.Base/Server/GetSample.cs +++ b/Project.FLY.Thick.Base/FLY.Thick.Base/Server/GetSample.cs @@ -14,6 +14,7 @@ using FLY.Thick.Base.IService; using PropertyChanged; using Newtonsoft.Json; using static Misc.ReverserInfo; +using FLY.Thick.Base.Common; namespace FLY.Thick.Base.Server { @@ -23,8 +24,6 @@ namespace FLY.Thick.Base.Server /// <summary> /// 报è¦æµ‹è¯• /// </summary> - public static FLY.OBJComponents.Common.ERRNO SAMPLE_ERRNO_Failure = new FLY.OBJComponents.Common.ERRNO() { Code = 60, Descrption = "æ ·å“å–æ ·å‡ºé”™" }; - #region IGetSampleService æŽ¥å£ @@ -197,7 +196,7 @@ namespace FLY.Thick.Base.Server { try { - string json = Newtonsoft.Json.JsonConvert.SerializeObject(this); + string json = Newtonsoft.Json.JsonConvert.SerializeObject(this, Formatting.Indented); File.WriteAllText(param_path, json); } @@ -360,7 +359,7 @@ namespace FLY.Thick.Base.Server } - + bool mIsFailure = false; /// <summary> /// æ ·å“å–æ ·ï¼ŒæŽ¨é€ç»™thickm, å‚数一定åˆæ³•ï¼Œä¸ç”¨æ£€æµ‹ /// </summary> @@ -504,11 +503,13 @@ namespace FLY.Thick.Base.Server if (isFailure)//æ ·å“获å–失败,下次继ç»ï¼ï¼ï¼ { + this.warningSystem.Add( - SAMPLE_ERRNO_Failure.Code, - SAMPLE_ERRNO_Failure.Descrption, + ERRNOs.Instance.SAMPLE_ERRNO_Failure.Code, + ERRNOs.Instance.SAMPLE_ERRNO_Failure.Descrption, OBJComponents.Common.ERR_STATE.ON); } + mIsFailure = isFailure; } /// <summary> @@ -519,13 +520,16 @@ namespace FLY.Thick.Base.Server { if (Enable) { - foreach (SampleCell sample in Samples) - { - if ((sample.Enable) && (sample.AD < 0)) - { - return false; - } - } + if (mIsFailure) + return false; + + //foreach (SampleCell sample in Samples) + //{ + // if ((sample.Enable) && (sample.AD < 0)) + // { + // return false; + // } + //} } return true; -- 2.18.1