Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
efe531a8
Commit
efe531a8
authored
Feb 18, 2020
by
xukaiqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合格和不告警
parent
25ff0bb2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
34 deletions
+45
-34
FmeaPointInputitem.java
...a/com/yeejoin/amos/fas/dao/entity/FmeaPointInputitem.java
+13
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+18
-15
dbTemplate_fmea_point_inputitem.xml
...n/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
+14
-19
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FmeaPointInputitem.java
View file @
efe531a8
...
@@ -4,6 +4,7 @@ import javax.persistence.Column;
...
@@ -4,6 +4,7 @@ import javax.persistence.Column;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
/**
/**
...
@@ -24,6 +25,8 @@ public class FmeaPointInputitem extends BasicEntity {
...
@@ -24,6 +25,8 @@ public class FmeaPointInputitem extends BasicEntity {
@Column
(
name
=
"state"
)
@Column
(
name
=
"state"
)
private
Integer
state
;
private
Integer
state
;
private
Long
inputItemId
;
public
Long
getPointInputitemId
()
{
public
Long
getPointInputitemId
()
{
return
PointInputitemId
;
return
PointInputitemId
;
}
}
...
@@ -47,4 +50,13 @@ public class FmeaPointInputitem extends BasicEntity {
...
@@ -47,4 +50,13 @@ public class FmeaPointInputitem extends BasicEntity {
public
void
setState
(
Integer
state
)
{
public
void
setState
(
Integer
state
)
{
this
.
state
=
state
;
this
.
state
=
state
;
}
}
public
void
setInputItemId
(
Long
inputItemId
)
{
this
.
inputItemId
=
inputItemId
;
}
@Transient
public
Long
getInputItemId
()
{
return
inputItemId
;
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
efe531a8
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
...
@@ -835,18 +836,21 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -835,18 +836,21 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if
(!
CollectionUtils
.
isEmpty
(
protalData
.
getItems
()))
{
if
(!
CollectionUtils
.
isEmpty
(
protalData
.
getItems
()))
{
Long
pointId
=
protalData
.
getId
();
Long
pointId
=
protalData
.
getId
();
List
<
Long
>
inputIds
=
Lists
.
newArrayList
();
List
<
Long
>
inputIds
=
Lists
.
newArrayList
();
Map
<
Long
,
CheckInputItemRo
>
map
=
Maps
.
newHashMap
();
for
(
CheckInputItemRo
checkInputItemRo
:
protalData
.
getItems
())
{
for
(
CheckInputItemRo
checkInputItemRo
:
protalData
.
getItems
())
{
inputIds
.
add
(
checkInputItemRo
.
getPointInputitemId
());
inputIds
.
add
(
checkInputItemRo
.
getPointInputitemId
());
map
.
put
(
checkInputItemRo
.
getPointInputitemId
(),
checkInputItemRo
);
}
}
List
<
FmeaPointInputitem
>
fmeaPointInputitems
=
fmeaPointInputitemMapper
.
listByPointIdAndInputItemIds
(
pointId
,
inputIds
);
List
<
FmeaPointInputitem
>
fmeaPointInputitems
=
fmeaPointInputitemMapper
.
listByPointIdAndInputItemIds
(
pointId
,
inputIds
);
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
List
<
Long
>
failIds
=
Lists
.
newArrayList
();
List
<
Long
>
failIds
=
Lists
.
newArrayList
();
List
<
Long
>
successIds
=
Lists
.
newArrayList
();
List
<
Long
>
successIds
=
Lists
.
newArrayList
();
fmeaPointInputitems
.
forEach
(
fmeaPointInputitem
->
{
fmeaPointInputitems
.
forEach
(
fmeaPointInputitem
->
{
if
(
fmeaPointInputitem
.
getState
().
equals
(
2
))
{
CheckInputItemRo
checkInputItemRo
=
map
.
get
(
fmeaPointInputitem
.
getInputItemId
());
if
(
checkInputItemRo
.
getStatus
().
equals
(
2
))
{
failIds
.
add
(
fmeaPointInputitem
.
getId
());
failIds
.
add
(
fmeaPointInputitem
.
getId
());
fmeaIds
.
add
(
fmeaPointInputitem
.
getFmeaId
());
fmeaIds
.
add
(
fmeaPointInputitem
.
getFmeaId
());
}
else
{
}
else
if
(
checkInputItemRo
.
getStatus
().
equals
(
1
))
{
successIds
.
add
(
fmeaPointInputitem
.
getId
());
successIds
.
add
(
fmeaPointInputitem
.
getId
());
fmeaIds
.
add
(
fmeaPointInputitem
.
getFmeaId
());
fmeaIds
.
add
(
fmeaPointInputitem
.
getFmeaId
());
}
}
...
@@ -1221,21 +1225,20 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1221,21 +1225,20 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if
(
dict
!=
null
&&
dict
.
getDictCode
().
equals
(
"alarm_type_trouble"
))
{
if
(
dict
!=
null
&&
dict
.
getDictCode
().
equals
(
"alarm_type_trouble"
))
{
List
<
FmeaEquipmentPoint
>
fmeaEquipmentPoints
=
fmeaEquipmentPointMapper
.
listByEquipmentPointId
(
fireEquipmentPoint
.
getId
());
List
<
FmeaEquipmentPoint
>
fmeaEquipmentPoints
=
fmeaEquipmentPointMapper
.
listByEquipmentPointId
(
fireEquipmentPoint
.
getId
());
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
List
<
Long
>
failIds
=
Lists
.
newArrayList
();
List
<
Long
>
ids
=
Lists
.
newArrayList
();
List
<
Long
>
successIds
=
Lists
.
newArrayList
();
fmeaEquipmentPoints
.
forEach
(
fmeaEquipmentPoint
->
{
fmeaEquipmentPoints
.
forEach
(
fmeaEquipmentPoint
->
{
if
(
fmeaEquipmentPoint
.
getState
().
equals
(
2
))
{
ids
.
add
(
fmeaEquipmentPoint
.
getId
());
failIds
.
add
(
fmeaEquipmentPoint
.
getId
());
fmeaIds
.
add
(
fmeaEquipmentPoint
.
getFmeaId
());
fmeaIds
.
add
(
fmeaEquipmentPoint
.
getFmeaId
());
}
else
{
successIds
.
add
(
fmeaEquipmentPoint
.
getId
());
fmeaIds
.
add
(
fmeaEquipmentPoint
.
getFmeaId
());
}
});
});
fmeaEquipmentPointMapper
.
updateStateByIds
(
1
,
failIds
);
if
(
param
.
getState
().
equals
(
"true"
))
{
fmeaEquipmentPointMapper
.
updateStateByIds
(
0
,
successIds
);
fmeaEquipmentPointMapper
.
updateStateByIds
(
1
,
ids
);
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addAbnormalMessage
(
fmeaId
));
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addAbnormalMessage
(
fmeaId
));
}
else
if
(
param
.
getState
().
equals
(
"false"
))
{
fmeaEquipmentPointMapper
.
updateStateByIds
(
0
,
ids
);
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addAbnormalMessage
(
fmeaId
));
}
}
}
String
batchNo
=
UUID
.
randomUUID
().
toString
();
String
batchNo
=
UUID
.
randomUUID
().
toString
();
FireEquimentDataRo
ruleData
=
new
FireEquimentDataRo
();
FireEquimentDataRo
ruleData
=
new
FireEquimentDataRo
();
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea_point_inputitem.xml
View file @
efe531a8
...
@@ -98,27 +98,22 @@
...
@@ -98,27 +98,22 @@
<select
id=
"listByPointIdAndInputItemIds"
resultType=
"com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem"
>
<select
id=
"listByPointIdAndInputItemIds"
resultType=
"com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem"
>
select
select
id,
a.id,
fmea_id as fmeaId,
a.fmea_id as fmeaId,
point_inputitem_id as pointInputitemId,
a.point_inputitem_id as pointInputitemId,
state
a.state,
b.input_item_id as inputItemId
from
from
f_fmea_point_inputitem
f_fmea_point_inputitem as a
left join
p_point_inputitem as b on a.point_inputitem_id = b.id
where
where
point_inputitem_id in
b.point_id = #{pointId}
(
and
select
b.input_item_id in
id
<foreach
collection=
"inputIds"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
from
#{item}
p_point_inputitem
</foreach>
where
point_id = #{pointId}
and
input_item_id in
<foreach
collection=
"inputIds"
item=
"item"
index=
"index"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
)
</select>
</select>
<select
id=
"listFmeaByFmeaId"
resultType=
"com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem"
>
<select
id=
"listFmeaByFmeaId"
resultType=
"com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem"
>
...
...
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