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
9a873feb
Commit
9a873feb
authored
Jun 19, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改缺陷
parent
dc845199
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
53 deletions
+27
-53
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+4
-6
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+2
-3
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+0
-1
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+15
-4
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+2
-3
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+4
-36
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
9a873feb
...
...
@@ -84,8 +84,8 @@ public class View3dController extends BaseController {
@GetMapping
(
value
=
"point/tree/{type}"
)
public
CommonResponse
getPointTreeByType
(
@PathVariable
(
value
=
"type"
)
String
type
)
{
if
(
ResourceTypeDefEnum
.
containsTypeCode
(
type
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
channelType
=
this
.
getChannelType
();
return
CommonResponseUtil
.
success
(
view3dService
.
getPointTreeByType
(
type
,
orgCode
,
channelType
));
}
...
...
@@ -94,10 +94,8 @@ public class View3dController extends BaseController {
@ApiOperation
(
value
=
"按照不同类型查询点详情"
,
notes
=
"按照不同类型查询点详情"
)
@GetMapping
(
value
=
"point/detail"
)
public
CommonResponse
getPointDetail
(
String
type
,
Long
pointId
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getPointDetailByTypeAndId
(
type
,
pointId
,
orgCode
));
public
CommonResponse
getPointDetail
(
@RequestParam
String
type
,
@RequestParam
Long
pointId
)
{
return
CommonResponseUtil
.
success
(
view3dService
.
getPointDetailByTypeAndId
(
type
,
pointId
));
}
@ApiOperation
(
value
=
"一周安全指数趋势查询"
,
notes
=
"一周安全指数趋势查询"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
9a873feb
...
...
@@ -27,10 +27,9 @@ public interface View3dMapper extends BaseMapper{
* 获取点详情
* @param type
* @param pointId
* @param orgCode
* @return
* @return map
*/
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
);
/**
* 统计风险上升异常数量(风险点)-日期+机构
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
9a873feb
...
...
@@ -846,7 +846,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if
(
"alarm_type_trouble"
.
equals
(
fireEquipmentPointType
))
{
//通知刷新3d页面相关故障数据
notifyAlarm
(
fireEquipmentPoint
,
deviceData
);
iDataRefreshService
.
refreshViewData
(
DataRefreshTypeEum
.
trouble
.
getCode
());
}
else
{
//通知刷新3d页面告警数据
iDataRefreshService
.
refreshViewData
(
DataRefreshTypeEum
.
alarm
.
getCode
());
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
9a873feb
...
...
@@ -32,6 +32,7 @@ import com.yeejoin.amos.fas.core.util.StringUtil;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -260,8 +261,8 @@ public class View3dServiceImpl implements IView3dService {
}
@Override
public
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
String
type
,
Long
pointId
,
String
orgCode
)
{
HashMap
<
String
,
Object
>
detail
=
view3dMapper
.
getPointDetailByTypeAndId
(
type
,
pointId
,
orgCode
);
public
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
String
type
,
Long
pointId
)
{
HashMap
<
String
,
Object
>
detail
=
view3dMapper
.
getPointDetailByTypeAndId
(
type
,
pointId
);
if
(
detail
!=
null
)
{
String
ue4Location
=
(
String
)
detail
.
get
(
"ue4Location"
);
detail
.
put
(
"ue4Location"
,
ue4Location
==
null
?
new
JSONArray
()
:
JSON
.
parseArray
(
ue4Location
));
...
...
@@ -269,6 +270,7 @@ public class View3dServiceImpl implements IView3dService {
detail
.
put
(
"ue4Rotation"
,
ue4Rotation
==
null
?
new
JSONArray
()
:
JSON
.
parseArray
(
ue4Rotation
));
String
ue4Extent
=
(
String
)
detail
.
get
(
"ue4Extent"
);
detail
.
put
(
"ue4Extent"
,
ue4Location
==
null
?
new
JSONArray
()
:
JSON
.
parseArray
(
ue4Extent
));
detail
.
put
(
"position3d"
,
this
.
strPositionToArry
(
detail
.
get
(
"position3d"
)));
}
return
detail
;
}
...
...
@@ -309,7 +311,7 @@ public class View3dServiceImpl implements IView3dService {
}
@Override
public
synchronized
List
<
SafetyIndexDetailVo
>
getSafetyIndexDetail
(
String
type
,
String
orgCode
)
{
public
List
<
SafetyIndexDetailVo
>
getSafetyIndexDetail
(
String
type
,
String
orgCode
)
{
List
<
SafetyIndexDetailVo
>
resultList
=
Lists
.
newArrayList
();
String
dateStr
=
DateUtil
.
getDateFormat
(
new
Date
(),
DateUtil
.
DATE_DEFAULT_FORMAT
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -480,7 +482,7 @@ public class View3dServiceImpl implements IView3dService {
return
view3dMapper
.
getRiskErrorTop5
(
orgCode
);
case
"check"
:
//巡检异常
return
view3dMapper
.
getCheckErrorTop5
(
orgCode
);
case
"fire"
:
case
"fire"
:
//火灾告警
return
view3dMapper
.
getFireAlarmTop5
(
orgCode
);
default
:
throw
new
YeeException
(
"不支持的类型 -->"
+
type
);
...
...
@@ -647,5 +649,14 @@ public class View3dServiceImpl implements IView3dService {
}
}
}
private
JSONArray
strPositionToArry
(
Object
position3d
){
JSONArray
jsonArray
=
new
JSONArray
();
if
(
StringUtil
.
isNotEmpty
(
position3d
)){
String
[]
arryStr
=
position3d
.
toString
().
split
(
","
);
List
<
Double
>
collect
=
Arrays
.
stream
(
arryStr
).
map
(
Double:
:
parseDouble
).
collect
(
Collectors
.
toList
());
jsonArray
.
addAll
(
collect
);
}
return
jsonArray
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
9a873feb
...
...
@@ -45,10 +45,9 @@ public interface IView3dService {
* 获取点详情
* @param type 树类型
* @param pointId 点id
* @param orgCode 登录机构
* @return
* @return map
*/
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
String
type
,
Long
pointId
,
String
orgCode
);
HashMap
<
String
,
Object
>
getPointDetailByTypeAndId
(
String
type
,
Long
pointId
);
/**
* 今日安全指数
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
9a873feb
...
...
@@ -171,9 +171,6 @@
<if
test=
"pointId != null"
>
AND rs.id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (rs.org_code = #{orgCode} OR rs.org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'patrol'"
>
select id,name,point_no as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,coordinates as position3d,
...
...
@@ -203,9 +200,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'impEquipment'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
...
...
@@ -219,9 +213,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'monitorEquipment'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
...
...
@@ -235,9 +226,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'video'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
...
...
@@ -251,9 +239,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'hydrant'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
...
...
@@ -267,9 +252,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'pool'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
...
...
@@ -283,9 +265,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'fireCar'"
>
select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
...
...
@@ -299,9 +278,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'fireEquipment'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
...
...
@@ -315,9 +291,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'fireChamber'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
...
...
@@ -331,9 +304,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
<when
test=
"type == 'fireFoamRoom'"
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
...
...
@@ -347,9 +317,6 @@
<if
test=
"pointId != null"
>
AND id = #{pointId}
</if>
<if
test=
"orgCode != null"
>
AND (org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%'))
</if>
</when>
</choose>
</select>
...
...
@@ -497,7 +464,7 @@
<select
id=
"getCheckErrorTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT p.id,I.point_no as code,
IF(p.is_ok = '2', CONCAT(I.name,' 不合格') ,CONCAT(I.name,' 漏检') ) as label,
p.point_id,'
check
' as type,p.check_time as changeDate
p.point_id,'
patrol
' as type,p.check_time as changeDate
FROM p_check p
left join p_point I ON I.id = p.point_id
where p.is_ok IN ('2', '3')
...
...
@@ -509,7 +476,8 @@
<select
id=
"getFireAlarmTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT
a.fire_equipment_id id,
a.id,
a.fire_equipment_id as pointId,
a.fire_equipment_code code,
a.fire_equipment_point_name as `label`,
a.update_date as changeDate,
...
...
@@ -1162,7 +1130,7 @@
<if
test=
"riskSourceId != null"
>
AND FIND_IN_SET(temp.riskSourceId,queryRiskSourceChildrenIds(#{riskSourceId}))
</if>
<if
test=
"type != null and type !='fireResource'"
>
<if
test=
"type != null and type !='fireResource'
and type !=''
"
>
AND temp.type = #{type}
</if>
<if
test=
"type == 'fireResource'"
>
...
...
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