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
d722ef98
Commit
d722ef98
authored
Feb 23, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_bitmap' of 172.16.10.76:moa/amos-boot-biz into dev_bitmap
parents
580bf9f6
9b5dec9c
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
240 additions
and
128 deletions
+240
-128
KeySiteMapper.xml
...le-common-api/src/main/resources/mapper/KeySiteMapper.xml
+1
-1
FireEquipment.java
...oin/equipmanage/common/datasync/entity/FireEquipment.java
+34
-24
AlertCalledMapper.xml
...e-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
+2
-0
CarController.java
...ava/com/yeejoin/equipmanage/controller/CarController.java
+1
-2
EquipmentDetailController.java
...oin/equipmanage/controller/EquipmentDetailController.java
+2
-2
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+1
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+18
-8
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+1
-2
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+5
-1
SyncDataUtil.java
...main/java/com/yeejoin/equipmanage/utils/SyncDataUtil.java
+1
-1
VoiceRecordFileController.java
.../module/tzs/biz/controller/VoiceRecordFileController.java
+1
-1
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+137
-68
EquipmentSpecificIndexMapper.xml
...rc/main/resources/mapper/EquipmentSpecificIndexMapper.xml
+1
-1
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+30
-13
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+5
-4
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/KeySiteMapper.xml
View file @
d722ef98
...
...
@@ -38,7 +38,7 @@
<if
test=
"name != null and name != ''"
>
AND c.`name` like concat('%',#{name}, '%')
</if>
<if
test=
"buildingId != null and buildingId != -1"
>
<if
test=
"buildingId != null and buildingId != -1
and buildingId != '-1'
"
>
AND c.`building_id`= #{buildingId}
</if>
<if
test=
"fireEnduranceRate != null and fireEnduranceRate != ''"
>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/datasync/entity/FireEquipment.java
View file @
d722ef98
...
...
@@ -76,6 +76,10 @@ public class FireEquipment implements Serializable {
@ApiModelProperty
(
value
=
"所属区域"
)
@TableField
(
"workarea"
)
private
String
workArea
;
@ApiModelProperty
(
value
=
"所属区域id"
)
@TableField
(
"areaid"
)
private
String
areaid
;
@ApiModelProperty
(
value
=
"所在建筑ID"
)
@TableField
(
"buildid"
)
...
...
@@ -87,23 +91,23 @@ public class FireEquipment implements Serializable {
@ApiModelProperty
(
value
=
"所属消防系统Ids"
)
@TableField
(
"fightingsystemids"
)
private
String
fightingSystemIds
;
private
String
fightingSystemIds
=
""
;
@ApiModelProperty
(
value
=
"位置"
)
@TableField
(
"position"
)
private
String
position
;
private
String
position
=
""
;
@ApiModelProperty
(
value
=
"使用日期"
)
@TableField
(
"inusedate"
)
private
LocalDateTime
inUseDate
;
private
LocalDateTime
inUseDate
;
@ApiModelProperty
(
value
=
"状态"
)
@TableField
(
"status"
)
private
String
status
;
private
String
status
=
"正常"
;
@ApiModelProperty
(
value
=
"使用状态"
)
@TableField
(
"inusestate"
)
private
String
inUseState
;
private
String
inUseState
=
"在位"
;
@ApiModelProperty
(
value
=
"创建时间"
)
@TableField
(
"createdate"
)
...
...
@@ -115,23 +119,23 @@ public class FireEquipment implements Serializable {
@ApiModelProperty
(
value
=
"别名"
)
@TableField
(
"aliasname"
)
private
String
aliasname
;
private
String
aliasname
=
""
;
@ApiModelProperty
(
value
=
"描述"
)
@TableField
(
"description"
)
private
String
description
;
private
String
description
=
""
;
@ApiModelProperty
(
value
=
"辅助监控设备类型"
)
@TableField
(
"kind"
)
private
String
kind
;
private
String
kind
=
""
;
@ApiModelProperty
(
value
=
"资产性质"
)
@TableField
(
"assetsnature"
)
private
String
assetsnature
;
private
String
assetsnature
=
""
;
@ApiModelProperty
(
value
=
"设备来源种类"
)
@TableField
(
"assetsource"
)
private
String
assetsource
;
private
String
assetsource
=
""
;
@ApiModelProperty
(
value
=
"是否组合设备"
)
@TableField
(
"combinedequipment"
)
...
...
@@ -139,15 +143,15 @@ public class FireEquipment implements Serializable {
@ApiModelProperty
(
value
=
"出厂编号"
)
@TableField
(
"factorynumber"
)
private
String
factorynumber
;
private
String
factorynumber
=
""
;
@ApiModelProperty
(
value
=
"制造国家"
)
@TableField
(
"manufacturecountry"
)
private
String
manufacturecountry
;
private
String
manufacturecountry
=
""
;
@ApiModelProperty
(
value
=
"经营方式"
)
@TableField
(
"operationmodel"
)
private
String
operationmodel
;
private
String
operationmodel
=
""
;
@ApiModelProperty
(
value
=
"运行编号"
)
@TableField
(
"operationno"
)
...
...
@@ -155,11 +159,11 @@ public class FireEquipment implements Serializable {
@ApiModelProperty
(
value
=
"验收测试的信息"
)
@TableField
(
"acceptancetest"
)
private
String
acceptancetest
;
private
String
acceptancetest
=
""
;
@ApiModelProperty
(
value
=
"基线状态"
)
@TableField
(
"baselinecondition"
)
private
String
baselinecondition
;
private
String
baselinecondition
=
""
;
@ApiModelProperty
(
value
=
"基线生命损耗"
)
@TableField
(
"baselinelossoflife"
)
...
...
@@ -175,38 +179,43 @@ public class FireEquipment implements Serializable {
@ApiModelProperty
(
value
=
"资产生命周期日期"
)
@TableField
(
"lifecycledate"
)
private
String
lifecycledate
;
private
String
lifecycledate
=
""
;
@ApiModelProperty
(
value
=
"资产生命周期状态"
)
@TableField
(
"lifecyclestate"
)
private
String
lifecyclestate
;
private
String
lifecyclestate
=
""
;
@ApiModelProperty
(
value
=
"批号"
)
@TableField
(
"lotnumber"
)
private
String
lotnumber
;
private
String
lotnumber
=
""
;
@ApiModelProperty
(
value
=
"采购价格"
)
@TableField
(
"purchaseprice"
)
private
String
purchaseprice
;
private
String
purchaseprice
=
""
;
@ApiModelProperty
(
value
=
"退役原因"
)
@TableField
(
"retiredreason"
)
private
String
retiredreason
;
private
String
retiredreason
=
""
;
@ApiModelProperty
(
value
=
"编号"
)
@TableField
(
"serialnumber"
)
private
String
serialnumber
;
private
String
serialnumber
=
""
;
@ApiModelProperty
(
value
=
"类型"
)
@TableField
(
"type"
)
private
String
type
;
private
String
type
=
""
;
@ApiModelProperty
(
value
=
"UTC编号"
)
@TableField
(
"utcnumber"
)
private
String
utcnumber
;
private
String
utcnumber
=
""
;
@ApiModelProperty
(
value
=
"所关联的设备信息"
)
@TableField
(
"fireequipmentinfo"
)
private
String
fireequipmentinfo
;
private
String
fireequipmentinfo
=
""
;
@ApiModelProperty
(
value
=
"二维码"
)
@TableField
(
exist
=
false
)
private
String
qrCode
;
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
d722ef98
...
...
@@ -554,6 +554,8 @@
a.region_code LIKE CONCAT('%', #{item}, '%')
</foreach>
</if>
order by a.call_time desc
</select>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/CarController.java
View file @
d722ef98
...
...
@@ -1124,7 +1124,7 @@ public class CarController extends AbstractBaseController {
+
"/iot/v1/livedata/list?timeStart="
+
timeStart
+
"&timeEnd="
+
timeEnd
+
"&productKey="
+
prefix
+
"&deviceName="
+
suffix
,
HttpMethod
.
GET
,
httpEntity
,
FeignClientResult
.
class
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
log
.
error
(
e
.
getMessage
()
);
}
if
(
null
!=
feignClientResult
&&
feignClientResult
.
getBody
().
getStatus
()
==
200
)
{
return
CommonResponseUtil
.
success
(
feignClientResult
.
getBody
().
getResult
());
...
...
@@ -1133,7 +1133,6 @@ public class CarController extends AbstractBaseController {
log
.
error
(
"注:iotCode为 ("
+
iotCode
+
") 的车辆不存在于物联系统或物联系统车辆历史轨迹接口出错!"
);
return
CommonResponseUtil
.
success
();
}
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentDetailController.java
View file @
d722ef98
...
...
@@ -136,7 +136,7 @@ public class EquipmentDetailController extends AbstractBaseController {
// 编辑同步redis装备iotcode数据
syncDataService
.
saveOrUpdateEquipIotCodeRedisData
(
null
);
if
(
syncSwitch
)
{
equipmentSpecificSerivce
.
equipSpecificDataSync
(
equipmentId
);
equipmentSpecificSerivce
.
equipSpecificDataSync
(
date
.
getEquipmentSpecific
().
getId
()
);
}
return
date
;
}
...
...
@@ -243,7 +243,7 @@ public class EquipmentDetailController extends AbstractBaseController {
// 编辑同步redis装备iotcode数据
syncDataService
.
saveOrUpdateEquipIotCodeRedisData
(
null
);
if
(
syncSwitch
)
{
equipmentSpecificSerivce
.
equipSpecificDataSync
(
bean
.
getEquipmen
tId
());
equipmentSpecificSerivce
.
equipSpecificDataSync
(
equipmentSpecific
.
ge
tId
());
}
return
equipmentDate
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
d722ef98
...
...
@@ -349,6 +349,7 @@ public class FireFightingSystemController extends AbstractBaseController {
try
{
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
update
(
vo
));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
d722ef98
...
...
@@ -934,14 +934,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
int
res
=
this
.
baseMapper
.
deleteById
(
id
);
if
(
res
>
0
&&
syncSwitch
)
{
//数据同步
syncDataService
.
syncDeletedEquipmentSpecific
(
Arrays
.
asList
(
id
));
List
<
EquipmentIndexVO
>
indexBySpecificIdIn
=
equipmentSpecificIndexSerivce
.
getEquipIndexBySpecificIdIn
(
Arrays
.
asList
(
String
.
valueOf
(
id
)));
if
(!
indexBySpecificIdIn
.
isEmpty
())
{
List
<
Long
>
fireEquipmentInfoCollect
=
indexBySpecificIdIn
.
stream
().
filter
(
vo
->
0
==
vo
.
getIsIot
()).
map
(
EquipmentIndexVO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
fireEquipMeasurementCollect
=
indexBySpecificIdIn
.
stream
().
filter
(
vo
->
1
==
vo
.
getIsIot
()).
map
(
EquipmentIndexVO:
:
getId
).
collect
(
Collectors
.
toList
());
syncDataService
.
syncDeletedEquipmentSpecificInfo
(
fireEquipmentInfoCollect
);
syncDataService
.
syncDeletedFireEquipMeasurement
(
fireEquipMeasurementCollect
);
}
delEquipmentSpecificSyncData
(
id
);
}
//判断装备表剩余数量,无剩余删除模板
QueryWrapper
<
EquipmentSpecific
>
wrapper
=
new
QueryWrapper
<>();
...
...
@@ -992,6 +985,18 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
}
public
void
delEquipmentSpecificSyncData
(
Long
id
){
//数据同步
syncDataService
.
syncDeletedEquipmentSpecific
(
Arrays
.
asList
(
id
));
List
<
EquipmentIndexVO
>
indexBySpecificIdIn
=
equipmentSpecificIndexSerivce
.
getEquipIndexBySpecificIdIn
(
Arrays
.
asList
(
String
.
valueOf
(
id
)));
if
(!
indexBySpecificIdIn
.
isEmpty
())
{
List
<
Long
>
fireEquipmentInfoCollect
=
indexBySpecificIdIn
.
stream
().
filter
(
vo
->
0
==
vo
.
getIsIot
()).
map
(
EquipmentIndexVO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
fireEquipMeasurementCollect
=
indexBySpecificIdIn
.
stream
().
filter
(
vo
->
1
==
vo
.
getIsIot
()).
map
(
EquipmentIndexVO:
:
getId
).
collect
(
Collectors
.
toList
());
syncDataService
.
syncDeletedEquipmentSpecificInfo
(
fireEquipmentInfoCollect
);
syncDataService
.
syncDeletedFireEquipMeasurement
(
fireEquipMeasurementCollect
);
}
}
@Override
public
Object
getOneCard
(
Long
id
,
String
type
)
{
if
(
BitmapEnum
.
video
.
getKey
().
equals
(
type
))
{
...
...
@@ -1530,6 +1535,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
// 已入库
this
.
baseMapper
.
deleteEquipDataByStockDetailId
(
stockDetail
.
getId
(),
specificId
);
}
if
(
syncSwitch
)
{
//数据同步
delEquipmentSpecificSyncData
(
specificId
);
}
return
Boolean
.
TRUE
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
d722ef98
...
...
@@ -738,8 +738,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
if
(!
StringUtil
.
isNotEmpty
(
SystemTypeEnum
.
getEnum
(
systemCode
)))
{
return
null
;
}
Map
<
String
,
Object
>
data
=
null
;
Map
<
String
,
Object
>
data
;
if
(
isUpdate
)
{
data
=
saveIntegrationPageSysData
(
systemCode
);
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
d722ef98
...
...
@@ -771,9 +771,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
action
.
setStatus
(
AlarmStatusEnum
.
HF
.
getCode
());
}
action
.
setUpdateDate
(
new
Date
());
// 更新所在系统,设备可能编辑过
// 更新所在系统,设备可能编辑过
,更新所在系统、装备名称、装备定义code
action
.
setSystemIds
(
equipmentSpcIndex
.
getSystemId
());
action
.
setSystemCodes
(
this
.
getSystemCodeBySpeId
(
equipmentSpcIndex
.
getSystemId
()));
action
.
setEquipmentSpecificName
(
equipmentSpcIndex
.
getEquipmentSpecificName
());
action
.
setEquipmentCode
(
equipmentSpcIndex
.
getEquipmentCode
());
// 冗余字段,alarm_log表更新时使用
action
.
setCode
(
equipmentSpcIndex
.
getEquipmentSpecificCode
());
equipmentSpecificAlarms
.
add
(
action
);
});
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/utils/SyncDataUtil.java
View file @
d722ef98
...
...
@@ -305,7 +305,7 @@ public class SyncDataUtil {
fireEquipMeasurement
.
setValue
(
i
.
getValue
());
fireEquipMeasurement
.
setTypeCode
(
i
.
getTypeCode
());
fireEquipMeasurement
.
setTypeName
(
i
.
getTypeName
());
fireEquipMeasurement
.
setMRid
(
i
.
get
TypeCode
());
fireEquipMeasurement
.
setMRid
(
i
.
get
IndexId
());
return
fireEquipMeasurement
;
}
).
collect
(
Collectors
.
toList
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/VoiceRecordFileController.java
View file @
d722ef98
...
...
@@ -136,7 +136,7 @@ public class VoiceRecordFileController extends BaseController {
sortRule
=
"desc"
;
}
}
else
{
sortParam
=
"
call
_time"
;
sortParam
=
"
tel_start
_time"
;
sortRule
=
"desc"
;
}
Page
<
VoiceRecordFileDto
>
pageBean
=
voiceRecordFileServiceImpl
.
queryRecordListByQueryDto
(
page
,
...
...
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
d722ef98
...
...
@@ -3103,80 +3103,149 @@ GROUP BY
-- ----------------------------
-- View structure for v_fire_cafs_fightingsys_equip_count
-- ----------------------------
DROP
VIEW
IF
EXISTS
`v_fire_cafs_fightingsys_equip_count`
;
DROP
VIEW
IF
EXISTS
`v_fire_cafs_fightingsys_equip_count`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_cafs_fightingsys_equip_count`
AS
SELECT
SUM
(
CASE
WHEN
temp
.
`value`
=
'true'
THEN
1
ELSE
0
END
)
AS
total
,
temp
.
fieldlabel
,
temp
.
fieldname
sum
(
(
CASE
WHEN
(
`temp`
.
`value`
=
'true'
)
THEN
1
ELSE
0
END
)
)
AS
`total`
,
`temp`
.
`fieldlabel`
AS
`fieldlabel`
,
`temp`
.
`fieldname`
AS
`fieldname`
FROM
(
SELECT
CASE
WHEN
esi
.
equipment_index_key
LIKE
'%Run'
THEN
'Run'
WHEN
esi
.
equipment_index_key
LIKE
'%Stop'
THEN
'Stop'
WHEN
esi
.
equipment_index_key
LIKE
'%Open'
THEN
'Open'
WHEN
esi
.
equipment_index_key
LIKE
'%Close'
THEN
'Close'
WHEN
esi
.
equipment_index_key
LIKE
'%Fault'
THEN
'Fault'
WHEN
esi
.
equipment_index_key
LIKE
'%RemoteControl'
THEN
'RemoteControl'
WHEN
esi
.
equipment_index_key
LIKE
'%Alarm'
THEN
'Alarm'
WHEN
esi
.
equipment_index_key
LIKE
'%Abnormal'
THEN
'Abnormal'
END
AS
fieldname
,
CASE
WHEN
esi
.
equipment_index_key
LIKE
'%Run'
THEN
'运行'
WHEN
esi
.
equipment_index_key
LIKE
'%Stop'
THEN
'停止'
WHEN
esi
.
equipment_index_key
LIKE
'%Open'
THEN
'开到位'
WHEN
esi
.
equipment_index_key
LIKE
'%Close'
THEN
'关到位'
WHEN
esi
.
equipment_index_key
LIKE
'%Fault'
THEN
'故障'
WHEN
esi
.
equipment_index_key
LIKE
'%RemoteControl'
THEN
'远方'
WHEN
esi
.
equipment_index_key
LIKE
'%Alarm'
THEN
'告警'
WHEN
esi
.
equipment_index_key
LIKE
'%Abnormal'
THEN
'异常'
END
AS
fieldlabel
,
esi
.
`value`
FROM
wl_equipment_specific_index
esi
LEFT
JOIN
wl_equipment_specific
es
ON
es
.
id
=
esi
.
equipment_specific_id
LEFT
JOIN
f_fire_fighting_system
fs
ON
find_in_set
(
`fs`
.
`id`
,
`es`
.
`system_id`
)
WHERE
fs
.
`code`
=
'029026401813010000000023'
AND
(
esi
.
equipment_index_key
LIKE
'%Run'
OR
esi
.
equipment_index_key
LIKE
'%Stop'
OR
esi
.
equipment_index_key
LIKE
'%Open'
OR
esi
.
equipment_index_key
LIKE
'%Close'
OR
esi
.
equipment_index_key
LIKE
'%Fault'
OR
esi
.
equipment_index_key
LIKE
'%RemoteControl'
OR
esi
.
equipment_index_key
LIKE
'%Alarm'
OR
esi
.
equipment_index_key
LIKE
'%Abnormal'
)
)
temp
(
CASE
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Run'
)
THEN
'Run'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Stop'
)
THEN
'Stop'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%_Open'
)
THEN
'Open'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Close'
)
THEN
'Close'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
THEN
'Fault'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%_RemoteControl'
)
THEN
'RemoteControl'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Alarm'
)
THEN
'Alarm'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Abnormal'
)
THEN
'Abnormal'
END
)
AS
`fieldname`
,
(
CASE
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Run'
)
THEN
'运行'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Stop'
)
THEN
'停止'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%_Open'
)
THEN
'开到位'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Close'
)
THEN
'关到位'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
THEN
'故障'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%_RemoteControl'
)
THEN
'远方'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Alarm'
)
THEN
'告警'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Abnormal'
)
THEN
'异常'
END
)
AS
`fieldlabel`
,
`esi`
.
`value`
AS
`value`
FROM
(
(
`wl_equipment_specific_index`
`esi`
LEFT
JOIN
`wl_equipment_specific`
`es`
ON
(
(
`es`
.
`id`
=
`esi`
.
`equipment_specific_id`
)
)
)
LEFT
JOIN
`f_fire_fighting_system`
`fs`
ON
(
(
0
<>
find_in_set
(
`fs`
.
`id`
,
`es`
.
`system_id`
)
)
)
)
WHERE
(
(
`fs`
.
`code`
=
'029026401813010000000023'
)
AND
(
(
`esi`
.
`equipment_index_key`
LIKE
'%Run'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Stop'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%_Open'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Close'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%_RemoteControl'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Alarm'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Abnormal'
)
)
)
)
`temp`
GROUP
BY
temp
.
fieldlabel
,
temp
.
fieldname
;
`temp`
.
`fieldlabel`
,
`temp`
.
`fieldname`
;
-- ----------------------------
-- View structure for v_person_plan_task
-- ----------------------------
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificIndexMapper.xml
View file @
d722ef98
...
...
@@ -340,7 +340,7 @@ WHERE wles.id=#{id}
si.update_date,
ei.type_code AS typeCode,
ei.type_name AS typeName,
e
s.`code
` AS indexId
e
i.`id
` AS indexId
FROM
wl_equipment_specific_index si
LEFT JOIN wl_equipment_index ei ON si.equipment_index_id = ei.id
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
d722ef98
...
...
@@ -741,6 +741,7 @@
SELECT
es.id,
es.`code` AS mrid,
es.`code` AS materialObjectId,
es.`name`,
es.`name` AS aliasname,
es.`code`,
...
...
@@ -760,7 +761,8 @@
NOW( ) AS updatedate,
es.area_id AS areaid,
ws.`name` AS buildname,
a.`name` AS workarea
a.`name` AS workarea,
es.qr_code as qrCode
FROM
wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id
...
...
@@ -773,17 +775,31 @@
<select
id=
"getEquipSpecificDetailsByEquipmentId"
resultType=
"com.yeejoin.equipmanage.common.datasync.entity.FireEquipment"
>
SELECT
es.id,
ed.`name`,
es.`code`,
es.`code` AS mRid,
es.system_id AS fightingSystemIds,
es.iot_code AS iotCode,
e.`name` AS categoryName,
e.`code` AS categoryCode,
ws.source_id AS buildId,
ws.`name` AS buildName,
TRIM( CONCAT( IFNULL( ws.full_name, '' ), ' ', IFNULL( sd.description, '' ) ) ) AS position
es.id,
ed.`name`,
ed.`name` as aliasname,
IFNULL(es.`code`,'') as `code`,
IFNULL(es.`code`,'') AS mRid,
IFNULL(es.system_id,'') AS fightingSystemIds,
IFNULL(es.iot_code,'') AS iotCode,
e.`name` AS categoryName,
e.`code` AS categoryCode,
IFNULL(ws.source_id,'') AS buildId,
IFNULL(ws.`name`,'') AS buildName,
IFNULL(a.`name`,'') as `workArea`,
IFNULL(a.`id`,'') as `areaid`,
(SELECT
`name`
FROM
f_station_info
LIMIT 1) as stationname,
(SELECT
station_code
FROM
f_station_info
LIMIT 1) as stationCode,
es.create_date as inUseDate,
TRIM( CONCAT( IFNULL( ws.full_name, '' ), ' ', IFNULL( sd.description, '' ) ) ) AS position
FROM
wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id
...
...
@@ -791,9 +807,10 @@
LEFT JOIN f_fire_fighting_system fs ON fs.id = es.system_id
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = es.id
LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id
LEFT JOIN wl_area a ON a.id = es.area_id
<where>
<if
test=
"equipmentId != null"
>
e
d.equipment_
id = #{equipmentId}
e
s.
id = #{equipmentId}
</if>
</where>
</select>
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
d722ef98
...
...
@@ -756,6 +756,7 @@
<select
id=
"getFireFightingSystemDetail"
resultType=
"com.yeejoin.equipmanage.common.datasync.entity.FireFightingSystem"
>
SELECT
fs.id,
f.`name` AS stationname,
f.`code` AS stationcode,
...
...
@@ -763,7 +764,7 @@
fs.`name` AS aliasname,
fs.`code`,
fg.group_name AS systemtype,
IFNULL(fs.install_date,'')
AS installdate,
fs.install_date
AS installdate,
IFNULL(p.`name`,'') AS chargeperson,
IFNULL(fs.charge_person_phone,'') AS chargepersonphone,
IFNULL(mi.`name`,'') AS constructionunit,
...
...
@@ -783,8 +784,8 @@
LEFT JOIN rpm_person p ON p.id = fs.charge_person,
f_station_info f
<where>
<if
test=
"
id != null and
id !=''"
>
fs.id = #{id}
<if
test=
"
fireFightingSystemVo != null and fireFightingSystemVo.id != null and fireFightingSystemVo.
id !=''"
>
fs.id = #{
fireFightingSystemVo.
id}
</if>
</where>
</select>
...
...
@@ -922,7 +923,7 @@
from
`wl_equipment_specific_index` si
where
si.equipment_index_key = 'FAS_
AirSampler
_FireAlarm') as sgbjqnum,
si.equipment_index_key = 'FAS_
SoundLightAlarm
_FireAlarm') as sgbjqnum,
(SELECT
count(1)
from
...
...
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