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
d78bf1ff
Commit
d78bf1ff
authored
Feb 14, 2020
by
xukaiqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
7c5de387
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
10 deletions
+48
-10
RiskModelController.java
...oin/amos/fas/business/controller/RiskModelController.java
+0
-2
FmeaMapper.java
.../com/yeejoin/amos/fas/business/dao/mapper/FmeaMapper.java
+2
-0
RiskSourceMapper.java
...eejoin/amos/fas/business/dao/mapper/RiskSourceMapper.java
+3
-1
FmeaServiceImpl.java
...ejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
+2
-2
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+4
-4
dbTemplate_fmea.xml
...SysStart/src/main/resources/db/mapper/dbTemplate_fmea.xml
+20
-1
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+17
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskModelController.java
View file @
d78bf1ff
...
@@ -148,9 +148,7 @@ public class RiskModelController extends BaseController {
...
@@ -148,9 +148,7 @@ public class RiskModelController extends BaseController {
public
CommonResponse
deleteFmea
(
@ApiParam
(
value
=
"Fmea模型id"
,
required
=
true
)
@RequestBody
RiskFmeaParam
param
)
{
public
CommonResponse
deleteFmea
(
@ApiParam
(
value
=
"Fmea模型id"
,
required
=
true
)
@RequestBody
RiskFmeaParam
param
)
{
try
{
try
{
Long
[]
fmeaIds
=
param
.
getFmeaIds
();
Long
[]
fmeaIds
=
param
.
getFmeaIds
();
Long
riskSourceId
=
param
.
getRiskSourceId
();
fmeaService
.
deleteFmea
(
fmeaIds
);
fmeaService
.
deleteFmea
(
fmeaIds
);
fmeaService
.
updateRpniInfo
(
riskSourceId
);
if
(
fmeaIds
.
length
>
0
)
{
if
(
fmeaIds
.
length
>
0
)
{
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
for
(
Long
fmeaId
:
fmeaIds
)
{
for
(
Long
fmeaId
:
fmeaIds
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FmeaMapper.java
View file @
d78bf1ff
...
@@ -35,4 +35,6 @@ public interface FmeaMapper extends BaseMapper {
...
@@ -35,4 +35,6 @@ public interface FmeaMapper extends BaseMapper {
Fmea
getById
(
Long
id
);
Fmea
getById
(
Long
id
);
List
<
Fmea
>
listByRiskSourceId
(
Long
riskSourceId
);
List
<
Fmea
>
listByRiskSourceId
(
Long
riskSourceId
);
void
updateRpn
(
Fmea
fmea
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/RiskSourceMapper.java
View file @
d78bf1ff
...
@@ -49,7 +49,7 @@ public interface RiskSourceMapper extends BaseMapper {
...
@@ -49,7 +49,7 @@ public interface RiskSourceMapper extends BaseMapper {
//厂区rpn,重点设备个数,风险点个数,巡检点个数
//厂区rpn,重点设备个数,风险点个数,巡检点个数
Map
<
String
,
List
>
statistics3dCount
();
Map
<
String
,
List
>
statistics3dCount
();
//消防设备按分类统计个数
//消防设备按分类统计个数
List
<
Map
>
statisticsEquipClassify
();
List
<
Map
>
statisticsEquipClassify
();
...
@@ -93,4 +93,6 @@ public interface RiskSourceMapper extends BaseMapper {
...
@@ -93,4 +93,6 @@ public interface RiskSourceMapper extends BaseMapper {
List
<
Map
>
queryContingencyWater
();
List
<
Map
>
queryContingencyWater
();
List
<
Map
>
queryFmeaByPointId
(
@Param
(
"pointId"
)
Long
pointId
);
List
<
Map
>
queryFmeaByPointId
(
@Param
(
"pointId"
)
Long
pointId
);
void
updateRpn
(
RiskSource
riskSource
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
View file @
d78bf1ff
...
@@ -66,8 +66,8 @@ public class FmeaServiceImpl implements IFmeaService {
...
@@ -66,8 +66,8 @@ public class FmeaServiceImpl implements IFmeaService {
fmeas
.
forEach
(
fmea
->
{
fmeas
.
forEach
(
fmea
->
{
String
userId
=
paramMap
.
get
(
"user_id"
)
==
null
?
"0"
:
paramMap
.
get
(
"user_id"
).
toString
();
String
userId
=
paramMap
.
get
(
"user_id"
)
==
null
?
"0"
:
paramMap
.
get
(
"user_id"
).
toString
();
fmea
.
setCreateBy
(
Integer
.
parseInt
(
userId
));
fmea
.
setCreateBy
(
Integer
.
parseInt
(
userId
));
RiskSource
riskSource
=
iRiskSourceDao
.
findById
(
fmea
.
getRiskSourceId
());
//
RiskSource riskSource = iRiskSourceDao.findById(fmea.getRiskSourceId());
fmea
.
setRiskSource
(
riskSource
);
//
fmea.setRiskSource(riskSource);
iFmeaDao
.
save
(
fmea
);
iFmeaDao
.
save
(
fmea
);
//updateRpniInfo(fmea.getRiskSourceId());
//updateRpniInfo(fmea.getRiskSourceId());
});
});
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
d78bf1ff
...
@@ -1399,7 +1399,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1399,7 +1399,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
BigDecimal
sidValue
=
new
BigDecimal
(
fmea
.
getSidValue
());
BigDecimal
sidValue
=
new
BigDecimal
(
fmea
.
getSidValue
());
BigDecimal
didValue
=
new
BigDecimal
(
fmea
.
getDidValue
());
BigDecimal
didValue
=
new
BigDecimal
(
fmea
.
getDidValue
());
BigDecimal
rpni
=
oidValue
.
multiply
(
sidValue
).
multiply
(
didValue
);
BigDecimal
rpni
=
oidValue
.
multiply
(
sidValue
).
multiply
(
didValue
);
BigDecimal
rpn
=
null
;
BigDecimal
rpn
;
if
(
fmea
.
getNewEvaluationOid
()
==
null
)
{
if
(
fmea
.
getNewEvaluationOid
()
==
null
)
{
fmea
.
setNewEvaluationOid
(
fmea
.
getEvaluationOid
());
fmea
.
setNewEvaluationOid
(
fmea
.
getEvaluationOid
());
rpn
=
rpni
;
rpn
=
rpni
;
...
@@ -1410,7 +1410,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1410,7 +1410,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
fmea
.
setRpni
(
rpni
);
fmea
.
setRpni
(
rpni
);
fmea
.
setRpn
(
rpn
);
fmea
.
setRpn
(
rpn
);
iFmeaDao
.
save
(
fmea
);
fmeaMapper
.
updateRpn
(
fmea
);
saveRpnLog
(
fmea
.
getRiskSourceId
(),
fmeaId
,
rpn
,
rpni
);
saveRpnLog
(
fmea
.
getRiskSourceId
(),
fmeaId
,
rpn
,
rpni
);
this
.
notifyRiskSource
(
fmea
.
getRiskSourceId
());
this
.
notifyRiskSource
(
fmea
.
getRiskSourceId
());
}
}
...
@@ -1438,7 +1438,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1438,7 +1438,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
BigDecimal
rpn
=
newOidValue
.
multiply
(
sidValue
).
multiply
(
didValue
);
BigDecimal
rpn
=
newOidValue
.
multiply
(
sidValue
).
multiply
(
didValue
);
fmea
.
setRpn
(
rpn
);
fmea
.
setRpn
(
rpn
);
fmea
.
setNewEvaluationOid
(
oEvaluationModel
.
getId
());
fmea
.
setNewEvaluationOid
(
oEvaluationModel
.
getId
());
iFmeaDao
.
save
(
fmea
);
fmeaMapper
.
updateRpn
(
fmea
);
saveRpnLog
(
fmea
.
getRiskSourceId
(),
fmeaId
,
rpn
,
fmea
.
getRpni
());
saveRpnLog
(
fmea
.
getRiskSourceId
(),
fmeaId
,
rpn
,
fmea
.
getRpni
());
this
.
notifyRiskSource
(
fmea
.
getRiskSourceId
());
this
.
notifyRiskSource
(
fmea
.
getRiskSourceId
());
}
}
...
@@ -1550,7 +1550,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1550,7 +1550,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSource
.
setRpn
(
rpn
);
riskSource
.
setRpn
(
rpn
);
riskSource
.
setRpni
(
rpni
);
riskSource
.
setRpni
(
rpni
);
riskSource
.
setRiskLevelId
(
newLevel
.
getId
());
riskSource
.
setRiskLevelId
(
newLevel
.
getId
());
iRiskSourceDao
.
save
(
riskSource
);
riskSourceMapper
.
updateRpn
(
riskSource
);
}
}
}
}
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fmea.xml
View file @
d78bf1ff
...
@@ -43,6 +43,10 @@
...
@@ -43,6 +43,10 @@
fm.department_leader as departmentLeader,
fm.department_leader as departmentLeader,
fm.group_leader as groupLeader,
fm.group_leader as groupLeader,
fm.person_leader as personLeader,
fm.person_leader as personLeader,
(select name from s_user where id = fm.company_leader) as companyLeaderName,
(select name from s_user where id = fm.department_leader) as departmentLeaderName,
(select name from s_user where id = fm.group_leader) as groupLeaderName,
(select name from s_user where id = fm.person_leader) as personLeaderName,
rf.`name` AS riskFactorName,
rf.`name` AS riskFactorName,
fat.`name` AS accidentTypeName,
fat.`name` AS accidentTypeName,
fat.id AS accidentTypeId,
fat.id AS accidentTypeId,
...
@@ -123,5 +127,19 @@
...
@@ -123,5 +127,19 @@
a.risk_source_id = #{riskSourceId}
a.risk_source_id = #{riskSourceId}
</select>
</select>
<update
id=
"updateRpn"
>
update f_fmea
<set>
<if
test=
"rpn != null"
>
rpn = #{rpn},
</if>
<if
test=
"rpni != null"
>
rpni = #{rpni},
</if>
<if
test=
"newEvaluationOid != null"
>
new_evaluation_oid = #{newEvaluationOid},
</if>
</set>
where id = #{id}
</update>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
d78bf1ff
...
@@ -656,4 +656,20 @@
...
@@ -656,4 +656,20 @@
parent_id = #{riskSourceId}
parent_id = #{riskSourceId}
</select>
</select>
<update
id=
"updateRpn"
>
update f_risk_source
<set>
<if
test=
"rpn != null"
>
rpn = #{rpn},
</if>
<if
test=
"rpni != null"
>
rpni = #{rpni},
</if>
<if
test=
"riskLevelId != null"
>
risk_level_id = #{riskLevelId},
</if>
</set>
where id = #{id}
</update>
</mapper>
</mapper>
\ No newline at end of file
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