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
36087d9e
Commit
36087d9e
authored
Dec 09, 2020
by
zhengjiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql修改
parent
1f95e80a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
240 additions
and
222 deletions
+240
-222
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+158
-158
StationMaintenServiceImp.java
...s/fas/business/service/impl/StationMaintenServiceImp.java
+62
-62
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+7
-2
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+13
-0
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+0
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
36087d9e
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.business.bo.SafetyExecuteBo
;
import
com.yeejoin.amos.fas.business.vo.View3dNodeVo
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.fas.core.common.response.Node3DVoResponse
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
public
interface
View3dMapper
extends
BaseMapper
{
/**
* 按类型查询点
* @param type
* @param orgCode
* @return
*/
List
<
RegionTreeResponse
>
getPointByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"channelType"
)
String
channelType
);
/**
* 获取点详情
* @param type
* @param pointId
* @return map
*/
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
@Param
(
"type"
)
String
type
,
@Param
(
"pointId"
)
Long
pointId
);
/**
* 统计风险上升异常数量(风险点)-日期+机构
* @param param:{type,orgCode}
* @return Long
*/
Long
countUpperRiskPoint
(
Map
<
String
,
Object
>
param
);
/**
* 统计巡检异常数量(不合格、漏检)-日期+机构
* @param param{}
* @return Long
*/
Long
countCheckException
(
Map
<
String
,
Object
>
param
);
/**
* 统计故障告警数量(不合格、漏检)-日期+机构
* @param param
* @return
*/
Long
countFireException
(
Map
<
String
,
Object
>
param
);
/**
* 今日安全指数详情
* @param params orgCode,date
* @return list
*/
List
<
RiskPointRpnChangeBo
>
getAllErrorRiskPoint
(
Map
<
String
,
Object
>
params
);
/**
* 一周安全指数趋势查询
* @param orgCode
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getSafetyIndexWeek
(
@Param
(
"orgCode"
)
String
orgCode
);
/**
* 今日安全指数详情
* @param params orgCode,date
* @return list
*/
List
<
CheckErrorBo
>
getAllErrorPatrolPoint
(
Map
<
String
,
Object
>
params
);
/**
* 今日安全指数故障告警详情
* @param params orgCode,date
* @return list
*/
List
<
CheckErrorBo
>
getAllFaultAlarm
(
Map
<
String
,
Object
>
params
);
/**
* 今日巡检统计接口
* @param orgCode
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getStatisticsCheck
(
String
orgCode
);
/**
* 风险异常显示最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getRiskErrorTop5
(
String
orgCode
);
/**
* 巡检异常示最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getCheckErrorTop5
(
String
orgCode
);
/**
* 火灾告警最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getFireAlarmTop5
(
String
orgCode
);
/**
* 设备状态最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getEquipStatusTop5
(
String
orgCode
);
/**
* 按照类型查询点
* @param params {orgCode,type}
* @return 列表
*/
List
<
HashMap
<
String
,
Object
>>
getPintsByType
(
Map
<
String
,
Object
>
params
);
/**
* 更新safetyIndexchangelog
*/
void
safetyIndexRefresh
();
/**
* 重点模式设备
* @return
*/
List
<
View3dNodeVo
>
getImpEqu3dPoints
(
String
orgCode
);
/**
* 异常点
* @param type
* @param orgCode
* @param riskSourceId 区域id
* @return
*/
List
<
View3dNodeVo
>
initViewErrorNode
(
String
type
,
Long
riskSourceId
,
String
orgCode
);
List
<
Node3DVoResponse
>
findViewDataByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"riskSourceId"
)
Long
riskSourceId
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"abnormalStatus"
)
Boolean
abnormalStatus
);
Long
retrieveAllCount
(
String
type
,
Long
riskSourceId
,
String
inputText
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
List
<
HashMap
<
String
,
Object
>>
retrieveAll
(
String
type
,
Long
riskSourceId
,
String
inputText
,
long
start
,
int
length
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
/**
* 查询区域下点
* @param ids 区域ids
* @return list
*/
List
<
Map
<
String
,
Object
>>
getAllPointInRegions
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
}
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.business.bo.SafetyExecuteBo
;
import
com.yeejoin.amos.fas.business.vo.View3dNodeVo
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.fas.core.common.response.Node3DVoResponse
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
public
interface
View3dMapper
extends
BaseMapper
{
/**
* 按类型查询点
* @param type
* @param orgCode
* @return
*/
List
<
RegionTreeResponse
>
getPointByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"channelType"
)
String
channelType
);
/**
* 获取点详情
* @param type
* @param pointId
* @return map
*/
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
@Param
(
"type"
)
String
type
,
@Param
(
"pointId"
)
Long
pointId
);
/**
* 统计风险上升异常数量(风险点)-日期+机构
* @param param:{type,orgCode}
* @return Long
*/
Long
countUpperRiskPoint
(
Map
<
String
,
Object
>
param
);
/**
* 统计巡检异常数量(不合格、漏检)-日期+机构
* @param param{}
* @return Long
*/
Long
countCheckException
(
Map
<
String
,
Object
>
param
);
/**
* 统计故障告警数量(不合格、漏检)-日期+机构
* @param param
* @return
*/
Long
countFireException
(
Map
<
String
,
Object
>
param
);
/**
* 今日安全指数详情
* @param params orgCode,date
* @return list
*/
List
<
RiskPointRpnChangeBo
>
getAllErrorRiskPoint
(
Map
<
String
,
Object
>
params
);
/**
* 一周安全指数趋势查询
* @param orgCode
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getSafetyIndexWeek
(
@Param
(
"orgCode"
)
String
orgCode
);
/**
* 今日安全指数详情
* @param params orgCode,date
* @return list
*/
List
<
CheckErrorBo
>
getAllErrorPatrolPoint
(
Map
<
String
,
Object
>
params
);
/**
* 今日安全指数故障告警详情
* @param params orgCode,date
* @return list
*/
List
<
CheckErrorBo
>
getAllFaultAlarm
(
Map
<
String
,
Object
>
params
);
/**
* 今日巡检统计接口
* @param orgCode
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getStatisticsCheck
(
String
orgCode
);
/**
* 风险异常显示最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getRiskErrorTop5
(
String
orgCode
);
/**
* 巡检异常示最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getCheckErrorTop5
(
String
orgCode
);
/**
* 火灾告警最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getFireAlarmTop5
(
String
orgCode
);
/**
* 设备状态最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getEquipStatusTop5
(
String
orgCode
);
/**
* 按照类型查询点
* @param params {orgCode,type}
* @return 列表
*/
List
<
HashMap
<
String
,
Object
>>
getPintsByType
(
Map
<
String
,
Object
>
params
);
/**
* 更新safetyIndexchangelog
*/
void
safetyIndexRefresh
();
/**
* 重点模式设备
* @return
*/
List
<
View3dNodeVo
>
getImpEqu3dPoints
(
String
orgCode
);
/**
* 异常点
* @param type
* @param orgCode
* @param riskSourceId 区域id
* @return
*/
List
<
View3dNodeVo
>
initViewErrorNode
(
String
type
,
Long
riskSourceId
,
String
orgCode
);
List
<
Node3DVoResponse
>
findViewDataByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"riskSourceId"
)
Long
riskSourceId
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"abnormalStatus"
)
Boolean
abnormalStatus
);
Long
retrieveAllCount
(
String
type
,
Long
riskSourceId
,
String
inputText
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
List
<
HashMap
<
String
,
Object
>>
retrieveAll
(
String
type
,
Long
riskSourceId
,
String
inputText
,
long
start
,
int
length
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
/**
* 查询区域下点
* @param ids 区域ids
* @return list
*/
List
<
Map
<
String
,
Object
>>
getAllPointInRegions
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/StationMaintenServiceImp.java
View file @
36087d9e
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.fas.business.dao.repository.IStationMaintenDao
;
import
com.yeejoin.amos.fas.business.service.intfc.IStationMaintenService
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.dao.entity.StationInfo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.List
;
@Service
(
"stationMaintenService"
)
public
class
StationMaintenServiceImp
implements
IStationMaintenService
{
@Autowired
private
IStationMaintenDao
iStationMaintenDao
;
@Override
public
void
save
(
StationInfo
stationInfo
){
// 状态为启用(0)下只能修改换流站名称
if
(
stationInfo
.
getId
()
==
0
){
StringBuilder
stringBuilder
=
new
StringBuilder
();
stringBuilder
.
append
(
stationInfo
.
getUseType
());
stringBuilder
.
append
(
stationInfo
.
getRegionCode
());
stringBuilder
.
append
(
stationInfo
.
getCode
());
stationInfo
.
setStationCode
(
stringBuilder
.
toString
());
}
else
{
StationInfo
station
=
detail
();
// 判断状态是否切换
if
(!
station
.
getStatus
().
equals
(
stationInfo
.
getStatus
())){
StringBuilder
stringBuilder
=
new
StringBuilder
();
if
(
StringUtils
.
isEmpty
(
stationInfo
.
getRegionCode
())){
stringBuilder
.
append
(
station
.
getStationCode
());
}
else
{
stringBuilder
.
append
(
stationInfo
.
getUseType
());
stringBuilder
.
append
(
stationInfo
.
getRegionCode
());
stringBuilder
.
append
(
stationInfo
.
getCode
());
}
stationInfo
.
setStationCode
(
stringBuilder
.
toString
());
}
}
//保存
iStationMaintenDao
.
save
(
stationInfo
);
}
@Override
public
StationInfo
detail
(){
List
<
StationInfo
>
list
=
iStationMaintenDao
.
findAll
();
if
(
list
!=
null
&&
!
ObjectUtils
.
isEmpty
(
list
))
{
return
list
.
get
(
0
);
}
else
{
return
new
StationInfo
();
}
}
}
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.yeejoin.amos.fas.business.dao.repository.IStationMaintenDao
;
import
com.yeejoin.amos.fas.business.service.intfc.IStationMaintenService
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.dao.entity.StationInfo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.List
;
@Service
(
"stationMaintenService"
)
public
class
StationMaintenServiceImp
implements
IStationMaintenService
{
@Autowired
private
IStationMaintenDao
iStationMaintenDao
;
@Override
public
void
save
(
StationInfo
stationInfo
){
// 状态为启用(0)下只能修改换流站名称
if
(
stationInfo
.
getId
()
==
0
){
StringBuilder
stringBuilder
=
new
StringBuilder
();
stringBuilder
.
append
(
stationInfo
.
getUseType
());
stringBuilder
.
append
(
stationInfo
.
getRegionCode
());
stringBuilder
.
append
(
stationInfo
.
getCode
());
stationInfo
.
setStationCode
(
stringBuilder
.
toString
());
}
else
{
StationInfo
station
=
detail
();
// 判断状态是否切换
if
(!
station
.
getStatus
().
equals
(
stationInfo
.
getStatus
())){
StringBuilder
stringBuilder
=
new
StringBuilder
();
if
(
StringUtils
.
isEmpty
(
stationInfo
.
getRegionCode
())){
stringBuilder
.
append
(
station
.
getStationCode
());
}
else
{
stringBuilder
.
append
(
stationInfo
.
getUseType
());
stringBuilder
.
append
(
stationInfo
.
getRegionCode
());
stringBuilder
.
append
(
stationInfo
.
getCode
());
}
stationInfo
.
setStationCode
(
stringBuilder
.
toString
());
}
}
//保存
iStationMaintenDao
.
save
(
stationInfo
);
}
@Override
public
StationInfo
detail
(){
List
<
StationInfo
>
list
=
iStationMaintenDao
.
findAll
();
if
(
list
!=
null
&&
!
ObjectUtils
.
isEmpty
(
list
))
{
return
list
.
get
(
0
);
}
else
{
return
new
StationInfo
();
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
36087d9e
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.service.impl;
import
java.math.BigDecimal
;
import
java.net.InetAddress
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
...
...
@@ -133,6 +134,10 @@ public class View3dServiceImpl implements IView3dService {
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Value
(
"${station.equipment.code}"
)
private
String
equipmentCode
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
CommonResponse
setPoint3dPosition
(
List
<
BindPointBo
>
pointBoList
)
{
...
...
@@ -547,7 +552,7 @@ public class View3dServiceImpl implements IView3dService {
@Override
public
List
<
View3dNodeVo
>
initViewErrorNode
(
String
type
,
Long
riskSourceId
,
String
orgCode
)
{
return
view3dMapper
.
initViewErrorNode
(
type
,
riskSourceId
,
orgCode
);
return
view3dMapper
.
initViewErrorNode
(
type
,
riskSourceId
,
orgCode
);
}
@Override
...
...
@@ -611,7 +616,7 @@ public class View3dServiceImpl implements IView3dService {
@Override
public
CommonResponse
retrieveAll
(
String
type
,
String
riskSourceId
,
String
inputText
,
int
current
,
int
pageSize
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
,
String
token
,
String
appKey
,
String
product
)
{
CommonPageable
pageable
=
new
CommonPageable
(
current
,
pageSize
);
CommonPageable
pageable
=
new
CommonPageable
(
current
,
pageSize
);
Long
riskSource
=
StringUtils
.
isEmpty
(
riskSourceId
)
?
null
:
Long
.
parseLong
(
riskSourceId
);
Long
count
=
view3dMapper
.
retrieveAllCount
(
type
,
riskSource
,
inputText
,
orgCode
,
dataLevel
,
protectObjName
);
List
<
HashMap
<
String
,
Object
>>
retrieveAll
=
view3dMapper
.
retrieveAll
(
type
,
riskSource
,
inputText
,
pageable
.
getOffset
(),
pageable
.
getPageSize
(),
orgCode
,
dataLevel
,
protectObjName
);
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
36087d9e
...
...
@@ -76,3 +76,16 @@ file.downLoad.url=http://39.98.246.31:8888/
#站端名称使用全拼
station.name
=
yinan
#查询装备分类
#消防车:2101
#灭火器:3104
#消火栓:3105
#探测器:8501
#消防小室:9301
#消防水池:9302
#消防泡沫间:9305
#消防视频:xfsp
station.equipment.code
=
2101,3104,3105,8501,9301,9302,9305,xfsp
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
36087d9e
This diff is collapsed.
Click to expand it.
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