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
a361df30
Commit
a361df30
authored
Feb 05, 2020
by
xukaiqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加风险点校验接口
parent
d75f26fa
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
324 additions
and
289 deletions
+324
-289
RiskModelController.java
...oin/amos/fas/business/controller/RiskModelController.java
+138
-134
RiskSourceMapper.java
...eejoin/amos/fas/business/dao/mapper/RiskSourceMapper.java
+58
-57
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+15
-1
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+100
-96
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+1
-1
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+12
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskModelController.java
View file @
a361df30
...
@@ -21,8 +21,8 @@ import org.slf4j.Logger;
...
@@ -21,8 +21,8 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
...
@@ -34,139 +34,143 @@ import java.util.List;
...
@@ -34,139 +34,143 @@ import java.util.List;
@RestController
@RestController
@RequestMapping
(
"/api/riskModel"
)
@RequestMapping
(
"/api/riskModel"
)
@Api
(
tags
=
"风险模型api"
)
@Api
(
tags
=
"风险模型api"
)
public
class
RiskModelController
extends
BaseController
{
public
class
RiskModelController
extends
BaseController
{
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
RiskLevelController
.
class
);
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
RiskLevelController
.
class
);
@Autowired
@Autowired
private
IRiskSourceService
riskSourceService
;
private
IRiskSourceService
riskSourceService
;
@Autowired
@Autowired
private
IFmeaService
fmeaService
;
private
IFmeaService
fmeaService
;
@ApiOperation
(
value
=
"根据父类编号获取子类风险点类型"
,
notes
=
"根据父类编号获取子类风险点类型"
)
@GetMapping
(
value
=
"/riskSource/getChildTypeByPid"
)
public
CommonResponse
getChildTypeByPid
(
@ApiParam
(
value
=
"风险模型对象"
,
required
=
true
)
@RequestParam
Long
riskSourceId
)
{
/**
try
{
* 风险模型新增及维护
Integer
type
=
riskSourceService
.
getChildTypeByPid
(
riskSourceId
);
* @param param
return
CommonResponseUtil
.
success
(
type
);
* @return
}
catch
(
Exception
e
)
{
*/
log
.
error
(
"根据父类编号获取子类风险点类型异常"
,
e
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"风险模型新增及维护"
,
notes
=
"风险模型新增及维护"
)
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
@RequestMapping
(
value
=
"/riskSource/editRiskSource"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
}
public
CommonResponse
editRiskSource
(
@ApiParam
(
value
=
"风险模型对象"
,
required
=
true
)
@RequestBody
RiskSource
param
)
{
}
try
{
User
user
=
getUserInfo
();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
/**
map
.
put
(
"org_code"
,
user
.
getOrgCode
());
* 风险模型新增及维护
map
.
put
(
"user_id"
,
user
.
getId
());
*/
map
.
put
(
"param"
,
param
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"风险模型新增及维护"
,
notes
=
"风险模型新增及维护"
)
riskSourceService
.
editRiskSource
(
map
);
@RequestMapping
(
value
=
"/riskSource/editRiskSource"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
return
CommonResponseUtil
.
success
();
public
CommonResponse
editRiskSource
(
@ApiParam
(
value
=
"风险模型对象"
,
required
=
true
)
@RequestBody
RiskSource
param
)
{
}
catch
(
Exception
e
)
{
try
{
log
.
error
(
e
.
getMessage
(),
e
);
Integer
type
=
riskSourceService
.
getChildTypeByPid
(
param
.
getParentId
());
return
CommonResponseUtil
.
failure
(
"风险模型新增及维护失败:"
+
e
.
getMessage
());
String
isRegion
=
param
.
getIsRegion
();
}
if
(
type
.
equals
(
1
)
&&
isRegion
.
equals
(
"FALSE"
))
{
}
return
CommonResponseUtil
.
failure
(
"该区域下只能添加区域"
);
}
/**
if
(
type
.
equals
(
2
)
&&
isRegion
.
equals
(
"TRUE"
))
{
* 风险模型删除
return
CommonResponseUtil
.
failure
(
"该区域下只能添加风险点"
);
* @param param
}
* @return
User
user
=
getUserInfo
();
*/
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"风险模型删除"
,
notes
=
"风险模型删除"
)
map
.
put
(
"org_code"
,
user
.
getOrgCode
());
@Authorization
(
ingore
=
true
)
map
.
put
(
"user_id"
,
user
.
getId
());
@RequestMapping
(
value
=
"/riskSource/deleteRiskSource"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
map
.
put
(
"param"
,
param
);
public
CommonResponse
deleteRiskSource
(
@ApiParam
(
value
=
"风险模型id"
,
required
=
true
)
@RequestBody
Long
[]
riskSourceId
)
{
riskSourceService
.
editRiskSource
(
map
);
try
{
return
CommonResponseUtil
.
success
();
riskSourceService
.
deleteRiskSource
(
riskSourceId
);
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
success
();
log
.
error
(
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
failure
(
"风险模型新增及维护失败:"
+
e
.
getMessage
());
log
.
error
(
e
.
getMessage
(),
e
);
}
return
CommonResponseUtil
.
failure
(
"风险模型删除失败:"
+
e
.
getMessage
());
}
}
}
/**
* 风险模型删除
/**
*/
* 风险点列表分页查询
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"风险模型删除"
,
notes
=
"风险模型删除"
)
*
@Authorization
(
ingore
=
true
)
* @param id
@RequestMapping
(
value
=
"/riskSource/deleteRiskSource"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
* @return
public
CommonResponse
deleteRiskSource
(
@ApiParam
(
value
=
"风险模型id"
,
required
=
true
)
@RequestBody
Long
[]
riskSourceId
)
{
*/
try
{
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"风险点列表分页查询"
,
notes
=
"风险点列表分页查询"
)
riskSourceService
.
deleteRiskSource
(
riskSourceId
);
@RequestMapping
(
value
=
"/riskSource/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
return
CommonResponseUtil
.
success
();
public
CommonResponse
queryRiskSourceByPage
(
}
catch
(
Exception
e
)
{
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
log
.
error
(
e
.
getMessage
(),
e
);
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
return
CommonResponseUtil
.
failure
(
"风险模型删除失败:"
+
e
.
getMessage
());
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
}
Page
<
HashMap
<
String
,
Object
>>
riskSourceList
=
riskSourceService
.
queryRiskSourceByPage
(
param
);
}
return
CommonResponseUtil
.
success
(
riskSourceList
);
}
/**
* 风险点列表分页查询
/**
*/
* Fmea模型新增及维护
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"风险点列表分页查询"
,
notes
=
"风险点列表分页查询"
)
* @param param
@RequestMapping
(
value
=
"/riskSource/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
* @return
public
CommonResponse
queryRiskSourceByPage
(
*/
@ApiParam
(
value
=
"查询条件"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"Fmea模型新增及维护"
,
notes
=
"Fmea模型新增及维护"
)
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
@RequestMapping
(
value
=
"/fmea/editFmea"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
public
CommonResponse
editFmea
(
@ApiParam
(
value
=
"Fmea模型对象"
,
required
=
true
)
@RequestBody
Fmea
param
)
{
Page
<
HashMap
<
String
,
Object
>>
riskSourceList
=
riskSourceService
.
queryRiskSourceByPage
(
param
);
try
{
return
CommonResponseUtil
.
success
(
riskSourceList
);
User
user
=
getUserInfo
();
}
HashMap
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"user_id"
,
user
.
getId
());
/**
map
.
put
(
"fmea"
,
param
);
* Fmea模型新增及维护
fmeaService
.
editFmea
(
map
);
*/
RsDataQueue
rs
=
RsDataQueue
.
getInstance
();
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"Fmea模型新增及维护"
,
notes
=
"Fmea模型新增及维护"
)
if
(!
ObjectUtils
.
isEmpty
(
param
.
getRiskSourceId
()))
{
@RequestMapping
(
value
=
"/fmea/editFmea"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
rs
.
add
(
param
.
getRiskSourceId
());
public
CommonResponse
editFmea
(
@ApiParam
(
value
=
"Fmea模型对象"
,
required
=
true
)
@RequestBody
Fmea
param
)
{
}
try
{
User
user
=
getUserInfo
();
return
CommonResponseUtil
.
success
();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
}
catch
(
Exception
e
)
{
map
.
put
(
"user_id"
,
user
.
getId
());
log
.
error
(
e
.
getMessage
(),
e
);
map
.
put
(
"fmea"
,
param
);
return
CommonResponseUtil
.
failure
(
"Fmea模型新增及维护失败:"
+
e
.
getMessage
());
fmeaService
.
editFmea
(
map
);
}
RsDataQueue
rs
=
RsDataQueue
.
getInstance
();
}
if
(!
ObjectUtils
.
isEmpty
(
param
.
getRiskSourceId
()))
{
rs
.
add
(
param
.
getRiskSourceId
());
/**
}
* Fmea模型删除
* @param param
return
CommonResponseUtil
.
success
();
* @return
}
catch
(
Exception
e
)
{
*/
log
.
error
(
e
.
getMessage
(),
e
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"Fmea模型删除"
,
notes
=
"Fmea模型删除"
)
return
CommonResponseUtil
.
failure
(
"Fmea模型新增及维护失败:"
+
e
.
getMessage
());
@RequestMapping
(
value
=
"/fmea/deleteFmea"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
}
public
CommonResponse
deleteFmea
(
@ApiParam
(
value
=
"Fmea模型id"
,
required
=
true
)
@RequestBody
RiskFmeaParam
param
)
{
}
try
{
Long
[]
fmeaIds
=
param
.
getFmeaIds
();
/**
Long
riskSourceId
=
param
.
getRiskSourceId
();
* Fmea模型删除
fmeaService
.
deleteFmea
(
fmeaIds
);
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"Fmea模型删除"
,
notes
=
"Fmea模型删除"
)
fmeaService
.
updateRpniInfo
(
riskSourceId
);
@RequestMapping
(
value
=
"/fmea/deleteFmea"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
RsDataQueue
rs
=
RsDataQueue
.
getInstance
();
public
CommonResponse
deleteFmea
(
@ApiParam
(
value
=
"Fmea模型id"
,
required
=
true
)
@RequestBody
RiskFmeaParam
param
)
{
if
(!
ObjectUtils
.
isEmpty
(
riskSourceId
))
{
try
{
rs
.
add
(
riskSourceId
);
Long
[]
fmeaIds
=
param
.
getFmeaIds
();
}
Long
riskSourceId
=
param
.
getRiskSourceId
();
return
CommonResponseUtil
.
success
();
fmeaService
.
deleteFmea
(
fmeaIds
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
fmeaService
.
updateRpniInfo
(
riskSourceId
);
return
CommonResponseUtil
.
failure
(
"Fmea模型删除失败:"
+
e
.
getMessage
());
RsDataQueue
rs
=
RsDataQueue
.
getInstance
();
}
if
(!
ObjectUtils
.
isEmpty
(
riskSourceId
))
{
}
rs
.
add
(
riskSourceId
);
}
/**
return
CommonResponseUtil
.
success
();
* Fmea列表分页查询
}
catch
(
Exception
e
)
{
*
log
.
error
(
e
.
getMessage
(),
e
);
* @param id
return
CommonResponseUtil
.
failure
(
"Fmea模型删除失败:"
+
e
.
getMessage
());
* @return
}
*/
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"Fmea列表分页查询"
,
notes
=
"Fmea列表分页查询"
)
@RequestMapping
(
value
=
"/fmea/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
/**
public
CommonResponse
queryFmeaByPage
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
* Fmea列表分页查询
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
*/
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"Fmea列表分页查询"
,
notes
=
"Fmea列表分页查询"
)
Page
<
HashMap
<
String
,
Object
>>
fmeaList
=
fmeaService
.
queryFmeaList
(
param
);
@RequestMapping
(
value
=
"/fmea/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
return
CommonResponseUtil
.
success
(
fmeaList
);
public
CommonResponse
queryFmeaByPage
(
@ApiParam
(
value
=
"查询条件"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
}
@ApiParam
(
value
=
"分页参数"
,
required
=
true
)
CommonPageable
commonPageable
)
{
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
HashMap
<
String
,
Object
>>
fmeaList
=
fmeaService
.
queryFmeaList
(
param
);
return
CommonResponseUtil
.
success
(
fmeaList
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/RiskSourceMapper.java
View file @
a361df30
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.RiskSourceParam
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
public
interface
RiskSourceMapper
extends
BaseMapper
{
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
/**
import
com.yeejoin.amos.fas.business.param.RiskSourceParam
;
* 风险点查询,分页查询统计用
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
*
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
* @param param
* @return
*/
long
countPageData
(
CommonPageInfoParam
param
);
/**
* 风险点分页查询queryForRiskSourceLevel
*
* @param param
* @return
*/
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceByPage
(
CommonPageInfoParam
param
);
public
interface
RiskSourceMapper
extends
BaseMapper
{
/**
List
<
Map
>
queryForRegion
();
* 风险点查询,分页查询统计用
* @param param
* @return
*/
long
countPageData
(
CommonPageInfoParam
param
);
/**
* 风险点分页查询queryForRiskSourceLevel
* @param param
* @return
*/
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceByPage
(
CommonPageInfoParam
param
);
List
<
Map
>
queryRPNReport
();
List
<
Map
>
queryForRegion
(
);
Map
queryForRiseUp
(
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
List
<
Map
>
queryRPNReport
(
);
Long
countByParentIdAndIsRegion
(
@Param
(
"riskSourceId"
)
Long
riskSourceId
,
@Param
(
"isRegion"
)
String
isRegion
);
Map
queryForRiseUp
(
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
List
<
Map
>
queryForMatrix
(
);
List
<
RiskSourceTreeResponse
>
getRiskSources
();
List
<
Map
>
queryForMatrix
();
List
<
RiskSourceTreeResponse
>
getRiskSourcesEquipment
();
List
<
RiskSourceTreeResponse
>
getRiskSources
();
List
<
RiskSourceTreeResponse
>
getRiskSourcesEquipment
();
List
<
HashMap
<
String
,
Object
>>
getRiskSourcePoints
(
RiskSourceParam
param
);
long
getRiskSourcePointCount
(
RiskSourceParam
param
);
List
<
HashMap
<
String
,
Object
>>
getRiskSourcePoints
(
RiskSourceParam
param
);
long
getRiskSourcePointCount
(
RiskSourceParam
param
);
List
<
RiskSource
>
queryByFireEqument
(
@Param
(
"fireEquipmentId"
)
Long
fireEquipmentId
);
List
<
RiskSource
>
queryByPoint
(
@Param
(
"pointId"
)
Long
poi
ntId
);
List
<
RiskSource
>
queryByFireEqument
(
@Param
(
"fireEquipmentId"
)
Long
fireEquipme
ntId
);
List
<
RiskSource
>
queryByPoint
(
@Param
(
"pointId"
)
Long
pointId
);
//厂区rpn,重点设备个数,风险点个数,巡检点个数
Map
statistics3dCount
();
//消防设备按分类统计
个数
//厂区rpn,重点设备个数,风险点个数,巡检点
个数
List
<
Map
>
statisticsEquipClassify
();
Map
statistics3dCount
();
//风险点按级别
统计个数
//消防设备按分类
统计个数
List
<
Map
>
statisticsRiskLevel
();
List
<
Map
>
statisticsEquipClassify
();
//巡检点按状态
统计个数
//风险点按级别
统计个数
List
<
Map
>
statisticsPointStatus
();
List
<
Map
>
statisticsRiskLevel
();
//巡检点按状态统计个数
List
<
Map
>
statisticsPointStatus
();
RiskSourceTreeResponse
findRiskSourceDetatil
(
@Param
(
"id"
)
Long
id
);
RiskSourceTreeResponse
findRiskSourceDetatil
(
@Param
(
"id"
)
Long
id
);
//风险点详情和级别
Map
queryForRiskSourceLevel
(
@Param
(
"riskSourceId"
)
Long
riskSourceId
);
//风险点详情和级别
Map
queryForRiskSourceLevel
(
@Param
(
"riskSourceId"
)
Long
riskSourceId
);
List
<
Map
>
queryForUnqualified
(
@Param
(
"riskSourceId"
)
Long
riskSourceId
);
List
<
Map
>
queryForUnqualified
(
@Param
(
"riskSourceId"
)
Long
riskSourceId
);
/**
* 子节点的rpni
*
* @param parentId
* @return
*/
List
<
Map
<
String
,
BigDecimal
>>
queryForRiskSourceRpni
(
@Param
(
"parentId"
)
Long
parentId
);
/**
List
<
HashMap
<
String
,
Object
>>
queryRiskAreaRpn
();
* 子节点的rpni
* @param parentId
* @return
*/
List
<
Map
<
String
,
BigDecimal
>>
queryForRiskSourceRpni
(
@Param
(
"parentId"
)
Long
parentId
);
List
<
HashMap
<
String
,
Object
>>
queryRiskAreaRpn
();
List
<
RiskSource
>
queryByFactor
(
@Param
(
"factorId"
)
Long
factorId
);
List
<
RiskSource
>
queryByFactor
(
@Param
(
"factorId"
)
Long
factorId
);
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
();
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
();
List
<
RiskSourceTreeResponse
>
getRiskSourcesFireEquipmentByType
(
@Param
(
"type"
)
String
[]
type
);
List
<
RiskSourceTreeResponse
>
getRiskSourcesFireEquipmentByType
(
@Param
(
"type"
)
String
[]
type
);
List
<
RiskSourceTreeResponse
>
getCheckPointRiskSource
();
List
<
RiskSourceTreeResponse
>
getCheckPointRiskSource
();
List
<
Map
>
queryContingencyWater
();
List
<
Map
>
queryContingencyWater
();
List
<
Map
>
queryFmeaByPointId
(
@Param
(
"pointId"
)
Long
pointId
);
List
<
Map
>
queryFmeaByPointId
(
@Param
(
"pointId"
)
Long
pointId
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
a361df30
...
@@ -1142,7 +1142,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1142,7 +1142,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
private
void
saveFireEquipmentData
(
FireEquipmentPoint
fireEquipmentPoint
,
AlarmParam
deviceData
,
String
fireEquipmentPointType
)
{
private
void
saveFireEquipmentData
(
FireEquipmentPoint
fireEquipmentPoint
,
AlarmParam
deviceData
,
String
fireEquipmentPointType
)
{
FireEquipmentData
fireEquipmentData
=
new
FireEquipmentData
();
FireEquipmentData
fireEquipmentData
=
new
FireEquipmentData
();
fireEquipmentData
.
setEqPointCode
(
deviceData
.
getPointCode
());
fireEquipmentData
.
setEqPointCode
(
deviceData
.
getPointCode
());
...
@@ -1344,4 +1343,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1344,4 +1343,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
public
List
<
Map
>
queryFmeaByPointId
(
Long
pointId
)
{
public
List
<
Map
>
queryFmeaByPointId
(
Long
pointId
)
{
return
riskSourceMapper
.
queryFmeaByPointId
(
pointId
);
return
riskSourceMapper
.
queryFmeaByPointId
(
pointId
);
}
}
@Override
public
Integer
getChildTypeByPid
(
Long
riskSourceId
)
{
Long
regionCount
=
riskSourceMapper
.
countByParentIdAndIsRegion
(
riskSourceId
,
"TRUE"
);
if
(!
regionCount
.
equals
(
0L
))
{
//子节点有风险区域
return
1
;
}
Long
pointCount
=
riskSourceMapper
.
countByParentIdAndIsRegion
(
riskSourceId
,
"FALSE"
);
if
(!
pointCount
.
equals
(
0L
))
{
//子节点有风险点
return
2
;
}
return
3
;
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskSourceService.java
View file @
a361df30
...
@@ -21,145 +21,149 @@ import java.util.Map;
...
@@ -21,145 +21,149 @@ import java.util.Map;
public
interface
IRiskSourceService
{
public
interface
IRiskSourceService
{
/**
/**
* 新增及维护风险点
* 新增及维护风险点
*
*
* @param map
* @param map
* @return
* @return
*/
*/
RiskSource
editRiskSource
(
HashMap
<
String
,
Object
>
map
)
throws
Exception
;
RiskSource
editRiskSource
(
HashMap
<
String
,
Object
>
map
)
throws
Exception
;
/**
/**
* 删除风险点
* 删除风险点
*
*
* @param riskSourceId
* @param riskSourceId
*/
*/
void
deleteRiskSource
(
Long
[]
riskSourceId
)
throws
Exception
;
void
deleteRiskSource
(
Long
[]
riskSourceId
)
throws
Exception
;
/**
/**
* 根据参数分页查询风险点信息
* 根据参数分页查询风险点信息
*
*
* @param param
* @param param
* @return
* @return
*/
*/
Page
<
HashMap
<
String
,
Object
>>
queryRiskSourceByPage
(
CommonPageInfoParam
param
);
Page
<
HashMap
<
String
,
Object
>>
queryRiskSourceByPage
(
CommonPageInfoParam
param
);
List
<
Map
>
queryForRegion
();
List
<
Map
>
queryForRegion
(
);
List
<
Map
>
queryRPNReport
(
);
List
<
Map
>
queryRPNReport
();
/**
* 上升率
*
* @return
*/
Map
queryForRiseUp
()
throws
Exception
;
/**
* 上升率
* @return
*/
Map
queryForRiseUp
()
throws
Exception
;
List
<
Map
>
queryForMatrix
();
List
<
Map
>
queryForMatrix
();
/**
* 获取所有风险点
/**
*
* 获取所有风险点
* @return
* @return
*/
*/
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
();
List
<
RiskSourceTreeResponse
>
findRiskSourceTrees
();
List
<
RiskSourceEquipment
>
bindFireEquiment
(
Long
riskSourceId
,
List
<
RiskSourceEquipment
>
riskSourceEquipments
);
List
<
RiskSourceEquipment
>
bindFireEquiment
(
Long
riskSourceId
,
List
<
RiskSourceEquipment
>
riskSourceEquipments
);
String
[]
removeBoundRelation
(
String
[]
idArray
);
String
[]
removeBoundRelation
(
String
[]
idArray
);
//解除绑定
/**
* 查询所有已绑定的关系列表
*
* @param riskSourceId
* @return
*/
Page
queryForView
(
CommonPageable
commonPageable
,
String
riskSourceId
);
//解除绑定
/**
* 查询指定风险点和设备之间的关系,包含绑定和未绑定
*
* @param equipmentId
* @return
*/
Page
queryEquimentRelation
(
CommonPageable
commonPageable
,
String
riskSourceId
,
String
equipmentId
,
String
fname
);
/**
/**
* 查询所有已绑定的关系列表
* 获取
* @param riskSourceId
*
* @return
* @param param
*/
* @return
Page
queryForView
(
CommonPageable
commonPageable
,
String
riskSourceId
);
*/
Page
<
HashMap
<
String
,
Object
>>
getRiskSourcePoints
(
RiskSourceParam
param
);
/**
* 查询指定风险点和设备之间的关系,包含绑定和未绑定
* @param equipmentId
* @return
*/
Page
queryEquimentRelation
(
CommonPageable
commonPageable
,
String
riskSourceId
,
String
equipmentId
,
String
fname
);
/**
* 获取
* @param param
* @return
*/
Page
<
HashMap
<
String
,
Object
>>
getRiskSourcePoints
(
RiskSourceParam
param
);
/**
/**
* 绑定巡检点检查项
* 绑定巡检点检查项
* @param riskSourceId
*
* @param pointInputitems
* @param riskSourceId
* @return
* @param pointInputitems
*/
* @return
List
<
RiskSourcePointInputitem
>
bindPointInputitem
(
Long
riskSourceId
,
List
<
RiskSourcePointInputitem
>
pointInputitems
);
*/
List
<
RiskSourcePointInputitem
>
bindPointInputitem
(
Long
riskSourceId
,
List
<
RiskSourcePointInputitem
>
pointInputitems
);
/**
/**
* 处理巡检数据和设备数据
* 处理巡检数据和设备数据
* @param deviceData
*
*/
* @param deviceData
String
processFireEqumtData
(
FireEquimentDataRo
deviceData
)
throws
Exception
;
*/
String
processFireEqumtData
(
FireEquimentDataRo
deviceData
)
throws
Exception
;
boolean
processTaskData
(
ProtalDataRo
taskData
)
throws
Exception
;
boolean
processTaskData
(
ProtalDataRo
taskData
)
throws
Exception
;
/**
* 删除风险点巡检点检查项
*/
void
removeByRSIdAndPId
(
List
<
HashMap
<
String
,
String
>>
list
);
/**
* 删除风险点巡检点检查项
*
*/
void
removeByRSIdAndPId
(
List
<
HashMap
<
String
,
String
>>
list
);
boolean
processProtalData
(
ProtalDataRo
protalData
)
throws
Exception
;
boolean
processProtalData
(
ProtalDataRo
protalData
)
throws
Exception
;
RiskSourceTreeResponse
queryRiskSourceDetailById
(
Long
id
)
;
RiskSourceTreeResponse
queryRiskSourceDetailById
(
Long
id
);
/**
* 三维图统计
*
* @return
*/
Map
queryFor3DStatistics
();
/**
* 三维图统计
* @return
*/
Map
queryFor3DStatistics
();
Map
earlyWarning
(
Long
riskSourceId
);
Map
earlyWarning
(
Long
riskSourceId
);
BigDecimal
updateRiskSourceRpni
(
Long
riskSourceId
)
throws
Exception
;
BigDecimal
updateRiskSourceRpni
(
Long
riskSourceId
)
throws
Exception
;
List
<
HashMap
<
String
,
Object
>>
queryRiskAreaRpn
();
List
<
HashMap
<
String
,
Object
>>
queryRiskAreaRpn
();
String
processFireEqumtData
(
AlarmParam
deviceData
)
throws
Exception
;
String
processFireEqumtData
(
AlarmParam
deviceData
)
throws
Exception
;
void
saveData
(
List
<
AlarmParam
>
deviceDatas
,
String
type
);
void
saveData
(
List
<
AlarmParam
>
deviceDatas
,
String
type
);
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
();
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
();
List
<
RiskSourceTreeResponse
>
findRiskSourceEquipStatistics
();
List
<
RiskSourceTreeResponse
>
findRiskSourceEquipStatistics
();
List
<
RiskSourceTreeResponse
>
findRiskSourceEquipStatistics
(
String
[]
type
);
List
<
RiskSourceTreeResponse
>
findRiskSourceEquipStatistics
(
String
[]
type
);
List
<
RiskSourceTreeResponse
>
getCheckPointRiskSources
();
List
<
RiskSourceTreeResponse
>
getCheckPointRiskSources
();
void
queryContingencyDeviceStatus
(
ContingencyDeviceStatus
contingencyDeviceStatus
);
void
queryContingencyDeviceStatus
(
ContingencyDeviceStatus
contingencyDeviceStatus
);
List
<
Map
>
queryContingencyWater
();
List
<
Map
>
queryContingencyWater
();
List
<
Map
>
queryFmeaByPointId
(
Long
pointId
);
List
<
Map
>
queryFmeaByPointId
(
Long
pointId
);
Integer
getChildTypeByPid
(
Long
riskSourceId
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
a361df30
spring.application.name
=
Amos-autosys-
tb
spring.application.name
=
Amos-autosys-
xkq
#environment
#environment
spring.profiles.active
=
dev
spring.profiles.active
=
dev
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
a361df30
...
@@ -645,4 +645,15 @@
...
@@ -645,4 +645,15 @@
EXISTS ( SELECT 1 FROM f_risk_source_point_inputitem frspi WHERE frspi.risk_source_id = frs.id AND frspi.point_id = ${pointId} )
EXISTS ( SELECT 1 FROM f_risk_source_point_inputitem frspi WHERE frspi.risk_source_id = frs.id AND frspi.point_id = ${pointId} )
</select>
</select>
<select
id=
"countByParentIdAndIsRegion"
resultType=
"long"
>
select
count(1)
from
f_risk_source
where
is_region = #{isRegion}
and
parent_id = #{riskSourceId}
</select>
</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