Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
1552c30a
Commit
1552c30a
authored
Aug 02, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/device-new-platform
parents
e6b0bf0e
d55e6f3e
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
682 additions
and
39 deletions
+682
-39
device-manager-ui/admin/src/assets/mixins/table.js
device-manager-ui/admin/src/assets/mixins/table.js
+3
-1
device-manager/db/add.sql
device-manager/db/add.sql
+8
-1
device-manager/pom.xml
device-manager/pom.xml
+1
-1
device-manager/src/main/java/com/mortals/xhx/base/framework/listener/CustomerKeyExpirationListener.java
...ase/framework/listener/CustomerKeyExpirationListener.java
+18
-1
device-manager/src/main/java/com/mortals/xhx/common/code/AlarmPusW1ayEnum.java
...in/java/com/mortals/xhx/common/code/AlarmPusW1ayEnum.java
+1
-1
device-manager/src/main/java/com/mortals/xhx/module/alarm/web/AlarmConfigController.java
...m/mortals/xhx/module/alarm/web/AlarmConfigController.java
+4
-2
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceAlarmInfoEntity.java
...ortals/xhx/module/device/model/DeviceAlarmInfoEntity.java
+33
-12
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceAlarmInfoQuery.java
...mortals/xhx/module/device/model/DeviceAlarmInfoQuery.java
+413
-1
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
...ava/com/mortals/xhx/module/device/model/DeviceEntity.java
+8
-8
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceAlarmInfoServiceImpl.java
...odule/device/service/impl/DeviceAlarmInfoServiceImpl.java
+1
-7
device-manager/src/main/resources/sqlmap/module/device/DeviceAlarmInfoMapper.xml
.../resources/sqlmap/module/device/DeviceAlarmInfoMapper.xml
+192
-4
doc/设备管理系统.docx
doc/设备管理系统.docx
+0
-0
No files found.
device-manager-ui/admin/src/assets/mixins/table.js
View file @
1552c30a
...
...
@@ -168,11 +168,13 @@ export default {
const
content
=
formatter
(
this
.
tableData
,
column
,
val
);
if
(
content
)
{
if
(
val
==
'
0
'
)
{
return
<
el
-
tag
size
=
'
mini
'
>
{
content
}
<
/el-tag
>
return
<
el
-
tag
type
=
{
'
warning
'
}
size
=
'
mini
'
>
{
content
}
<
/el-tag
>
}
else
if
(
val
==
'
1
'
)
{
return
<
el
-
tag
type
=
{
'
danger
'
}
size
=
'
mini
'
>
{
content
}
<
/el-tag
>
}
else
if
(
val
==
'
2
'
)
{
return
<
el
-
tag
type
=
{
'
success
'
}
size
=
'
mini
'
>
{
content
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
size
=
'
mini
'
>
{
content
}
<
/el-tag
>
}
}
else
{
return
val
...
...
device-manager/db/add.sql
View file @
1552c30a
...
...
@@ -41,4 +41,11 @@ ALTER TABLE mortals_xhx_device ADD COLUMN `showWechatQrCode` tinyint(2) DEFA
ALTER
TABLE
mortals_xhx_device
ADD
COLUMN
`orgName`
varchar
(
128
)
COMMENT
'所属机构'
AFTER
showWechatQrCode
;
\ No newline at end of file
ALTER
TABLE
mortals_xhx_device
ADD
COLUMN
`orgName`
varchar
(
128
)
COMMENT
'所属机构'
AFTER
showWechatQrCode
;
ALTER
TABLE
mortals_xhx_device_alarm_info
ADD
COLUMN
`push`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'是否推送'
,
ADD
COLUMN
`productId`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'产品Id'
,
ADD
COLUMN
`productCode`
varchar
(
256
)
DEFAULT
''
COMMENT
'产品编码'
,
ADD
COLUMN
`productName`
varchar
(
256
)
DEFAULT
''
COMMENT
'产品名称'
device-manager/pom.xml
View file @
1552c30a
...
...
@@ -111,7 +111,7 @@
<profiles.redis.username></profiles.redis.username>
<profiles.redis.password>
12345678
</profiles.redis.password>
<profiles.redis.database>
6
</profiles.redis.database>
<profiles.rabbitmq.host>
1
92.168.0.25
1
</profiles.rabbitmq.host>
<profiles.rabbitmq.host>
1
27.0.0.
1
</profiles.rabbitmq.host>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.username>
root_mq
</profiles.rabbitmq.username>
<profiles.rabbitmq.password>
xhx@2022
</profiles.rabbitmq.password>
...
...
device-manager/src/main/java/com/mortals/xhx/base/framework/listener/CustomerKeyExpirationListener.java
View file @
1552c30a
...
...
@@ -146,10 +146,19 @@ public class CustomerKeyExpirationListener implements MessageListener {
alarmInfoEntity
.
setReceivePersonnelTelephone
(
deviceEntity
.
getLeadingOfficialTelephone
());
alarmInfoEntity
.
setCreateTime
(
new
Date
());
alarmInfoEntity
.
setCreateUserId
(
1L
);
deviceAlarmInfoService
.
save
(
alarmInfoEntity
);
// TODO: 2022/6/23 告警信息保存与发送
AlarmConfigEntity
alarmConfigEntity
=
alarmConfigService
.
selectOne
(
new
AlarmConfigQuery
().
productId
(
productEntity
.
getId
()));
if
(!
ObjectUtils
.
isEmpty
(
alarmConfigEntity
))
{
/* if (alarmConfigEntity.getAlarmPusW1ay() == AlarmPusW1ayEnum.站内信息.getValue()) {
}*/
if
(
EnabledEnum
.
启用
.
getValue
()==
alarmConfigEntity
.
getEnabled
()){
alarmInfoEntity
.
setProductId
(
productEntity
.
getId
());
alarmInfoEntity
.
setProductCode
(
productEntity
.
getProductCode
());
alarmInfoEntity
.
setProductName
(
productEntity
.
getProductName
());
alarmInfoEntity
.
setPush
(
YesNoEnum
.
YES
.
getValue
());
deviceAlarmInfoService
.
save
(
alarmInfoEntity
);
}
if
(
alarmConfigEntity
.
getAlarmPusW1ay
()
==
AlarmPusW1ayEnum
.
短信
.
getValue
())
{
// TODO: 2022/7/4 发送短信
Rest
<
RespData
<
List
<
SmsSetPdu
>>>
respDataRest
=
smsSetFeign
.
list
(
new
SmsSetPdu
().
siteId
(
deviceEntity
.
getSiteId
()));
...
...
@@ -176,12 +185,20 @@ public class CustomerKeyExpirationListener implements MessageListener {
alarmSmsSendService
.
save
(
alarmSmsSendEntity
,
null
);
}
}
else
{
//推送站类
}
}
}
}
}
// deviceAlarmInfoService.save(alarmInfoEntity);
}
}
}
...
...
device-manager/src/main/java/com/mortals/xhx/common/code/AlarmPusW1ayEnum.java
View file @
1552c30a
...
...
@@ -9,7 +9,7 @@ import java.util.Map;
* @author zxfei
*/
public
enum
AlarmPusW1ayEnum
{
不推送
(
0
,
"不推送
"
),
站内信息
(
0
,
"站内信息
"
),
短信
(
1
,
"短信"
);
private
Integer
value
;
private
String
desc
;
...
...
device-manager/src/main/java/com/mortals/xhx/module/alarm/web/AlarmConfigController.java
View file @
1552c30a
...
...
@@ -3,6 +3,8 @@ package com.mortals.xhx.module.alarm.web;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.AlarmPusW1ayEnum
;
import
com.mortals.xhx.common.code.EnabledEnum
;
import
com.mortals.xhx.module.alarm.model.AlarmConfigEntity
;
import
com.mortals.xhx.module.alarm.service.AlarmConfigService
;
import
com.mortals.xhx.module.product.model.ProductEntity
;
...
...
@@ -38,8 +40,8 @@ public class AlarmConfigController extends BaseCRUDJsonBodyMappingController<Ala
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"alarmType"
,
paramService
.
getParamBySecondOrganize
(
"AlarmConfig"
,
"alarmType"
));
this
.
addDict
(
model
,
"alarmLevel"
,
paramService
.
getParamBySecondOrganize
(
"AlarmConfig"
,
"alarmLevel"
));
this
.
addDict
(
model
,
"alarmPusW1ay"
,
paramService
.
getParamBySecondOrganize
(
"AlarmConfig"
,
"alarmPusW1ay"
));
this
.
addDict
(
model
,
"enabled"
,
paramService
.
getParamBySecondOrganize
(
"AlarmConfig"
,
"isUse"
));
this
.
addDict
(
model
,
"alarmPusW1ay"
,
AlarmPusW1ayEnum
.
getEnumMap
(
));
this
.
addDict
(
model
,
"enabled"
,
EnabledEnum
.
getEnumMap
(
));
this
.
addDict
(
model
,
"productId"
,
productService
.
find
(
new
ProductEntity
()).
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getProductName
())));
super
.
init
(
model
,
context
);
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceAlarmInfoEntity.java
View file @
1552c30a
...
...
@@ -4,12 +4,11 @@ import com.mortals.xhx.module.device.model.vo.DeviceAlarmInfoVo;
import
lombok.Data
;
import
java.util.Date
;
/**
* 设备告警日志实体对象
*
* @author zxfei
* @date 2023-0
4-27
* @date 2023-0
7-19
*/
@Data
public
class
DeviceAlarmInfoEntity
extends
DeviceAlarmInfoVo
{
...
...
@@ -24,7 +23,7 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
*/
private
Long
alarmDevice
;
/**
* 告警类型,(0.离线
,1.在线,2.缺纸
)
* 告警类型,(0.离线)
*/
private
Integer
alarmType
;
/**
...
...
@@ -59,33 +58,47 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
* 设备名称
*/
private
String
deviceName
;
/**
* 是否推送
*/
private
Integer
push
;
/**
* 产品Id
*/
private
Long
productId
;
/**
* 产品编码
*/
private
String
productCode
;
/**
* 产品名称
*/
private
String
productName
;
@Override
public
int
hashCode
()
{
return
this
.
get
AlarmDevice
().
hashCode
();
return
this
.
get
Id
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
return
false
;
if
(
obj
instanceof
DeviceAlarmInfoEntity
)
{
DeviceAlarmInfoEntity
tmp
=
(
DeviceAlarmInfoEntity
)
obj
;
if
(
this
.
get
AlarmDevice
().
equals
(
tmp
.
getAlarmDevice
()
))
{
if
(
this
.
get
Id
()
==
tmp
.
getId
(
))
{
return
true
;
}
}
return
false
;
}
public
void
initAttrValue
()
{
public
void
initAttrValue
(){
this
.
alarmTime
=
null
;
this
.
alarmDevice
=
null
;
this
.
alarmDevice
=
-
1L
;
this
.
alarmType
=
null
;
this
.
alarmType
=
-
1
;
this
.
alarmLevel
=
null
;
this
.
alarmLevel
=
-
1
;
this
.
alarmReceivePersonnel
=
""
;
...
...
@@ -95,10 +108,18 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
this
.
alarmContent
=
""
;
this
.
siteId
=
null
;
this
.
siteId
=
-
1L
;
this
.
deviceCode
=
""
;
this
.
deviceName
=
""
;
this
.
push
=
0
;
this
.
productId
=
-
1L
;
this
.
productCode
=
""
;
this
.
productName
=
""
;
}
}
\ No newline at end of file
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceAlarmInfoQuery.java
View file @
1552c30a
This diff is collapsed.
Click to expand it.
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
View file @
1552c30a
...
...
@@ -242,27 +242,27 @@ public class DeviceEntity extends DeviceVo {
this
.
deviceMac
=
""
;
this
.
siteId
=
null
;
this
.
siteId
=
0L
;
this
.
siteCode
=
""
;
this
.
siteName
=
""
;
this
.
platformId
=
null
;
this
.
platformId
=
0L
;
this
.
platformName
=
""
;
this
.
productId
=
null
;
this
.
productId
=
0L
;
this
.
productName
=
""
;
this
.
skinId
=
null
;
this
.
skinId
=
0L
;
this
.
skinName
=
""
;
this
.
homeUrl
=
""
;
this
.
deviceFirmId
=
null
;
this
.
deviceFirmId
=
0L
;
this
.
deviceFirmname
=
""
;
...
...
@@ -274,9 +274,9 @@ public class DeviceEntity extends DeviceVo {
this
.
lati
=
""
;
this
.
deviceInBuilding
=
null
;
this
.
deviceInBuilding
=
1
;
this
.
deviceInFloor
=
null
;
this
.
deviceInFloor
=
1
;
this
.
defectsLiabilityPeriod
=
null
;
...
...
@@ -318,7 +318,7 @@ public class DeviceEntity extends DeviceVo {
this
.
productCode
=
""
;
this
.
hallId
=
null
;
this
.
hallId
=
0L
;
this
.
hallName
=
""
;
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceAlarmInfoServiceImpl.java
View file @
1552c30a
...
...
@@ -69,15 +69,9 @@ public class DeviceAlarmInfoServiceImpl extends AbstractCRUDServiceImpl<DeviceAl
DeviceAlarmInfoQuery
deviceAlarmInfoQuery
=
new
DeviceAlarmInfoQuery
();
deviceAlarmInfoQuery
.
setAlarmTimeStart
(
DateUtil
.
today
());
deviceAlarmInfoQuery
.
setAlarmTimeEnd
(
DateUtil
.
today
());
List
<
OrderCol
>
orderCols
=
new
ArrayList
<>();
OrderCol
orderCol
=
new
OrderCol
();
orderCol
.
setColName
(
"alarmTime"
);
orderCol
.
setSortKind
(
OrderCol
.
DESCENDING
);
orderCols
.
add
(
orderCol
);
deviceAlarmInfoQuery
.
setOrderColList
(
orderCols
);
deviceAlarmInfoQuery
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"alarmTime"
,
OrderCol
.
DESCENDING
)));
List
<
DeviceAlarmInfoEntity
>
deviceAlarmInfoList
=
this
.
find
(
deviceAlarmInfoQuery
);
//统计总设备数量
List
<
DeviceEntity
>
deviceList
=
deviceService
.
find
(
new
DeviceQuery
().
siteId
(
siteId
));
//设备总量
...
...
device-manager/src/main/resources/sqlmap/module/device/DeviceAlarmInfoMapper.xml
View file @
1552c30a
This diff is collapsed.
Click to expand it.
doc/设备管理系统.docx
View file @
1552c30a
No preview for this file type
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