Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
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
王衍超
cloud-fb
Commits
529ebae2
Commit
529ebae2
authored
Apr 20, 2021
by
王衍超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预警执行记录增加实际值字段;
parent
252ef90a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
85 additions
and
1 deletions
+85
-1
BaseBusinessWarn.java
...c/main/java/com/xyst/dinas/biz/warn/BaseBusinessWarn.java
+2
-0
IWarningCalculate.java
.../main/java/com/xyst/dinas/biz/warn/IWarningCalculate.java
+15
-0
WarnExeRecord.java
.../src/main/java/com/xyst/dinas/biz/warn/WarnExeRecord.java
+7
-0
WarningExe.mk
...src/main/model/com/xyst/dinas/biz/datamodel/WarningExe.mk
+3
-0
WarningExe.jmx
...ain/resources/com/xyst/dinas/biz/datamodel/WarningExe.jmx
+23
-0
WarningExe.hbm.xml
...st.dinas.biz/src/main/resources/config/WarningExe.hbm.xml
+3
-0
DinasCountWarningCalculate.java
.../xyst/dinas/contract/warn/DinasCountWarningCalculate.java
+6
-0
ContractWarningExe.mk
...model/com/xyst/dinas/contract/query/ContractWarningExe.mk
+10
-1
ContractWarningExe.jmx
...rces/com/xyst/dinas/contract/query/ContractWarningExe.jmx
+10
-0
SandAreaDinasCountWarningCalculate.java
...duction/processor/SandAreaDinasCountWarningCalculate.java
+6
-0
No files found.
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/warn/BaseBusinessWarn.java
View file @
529ebae2
...
...
@@ -121,11 +121,13 @@ public class BaseBusinessWarn {
if
(!
isWarning
)
return
false
;
//1.1 没有触发预警, 则不做任何操作;
//1.2 新增预警执行信息
warnExeRecord
=
createWarnExeRecord
(
warnSetting
);
warnExeRecord
.
setActualValue
(
warningCalculate
.
getActualValue
());
warningSettingService
.
insertWarnExe
(
warnExeRecord
);
}
else
{
//2.当前存在执行中的预警记录,则修改预警执行信息
Date
currentTime
=
new
Date
();
warnExeRecord
.
setRecentlyTime
(
currentTime
);
warnExeRecord
.
setActualValue
(
warningCalculate
.
getActualValue
());
if
(!
isWarning
)
{
//2.1 如果没有触发预警,则结束该预警记录
//如果预警已经结束,则不修改
if
((
WarnStateEnum
.
OVER
.
getValue
()+
""
).
equals
(
warnExeRecord
.
getWarnState
())){
...
...
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/warn/IWarningCalculate.java
View file @
529ebae2
...
...
@@ -7,10 +7,25 @@ package com.xyst.dinas.biz.warn;
*/
public
interface
IWarningCalculate
{
/**
* 计算是否预警
* @param warnSetting
* @return
*/
boolean
isWarning
(
WarnSetting
warnSetting
);
/**
* 预警消息
* @return
*/
String
warnMessage
();
/**
* 实际值
* @return
*/
String
getActualValue
();
//boolean isRepeat();重复执行
...
...
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/warn/WarnExeRecord.java
View file @
529ebae2
...
...
@@ -24,11 +24,18 @@ public class WarnExeRecord {
private
String
target
;
private
String
max
;
private
String
min
;
private
String
actualValue
;
private
String
message
;
private
String
memo
;
public
String
getActualValue
()
{
return
actualValue
;
}
public
void
setActualValue
(
String
actualValue
)
{
this
.
actualValue
=
actualValue
;
}
public
Long
getVersion
()
{
return
version
;
}
...
...
backend/xyst.dinas.biz/src/main/model/com/xyst/dinas/biz/datamodel/WarningExe.mk
View file @
529ebae2
...
...
@@ -46,6 +46,9 @@
<attribute id='cbb5b983-299b-4259-97d9-6470651bb18b' name='min' columnName='min' title='指标下限' type='string' default='' precision='' isArray='false'>
<annotation id='ea154cb8-f939-4e9f-9793-9673d984161f' attributeId='ffc0a199-4038-4ebf-a94f-a0f12bfc76dd' name='length' value='100'></annotation>
</attribute>
<attribute id='cbb5b983-299b-4259-97d9-6470651bb18b' name='actualValue' columnName='actual_value' title='实际值' type='string' default='' precision='' isArray='false'>
<annotation id='ea154cb8-f939-4e9f-9793-9673d984161f' attributeId='ffc0a199-4038-4ebf-a94f-a0f12bfc76dd' name='length' value='100'></annotation>
</attribute>
<attribute id='cbb5b983-299b-4259-97d9-6470651bb18b' name='memo' columnName='memo' title='备注' type='string' default='' precision='' isArray='false'>
<annotation id='ea154cb8-f939-4e9f-9793-9673d984161f' attributeId='ffc0a199-4038-4ebf-a94f-a0f12bfc76dd' name='length' value='1000'></annotation>
</attribute>
...
...
backend/xyst.dinas.biz/src/main/resources/com/xyst/dinas/biz/datamodel/WarningExe.jmx
View file @
529ebae2
...
...
@@ -258,6 +258,29 @@
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
100
</m:value>
</m:annotation>
<m:annotation>
<m:type>
javax.persistence.Column
</m:type>
<m:properties>
<m:property>
<m:key>
name
</m:key>
<m:value>
actual_value
</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>
cbb5b983-299b-4259-97d9-6470651bb18b
</m:id>
<m:name>
actualValue
</m:name>
<m:title>
实际值
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
1000
</m:value>
</m:annotation>
<m:annotation>
...
...
backend/xyst.dinas.biz/src/main/resources/config/WarningExe.hbm.xml
View file @
529ebae2
...
...
@@ -47,6 +47,9 @@
<property
name=
"min"
type=
"nstring"
not-null=
"false"
>
<column
name=
"min"
length=
"100"
></column>
</property>
<property
name=
"actualValue"
type=
"nstring"
not-null=
"false"
>
<column
name=
"actual_value"
length=
"100"
></column>
</property>
<property
name=
"discard"
type=
"boolean"
not-null=
"false"
>
<column
name=
"discard"
></column>
</property>
...
...
backend/xyst.dinas.contract/src/main/java/com/xyst/dinas/contract/warn/DinasCountWarningCalculate.java
View file @
529ebae2
...
...
@@ -53,4 +53,10 @@ public class DinasCountWarningCalculate implements IWarningCalculate{
public
String
warnMessage
()
{
return
warnMessage
;
}
@Override
public
String
getActualValue
()
{
return
dinsaCount
+
""
;
}
}
backend/xyst.dinas.contract/src/main/model/com/xyst/dinas/contract/query/ContractWarningExe.mk
View file @
529ebae2
...
...
@@ -77,7 +77,7 @@
</ref>
<description></description>
</field>
<field title='
实际
值'>
<field title='
预警
值'>
<name>min</name>
<type>string</type>
<ref>
...
...
@@ -86,6 +86,15 @@
</ref>
<description></description>
</field>
<field title='实际值'>
<name>actualValue</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='创建时间'>
<name>createTime</name>
<type>datetime</type>
...
...
backend/xyst.dinas.contract/src/main/resources/com/xyst/dinas/contract/query/ContractWarningExe.jmx
View file @
529ebae2
...
...
@@ -91,6 +91,16 @@
</m:field>
<m:field>
<m:name>
min
</m:name>
<m:title>
预警值
</m:title>
<m:type>
string
</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>
actualValue
</m:name>
<m:title>
实际值
</m:title>
<m:type>
string
</m:type>
<m:ref>
...
...
backend/xyst.dinas.production/src/main/java/com/xyst/dinas/production/processor/SandAreaDinasCountWarningCalculate.java
View file @
529ebae2
...
...
@@ -61,4 +61,10 @@ public class SandAreaDinasCountWarningCalculate implements IWarningCalculate{
}
@Override
public
String
getActualValue
()
{
return
dischargingWeight
+
""
;
}
}
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