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
f21ea8c8
Commit
f21ea8c8
authored
Feb 25, 2022
by
chenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_ccs' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_ccs
parents
30336623
815440f3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
793 additions
and
146 deletions
+793
-146
BaseDto.java
...in/java/com/yeejoin/amos/boot/biz/common/dto/BaseDto.java
+3
-1
BaseEntity.java
...a/com/yeejoin/amos/boot/biz/common/entity/BaseEntity.java
+2
-1
WaterResource.java
...oin/amos/boot/module/common/api/entity/WaterResource.java
+2
-0
CarProperty.java
...va/com/yeejoin/equipmanage/common/entity/CarProperty.java
+32
-0
EquipmentAlarmReportDay.java
...in/equipmanage/common/entity/EquipmentAlarmReportDay.java
+3
-0
EquipmentIndex.java
...com/yeejoin/equipmanage/common/entity/EquipmentIndex.java
+13
-1
EquipmentSpecificAlarm.java
...oin/equipmanage/common/entity/EquipmentSpecificAlarm.java
+19
-1
EquipmentSpecificAlarmLog.java
.../equipmanage/common/entity/EquipmentSpecificAlarmLog.java
+18
-0
EquipmentSpecificIndex.java
...oin/equipmanage/common/entity/EquipmentSpecificIndex.java
+35
-1
SignalClassify.java
...com/yeejoin/equipmanage/common/entity/SignalClassify.java
+66
-0
EquipmentIndexVO.java
...eejoin/equipmanage/common/entity/vo/EquipmentIndexVO.java
+4
-0
EquipmentStateVo.java
...eejoin/equipmanage/common/entity/vo/EquipmentStateVo.java
+6
-0
CarForGisEnum.java
...a/com/yeejoin/equipmanage/common/enums/CarForGisEnum.java
+1
-1
EquipmentIndexLabelsEnum.java
...in/equipmanage/common/enums/EquipmentIndexLabelsEnum.java
+1
-1
EquipmentStateUtil.java
.../yeejoin/equipmanage/common/utils/EquipmentStateUtil.java
+6
-10
SpeIndexVo.java
...in/java/com/yeejoin/equipmanage/common/vo/SpeIndexVo.java
+12
-0
AlertCalledMapper.xml
...e-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
+2
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+1
-0
EquipmentDetailController.java
...oin/equipmanage/controller/EquipmentDetailController.java
+2
-2
EquipmentIndexController.java
...join/equipmanage/controller/EquipmentIndexController.java
+90
-8
SignalClassifyController.java
...join/equipmanage/controller/SignalClassifyController.java
+98
-0
EquipmentSpecificAlarmLogMapper.java
...n/equipmanage/mapper/EquipmentSpecificAlarmLogMapper.java
+4
-0
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+3
-1
SignalClassifyMapper.java
.../com/yeejoin/equipmanage/mapper/SignalClassifyMapper.java
+14
-0
ISignalClassifyService.java
...m/yeejoin/equipmanage/service/ISignalClassifyService.java
+18
-0
EquipmentIndexImpl.java
.../yeejoin/equipmanage/service/impl/EquipmentIndexImpl.java
+35
-4
EquipmentSpecificAlarmServiceImpl.java
...anage/service/impl/EquipmentSpecificAlarmServiceImpl.java
+2
-1
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+8
-1
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+26
-19
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+0
-0
RiskSourceSceneServiceImpl.java
.../equipmanage/service/impl/RiskSourceSceneServiceImpl.java
+1
-1
SignalClassifyServiceImpl.java
...n/equipmanage/service/impl/SignalClassifyServiceImpl.java
+23
-0
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+1
-1
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+1
-1
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+137
-68
wl-3.0.1.xml
...ot-system-equip/src/main/resources/changelog/wl-3.0.1.xml
+0
-0
CarPropertyMapper.xml
...tem-equip/src/main/resources/mapper/CarPropertyMapper.xml
+11
-4
EquipmentIndexMapper.xml
...-equip/src/main/resources/mapper/EquipmentIndexMapper.xml
+6
-3
EquipmentSpecificAlarmLogMapper.xml
...main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
+39
-0
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+7
-6
EquipmentSpecificIndexMapper.xml
...rc/main/resources/mapper/EquipmentSpecificIndexMapper.xml
+9
-2
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+20
-5
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+7
-2
SignalClassifyMapper.xml
...-equip/src/main/resources/mapper/SignalClassifyMapper.xml
+5
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dto/BaseDto.java
View file @
f21ea8c8
...
...
@@ -41,5 +41,7 @@ public class BaseDto implements Serializable{
@ExcelIgnore
@ApiModelProperty
(
value
=
"是否删除"
)
private
Boolean
isDelete
;
private
Boolean
isDelete
=
false
;
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/entity/BaseEntity.java
View file @
f21ea8c8
...
...
@@ -35,5 +35,6 @@ public class BaseEntity implements Serializable{
* 是否删除
*/
@TableField
(
value
=
"is_delete"
)
private
Boolean
isDelete
;
public
Boolean
isDelete
=
false
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/WaterResource.java
View file @
f21ea8c8
...
...
@@ -205,4 +205,6 @@ public class WaterResource extends BaseEntity {
@ApiModelProperty
(
"维保周期"
)
@TableField
(
"maintenance_period"
)
private
String
maintenancePeriod
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/CarProperty.java
View file @
f21ea8c8
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
@@ -51,6 +52,32 @@ public class CarProperty extends BaseEntity {
*/
@TableField
(
value
=
"equipment_index_key"
)
private
String
equipmentIndexKey
;
/**
* 颜色
*/
@TableField
(
value
=
"emergency_level_color"
)
private
String
emergencyLevelColor
;
/**
* 是否告警:0-否;1-是
*/
@TableField
(
value
=
"is_alarm"
)
private
Integer
isAlarm
;
/**
* 紧急程度枚举(1:紧急,2:严重,3:轻微,4:正常,5:无效,6:备用,7:其他)
*/
@TableField
(
value
=
"emergency_level"
)
private
String
emergencyLevel
;
/**
* 紧急程度描述
*/
@TableField
(
value
=
"emergency_level_describe"
)
private
String
emergencyLevelDescribe
;
@TableField
(
exist
=
false
)
private
String
unitName
;
...
...
@@ -58,7 +85,12 @@ public class CarProperty extends BaseEntity {
private
String
perfQuotaName
;
@TableField
(
exist
=
false
)
private
String
groupName
;
@TableField
(
exist
=
false
)
private
String
nameKey
;
@TableField
(
exist
=
false
)
private
String
iotCode
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentAlarmReportDay.java
View file @
f21ea8c8
...
...
@@ -83,4 +83,7 @@ public class EquipmentAlarmReportDay extends BaseEntity {
@ApiModelProperty
(
value
=
"指标最新值"
)
private
String
value
;
@ApiModelProperty
(
value
=
"是否告警:0-否;1-是"
)
private
Integer
isAlarm
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentIndex.java
View file @
f21ea8c8
...
...
@@ -98,7 +98,6 @@ public class EquipmentIndex extends BaseEntity {
@TableField
(
value
=
"perf_value"
)
private
String
perfValue
;
/**
* 性能指标(临时)
*/
...
...
@@ -111,4 +110,17 @@ public class EquipmentIndex extends BaseEntity {
*/
@TableField
(
value
=
"is_trend"
)
private
Boolean
isTrend
;
@TableField
(
value
=
"emergency_level_color"
)
private
String
emergencyLevelColor
;
@TableField
(
value
=
"is_alarm"
)
private
Integer
isAlarm
;
@TableField
(
value
=
"emergency_level"
)
private
String
emergencyLevel
;
@TableField
(
value
=
"emergency_level_describe"
)
private
String
emergencyLevelDescribe
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificAlarm.java
View file @
f21ea8c8
...
...
@@ -146,7 +146,7 @@ public class EquipmentSpecificAlarm extends BaseEntity {
@ApiModelProperty
(
value
=
"设备编码"
)
@TableField
(
exist
=
false
)
private
String
c
ode
;
private
String
equipmentSpecificC
ode
;
@ApiModelProperty
(
value
=
"消防系统名称"
,
notes
=
"告警详情时使用"
)
@TableField
(
exist
=
false
)
...
...
@@ -180,4 +180,22 @@ public class EquipmentSpecificAlarm extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
buildId
;
/**
* 颜色
*/
@TableField
(
value
=
"emergency_level_color"
)
private
String
emergencyLevelColor
;
/**
* 紧急程度枚举(1:紧急,2:严重,3:轻微,4:正常,5:无效,6:备用,7:其他)
*/
@TableField
(
value
=
"emergency_level"
)
private
String
emergencyLevel
;
/**
* 紧急程度描述
*/
@TableField
(
value
=
"emergency_level_describe"
)
private
String
emergencyLevelDescribe
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificAlarmLog.java
View file @
f21ea8c8
...
...
@@ -188,4 +188,22 @@ public class EquipmentSpecificAlarmLog extends BaseEntity {
@ApiModelProperty
(
value
=
"消除状态"
)
@TableField
(
exist
=
false
)
private
String
cleanStatus
;
/**
* 颜色
*/
@TableField
(
value
=
"emergency_level_color"
)
private
String
emergencyLevelColor
;
/**
* 紧急程度枚举(1:紧急,2:严重,3:轻微,4:正常,5:无效,6:备用,7:其他)
*/
@TableField
(
value
=
"emergency_level"
)
private
String
emergencyLevel
;
/**
* 紧急程度描述
*/
@TableField
(
value
=
"emergency_level_describe"
)
private
String
emergencyLevelDescribe
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificIndex.java
View file @
f21ea8c8
...
...
@@ -50,7 +50,31 @@ public class EquipmentSpecificIndex extends BaseEntity {
@ApiModelProperty
(
value
=
"指标key(冗余字段)"
)
@TableField
(
"equipment_index_key"
)
private
String
equipmentIndexKey
;
/**
* 颜色
*/
@TableField
(
value
=
"emergency_level_color"
)
private
String
emergencyLevelColor
;
/**
* 是否告警:0-否;1-是
*/
@TableField
(
value
=
"is_alarm"
)
private
Integer
isAlarm
;
/**
* 紧急程度枚举(1:紧急,2:严重,3:轻微,4:正常,5:无效,6:备用,7:其他)
*/
@TableField
(
value
=
"emergency_level"
)
private
String
emergencyLevel
;
/**
* 紧急程度描述
*/
@TableField
(
value
=
"emergency_level_describe"
)
private
String
emergencyLevelDescribe
;
@TableField
(
exist
=
false
)
private
String
nameKey
;
...
...
@@ -109,4 +133,14 @@ public class EquipmentSpecificIndex extends BaseEntity {
@ApiModelProperty
(
value
=
"设备所属系统ids"
)
@TableField
(
exist
=
false
)
private
String
systemId
;
@ApiModelProperty
(
value
=
"详细位置"
)
@TableField
(
exist
=
false
)
private
String
location
;
@ApiModelProperty
(
value
=
"所属建筑id"
)
@TableField
(
exist
=
false
)
private
String
buildId
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/SignalClassify.java
0 → 100644
View file @
f21ea8c8
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* 信号分类量测枚举表
*
* @author system_generator
* @date 2022-02-18
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"wl_signal_classify"
)
public
class
SignalClassify
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableField
(
"id"
)
private
Long
id
;
/**
* 量测枚举key
*/
@TableField
(
"type_code"
)
private
String
typeCode
;
/**
* 类型名称
*/
@TableField
(
"type_name"
)
private
String
typeName
;
/**
* 十六进制颜色
*/
@TableField
(
"emergency_level_color"
)
private
String
emergencyLevelColor
;
/**
* 是否删除:0-否;1-是
*/
@TableField
(
"is_alarm"
)
private
Integer
isAlarm
;
/**
* 紧急程度枚举(1:紧急,2:严重,3:轻微,4:正常,5:无效,6:备用,7:其他)
*/
@TableField
(
"emergency_level"
)
private
String
emergencyLevel
;
/**
* 紧急程度描述
*/
@TableField
(
"emergency_level_describe"
)
private
String
emergencyLevelDescribe
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquipmentIndexVO.java
View file @
f21ea8c8
...
...
@@ -65,4 +65,8 @@ public class EquipmentIndexVO {
@ApiModelProperty
(
value
=
"是否支持趋势查看"
)
private
Integer
isTrend
;
@ApiModelProperty
(
value
=
"指标枚举"
)
private
String
valueEnum
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquipmentStateVo.java
View file @
f21ea8c8
...
...
@@ -54,4 +54,10 @@ public class EquipmentStateVo {
*/
private
List
<
SpeIndexVo
>
speindexList
;
/**
* 紧急程度颜色
*/
private
String
color
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/CarForGisEnum.java
View file @
f21ea8c8
...
...
@@ -16,7 +16,7 @@ public enum CarForGisEnum {
DL
(
"电量"
,
"FireCar_Power"
),
DDHX
(
"对地航向"
,
"FireCar_CourseOverGround"
),
SJ
(
"时间"
,
"time"
),
QT
(
"启停"
,
"
state
"
);
QT
(
"启停"
,
"
FireCar_Start
"
);
private
String
describe
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/EquipmentIndexLabelsEnum.java
View file @
f21ea8c8
...
...
@@ -10,7 +10,7 @@ package com.yeejoin.equipmanage.common.enums;
*/
public
enum
EquipmentIndexLabelsEnum
{
labels
(
"
l
abels"
,
"装备指标编码"
);
labels
(
"
FireCar_L
abels"
,
"装备指标编码"
);
public
final
String
name
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/EquipmentStateUtil.java
View file @
f21ea8c8
...
...
@@ -6,17 +6,19 @@ import com.yeejoin.equipmanage.common.enums.EquipmentRiskTypeEnum;
import
com.yeejoin.equipmanage.common.enums.EquipmentStateEnum
;
import
com.yeejoin.equipmanage.common.enums.TrueOrFalseEnum
;
import
com.yeejoin.equipmanage.common.vo.AlarmDataVO
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
javax.validation.Validation
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author keyong
* @title: EquipmentStateUtil
* <pre>
* @description: 通过性能指标判断设备状态(火灾报警 > 故障告警 > 屏蔽 > 运行状态)
...
...
@@ -265,15 +267,9 @@ public class EquipmentStateUtil {
}
public
static
String
judgeEquipState
(
EquipmentSpecificIndex
index
)
{
String
status
=
EquipmentStateEnum
.
ZC
.
getStatus
();
String
keyValue
=
String
.
valueOf
(
index
.
getValue
());
for
(
EquipmentRiskTypeEnum
enums
:
EquipmentRiskTypeEnum
.
values
())
{
if
(
enums
.
getCode
().
equals
(
index
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
keyValue
))
{
status
=
enums
.
getStateCode
();
break
;
}
if
(
TrueOrFalseEnum
.
real
.
value
.
toUpperCase
().
equals
(
String
.
valueOf
(
index
.
getValue
()).
toUpperCase
()))
{
return
index
.
getEmergencyLevelColor
();
}
log
.
info
(
"此装备的状态为: "
+
status
+
"(屏蔽-5, 火灾告警-4, 故障-3, 正常-2, 挂起-1)"
);
return
status
;
return
""
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/SpeIndexVo.java
View file @
f21ea8c8
...
...
@@ -19,4 +19,16 @@ public class SpeIndexVo {
private
String
typeCode
=
""
;
private
Long
equipmentSpecificId
;
private
String
color
=
""
;
private
Integer
isAlarm
=
0
;
private
String
emergencyLevel
=
""
;
private
String
emergencyLevelDescribe
=
""
;
private
String
indexValue
;
private
String
indexName
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
f21ea8c8
...
...
@@ -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-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
f21ea8c8
...
...
@@ -94,6 +94,7 @@ public class WaterResourceController extends BaseController {
model
.
setResourceTypeName
(
resourceTypeEnum
.
get
().
getName
());
model
.
setRealityImg
(
null
);
model
.
setOrientationImg
(
null
);
model
.
setIsDelete
(
true
);
/*2021-09-08 前端表示前端传递的address参数已经切割过,后端无需再切割获取 陈召 屏蔽代码 97-102行*/
/* if(model.getAddress()!=null){
JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(model.getAddress());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentDetailController.java
View file @
f21ea8c8
...
...
@@ -180,7 +180,7 @@ public class EquipmentDetailController extends AbstractBaseController {
// 编辑同步redis装备iotcode数据
syncDataService
.
saveOrUpdateEquipIotCodeRedisData
(
null
);
if
(
syncSwitch
)
{
equipmentSpecificSerivce
.
equipSpecificDataSync
(
equipmentId
);
equipmentSpecificSerivce
.
equipSpecificDataSync
(
date
.
getEquipmentSpecific
().
getId
()
);
}
EquipmentDetailController
controllerProxy
=
SpringUtils
.
getBean
(
EquipmentDetailController
.
class
);
controllerProxy
.
refreshCount
(
vo
.
getBizOrgCode
());
...
...
@@ -291,7 +291,7 @@ public class EquipmentDetailController extends AbstractBaseController {
// 编辑同步redis装备iotcode数据
syncDataService
.
saveOrUpdateEquipIotCodeRedisData
(
null
);
if
(
syncSwitch
)
{
equipmentSpecificSerivce
.
equipSpecificDataSync
(
bean
.
getEquipmen
tId
());
equipmentSpecificSerivce
.
equipSpecificDataSync
(
equipmentSpecific
.
ge
tId
());
}
// 刷新缓存,新的单位和之前的单位都刷新
EquipmentDetailController
controllerProxy
=
SpringUtils
.
getBean
(
EquipmentDetailController
.
class
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentIndexController.java
View file @
f21ea8c8
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
javax.servlet.http.HttpServletRequest
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.mapper.SignalClassifyMapper
;
import
com.yeejoin.equipmanage.service.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -15,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -23,15 +31,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.yeejoin.equipmanage.common.entity.Equipment
;
import
com.yeejoin.equipmanage.common.entity.EquipmentIndex
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex
;
import
com.yeejoin.equipmanage.common.entity.dto.PerfQuotaIotDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO
;
import
com.yeejoin.equipmanage.service.ICarPropertyService
;
import
com.yeejoin.equipmanage.service.IEquipmentIndexService
;
import
com.yeejoin.equipmanage.service.IEquipmentService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificIndexSerivce
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -58,6 +59,10 @@ public class EquipmentIndexController {
ICarPropertyService
carPropertyService
;
@Autowired
private
Sequence
sequence
;
@Autowired
IEquipmentDetailService
iEquipmentDetailService
;
@Autowired
SignalClassifyMapper
signalClassifyMapper
;
/**
* 新增消防装备/消防车指标
...
...
@@ -101,7 +106,6 @@ public class EquipmentIndexController {
return
true
;
}
/**
* 修改消防装备/消防车指标
*
...
...
@@ -114,6 +118,35 @@ public class EquipmentIndexController {
if
(
equipmentIndex
.
getIsImportentParameter
())
{
//如果不是物联指标项,清空物联指标项信息
if
(
equipmentIndex
.
getIsIot
()==
false
){
QueryWrapper
<
EquipmentDetail
>
equipmentDetailQueryWrapper
=
new
QueryWrapper
<>();
equipmentDetailQueryWrapper
.
eq
(
"equipment_id"
,
equipmentIndex
.
getEquipmentId
());
List
<
EquipmentDetail
>
equipDetailList
=
iEquipmentDetailService
.
list
(
equipmentDetailQueryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
equipDetailList
))
{
LambdaUpdateWrapper
<
CarProperty
>
carWrapper
=
new
LambdaUpdateWrapper
<>();
carWrapper
.
eq
(
CarProperty:
:
getEquipmentIndexId
,
equipmentIndex
.
getId
());
List
<
CarProperty
>
list
=
carPropertyService
.
list
(
carWrapper
);
// 因为是非物联指标信息,所以此处手动定义了默认值(color:#49AA19[绿色];isAlarm:0;alarmDescribe:否;emergencyLevel:4;emergencyLevelDescribe:正常)
list
.
forEach
(
x
->
{
x
.
setEmergencyLevelColor
(
"#49AA19"
);
x
.
setIsAlarm
(
0
);
x
.
setEmergencyLevel
(
"4"
);
x
.
setEmergencyLevelDescribe
(
"正常"
);
});
carPropertyService
.
updateBatchById
(
list
);
}
else
{
LambdaUpdateWrapper
<
EquipmentSpecificIndex
>
equipWrapper
=
new
LambdaUpdateWrapper
<>();
equipWrapper
.
eq
(
EquipmentSpecificIndex:
:
getEquipmentIndexId
,
equipmentIndex
.
getId
());
List
<
EquipmentSpecificIndex
>
indexList
=
equipmentSpecificIndexSerivce
.
list
(
equipWrapper
);
if
(!
ObjectUtils
.
isEmpty
(
indexList
))
{
indexList
.
forEach
(
y
->
{
y
.
setEmergencyLevelColor
(
"#49AA19"
);
y
.
setIsAlarm
(
0
);
y
.
setEmergencyLevel
(
"4"
);
y
.
setEmergencyLevelDescribe
(
"正常"
);
});
equipmentSpecificIndexSerivce
.
updateBatchById
(
indexList
);
}
}
LambdaUpdateWrapper
<
EquipmentIndex
>
equipmentIndexLambdaUpdateWrapper
=
new
LambdaUpdateWrapper
<>();
equipmentIndexLambdaUpdateWrapper
.
eq
(
EquipmentIndex:
:
getId
,
equipmentIndex
.
getId
());
equipmentIndexLambdaUpdateWrapper
.
set
(
EquipmentIndex:
:
getEquipmentId
,
equipmentIndex
.
getEquipmentId
());
...
...
@@ -129,6 +162,55 @@ public class EquipmentIndexController {
equipmentIndexLambdaUpdateWrapper
.
set
(
EquipmentIndex:
:
getPerfValue
,
equipmentIndex
.
getPerfValue
());
return
equipmentIndexService
.
update
(
equipmentIndexLambdaUpdateWrapper
);
}
else
{
AtomicBoolean
bool
=
new
AtomicBoolean
(
true
);
if
(
ValidationUtil
.
isEmpty
(
equipmentIndex
.
getTypeCode
()))
{
bool
.
set
(
false
);
}
SignalClassify
signalClassify
=
null
;
if
(
bool
.
get
())
{
LambdaQueryWrapper
<
SignalClassify
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
inSql
(
SignalClassify:
:
getTypeCode
,
"SELECT type_code FROM wl_signal_classify WHERE UPPER(type_code) ='"
+
equipmentIndex
.
getTypeCode
().
toUpperCase
()
+
"'"
);
signalClassify
=
signalClassifyMapper
.
selectOne
(
queryWrapper
);
}
QueryWrapper
<
EquipmentDetail
>
equipmentDetailQueryWrapper
=
new
QueryWrapper
<>();
equipmentDetailQueryWrapper
.
eq
(
"equipment_id"
,
equipmentIndex
.
getEquipmentId
());
List
<
EquipmentDetail
>
equipDetailList
=
iEquipmentDetailService
.
list
(
equipmentDetailQueryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
equipDetailList
))
{
LambdaUpdateWrapper
<
CarProperty
>
carWrapper
=
new
LambdaUpdateWrapper
<>();
carWrapper
.
eq
(
CarProperty:
:
getEquipmentIndexId
,
equipmentIndex
.
getId
());
List
<
CarProperty
>
list
=
carPropertyService
.
list
(
carWrapper
);
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
for
(
CarProperty
x
:
list
)
{
x
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
x
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
if
(
bool
.
get
())
{
x
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
x
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
x
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
x
.
setEmergencyLevelDescribe
(
signalClassify
.
getEmergencyLevelDescribe
());
}
}
carPropertyService
.
updateBatchById
(
list
);
}
}
else
{
LambdaUpdateWrapper
<
EquipmentSpecificIndex
>
equipWrapper
=
new
LambdaUpdateWrapper
<>();
equipWrapper
.
eq
(
EquipmentSpecificIndex:
:
getEquipmentIndexId
,
equipmentIndex
.
getId
());
List
<
EquipmentSpecificIndex
>
indexList
=
equipmentSpecificIndexSerivce
.
list
(
equipWrapper
);
if
(!
ObjectUtils
.
isEmpty
(
indexList
))
{
for
(
EquipmentSpecificIndex
y
:
indexList
)
{
y
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
y
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
if
(
bool
.
get
())
{
y
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
y
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
y
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
y
.
setEmergencyLevelDescribe
(
signalClassify
.
getEmergencyLevelDescribe
());
}
}
equipmentSpecificIndexSerivce
.
updateBatchById
(
indexList
);
}
}
return
equipmentIndexService
.
updateById
(
equipmentIndex
);
}
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SignalClassifyController.java
0 → 100644
View file @
f21ea8c8
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.equipmanage.common.entity.SignalClassify
;
import
com.yeejoin.equipmanage.service.ISignalClassifyService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
* 信号分类量测枚举表
*
* @author system_generator
* @date 2022-02-18
*/
@RestController
@Api
(
tags
=
"信号分类量测枚举表Api"
)
@RequestMapping
(
value
=
"/signal/classify"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
class
SignalClassifyController
extends
AbstractBaseController
{
@Autowired
ISignalClassifyService
iSignalClassifyService
;
/**
* 新增信号分类量测枚举表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增信号分类量测枚举表"
,
notes
=
"新增信号分类量测枚举表"
)
public
ResponseModel
<
SignalClassify
>
save
(
@RequestBody
SignalClassify
model
)
{
boolean
bool
=
iSignalClassifyService
.
save
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据id更新
*
* @param id 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{id}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据id更新信号分类量测枚举表"
,
notes
=
"根据id更新信号分类量测枚举表"
)
public
ResponseModel
<
SignalClassify
>
updateByidWlSignalClassify
(
@RequestBody
SignalClassify
model
,
@PathVariable
(
value
=
"id"
)
Long
id
)
{
model
.
setId
(
id
);
boolean
bool
=
iSignalClassifyService
.
updateById
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据id删除
*
* @param id 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除信号分类量测枚举表"
,
notes
=
"根据id删除信号分类量测枚举表"
)
public
ResponseModel
<
Boolean
>
deleteByid
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"id"
)
Long
id
){
return
ResponseHelper
.
buildResponse
(
iSignalClassifyService
.
removeById
(
id
));
}
/**
* 根据id查询
*
* @param id 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询单个信号分类量测枚举表"
,
notes
=
"根据id查询单个信号分类量测枚举表"
)
public
ResponseModel
<
SignalClassify
>
selectOne
(
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iSignalClassifyService
.
getById
(
id
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"信号分类量测枚举表列表全部数据查询"
,
notes
=
"信号分类量测枚举表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
SignalClassify
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
iSignalClassifyService
.
query
().
list
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificAlarmLogMapper.java
View file @
f21ea8c8
package
com
.
yeejoin
.
equipmanage
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentFireAlarm
;
import
com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarm
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog
;
...
...
@@ -28,4 +29,7 @@ public interface EquipmentSpecificAlarmLogMapper extends BaseMapper<EquipmentSpe
List
<
AppAlarmExtVo
>
findByIdListNoBuildId
(
@Param
(
"list"
)
List
<
Long
>
idBNullList
);
List
<
EquipmentSpecificAlarmLog
>
getIsConfirmByAlarmId
(
@Param
(
"equipmentSpecificAlarmId"
)
Long
equipmentSpecificAlarmId
,
@Param
(
"isConfirm"
)
String
isConfirm
);
List
<
FireEquipmentFireAlarm
>
getFireEquipAlarmLogDetailsById
(
@Param
(
"list"
)
List
<
Long
>
ids
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
f21ea8c8
...
...
@@ -106,7 +106,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
IPage
<
SourceNameByEquipSpeIdVO
>
getSourceNameList
(
IPage
page
,
Long
warehouseStructureId
,
Long
sourceId
,
String
equipmentName
,
String
equipmentCode
);
FireEquipment
getEquipSpecificDetail
(
EquipmentSpecific
equipmentSpecific
);
FireEquipment
getEquipSpecificDetail
(
Long
id
);
List
<
EquipmentCategory
>
getEquipSpeTypeByQrcode
(
@Param
(
"qrCode"
)
String
qrCode
);
...
...
@@ -205,4 +205,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
String
getEquipmentBySpecificId
(
@Param
(
"specificId"
)
Long
specificId
);
List
<
EquiplistSpecificBySystemVO
>
getListByWarehouseStructureId
(
Long
floorId
);
List
<
Map
<
String
,
String
>>
getStationInfo
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/SignalClassifyMapper.java
0 → 100644
View file @
f21ea8c8
package
com
.
yeejoin
.
equipmanage
.
mapper
;
import
com.yeejoin.equipmanage.common.entity.SignalClassify
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 信号分类量测枚举表 Mapper 接口
*
* @author system_generator
* @date 2022-02-18
*/
public
interface
SignalClassifyMapper
extends
BaseMapper
<
SignalClassify
>
{
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/ISignalClassifyService.java
0 → 100644
View file @
f21ea8c8
package
com
.
yeejoin
.
equipmanage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.equipmanage.common.entity.SignalClassify
;
import
java.util.List
;
/**
* 信号分类量测枚举表接口类
*
* @author system_generator
* @date 2022-02-18
*/
public
interface
ISignalClassifyService
extends
IService
<
SignalClassify
>
{
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentIndexImpl.java
View file @
f21ea8c8
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO
;
import
com.yeejoin.equipmanage.mapper.EquipmentIndexMapper
;
import
com.yeejoin.equipmanage.mapper.SignalClassifyMapper
;
import
com.yeejoin.equipmanage.service.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
javax.validation.Validation
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.atomic.AtomicBoolean
;
@Service
public
class
EquipmentIndexImpl
extends
ServiceImpl
<
EquipmentIndexMapper
,
EquipmentIndex
>
implements
IEquipmentIndexService
{
...
...
@@ -37,6 +42,9 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm
@Autowired
IEquipmentSpecificIndexSerivce
iEquipmentSpecificIndexSerivce
;
@Autowired
SignalClassifyMapper
signalClassifyMapper
;
@Override
public
IPage
<
EquipmentIndexVO
>
getPerfQutoaPage
(
IPage
<
EquipmentIndex
>
page
,
Long
id
,
String
groupName
)
{
return
this
.
baseMapper
.
getPage
(
page
,
id
,
groupName
);
...
...
@@ -90,7 +98,18 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm
@Override
public
boolean
savePerfQuota
(
EquipmentIndex
equipmentIndex
)
{
AtomicBoolean
bool
=
new
AtomicBoolean
(
true
);
if
(
ValidationUtil
.
isEmpty
(
equipmentIndex
.
getTypeCode
()))
{
bool
.
set
(
false
);
}
int
i
=
this
.
baseMapper
.
insert
(
equipmentIndex
);
SignalClassify
signalClassify
=
null
;
if
(
bool
.
get
())
{
LambdaQueryWrapper
<
SignalClassify
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
inSql
(
SignalClassify:
:
getTypeCode
,
"SELECT type_code FROM wl_signal_classify WHERE UPPER(type_code) ='"
+
equipmentIndex
.
getTypeCode
().
toUpperCase
()
+
"'"
);
signalClassify
=
signalClassifyMapper
.
selectOne
(
queryWrapper
);
}
QueryWrapper
<
EquipmentDetail
>
equipmentDetailQueryWrapper
=
new
QueryWrapper
<>();
equipmentDetailQueryWrapper
.
eq
(
"equipment_id"
,
equipmentIndex
.
getEquipmentId
());
List
<
EquipmentDetail
>
equipDetailList
=
iEquipmentDetailService
.
list
(
equipmentDetailQueryWrapper
);
...
...
@@ -100,14 +119,20 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm
List
<
Car
>
carList
=
iCarService
.
list
(
carQueryWrapper
);
if
(!
ObjectUtils
.
isEmpty
(
carList
))
{
List
<
CarProperty
>
carProperties
=
new
ArrayList
<>();
carList
.
forEach
(
car
->
{
for
(
Car
car
:
carList
)
{
CarProperty
carProperty
=
new
CarProperty
();
carProperty
.
setCarId
(
car
.
getId
());
carProperty
.
setEquipmentIndexId
(
equipmentIndex
.
getId
());
carProperty
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaName
());
carProperty
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
if
(
bool
.
get
())
{
carProperty
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
carProperty
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
carProperty
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
carProperty
.
setEmergencyLevelDescribe
(
signalClassify
.
getEmergencyLevelDescribe
());
}
carProperties
.
add
(
carProperty
);
}
);
}
iCarPropertyService
.
saveBatch
(
carProperties
);
}
}
else
{
...
...
@@ -120,15 +145,21 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm
List
<
EquipmentSpecific
>
equipmentSpecifics
=
iEquipmentSpecificSerivce
.
list
(
equipmentSpecificQueryWrapper
);
if
(
equipmentSpecifics
.
size
()
>
0
)
{
List
<
EquipmentSpecificIndex
>
equipmentSpecificIndexList
=
new
ArrayList
<>();
equipmentSpecifics
.
forEach
(
y
->
{
for
(
EquipmentSpecific
y
:
equipmentSpecifics
)
{
EquipmentSpecificIndex
equipmentSpecificIndex
=
new
EquipmentSpecificIndex
();
equipmentSpecificIndex
.
setEquipmentSpecificId
(
y
.
getId
());
equipmentSpecificIndex
.
setEquipmentIndexId
(
equipmentIndex
.
getId
());
equipmentSpecificIndex
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
equipmentSpecificIndex
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
equipmentSpecificIndex
.
setEquipmentSpecialName
(
y
.
getName
());
if
(
bool
.
get
())
{
equipmentSpecificIndex
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
equipmentSpecificIndex
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
equipmentSpecificIndex
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
equipmentSpecificIndex
.
setEmergencyLevelDescribe
(
signalClassify
.
getEmergencyLevelDescribe
());
}
equipmentSpecificIndexList
.
add
(
equipmentSpecificIndex
);
}
)
;
};
iEquipmentSpecificIndexSerivce
.
saveBatch
(
equipmentSpecificIndexList
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmServiceImpl.java
View file @
f21ea8c8
...
...
@@ -185,7 +185,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
LocalDateTime
createDate
=
(
LocalDateTime
)
x
.
get
(
"createDate"
);
x
.
put
(
"createDate"
,
Date
.
from
(
createDate
.
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()));
x
.
put
(
"handleType"
,
ConfirmAlamEnum
.
getTypeByCode
(
String
.
valueOf
(
x
.
get
(
"handleType"
))));
x
.
put
(
"fireEquipmentName"
,
x
.
get
(
"fireEquipmentName"
));
// 冗余统一跑马灯显示字段取值
x
.
put
(
"equipmentSpecificIndexName"
,
x
.
get
(
"fireEquipmentSpecificIndexName"
));
}
}
return
resultPage
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
f21ea8c8
...
...
@@ -139,6 +139,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Autowired
private
VideoMapper
videoMapper
;
@Autowired
SignalClassifyMapper
signalClassifyMapper
;
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
syncSwitch
;
...
...
@@ -1427,7 +1430,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Override
public
FireEquipment
getEquipSpecificDetail
(
EquipmentSpecific
equipmentSpecific
)
{
return
equipmentSpecificMapper
.
getEquipSpecificDetail
(
equipmentSpecific
);
return
equipmentSpecificMapper
.
getEquipSpecificDetail
(
equipmentSpecific
.
getId
()
);
}
@Override
...
...
@@ -1466,6 +1469,10 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecificIndex
.
setEquipmentSpecialName
(
equipName
);
equipmentSpecificIndex
.
setEquipmentIndexName
(
index
.
getPerfQuotaName
());
equipmentSpecificIndex
.
setEquipmentIndexKey
(
index
.
getPerfQuotaDefinitionId
());
equipmentSpecificIndex
.
setEmergencyLevelColor
(
index
.
getEmergencyLevelColor
());
equipmentSpecificIndex
.
setIsAlarm
(
index
.
getIsAlarm
());
equipmentSpecificIndex
.
setEmergencyLevel
(
index
.
getEmergencyLevel
());
equipmentSpecificIndex
.
setEmergencyLevelDescribe
(
index
.
getEmergencyLevelDescribe
());
equipmentSpecificIndices
.
add
(
equipmentSpecificIndex
);
});
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
f21ea8c8
...
...
@@ -48,6 +48,7 @@ import java.net.SocketException;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
FireFightingSystemServiceImpl
extends
ServiceImpl
<
FireFightingSystemMapper
,
FireFightingSystemEntity
>
implements
IFireFightingSystemService
{
...
...
@@ -566,9 +567,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
List
<
SpeIndexVo
>
newList
=
new
ArrayList
<>();
List
<
SpeIndexVo
>
statusList
=
new
ArrayList
<>();
for
(
SpeIndexVo
vo
:
list
)
{
String
k
=
vo
.
getTypeCode
();
if
(
EquipmentRiskTypeEnum
.
GZ
.
getCode
().
equals
(
k
)
||
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
k
)
||
EquipmentRiskTypeEnum
.
YXZT
.
getCode
().
equals
(
k
)
||
EquipmentRiskTypeEnum
.
PB
.
getCode
().
equals
(
k
))
{
int
status
=
vo
.
getIsAlarm
();
if
(
AlarmStatusEnum
.
BJ
.
getCode
()
==
status
)
{
statusList
.
add
(
vo
);
}
newList
.
add
(
vo
);
...
...
@@ -578,8 +578,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
SpeIndexVo
spe
=
new
SpeIndexVo
();
spe
.
setKey
(
EquipmentSpeIndexEnum
.
YXZT
.
getCode
());
SpeIndexVo
latestVo
=
statusList
.
get
(
0
);
org
.
springframework
.
beans
.
BeanUtils
.
copyProperties
(
latestVo
,
spe
);
spe
.
setName
(
"当前状态"
);
spe
.
setValue
(
getStatus
(
statusList
));
Map
<
String
,
String
>
map
=
getStatus
(
statusList
);
spe
.
setValue
(
map
.
get
(
"runStatus"
));
spe
.
setColor
(
map
.
get
(
"color"
));
statusList
.
clear
();
statusList
.
add
(
spe
);
statusList
.
addAll
(
newList
);
...
...
@@ -592,25 +596,28 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
* @param statusList
* @return
*/
private
String
getStatus
(
List
<
SpeIndexVo
>
statusList
)
{
private
Map
<
String
,
String
>
getStatus
(
List
<
SpeIndexVo
>
statusList
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
SpeIndexVo
indexVo
=
statusList
.
get
(
0
);
if
(
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
indexVo
.
getValue
()))
{
return
"报警"
;
}
if
(
EquipmentRiskTypeEnum
.
GZ
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
indexVo
.
getValue
()))
{
return
"故障"
;
int
i
=
0
;
for
(
SpeIndexVo
x
:
statusList
)
{
if
(
StringUtil
.
isNotEmpty
(
x
.
getIndexValue
()))
{
i
=
i
+
1
;
}
}
if
(
EquipmentRiskTypeEnum
.
PB
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
indexVo
.
getValue
()))
{
return
"屏蔽"
;
if
(
0
==
i
)
{
map
.
put
(
"runStatus"
,
"无"
);
map
.
put
(
"color"
,
""
);
return
map
;
}
if
(
EquipmentRiskTypeEnum
.
YXZT
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
fake
.
value
.
equals
(
indexVo
.
getValue
()))
{
return
"停运"
;
if
(
StringUtil
.
isNotEmpty
(
indexVo
.
getIndexValue
())
&&
TrueOrFalseEnum
.
real
.
value
.
toUpperCase
().
equals
(
indexVo
.
getIndexValue
().
toUpperCase
()))
{
map
.
put
(
"runStatus"
,
indexVo
.
getIndexName
());
map
.
put
(
"color"
,
indexVo
.
getColor
());
return
map
;
}
return
"运行"
;
map
.
put
(
"runStatus"
,
"运行"
);
map
.
put
(
"color"
,
""
);
return
map
;
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
f21ea8c8
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/RiskSourceSceneServiceImpl.java
View file @
f21ea8c8
...
...
@@ -348,7 +348,7 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
equipIndexLatestStatus
.
forEach
(
action
->{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"equipCode"
,
action
.
getQrCode
());
map
.
put
(
"
status
"
,
EquipmentStateUtil
.
judgeEquipState
(
action
));
map
.
put
(
"
color
"
,
EquipmentStateUtil
.
judgeEquipState
(
action
));
data
.
add
(
map
);
});
return
data
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SignalClassifyServiceImpl.java
0 → 100644
View file @
f21ea8c8
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.equipmanage.common.entity.SignalClassify
;
import
com.yeejoin.equipmanage.mapper.SignalClassifyMapper
;
import
com.yeejoin.equipmanage.service.ISignalClassifyService
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 信号分类量测枚举表服务实现类
*
* @author system_generator
* @date 2022-02-18
*/
@Service
public
class
SignalClassifyServiceImpl
extends
ServiceImpl
<
SignalClassifyMapper
,
SignalClassify
>
implements
ISignalClassifyService
{
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
f21ea8c8
...
...
@@ -1981,7 +1981,7 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// 登录人为整改责任人
pageParam
.
put
(
"reformLeaderId"
,
jcsUserId
);
// 登录人单位
pageParam
.
put
(
"bizOrgCode"
,
person
.
get
(
"bizOrgCode"
).
toString
().
substring
(
0
,
6
));
pageParam
.
put
(
"bizOrgCode"
,
person
.
get
(
"bizOrgCode"
).
toString
().
substring
(
0
,
12
));
// 登录人为治理人
pageParam
.
put
(
"governUserId"
,
jcsUserId
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
View file @
f21ea8c8
...
...
@@ -336,7 +336,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
list
.
add
(
alertHandlerInfoDto
);
}
map
.
put
(
"agReturnVisit"
,
dispatchPaper
.
getFeedback
Time
());
map
.
put
(
"agReturnVisit"
,
dispatchPaper
.
getFeedback
FinishTime
());
// 修复BUG 3439 by kongfm
}
else
{
for
(
String
s:
str
)
{
AlertHandlerInfoDto
alertHandlerInfoDto
=
new
AlertHandlerInfoDto
();
...
...
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
f21ea8c8
...
...
@@ -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/changelog/wl-3.0.1.xml
View file @
f21ea8c8
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/mapper/CarPropertyMapper.xml
View file @
f21ea8c8
...
...
@@ -8,15 +8,22 @@
wcp.value AS value,
wcp.remark AS remark,
wcp.equipment_index_id AS equipmentIndexId,
wei.name_key AS nameKey
wei.name_key AS nameKey,
wcp.is_alarm as isAlarm,
wcp.emergency_level_color as emergencyLevelColor,
wcp.emergency_level as emergencyLevel,
wcp.emergency_level_describe as emergencyLevelDescribe,
wc.iot_code as iotCode,
wc.`name` as carName,
wc.car_num as carNum,
wei.unit unitName,
wei.group_name as groupName
FROM
wl_car_property wcp
LEFT JOIN wl_car AS wc ON wc.id = wcp.car_id
LEFT JOIN wl_equipment_index AS wei ON wei.id = wcp.equipment_index_id
WHERE
wc.iot_code = #{iotCode}
AND
TRIM(wei.name_key) != '' AND wei.name_key IS NOT NULL
wc.iot_code = #{iotCode} and wei.is_iot = true
</select>
<select
id=
"getCarPropertyList"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo"
>
SELECT
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentIndexMapper.xml
View file @
f21ea8c8
...
...
@@ -89,7 +89,8 @@
null as group_name,
null as index_id,
0 as is_importent_parameter,
0 as sort_num
0 as sort_num,
null as value_enum
from wl_equipment
where
id = #{id}
...
...
@@ -108,7 +109,8 @@
group_name,
index_definition_id,
1 as is_importent_parameter,
sort_num
sort_num,
value_enum
from
wl_equipment_index
where equipment_id = #{id}
...
...
@@ -154,7 +156,8 @@
1 as is_importent_parameter,
sort_num,
type,
is_trend
is_trend,
value_enum
from
wl_equipment_index
where id = #{id}
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
View file @
f21ea8c8
...
...
@@ -110,4 +110,42 @@
</if>
</where>
</select>
<select
id=
"getFireEquipAlarmLogDetailsById"
resultType=
"com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentFireAlarm"
>
SELECT
sal.id,
es.id AS fireEquipmentId,
si.id AS equipmentMeasurementId,
ei.name_key AS fieldName,
ei.`name` AS fieldLabel,
IFNULL(si.`value`,'') AS `value`,
sa.frequency,
sa.`status`,
sa.type,
IFNULL(es.code,'') AS fireEquipmentMRid,
'' AS equipmentMeasurementMRid,
ed.`name` AS fireEquipmentName,
sa.recovery_date,
sal.create_date,
sal.update_date,
sal.alarm_reason AS description,
IFNULL(sal.equipment_specific_name,'') AS `name`,
IFNULL(sal.equipment_specific_code,'') AS mrid
FROM
wl_equipment_specific_alarm_log sal
LEFT JOIN wl_equipment_specific_alarm sa ON sal.equipment_specific_alarm_id = sa.id
LEFT JOIN wl_equipment_specific es ON sa.equipment_specific_id = es.id
LEFT JOIN wl_equipment_specific_index si ON es.id = si.equipment_specific_id
LEFT JOIN wl_equipment_detail ed ON ed.id = es.equipment_detail_id
LEFT JOIN wl_equipment_index ei ON si.equipment_index_id = ei.id
<where>
<if
test=
"list != null and list.size > 0"
>
sal.id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
f21ea8c8
...
...
@@ -199,16 +199,17 @@
AS fireEquipmentPointValue,
wlesal.type AS type,
wlesal.create_date AS createDate,
wlesal.location AS warehouseStructureName,
CONCAT_WS(' ', wles.position,wled.area) AS warehouseStructureName, /*告警列表拼接详细地址*/
(select
group_concat(fet.`name`)
from f_equipment_fire_equipment as fefe
left join f_equipment as fet on fet.id = fefe.equipment_id
where fefe.fire_equipment_id = wlesal.equipment_specific_id
) as equipmentName
) as equipmentName,
wlesal.equipment_specific_name as equipmentSpecificName,
wles.position
FROM wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id
left join wl_stock_detail as wsd on wsd.equipment_specific_id = wlesal.equipment_specific_id
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment we ON wled.equipment_id = we.id
) d
...
...
@@ -756,7 +757,7 @@
wlesa.`status`,
wlesal.type AS type,
wlesal.create_date AS createDate,
wlesal.location AS warehouseStructureName,
CONCAT_WS(' ', wlesal.location,wled.area) AS warehouseStructureName,/*告警列表拼接详细地址*/
(select
group_concat(fet.`name`)
from f_equipment_fire_equipment as fefe
...
...
@@ -945,8 +946,8 @@
</if>
<if
test=
'dto.startDate != null and dto.endDate != null '
>
AND DATE_FORMAT(wlesa.create_date, '%Y-%m-%d
' ) between DATE_FORMAT(#{dto.startDate}, '%Y-%m-%d ' ) and
DATE_FORMAT(#{dto.endDate}, '%Y-%m-%d
' )
AND DATE_FORMAT(wlesa.create_date, '%Y-%m-%d
' )
<![CDATA[>=]]>
DATE_FORMAT(#{dto.startDate}, '%Y-%m-%d' )
AND DATE_FORMAT(wlesa.create_date, '%Y-%m-%d' )
<![CDATA[<=]]>
DATE_FORMAT(#{dto.endDate}, '%Y-%m-%d
' )
</if>
<if
test=
"dto.isFirm == 'yes'"
>
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificIndexMapper.xml
View file @
f21ea8c8
...
...
@@ -57,14 +57,21 @@
ed.equipment_id AS equipmentId,
ed.id AS equipmentDetailId,
wes.code as equipmentSpecificCode,
wes.system_id as systemId
wes.system_id as systemId,
wesi.is_alarm as isAlarm,
wesi.emergency_level_color as emergencyLevelColor,
wesi.emergency_level as emergencyLevel,
wesi.emergency_level_describe as emergencyLevelDescribe,
TRIM(CONCAT_WS(' ',wes.position,sd.description)) AS location,
sd.warehouse_structure_id AS buildId
FROM
wl_equipment_specific_index AS wesi
LEFT JOIN wl_equipment_specific AS wes ON wes.id = wesi.equipment_specific_id
LEFT JOIN wl_equipment_detail ed ON ed.id = wes.equipment_detail_id
LEFT JOIN wl_equipment_index AS wei ON wei.id = wesi.equipment_index_id
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = wes.id
WHERE
wes.iot_code = #{iotCode}
wes.iot_code = #{iotCode}
and wei.is_iot = true
</select>
<select
id=
"getEquipmentSpeIndexByIotCode"
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
f21ea8c8
...
...
@@ -275,13 +275,15 @@
SELECT
equipindex.`value`,
ei.type_code AS 'typeCode',
es.qr_code AS 'qrCode'
es.qr_code AS 'qrCode',
equipindex.color AS emergencyLevelColor
FROM
(
SELECT
esi.equipment_index_id,
esi.equipment_specific_id,
esi.`value`
esi.`value`,
esi.emergency_level_color as color
FROM
wl_equipment_specific_index esi,
(
...
...
@@ -315,12 +317,15 @@
es.realtime_iot_index_name AS 'indexName',
es.qr_code AS 'qrCode',
es.iot_code AS 'iotCode',
es.realtime_iot_index_value AS 'value'
es.realtime_iot_index_value AS 'value',
sc.emergency_level_color AS 'emergencyLevelColor'
FROM
wl_equipment_specific es,
wl_equipment_index ei
wl_equipment_index ei,
wl_signal_classify sc
WHERE
es.realtime_iot_index_id = ei.id
AND upper(ei.type_code) = upper(sc.type_code)
AND find_in_set(
es.id,
(
...
...
@@ -807,7 +812,7 @@
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>
...
...
@@ -1502,5 +1507,14 @@
LEFT JOIN wl_equipment_category AS wlec ON wlec.id = wle.category_id
WHERE
spe.warehouse_structure_id =#{floorId}
</select>
<select
id=
"getStationInfo"
resultType=
"Map"
>
SELECT
`name` AS stationName,
station_code AS stationCode
FROM
f_station_info
LIMIT 1
</select>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
f21ea8c8
...
...
@@ -355,7 +355,6 @@
spein.value_label
),
concat(
IF (
(
ISNULL(spein.value_label)
...
...
@@ -367,7 +366,13 @@
' ',
eqin.unit
)
) AS `value`
) AS `value`,
spein.emergency_level_color AS color,
spein.is_alarm AS isAlarm,
spein.emergency_level AS emergencyLevel,
spein.emergency_level_describe AS emergencyLevelDescribe,
spein.`value` AS indexValue,
spein.equipment_index_name AS indexName
FROM
wl_equipment_specific_index AS spein
LEFT JOIN wl_equipment_index AS eqin ON spein.equipment_index_id = eqin.id
...
...
amos-boot-system-equip/src/main/resources/mapper/SignalClassifyMapper.xml
0 → 100644
View file @
f21ea8c8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.equipmanage.mapper.SignalClassifyMapper"
>
</mapper>
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