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
6b621fd7
Commit
6b621fd7
authored
May 22, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
1ff71201
0018fa6d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
122 additions
and
25 deletions
+122
-25
SafetyExecuteBo.java
...ava/com/yeejoin/amos/fas/business/bo/SafetyExecuteBo.java
+7
-0
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+2
-0
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+22
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+0
-0
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+32
-22
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+1
-1
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+58
-2
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/bo/SafetyExecuteBo.java
View file @
6b621fd7
...
...
@@ -7,6 +7,7 @@ public class SafetyExecuteBo {
private
String
label
;
private
String
pointId
;
private
String
type
;
private
String
status
;
//指标状态
private
String
changeDate
;
public
Long
getId
()
{
return
id
;
...
...
@@ -44,4 +45,10 @@ public class SafetyExecuteBo {
public
void
setChangeDate
(
String
changeDate
)
{
this
.
changeDate
=
changeDate
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
6b621fd7
...
...
@@ -12,6 +12,8 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.Authorization
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.web.bind.annotation.*
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
6b621fd7
...
...
@@ -73,6 +73,14 @@ public interface View3dMapper extends BaseMapper{
* @return list
*/
List
<
CheckErrorBo
>
getAllErrorPatrolPoint
(
Map
<
String
,
Object
>
params
);
/**
* 今日安全指数故障告警详情
* @param params orgCode,date
* @return list
*/
List
<
CheckErrorBo
>
getAllFaultAlarm
(
Map
<
String
,
Object
>
params
);
/**
* 今日巡检统计接口
...
...
@@ -94,6 +102,20 @@ public interface View3dMapper extends BaseMapper{
* @return
*/
List
<
SafetyExecuteBo
>
getCheckErrorTop5
(
String
orgCode
);
/**
* 火灾告警最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getFireAlarmTop5
(
String
orgCode
);
/**
* 设备状态最新5条
* @param orgCode
* @return
*/
List
<
SafetyExecuteBo
>
getEquipStatusTop5
(
String
orgCode
);
/**
* 按照类型查询点
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
6b621fd7
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
6b621fd7
...
...
@@ -307,8 +307,7 @@ public class View3dServiceImpl implements IView3dService {
Long
checkExceptionNum
=
this
.
getCheckExceptionNum
(
orgCode
,
date
);
vo
.
setCheckExceptionNum
(
checkExceptionNum
);
//4.统计故障数量-日期+机构
//TODO:待毛颖确认调整完成后继续
vo
.
setFireExceptionNum
(
0L
);
vo
.
setFireExceptionNum
(
getFireExceptionNum
(
orgCode
,
date
));
}
else
{
throw
new
YeeException
(
"机构:"
+
orgCode
+
" 不存在"
);
}
...
...
@@ -350,6 +349,15 @@ public class View3dServiceImpl implements IView3dService {
});
}
else
if
(
StatisticsErrorTypeEum
.
equip
.
getCode
().
equals
(
type
)){
//TODO:待毛颖确认调整完成后继续
List
<
CheckErrorBo
>
checkErrorBoList
=
view3dMapper
.
getAllFaultAlarm
(
params
);
Map
<
String
,
List
<
CheckErrorBo
>>
map
=
checkErrorBoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
CheckErrorBo:
:
getStatus
));
map
.
forEach
((
k
,
v
)->{
SafetyIndexDetailVo
safetyIndexDetailVo
=
new
SafetyIndexDetailVo
();
safetyIndexDetailVo
.
setTypeCode
(
k
);
safetyIndexDetailVo
.
setTypeName
(
k
);
safetyIndexDetailVo
.
setContent
(
getErrorContentVos
(
v
));
resultList
.
add
(
safetyIndexDetailVo
);
});
}
return
resultList
;
}
...
...
@@ -478,23 +486,24 @@ public class View3dServiceImpl implements IView3dService {
case
"check"
:
//巡检异常
return
view3dMapper
.
getCheckErrorTop5
(
orgCode
);
case
"fire"
:
return
JSON
.
parseArray
(
" [\r\n"
+
" {\r\n"
+
" \"id\": 35781,\r\n"
+
" \"code\": \"s001\",\r\n"
+
" \"label\": \"设备test\",\r\n"
+
" \"pointId\": \"1\",\r\n"
+
" \"type\": \"check\",\r\n"
+
" \"changeDate\": \"2020-04-23 14:31:31\"\r\n"
+
" },\r\n"
+
" {\r\n"
+
" \"id\": 35780,\r\n"
+
" \"code\": \"s002\",\r\n"
+
" \"label\": \"设备002\",\r\n"
+
" \"pointId\": \"23123\",\r\n"
+
" \"type\": \"check\",\r\n"
+
" \"changeDate\": \"2020-04-23 14:31:27\"\r\n"
+
" }]"
,
SafetyExecuteBo
.
class
);
return
view3dMapper
.
getFireAlarmTop5
(
orgCode
);
// return JSON.parseArray(" [\r\n" +
// " {\r\n" +
// " \"id\": 35781,\r\n" +
// " \"code\": \"s001\",\r\n" +
// " \"label\": \"设备test\",\r\n" +
// " \"pointId\": \"1\",\r\n" +
// " \"type\": \"check\",\r\n" +
// " \"changeDate\": \"2020-04-23 14:31:31\"\r\n" +
// " },\r\n" +
// " {\r\n" +
// " \"id\": 35780,\r\n" +
// " \"code\": \"s002\",\r\n" +
// " \"label\": \"设备002\",\r\n" +
// " \"pointId\": \"23123\",\r\n" +
// " \"type\": \"check\",\r\n" +
// " \"changeDate\": \"2020-04-23 14:31:27\"\r\n" +
// " }]", SafetyExecuteBo.class);
default
:
throw
new
YeeException
(
"不支持的类型 -->"
+
type
);
}
...
...
@@ -510,9 +519,10 @@ public class View3dServiceImpl implements IView3dService {
}
@Override
public
Object
getEquipStatusList
(
String
orgCode
)
{
return
JSON
.
parseArray
(
"[{\"id\":1,\"label\":\"设备1 label\",\"changeDate\":\"2020-04-26 10:00:00\"}"
+
",{\"id\":2,\"label\":\"设备2 label\",\"changeDate\":\"2020-04-25 10:00:00\"}]"
);
public
List
<
SafetyExecuteBo
>
getEquipStatusList
(
String
orgCode
)
{
return
view3dMapper
.
getEquipStatusTop5
(
orgCode
);
// return JSON.parseArray("[{\"id\":1,\"label\":\"设备1 label\",\"changeDate\":\"2020-04-26 10:00:00\"}"
// + ",{\"id\":2,\"label\":\"设备2 label\",\"changeDate\":\"2020-04-25 10:00:00\"}]");
}
@Override
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
6b621fd7
...
...
@@ -112,7 +112,7 @@ public interface IView3dService {
* @param orgCode
* @return
*/
Object
getEquipStatusList
(
String
orgCode
);
List
<
SafetyExecuteBo
>
getEquipStatusList
(
String
orgCode
);
/**
* 左侧菜单(异常点)
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
6b621fd7
...
...
@@ -438,7 +438,15 @@
</select>
<select
id=
"countFireException"
resultType=
"long"
>
SELECT
count(1)
FROM
f_alarm a
WHERE
`status` = TRUE
AND org_code = #{orgCode}
AND type = 'alarm_type_trouble'
AND date_format(a.update_date, '%Y-%m-%d') = #{date}
</select>
<select
id=
"getAllErrorRiskPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo"
>
...
...
@@ -473,6 +481,23 @@
and a.org_code = #{orgCode}
</select>
<select
id=
"getAllFaultAlarm"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
SELECT
a.id,
a.fire_equipment_point_name as `name`,
fe.equip_type as status,
a.update_date as changeDate
FROM
f_alarm a
LEFT JOIN f_fire_equipment fe ON fe.id = a.fire_equipment_id
WHERE
`status` = TRUE
AND type = 'alarm_type_trouble'
AND a.org_code = #{orgCode}
AND date_format(a.update_date, '%Y-%m-%d') =#{date}
</select>
<select
id=
"getStatisticsCheck"
resultType=
"java.util.HashMap"
>
<![CDATA[
SELECT d.status as type, count(1) as value
...
...
@@ -503,11 +528,42 @@
left join p_point I ON I.id = p.point_id
where p.is_ok IN ('2', '3')
AND I.is_delete = 0
AND p.org_code = #{org
_c
ode} or p.org_code like CONCAT(#{orgCode},'-','%')
AND p.org_code = #{org
C
ode} or p.org_code like CONCAT(#{orgCode},'-','%')
ORDER BY p.check_time desc
limit 0,5
</select>
<select
id=
"getFireAlarmTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT
a.fire_equipment_id id,
a.fire_equipment_code code,
a.fire_equipment_point_name as `label`,
a.update_date as changeDate,
"monitorEquipment" type
FROM
f_alarm a
WHERE
a.org_code = #{orgCode}
AND a.`status` = TRUE
AND a.type = 'alarm_type_fire'
ORDER BY a.update_date DESC
limit 0,5
</select>
<select
id=
"getEquipStatusTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT
fed.id,
fed.eq_point_name label,
fed.e_value status,
fed.create_date changeDate
FROM
f_fire_equipment_data fed
WHERE
fed.org_code = #{orgCode}
ORDER BY fed.create_date DESC
limit 0,5
</select>
<select
id=
"getPintsByType"
resultType=
"hashmap"
>
select CONCAT(type,'-',id) as `key`,sp.* from
(select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'riskSource' as type,org_code as orgCode,
...
...
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