Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
Thick-Common
Commits
da297f04
Commit
da297f04
authored
Mar 26, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 样品报警的msg 放入 FLY.Thick.Base.Common.ERRNOs.
parent
a731e151
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
14 deletions
+22
-14
ERRNO.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Common/ERRNO.cs
+5
-1
GetSample.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GetSample.cs
+17
-13
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base/Common/ERRNO.cs
View file @
da297f04
...
...
@@ -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
=
"样品取样出错"
};
}
}
Project.FLY.Thick.Base/FLY.Thick.Base/Server/GetSample.cs
View file @
da297f04
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment