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
9ae17467
Commit
9ae17467
authored
May 21, 2021
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:三维预案核对修改执行
parent
fa0c367b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
44 deletions
+106
-44
FireEquipServiceImpl.java
.../amos/fas/business/service/impl/FireEquipServiceImpl.java
+30
-10
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+1
-1
FireStationVo.java
.../java/com/yeejoin/amos/fas/business/vo/FireStationVo.java
+6
-0
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+8
-6
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+61
-27
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipServiceImpl.java
View file @
9ae17467
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.fas.business.feign.IEquipManageFeign;
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.fas.business.feign.IEquipManageFeign;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.util.FireEquipmentType
;
import
com.yeejoin.amos.fas.business.util.FireEquipmentType
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.business.vo.FireStationVo
;
import
com.yeejoin.amos.fas.business.vo.FireStationVo
;
import
com.yeejoin.amos.fas.common.enums.EquipClassifyEnum
;
import
com.yeejoin.amos.fas.common.enums.EquipClassifyEnum
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
...
@@ -18,6 +19,7 @@ import org.springframework.data.domain.Page;
...
@@ -18,6 +19,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -25,6 +27,11 @@ import java.util.Map;
...
@@ -25,6 +27,11 @@ import java.util.Map;
@Service
(
"fireEquipService"
)
@Service
(
"fireEquipService"
)
public
class
FireEquipServiceImpl
implements
IFireEquipService
{
public
class
FireEquipServiceImpl
implements
IFireEquipService
{
/**
* 液位
*/
private
final
static
String
NAME_KEY
=
"WaterLevel"
;
@Autowired
@Autowired
FireEquipMapper
fireEquipMapper
;
FireEquipMapper
fireEquipMapper
;
...
@@ -123,29 +130,42 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -123,29 +130,42 @@ public class FireEquipServiceImpl implements IFireEquipService {
FireEquipmentType
fireEquipmentType
=
FireEquipmentType
.
valueOf
(
type
);
FireEquipmentType
fireEquipmentType
=
FireEquipmentType
.
valueOf
(
type
);
switch
(
fireEquipmentType
)
{
switch
(
fireEquipmentType
)
{
case
pool:
case
pool:
case
fireFoamRoom:
Object
obj
=
equipManageFeign
.
findByInstanceId
(
id
).
get
(
"result"
);
Object
obj
=
equipManageFeign
.
findByInstanceId
(
id
).
get
(
"result"
);
if
(
obj
!=
null
)
{
if
(
obj
!=
null
)
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
FireStationVo
fireStationVo
=
objectMapper
.
convertValue
(
obj
,
FireStationVo
.
class
);
FireStationVo
fireStationVo
=
objectMapper
.
convertValue
(
obj
,
FireStationVo
.
class
);
fireStationVo
.
setType
(
"2"
);
fireStationVo
.
setType
(
"2"
);
fireStationVo
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
List
<
Map
>
equipDetails
=
this
.
fireEquipMapper
.
queryStorageEquips
(
fireStationVo
.
getRiskSourceId
());
fireStationVo
.
setFireEquipmentInfo
(
equipDetails
);
// 获取水池实时液位
List
<
Object
>
equipDetailIdList
=
new
ArrayList
<>();
if
(
equipDetails
!=
null
&&
!
equipDetails
.
isEmpty
())
{
equipDetails
.
stream
().
forEach
(
map
->
equipDetailIdList
.
add
(
map
.
get
(
"id"
)));
List
<
EquipmentSpecificIndexVo
>
specificIndexVos
=
equipmentSpecificIndexMapper
.
findByDetailIdInAndNameKey
(
equipDetailIdList
,
NAME_KEY
);
if
(
specificIndexVos
!=
null
&&
!
specificIndexVos
.
isEmpty
())
{
fireStationVo
.
setLevel
(
specificIndexVos
.
get
(
0
).
getValue
().
concat
(
" "
).
concat
(
specificIndexVos
.
get
(
0
).
getEquipmentIndexUnitName
()));
}
}
returnEntity
=
fireStationVo
;
returnEntity
=
fireStationVo
;
}
}
break
;
break
;
// case fireFoamRoom:
case
fireFoamRoom:
// FireStation fireStation1 = fireEquipMapper.findFireStationById(id);
// fireStation1.setType("2");
// fireStation1.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
// returnEntity = fireStation1;
// break;
case
fireChamber:
Object
obj1
=
equipManageFeign
.
findByInstanceId
(
id
).
get
(
"result"
);
Object
obj1
=
equipManageFeign
.
findByInstanceId
(
id
).
get
(
"result"
);
if
(
obj1
!=
null
)
{
if
(
obj1
!=
null
)
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
FireStationVo
fireStationVo
=
objectMapper
.
convertValue
(
obj1
,
FireStationVo
.
class
);
FireStationVo
fireStationVo
=
objectMapper
.
convertValue
(
obj1
,
FireStationVo
.
class
);
fireStationVo
.
setType
(
"2"
);
List
<
Map
>
equipDetails
=
this
.
fireEquipMapper
.
queryStorageEquips
(
fireStationVo
.
getRiskSourceId
());
fireStationVo
.
setFireEquipmentInfo
(
equipDetails
);
returnEntity
=
fireStationVo
;
}
case
fireChamber:
Object
obj2
=
equipManageFeign
.
findByInstanceId
(
id
).
get
(
"result"
);
if
(
obj2
!=
null
)
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
FireStationVo
fireStationVo
=
objectMapper
.
convertValue
(
obj2
,
FireStationVo
.
class
);
fireStationVo
.
setType
(
"1"
);
fireStationVo
.
setType
(
"1"
);
fireStationVo
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
fireStationVo
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
fireStationVo
.
getRiskSourceId
()
));
returnEntity
=
fireStationVo
;
returnEntity
=
fireStationVo
;
}
}
break
;
break
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
9ae17467
...
@@ -466,7 +466,7 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -466,7 +466,7 @@ public class View3dServiceImpl implements IView3dService {
List
<
Map
<
String
,
Object
>>
stateList
=
PlanTaskDetailStatusEnum
.
getEnumList
();
List
<
Map
<
String
,
Object
>>
stateList
=
PlanTaskDetailStatusEnum
.
getEnumList
();
stateList
.
forEach
(
s
->
{
stateList
.
forEach
(
s
->
{
if
(
statisticsCheck
!=
null
)
{
if
(
statisticsCheck
!=
null
)
{
Long
value
=
0
l
;
Long
value
=
0
L
;
for
(
HashMap
<
String
,
Object
>
sc:
statisticsCheck
)
{
for
(
HashMap
<
String
,
Object
>
sc:
statisticsCheck
)
{
String
typeString
=
sc
.
get
(
"type"
).
toString
();
String
typeString
=
sc
.
get
(
"type"
).
toString
();
String
enumType
=
s
.
get
(
"type"
).
toString
();
String
enumType
=
s
.
get
(
"type"
).
toString
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/FireStationVo.java
View file @
9ae17467
...
@@ -49,4 +49,9 @@ public class FireStationVo {
...
@@ -49,4 +49,9 @@ public class FireStationVo {
private
List
<
Map
>
fireEquipmentInfo
;
private
List
<
Map
>
fireEquipmentInfo
;
/**
* 实时液位(m)
*/
private
String
level
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
9ae17467
...
@@ -314,12 +314,14 @@
...
@@ -314,12 +314,14 @@
LEFT JOIN wl_equipment we ON we.id = wed.equipment_id
LEFT JOIN wl_equipment we ON we.id = wed.equipment_id
LEFT JOIN wl_unit u ON u.id = we.unit_id
LEFT JOIN wl_unit u ON u.id = we.unit_id
LEFT JOIN wl_warehouse_structure ws ON ws.id = wsd.warehouse_structure_id
LEFT JOIN wl_warehouse_structure ws ON ws.id = wsd.warehouse_structure_id
LEFT JOIN f_risk_source as sce on sce.source_id = ws.source_id
<where>
WHERE
<if
test=
"riskSourceId != null"
>
sce.id = #{riskSourceId}
AND ws.source_id = #{riskSourceId}
GROUP BY
</if>
wsd.equipment_detail_id,
</where>
wed.`name`
GROUP BY
wsd.equipment_detail_id,
wed.`name`
</select>
</select>
<!-- <select id="findEquipDetailsById" resultType="com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse">-->
<!-- <select id="findEquipDetailsById" resultType="com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse">-->
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
9ae17467
...
@@ -485,42 +485,76 @@
...
@@ -485,42 +485,76 @@
<select
id=
"getFireAlarmTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
<select
id=
"getFireAlarmTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT
SELECT
ala.id,
ala.id,
ala.equipment_specific_id AS pointId,
ala.equipment_specific_id AS pointId,
'monitorEquipment' AS type,
'monitorEquipment' AS type,
spe.CODE,
spe. CODE,
ala.equipment_specific_index_name,
ala.equipment_specific_index_name,
CONCAT( ala.equipment_specific_index_name, '(', ala.equipment_specific_name, ')' ) AS label,
CONCAT(
ala.update_date AS changeDate
ala.equipment_specific_index_name,
FROM
'(',
wl_equipment_specific_alarm AS ala
ala.equipment_specific_name,
LEFT JOIN wl_equipment_specific AS spe ON ala.equipment_specific_id = spe.id
')',
WHERE ala.status = true
AND (ala.org_code = #{orgCode} OR ala.org_code like CONCAT(#{orgCode},'-%'))
IF (
AND ala.type = 'FIREALARM'
(
ORDER BY ala.update_date DESC
ISNULL(ws.full_name)
limit 0,5
AND ISNULL(sd.description)
),
'',
CONCAT(
'【',
IFNULL(ws.full_name, ''),
' ',
IFNULL(sd.description, ''),
'】'
)
)
) AS label,
ala.create_date AS changeDate
FROM
wl_equipment_specific_alarm AS ala
LEFT JOIN wl_equipment_specific AS spe ON ala.equipment_specific_id = spe.id
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = spe.id
LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id
WHERE ala.status = true
AND (ala.org_code = #{orgCode} OR ala.org_code like CONCAT(#{orgCode},'-%'))
AND ala.type = 'FIREALARM'
ORDER BY ala.create_date DESC
limit 0,5
</select>
</select>
<select
id=
"getEquipStatusTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
<select
id=
"getEquipStatusTop5"
resultType=
"com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"
>
SELECT
SELECT
wlesi.id,
wlesi.id,
wlesi.`value`
status
,
wlesi.`value`
STATUS
,
wlesi.update_date changeDate,
wlesi.update_date changeDate,
CONCAT(ed.name,' ',wlei.name) label
CONCAT(ed. NAME, ' ', wlei. NAME,IF((ISNULL(ws.full_name) AND ISNULL(sd.description)),'',CONCAT(
'【',
IFNULL(ws.full_name, ''),
' ',
IFNULL(sd.description, ''),
'】'
))) label
FROM
FROM
wl_equipment_specific_index wlesi
wl_equipment_specific_index wlesi
LEFT JOIN wl_equipment_index wlei ON wlesi.equipment_index_id = wlei.id
LEFT JOIN wl_equipment_index wlei ON wlesi.equipment_index_id = wlei.id
left join wl_equipment_specific wles on wlesi.equipment_specific_id = wles.id
LEFT JOIN wl_equipment_specific wles ON wlesi.equipment_specific_id = wles.id
left join wl_equipment_detail ed on ed.id = wles.equipment_detail_id
LEFT JOIN wl_equipment_detail ed ON ed.id = wles.equipment_detail_id
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = wles.id
LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id
WHERE
WHERE
wles.org_code=#{orgCode}
wles.org_code = '10'
and wlei.type_code!='BREAKDOWN'
AND wlei.type_code != 'BREAKDOWN'
and wlei.type_code!='FIREALARM'
AND wlei.type_code != 'FIREALARM'
and (wlesi.`value` = 'true'
AND (
OR wlesi.`value` = 'false')
wlesi.`value` = 'true'
ORDER BY wlesi.update_date DESC
OR wlesi.`value` = 'false'
limit 0,5
)
ORDER BY
wlesi.update_date DESC
LIMIT 0,
5
</select>
</select>
<!-- <select id="getPintsByType" resultType="hashmap">-->
<!-- <select id="getPintsByType" resultType="hashmap">-->
...
...
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