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
f72c369e
Commit
f72c369e
authored
Apr 22, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
冲突
parents
003010c6
87a2f8e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
531 additions
and
34 deletions
+531
-34
RpnChangeTypeEum.java
...a/com/yeejoin/amos/fas/common/enums/RpnChangeTypeEum.java
+40
-0
StatisticsErrorTypeEum.java
...yeejoin/amos/fas/common/enums/StatisticsErrorTypeEum.java
+55
-0
RiskPointRpnChangeBo.java
...om/yeejoin/amos/fas/business/bo/RiskPointRpnChangeBo.java
+43
-0
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+16
-7
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+38
-2
IRiskSourceDao.java
...join/amos/fas/business/dao/repository/IRiskSourceDao.java
+1
-1
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+116
-17
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+40
-0
ErrorContentVo.java
...java/com/yeejoin/amos/fas/business/vo/ErrorContentVo.java
+32
-0
SafetyIndexDetailVo.java
...com/yeejoin/amos/fas/business/vo/SafetyIndexDetailVo.java
+45
-0
TodaySafetyIndexVo.java
.../com/yeejoin/amos/fas/business/vo/TodaySafetyIndexVo.java
+48
-0
application-docker.properties
...SysStart/src/main/resources/application-docker.properties
+6
-6
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+51
-1
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/RpnChangeTypeEum.java
0 → 100644
View file @
f72c369e
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
/**
* @author suhg
*/
public
enum
RpnChangeTypeEum
{
/**
* rpn 上升
*/
upper
(
"上升"
,
0
),
/**
* rpn 下降
*/
down
(
"下降"
,
1
);
private
String
label
;
private
int
value
;
RpnChangeTypeEum
(
String
label
,
int
value
){
this
.
label
=
label
;
this
.
value
=
value
;
}
public
String
getLabel
()
{
return
label
;
}
public
void
setLabel
(
String
label
)
{
this
.
label
=
label
;
}
public
int
getValue
()
{
return
value
;
}
public
void
setValue
(
int
value
)
{
this
.
value
=
value
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/StatisticsErrorTypeEum.java
0 → 100644
View file @
f72c369e
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
/**
* @author suhg
*/
public
enum
StatisticsErrorTypeEum
{
/**
* 风险异常
*/
risk
(
"risk"
,
"风险异常"
),
/**
* 巡检异常
*/
patrol
(
"patrol"
,
"巡检异常"
),
/**
* 设备故障
*/
equip
(
"equip"
,
"设备故障"
),
/**
* 火灾告警
*/
fire
(
"fire"
,
"火灾告警"
);
/**
* 编号
*/
private
String
code
;
/**
* 名称
*/
private
String
name
;
StatisticsErrorTypeEum
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/bo/RiskPointRpnChangeBo.java
0 → 100644
View file @
f72c369e
package
com
.
yeejoin
.
amos
.
fas
.
business
.
bo
;
/**
* @author suhg
*/
public
class
RiskPointRpnChangeBo
{
private
Long
id
;
private
String
name
;
private
Long
riskLevelId
;
private
String
changeDate
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Long
getRiskLevelId
()
{
return
riskLevelId
;
}
public
void
setRiskLevelId
(
Long
riskLevelId
)
{
this
.
riskLevelId
=
riskLevelId
;
}
public
String
getChangeDate
()
{
return
changeDate
;
}
public
void
setChangeDate
(
String
changeDate
)
{
this
.
changeDate
=
changeDate
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
f72c369e
...
@@ -8,12 +8,7 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
...
@@ -8,12 +8,7 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
...
@@ -88,6 +83,20 @@ public class View3dController extends BaseController {
...
@@ -88,6 +83,20 @@ public class View3dController extends BaseController {
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getPointDetailByTypeAndId
(
type
,
pointId
,
orgCode
));
return
CommonResponseUtil
.
success
(
view3dService
.
getPointDetailByTypeAndId
(
type
,
pointId
,
orgCode
));
}
}
@ApiOperation
(
value
=
"今日安全指数查询"
,
notes
=
"按照日期查询安全指数及分类数据"
)
@GetMapping
(
value
=
"/statistics/safetyIndex"
)
public
CommonResponse
getSafetyIndexInfoByDate
(
@RequestParam
(
name
=
"date"
,
required
=
false
)
String
date
){
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getSafetyIndexInfoByDate
(
orgCode
,
date
));
}
@ApiOperation
(
value
=
"今日安全指数详情"
,
notes
=
"risk-风险异常,check-巡检异常,equipProblem-设备故障"
)
@GetMapping
(
value
=
"/safetyIndex/detail/{type}"
)
public
CommonResponse
getSafetyIndexDetail
(
@PathVariable
String
type
){
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getSafetyIndexDetail
(
type
,
orgCode
));
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
f72c369e
...
@@ -2,15 +2,51 @@ package com.yeejoin.amos.fas.business.dao.mapper;
...
@@ -2,15 +2,51 @@ package com.yeejoin.amos.fas.business.dao.mapper;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
public
interface
View3dMapper
extends
BaseMapper
{
public
interface
View3dMapper
extends
BaseMapper
{
/**
* 按类型查询树
* @param type
* @param orgCode
* @return
*/
List
<
RegionTreeResponse
>
getPointTreeByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
RegionTreeResponse
>
getPointTreeByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
);
/**
* 获取点详情
* @param type
* @param pointId
* @param orgCode
* @return
*/
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
@Param
(
"type"
)
String
type
,
@Param
(
"pointId"
)
Long
pointId
,
@Param
(
"orgCode"
)
String
orgCode
);
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
@Param
(
"type"
)
String
type
,
@Param
(
"pointId"
)
Long
pointId
,
@Param
(
"orgCode"
)
String
orgCode
);
/**
* 统计风险上升异常数量(风险点)-日期+机构
* @param param:{type,orgCode}
* @return Long
*/
Long
countUpperRiskPoint
(
Map
<
String
,
Object
>
param
);
/**
* 统计巡检异常数量(不合格、漏检)-日期+机构
* @param param{}
* @return Long
*/
Long
countCheckException
(
Map
<
String
,
Object
>
param
);
/**
* 今日安全指数详情
* @param params orgCode,date
* @return list
*/
List
<
RiskPointRpnChangeBo
>
getAllErrorRiskPoint
(
Map
<
String
,
Object
>
params
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IRiskSourceDao.java
View file @
f72c369e
...
@@ -36,5 +36,5 @@ public interface IRiskSourceDao extends BaseDao<RiskSource, Long> {
...
@@ -36,5 +36,5 @@ public interface IRiskSourceDao extends BaseDao<RiskSource, Long> {
List
<
RiskSource
>
queryRiskAreaRpn
();
List
<
RiskSource
>
queryRiskAreaRpn
();
Optional
<
RiskSource
>
findByOrgCodeAndParentId
(
String
orgCode
,
Long
parentId
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
f72c369e
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
f72c369e
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.vo.SafetyIndexDetailVo
;
import
com.yeejoin.amos.fas.business.vo.TodaySafetyIndexVo
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RegionTreeResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
...
@@ -13,11 +15,49 @@ import java.util.Map;
...
@@ -13,11 +15,49 @@ import java.util.Map;
*/
*/
public
interface
IView3dService
{
public
interface
IView3dService
{
/**
* 区域绑定保存
* @param pointBoList 数组
* @return 空
*/
CommonResponse
setPoint3dPosition
(
List
<
BindPointBo
>
pointBoList
);
CommonResponse
setPoint3dPosition
(
List
<
BindPointBo
>
pointBoList
);
/**
* 点类型查询
* @return list
*/
List
<
Map
<
String
,
String
>>
getPointType
();
List
<
Map
<
String
,
String
>>
getPointType
();
/**
* 按照分类查询点树
* @param type 树类型字典值
* @param orgCode 登陆机构
* @return list
*/
List
<
RegionTreeResponse
>
getPointTreeByType
(
String
type
,
String
orgCode
);
List
<
RegionTreeResponse
>
getPointTreeByType
(
String
type
,
String
orgCode
);
/**
* 获取点详情
* @param type 树类型
* @param pointId 点id
* @param orgCode 登录机构
* @return
*/
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
String
type
,
Long
pointId
,
String
orgCode
);
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
String
type
,
Long
pointId
,
String
orgCode
);
/**
* 今日安全指数
* @param orgCode 登陆机构
* @param date 日期
* @return TodaySafetyIndexVo
*/
TodaySafetyIndexVo
getSafetyIndexInfoByDate
(
String
orgCode
,
String
date
);
/**
* 今日安全指数详情
* @param type 详情类型
* @return list
*/
List
<
SafetyIndexDetailVo
>
getSafetyIndexDetail
(
String
type
,
String
orgCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/ErrorContentVo.java
0 → 100644
View file @
f72c369e
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
/**
* @author suhg
*/
public
class
ErrorContentVo
{
/**
* 名称
*/
private
String
name
;
/**
* 日期
*/
private
String
changeDate
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getChangeDate
()
{
return
changeDate
;
}
public
void
setChangeDate
(
String
changeDate
)
{
this
.
changeDate
=
changeDate
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/SafetyIndexDetailVo.java
0 → 100644
View file @
f72c369e
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
java.util.List
;
/**
* @author suhg
*/
public
class
SafetyIndexDetailVo
{
/**
* 类型字典
*/
private
String
typeCode
;
/**
* 类型名称
*/
private
String
typeName
;
/**
* 异常内容数组
*/
private
List
<
ErrorContentVo
>
content
;
public
String
getTypeCode
()
{
return
typeCode
;
}
public
void
setTypeCode
(
String
typeCode
)
{
this
.
typeCode
=
typeCode
;
}
public
String
getTypeName
()
{
return
typeName
;
}
public
void
setTypeName
(
String
typeName
)
{
this
.
typeName
=
typeName
;
}
public
List
<
ErrorContentVo
>
getContent
()
{
return
content
;
}
public
void
setContent
(
List
<
ErrorContentVo
>
content
)
{
this
.
content
=
content
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/TodaySafetyIndexVo.java
0 → 100644
View file @
f72c369e
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
/**
* @author suhg
*/
public
class
TodaySafetyIndexVo
{
private
Double
safetyIndex
;
private
Long
riskExceptionNum
;
private
Long
checkExceptionNum
;
private
Long
fireExceptionNum
;
public
Long
getRiskExceptionNum
()
{
return
riskExceptionNum
;
}
public
void
setRiskExceptionNum
(
Long
riskExceptionNum
)
{
this
.
riskExceptionNum
=
riskExceptionNum
;
}
public
Long
getCheckExceptionNum
()
{
return
checkExceptionNum
;
}
public
void
setCheckExceptionNum
(
Long
checkExceptionNum
)
{
this
.
checkExceptionNum
=
checkExceptionNum
;
}
public
Long
getFireExceptionNum
()
{
return
fireExceptionNum
;
}
public
void
setFireExceptionNum
(
Long
fireExceptionNum
)
{
this
.
fireExceptionNum
=
fireExceptionNum
;
}
public
Double
getSafetyIndex
()
{
return
safetyIndex
;
}
public
void
setSafetyIndex
(
Double
safetyIndex
)
{
this
.
safetyIndex
=
safetyIndex
;
}
}
YeeAmosFireAutoSysStart/src/main/resources/application-docker.properties
View file @
f72c369e
...
@@ -14,7 +14,7 @@ eureka.client.fetchRegistry = true
...
@@ -14,7 +14,7 @@ eureka.client.fetchRegistry = true
#DB properties:
#DB properties:
spring.datasource.url
=
jdbc:mysql://amos-mysql:3306/91-safety-business?serverTimezone=UTC&&useSSL=false&&allowMultiQueries=true&serverTimezone=GMT&characterEncoding=utf8
spring.datasource.url
=
jdbc:mysql://amos-mysql:3306/91-safety-business?serverTimezone=UTC&&useSSL=false&&allowMultiQueries=true&serverTimezone=GMT&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
root_123
spring.datasource.password
=
yeejoin_1234
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.hikari.maxLifetime
=
1765000
spring.datasource.hikari.maxLifetime
=
1765000
spring.datasource.hikari.maximum-pool-size
=
10
spring.datasource.hikari.maximum-pool-size
=
10
...
@@ -22,18 +22,18 @@ spring.datasource.testWhileIdle = true
...
@@ -22,18 +22,18 @@ spring.datasource.testWhileIdle = true
spring.datasource.validationQuery
=
SELECT 1
spring.datasource.validationQuery
=
SELECT 1
#mongodb
#mongodb
spring.data.mongodb.uri
=
mongodb://amos-mongo
db
:27017/iecmonitor
spring.data.mongodb.uri
=
mongodb://amos-mongo:27017/iecmonitor
#rule
#rule
#params.remoteRuleUrl=http://172.16.3.3:8080/
#params.remoteRuleUrl=http://172.16.3.3:8080/
params.remoteRuleUrl
=
http://
magintursh.xicp.net:1
8080/
params.remoteRuleUrl
=
http://
station-rule:
8080/
params.remoteWebsocketUrl
=
http://
amos
-websocket:10600/
params.remoteWebsocketUrl
=
http://
station
-websocket:10600/
spring.redis.database
=
5
spring.redis.database
=
5
spring.redis.host
=
amos-redis
spring.redis.host
=
amos-redis
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
123456
0
spring.redis.password
=
redis202
0
spring.redis.jedis.pool.max-active
=
200
spring.redis.jedis.pool.max-active
=
200
spring.redis.jedis.pool.max-wait
=
-1
spring.redis.jedis.pool.max-wait
=
-1
spring.redis.jedis.pool.max-idle
=
10
spring.redis.jedis.pool.max-idle
=
10
...
@@ -43,5 +43,5 @@ spring.redis.timeout=1000
...
@@ -43,5 +43,5 @@ spring.redis.timeout=1000
#picture upload
#picture upload
file.uploadUrl
=
D:
\\
upload
\\
files
\\
file.uploadUrl
=
D:
\\
upload
\\
files
\\
#picture read
#picture read
file.readUrl
=
http://
amos-file
:8083/file/getFile?in=
file.readUrl
=
http://
station-fireautosys
:8083/file/getFile?in=
params.isPush
=
true
params.isPush
=
true
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
f72c369e
...
@@ -173,5 +173,54 @@
...
@@ -173,5 +173,54 @@
AND org_code like CONCAT(#{orgCode},'%')
AND org_code like CONCAT(#{orgCode},'%')
</if>
</if>
</select>
</select>
<select
id=
"countUpperRiskPoint"
resultType=
"long"
>
SELECT
count(DISTINCT frcl.id)
FROM
(
SELECT
a.id,
a.risk_source_id,
date_format(a.create_date, '%Y-%m-%d') AS create_date
FROM
`f_rpn_change_log` a,
`f_risk_source` b
WHERE
a.type = #{type}
and a.risk_source_id = b.id
and b.org_code = #{orgCode}
) as frcl
WHERE
frcl.create_date = #{date}
</select>
<select
id=
"countCheckException"
resultType=
"long"
>
select count(1) from
(
SELECT
a.id,
DATE_FORMAT(b.begin_time,'%Y-%m-%d') as begin_date,
DATE_FORMAT(b.end_time,'%Y-%m-%d') as end_date
FROM `p_plan_task_detail` a , p_plan_task b
where
a.task_no = b.id
and a.`status` in ('2','3')
and (b.org_code = #{orgCode} or b.org_code like CONCAT(#{orgCode},'-','%'))
) pt
where #{date} BETWEEN pt.begin_date and pt.end_date
</select>
<select
id=
"getAllErrorRiskPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo"
>
SELECT
b.id,
a.`name`,
a.risk_level_id as riskLevelId,
b.create_date as changeDate
FROM
f_risk_source a,
f_rpn_change_log b
WHERE
b.risk_source_id = a.id
AND b.type = '0'
and a.org_code = #{orgCode}
and DATE_FORMAT(b.create_date,'%Y-%m-%d') = #{date}
</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