Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
5c86ce9b
Commit
5c86ce9b
authored
Jan 11, 2022
by
helinlin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
610e5a84
c97706c5
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
184 additions
and
35 deletions
+184
-35
DynamicFormInstanceMapper.xml
...i/src/main/resources/mapper/DynamicFormInstanceMapper.xml
+1
-0
DutyFirstAidServiceImpl.java
...dule/common/biz/service/impl/DutyFirstAidServiceImpl.java
+11
-1
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+1
-0
FailureVerifyServiceImpl.java
...ule/common/biz/service/impl/FailureVerifyServiceImpl.java
+6
-1
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+1
-0
EquipmentDetailServiceImpl.java
.../equipmanage/service/impl/EquipmentDetailServiceImpl.java
+1
-1
AircraftServiceImpl.java
...boot/module/jcs/biz/service/impl/AircraftServiceImpl.java
+5
-1
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+13
-5
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+1
-1
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+3
-3
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+141
-22
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/DynamicFormInstanceMapper.xml
View file @
5c86ce9b
...
...
@@ -519,6 +519,7 @@ AND instance_id = (
jc_user_car
WHERE
car_id = #{carId}
and is_delete = 0
)
) and field_code='telephone'
) ss
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyFirstAidServiceImpl.java
View file @
5c86ce9b
...
...
@@ -7,6 +7,7 @@ import java.util.List;
import
java.util.Map
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.velocity.runtime.directive.Break
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
...
@@ -158,7 +159,16 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
}
resultList
.
add
(
detailMap
);
});
result
.
add
(
resultList
.
get
(
0
));
for
(
int
i
=
0
;
i
<
resultList
.
size
();
i
++)
{
if
(
resultList
.
get
(
i
).
size
()
==
4
){
result
.
add
(
resultList
.
get
(
i
));
}
if
(
result
.
size
()>
0
){
break
;
}
}
return
result
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
5c86ce9b
...
...
@@ -323,6 +323,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
// 发起主表流程 并添加至报修日志
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
WAITING_AUDIT
.
getCode
());
FailureDetailsDto
model
=
this
.
updateWithModel
(
failureDetailsDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureDetailsDto
.
getAttachment
()))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureVerifyServiceImpl.java
View file @
5c86ce9b
...
...
@@ -85,10 +85,15 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
List
<
FailureVerify
>
byfaultId
=
findByfaultId
(
failureDetailsDto
.
getSequenceNbr
());
if
(
byfaultId
.
size
()
!=
0
)
{
if
(
byfaultId
.
size
()
!=
0
&&
status
.
getCode
().
equals
(
FailureStatuEnum
.
FINISH
.
getCode
())
)
{
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
}
if
(
condition
==
AuditResultEnum
.
REFUSE
.
getCode
()){
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
}
failureDetailsDto
.
setSequenceNbr
(
model
.
getFaultId
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
5c86ce9b
...
...
@@ -123,6 +123,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
videoBySpeId
.
forEach
(
action
->
{
action
.
setVedioFormat
(
vedioFormat
);
action
.
setUrl
(
videoService
.
getVideoUrl
(
action
.
getName
(),
action
.
getPresetPosition
(),
action
.
getUrl
(),
action
.
getCode
()));
});
res
.
put
(
"data"
,
specificAlarm
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentDetailServiceImpl.java
View file @
5c86ce9b
...
...
@@ -119,7 +119,7 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
equipmentDetail
.
setEquPropertyList
(
equPropertyList
);
ManufacturerInfo
manufacturerInfo
=
manufacturerInfoMapper
.
selectById
(
equipmentDetail
.
getManufacturerId
());
if
(
manufacturerInfo
!=
null
)
{
manufacturerInfo
.
setImg
(
fileServer
+
manufacturerInfo
.
getImg
());
manufacturerInfo
.
setImg
(
manufacturerInfo
.
getImg
());
}
equipmentDetail
.
setManufacturerInfo
(
manufacturerInfo
);
equipmentDetail
.
setImg
(
getEquipFileList
(
id
,
FileTypeEnum
.
image
.
toString
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AircraftServiceImpl.java
View file @
5c86ce9b
...
...
@@ -121,7 +121,11 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
String
aircraft
=
""
;
List
<
AlertFormValue
>
list1
=
list
.
stream
().
filter
(
formValue
->
formValue
.
getFieldCode
().
equals
(
"aircraft"
)
||
formValue
.
getFieldCode
().
equals
(
"aircraftModel"
)).
collect
(
Collectors
.
toList
());
if
(
list1
.
size
()
>
0
)
{
aircraft
=
list1
.
get
(
0
).
getFieldValueCode
();
if
(
ValidationUtil
.
isEmpty
(
list1
.
get
(
0
).
getFieldValue
()))
{
aircraft
=
list1
.
get
(
0
).
getFieldValue
();
}
else
{
aircraft
=
list1
.
get
(
0
).
getFieldValueCode
();
}
}
LambdaQueryWrapper
<
Aircraft
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
5c86ce9b
...
...
@@ -640,11 +640,19 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
/*
* if(null == valueCode) { valueCode = alertFormValue.getFieldValue(); }
*/
// if("flightNumber".equals(alertFormValue.getFieldCode()) || "aircraftModel".equals(alertFormValue.getFieldCode())) {
// listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), alertFormValue.getFieldValueCode()));
// } else {
listdate
.
add
(
new
KeyValueLabel
(
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldCode
(),
valueCode
));
// }
if
(
"flightNumber"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
listdate
.
add
(
new
KeyValueLabel
(
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldValueCode
()));
}
else
{
if
(
"aircraftModel"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
if
(
ValidationUtil
.
isEmpty
(
valueCode
))
{
listdate
.
add
(
new
KeyValueLabel
(
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldValueCode
()));
}
else
{
listdate
.
add
(
new
KeyValueLabel
(
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldCode
(),
valueCode
));
}
}
else
{
listdate
.
add
(
new
KeyValueLabel
(
alertFormValue
.
getFieldName
(),
alertFormValue
.
getFieldCode
(),
valueCode
));
}
}
});
map
.
put
(
"data"
,
listdate
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
5c86ce9b
...
...
@@ -1491,7 +1491,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(
designatedDriver
)
{
// 发送单个车辆的信息数据到客户
smsParams
.
put
(
"resourcesNum"
,
resourcesNum
.
toString
()
.
substring
(
resourcesNum
.
toString
().
length
()
-
2
)
);
resourcesNum
.
toString
());
List
<
AlertSubmittedObject
>
alertSubmittedObjectListSub
=
Lists
.
newArrayList
();
Map
<
String
,
Object
>
map
=
dynamicFormInstanceMapper
.
getCurentCarIsUserPhone
(
Long
.
parseLong
(
i
.
getResourcesId
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferServiceImpl.java
View file @
5c86ce9b
...
...
@@ -543,10 +543,10 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
responseLevel
=
list1
.
get
(
0
).
getFieldValue
();
}
definitions
.
put
(
"rescueGrid"
,
alertCalled
.
getAddress
());
definitions
.
put
(
"rescueGrid"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getAddress
()
)
?
""
:
alertCalled
.
getAddress
());
definitions
.
put
(
"type"
,
alertCalled
.
getAlertType
());
definitions
.
put
(
"contactUser"
,
alertCalled
.
getContactUser
());
definitions
.
put
(
"contactPhone"
,
alertCalled
.
getContactPhone
());
definitions
.
put
(
"contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
()
)
?
""
:
alertCalled
.
getContactUser
());
definitions
.
put
(
"contactPhone"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
()
)
?
""
:
alertCalled
.
getContactPhone
());
definitions
.
put
(
"replaceContent"
,
replaceContent
);
definitions
.
put
(
"responseLevel"
,
responseLevel
);
definitions
.
put
(
"callTime"
,
...
...
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
5c86ce9b
...
...
@@ -632,23 +632,18 @@ ORDER BY
-- ----------------------------
DROP
VIEW
IF
EXISTS
`v_equip_alarm_today_statistics`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_equip_alarm_today_statistics`
AS
SELECT
count
(
`confirm_type`
)
AS
`confirmed`
,
(
count
(
1
)
-
count
(
`clean_time`
)
)
AS
`unCleaned`
,
(
count
(
1
)
-
count
(
`confirm_type`
)
)
AS
`pending`
FROM
`wl_equipment_specific_alarm_log`
WHERE
(
cast
(
now
()
AS
date
)
=
cast
(
`create_date`
AS
date
)
);
`wl_equipment_specific_alarm_log`
;
-- ----------------------------
-- View structure for v_equip_fire_control_water
...
...
@@ -674,10 +669,8 @@ SELECT
`sal`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sal`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sal`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
sal
.
equipment_specific_name
,
sal
.
equipment_specific_index_name
)
AS
alamReason
,
IF
(
`sal`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sal`
.
`iot_code`
AS
`iotCode`
,
date_format
(
`sal`
.
`create_date`
,
...
...
@@ -5794,27 +5787,153 @@ CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_equip
-- 火灾报警系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_alarm`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_alarm`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000016'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_alarm`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000016'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- CAFS系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_cafs`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_cafs`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000023'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_cafs`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000023'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 预混泡沫灭火系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_foam`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_foam`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000054'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_foam`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000054'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 细水雾涡扇炮系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_foam_mist`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_foam_mist`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'011023306003010000000082'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_foam_mist`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'011023306003010000000082'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 排油系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_ONL`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_onl`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000030'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_onl`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_onl`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000030'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 消防给水系统4小告警列表前60
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_water`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_water`
AS
select
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
concat
(
`sa`
.
`equipment_specific_name`
,
`sa`
.
`equipment_specific_index_name`
)
AS
`alamReason`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
from
(
`wl_equipment_specific_alarm_log`
`sa`
left
join
`wl_equipment_specific`
`ec`
on
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
where
find_in_set
(
'029026401813010000000047'
,
`sa`
.
`system_codes`
)
order
by
`sa`
.
`create_date`
desc
limit
60
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_water`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
(
`sa`
.
`clean_time`
IS
NOT
NULL
,
'已消除'
,
'未消除'
)
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
find_in_set
(
'029026401813010000000047'
,
`sa`
.
`system_codes`
)
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
-- 消防人员视图
DROP
VIEW
IF
EXISTS
`v_fire_fighter`
;
...
...
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