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
71a26a67
Commit
71a26a67
authored
Dec 08, 2023
by
王晓旭
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/device-new-platform
parents
fe94d296
0c5faa7b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
101 additions
and
107 deletions
+101
-107
common-lib/src/main/java/com/mortals/xhx/feign/IInfoPublishDeviceFeign.java
...n/java/com/mortals/xhx/feign/IInfoPublishDeviceFeign.java
+55
-0
device-manager-ui/admin/src/views/alarm/config/list.vue
device-manager-ui/admin/src/views/alarm/config/list.vue
+3
-3
device-manager-ui/admin/src/views/alarm/config/view.vue
device-manager-ui/admin/src/views/alarm/config/view.vue
+4
-75
device-manager-ui/admin/src/views/device/module/list.vue
device-manager-ui/admin/src/views/device/module/list.vue
+4
-4
device-manager-ui/admin/vue.config.js
device-manager-ui/admin/vue.config.js
+1
-2
device-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
.../java/com/mortals/xhx/base/login/web/LoginController.java
+1
-0
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+1
-0
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java
...aemon/applicationservice/DeviceSendThirdPartyService.java
+1
-1
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceAlarmInfoEntity.java
...ortals/xhx/module/device/model/DeviceAlarmInfoEntity.java
+17
-22
device-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceAlarmInfoVo.java
...mortals/xhx/module/device/model/vo/DeviceAlarmInfoVo.java
+2
-0
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+12
-0
No files found.
common-lib/src/main/java/com/mortals/xhx/feign/IInfoPublishDeviceFeign.java
0 → 100644
View file @
71a26a67
package
com.mortals.xhx.feign
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.common.pdu.DeviceReq
;
import
feign.hystrix.FallbackFactory
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
/**
* 设备 Feign接口
*
* @author zxfei
* @date 2023-02-25
*/
@FeignClient
(
name
=
"info-publish-manager"
,
path
=
"/infopublish"
,
fallbackFactory
=
InfoDeviceFeignFallbackFactory
.
class
)
public
interface
IInfoPublishDeviceFeign
extends
IFeign
{
/**
* 设备回调
*
* @param deviceReq
* @return
*/
@PostMapping
(
value
=
"/api/device/callback"
)
Rest
<
String
>
deviceCall
(
@RequestBody
DeviceReq
deviceReq
);
}
@Slf4j
@Component
class
InfoDeviceFeignFallbackFactory
implements
FallbackFactory
<
IInfoPublishDeviceFeign
>
{
@Override
public
IInfoPublishDeviceFeign
create
(
Throwable
t
)
{
return
new
IInfoPublishDeviceFeign
()
{
@Override
public
Rest
<
String
>
deviceCall
(
DeviceReq
deviceReq
)
{
return
Rest
.
fail
();
}
};
}
}
device-manager-ui/admin/src/views/alarm/config/list.vue
View file @
71a26a67
...
@@ -28,9 +28,9 @@ export default {
...
@@ -28,9 +28,9 @@ export default {
this
.
$refs
.
drawerform
.
edit
(
row
);
this
.
$refs
.
drawerform
.
edit
(
row
);
},
},
/** 重写查看方法 */
/** 重写查看方法 */
//
toView(row) {
toView
(
row
)
{
// this.$refs.dialog
form.view(row);
this
.
$refs
.
drawer
form
.
view
(
row
);
//
},
},
// 操作菜单状态
// 操作菜单状态
changeStatus
(
row
,
column
)
{
changeStatus
(
row
,
column
)
{
return
(
return
(
...
...
device-manager-ui/admin/src/views/alarm/config/view.vue
View file @
71a26a67
<
template
>
<
template
>
<layout-view>
<el-descriptions
:title=
"title"
:column=
"column"
:size=
"size"
:colon=
"false"
border
>
<template
slot=
"title"
>
<i
class=
"el-icon-tickets"
></i>
基本详细信息
</
template
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button
>
</
template
>
<el-descriptions-item
label=
"产品"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{ form.productId }}
</el-descriptions-item>
<el-descriptions-item
label=
"告警类型"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{ util_formatters("alarmType", form.alarmType) }}
</el-descriptions-item>
<el-descriptions-item
label=
"告警级别,"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{ util_formatters("alarmLevel", form.alarmLevel) }}
</el-descriptions-item>
<el-descriptions-item
label=
"推送方式,"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{ util_formatters("alarmPusW1ay", form.alarmPusW1ay) }}
</el-descriptions-item>
<el-descriptions-item
label=
"是否启用"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{ util_formatters("isUse", form.isUse) }}
</el-descriptions-item>
</el-descriptions>
</layout-view>
</
template
>
</
template
>
<
script
>
<
script
>
import
view
from
"
@/assets/mixins/view
"
;
export
default
{
export
default
{
mixins
:
[
view
],
components
:
{},
components
:
{},
methods
:
{},
methods
:
{},
data
()
{
data
()
{
return
{
return
{
size
:
"
small
"
,
column
:
2
,
toString
:
[
"
alarmType
"
,
"
alarmLevel
"
,
"
alarmPusW1ay
"
,
"
isUse
"
],
toArrays
:
[],
toDate
:
[],
};
};
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
.labelClass {
width: 200px;
}
.el-descriptions__body {
margin-left: 5px;
margin-right: 5px;
color: #606266;
background-color: #fff;
}
.contentClass {
width: 600px;
}
</
style
>
\ No newline at end of file
device-manager-ui/admin/src/views/device/module/list.vue
View file @
71a26a67
...
@@ -25,9 +25,9 @@ export default {
...
@@ -25,9 +25,9 @@ export default {
this
.
$refs
.
dialogform
.
edit
(
row
);
this
.
$refs
.
dialogform
.
edit
(
row
);
},
},
/** 重写查看方法 */
/** 重写查看方法 */
//
toView(row) {
toView
(
row
)
{
//
this.$refs.dialogform.view(row);
this
.
$refs
.
dialogform
.
view
(
row
);
//
},
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -65,4 +65,4 @@ export default {
...
@@ -65,4 +65,4 @@ export default {
};
};
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
device-manager-ui/admin/vue.config.js
View file @
71a26a67
...
@@ -20,8 +20,7 @@ module.exports = {
...
@@ -20,8 +20,7 @@ module.exports = {
target
:
"
http://192.168.0.98:11078
"
,
target
:
"
http://192.168.0.98:11078
"
,
//target: 'http://127.0.0.1:18222',
//target: 'http://127.0.0.1:18222',
changeOrigin
:
true
,
changeOrigin
:
true
,
secure
:
false
,
secure
:
false
cookieDomainRewrite
:
"
plm.testnew.com
"
,
},
},
"
/file
"
:
{
"
/file
"
:
{
target
:
"
http://192.168.0.98:11078
"
,
target
:
"
http://192.168.0.98:11078
"
,
...
...
device-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
View file @
71a26a67
...
@@ -69,6 +69,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
...
@@ -69,6 +69,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
UserPdu
userPdu
=
new
UserPdu
();
UserPdu
userPdu
=
new
UserPdu
();
userPdu
.
setLoginName
(
loginName
);
userPdu
.
setLoginName
(
loginName
);
userPdu
.
setPassword
(
password
);
userPdu
.
setPassword
(
password
);
userPdu
.
setSecurityCode
(
"admin"
);
String
resp
=
userFeign
.
portalLogin
(
userPdu
);
String
resp
=
userFeign
.
portalLogin
(
userPdu
);
return
resp
;
return
resp
;
...
...
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
71a26a67
...
@@ -799,6 +799,7 @@ public class DeviceApiController {
...
@@ -799,6 +799,7 @@ public class DeviceApiController {
* @return
* @return
*/
*/
@PostMapping
(
"receive"
)
@PostMapping
(
"receive"
)
@UnAuth
public
String
receive
(
HttpServletRequest
request
,
@RequestBody
DeviceReq
req
)
{
public
String
receive
(
HttpServletRequest
request
,
@RequestBody
DeviceReq
req
)
{
log
.
info
(
"【设备接收】【请求体】--> "
+
JSONObject
.
toJSONString
(
req
));
log
.
info
(
"【设备接收】【请求体】--> "
+
JSONObject
.
toJSONString
(
req
));
ApiResp
<
String
>
rsp
=
new
ApiResp
<>();
ApiResp
<
String
>
rsp
=
new
ApiResp
<>();
...
...
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceSendThirdPartyService.java
View file @
71a26a67
...
@@ -43,7 +43,7 @@ public class DeviceSendThirdPartyService implements IApplicationStartedService {
...
@@ -43,7 +43,7 @@ public class DeviceSendThirdPartyService implements IApplicationStartedService {
int
waitTime
=
SEND_INTEVEL
;
int
waitTime
=
SEND_INTEVEL
;
while
(!
stopped
)
{
while
(!
stopped
)
{
try
{
try
{
DeviceReq
deviceReq
=
cacheService
.
lpop
(
KEY_DEVICE_THIRDPARTY_QUEUE
,
DeviceReq
.
class
);
DeviceReq
deviceReq
=
cacheService
.
blpop
(
KEY_DEVICE_THIRDPARTY_QUEUE
,
10
,
DeviceReq
.
class
);
if
(!
ObjectUtils
.
isEmpty
(
deviceReq
))
{
if
(!
ObjectUtils
.
isEmpty
(
deviceReq
))
{
String
phpInUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_IN_HTTP_URL
,
"http://172.15.28.116:8090"
);
String
phpInUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_IN_HTTP_URL
,
"http://172.15.28.116:8090"
);
ApiResp
<
String
>
resp
=
messageService
.
sendThirdParty
(
UrlBuilder
.
of
(
phpInUrl
).
addPath
(
thirdPartyPath
).
build
(),
deviceReq
);
ApiResp
<
String
>
resp
=
messageService
.
sendThirdParty
(
UrlBuilder
.
of
(
phpInUrl
).
addPath
(
thirdPartyPath
).
build
(),
deviceReq
);
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceAlarmInfoEntity.java
View file @
71a26a67
package
com.mortals.xhx.module.device.model
;
package
com.mortals.xhx.module.device.model
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.xhx.module.device.model.vo.DeviceAlarmInfoVo
;
import
com.mortals.xhx.module.device.model.vo.DeviceAlarmInfoVo
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -8,7 +9,7 @@ import java.util.Date;
...
@@ -8,7 +9,7 @@ import java.util.Date;
* 设备告警日志实体对象
* 设备告警日志实体对象
*
*
* @author zxfei
* @author zxfei
* @date 2023-
07-19
* @date 2023-
12-08
*/
*/
@Data
@Data
public
class
DeviceAlarmInfoEntity
extends
DeviceAlarmInfoVo
{
public
class
DeviceAlarmInfoEntity
extends
DeviceAlarmInfoVo
{
...
@@ -17,6 +18,7 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
...
@@ -17,6 +18,7 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
/**
/**
* 告警时间
* 告警时间
*/
*/
@Excel
(
name
=
"告警时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
alarmTime
;
private
Date
alarmTime
;
/**
/**
* 告警设备Id
* 告警设备Id
...
@@ -25,18 +27,22 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
...
@@ -25,18 +27,22 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
/**
/**
* 告警类型,(0.离线)
* 告警类型,(0.离线)
*/
*/
@Excel
(
name
=
"告警类型,"
,
readConverterExp
=
"告警类型,(0.离线)"
)
private
Integer
alarmType
;
private
Integer
alarmType
;
/**
/**
* 告警级别(0.危险,1.次要,2.一般)
* 告警级别(0.危险,1.次要,2.一般)
*/
*/
@Excel
(
name
=
"告警级别"
,
readConverterExp
=
"0=危险,1=次要,2=一般"
)
private
Integer
alarmLevel
;
private
Integer
alarmLevel
;
/**
/**
* 接收人员[设备管理的责任人]
* 接收人员[设备管理的责任人]
*/
*/
@Excel
(
name
=
"接收人员[设备管理的责任人]"
)
private
String
alarmReceivePersonnel
;
private
String
alarmReceivePersonnel
;
/**
/**
* 接收人员电话
* 接收人员电话
*/
*/
@Excel
(
name
=
"接收人员电话"
)
private
String
receivePersonnelTelephone
;
private
String
receivePersonnelTelephone
;
/**
/**
* 告警状态,来自工单系统(0.未清除,1.清除未确认,2.清除已确认)
* 告警状态,来自工单系统(0.未清除,1.清除未确认,2.清除已确认)
...
@@ -45,6 +51,7 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
...
@@ -45,6 +51,7 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
/**
/**
* 告警详细内容
* 告警详细内容
*/
*/
@Excel
(
name
=
"告警详细内容"
)
private
String
alarmContent
;
private
String
alarmContent
;
/**
/**
* 站点Id,来源基础服务平台
* 站点Id,来源基础服务平台
...
@@ -53,10 +60,12 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
...
@@ -53,10 +60,12 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
/**
/**
* 设备编码
* 设备编码
*/
*/
@Excel
(
name
=
"设备编码"
)
private
String
deviceCode
;
private
String
deviceCode
;
/**
/**
* 设备名称
* 设备名称
*/
*/
@Excel
(
name
=
"设备名称"
)
private
String
deviceName
;
private
String
deviceName
;
/**
/**
* 是否推送
* 是否推送
...
@@ -73,6 +82,7 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
...
@@ -73,6 +82,7 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
/**
/**
* 产品名称
* 产品名称
*/
*/
@Excel
(
name
=
"产品名称"
)
private
String
productName
;
private
String
productName
;
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
...
@@ -91,35 +101,20 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
...
@@ -91,35 +101,20 @@ public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
}
}
public
void
initAttrValue
(){
public
void
initAttrValue
(){
this
.
alarmTime
=
new
Date
();
this
.
alarmTime
=
null
;
this
.
alarmDevice
=
null
;
this
.
alarmType
=
0
;
this
.
alarmDevice
=
-
1L
;
this
.
alarmLevel
=
0
;
this
.
alarmType
=
-
1
;
this
.
alarmLevel
=
-
1
;
this
.
alarmReceivePersonnel
=
""
;
this
.
alarmReceivePersonnel
=
""
;
this
.
receivePersonnelTelephone
=
""
;
this
.
receivePersonnelTelephone
=
""
;
this
.
alarmStatus
=
0
;
this
.
alarmStatus
=
0
;
this
.
alarmContent
=
""
;
this
.
alarmContent
=
""
;
this
.
siteId
=
null
;
this
.
siteId
=
-
1L
;
this
.
deviceCode
=
""
;
this
.
deviceCode
=
""
;
this
.
deviceName
=
""
;
this
.
deviceName
=
""
;
this
.
push
=
0
;
this
.
push
=
0
;
this
.
productId
=
null
;
this
.
productId
=
-
1L
;
this
.
productCode
=
""
;
this
.
productCode
=
""
;
this
.
productName
=
""
;
this
.
productName
=
""
;
}
}
}
}
\ No newline at end of file
device-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceAlarmInfoVo.java
View file @
71a26a67
...
@@ -17,6 +17,8 @@ import java.util.Map;
...
@@ -17,6 +17,8 @@ import java.util.Map;
@Data
@Data
public
class
DeviceAlarmInfoVo
extends
BaseEntityLong
{
public
class
DeviceAlarmInfoVo
extends
BaseEntityLong
{
private
List
<
Long
>
idList
;
/**
/**
* 开始 告警时间
* 开始 告警时间
*/
*/
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
71a26a67
...
@@ -23,6 +23,7 @@ import com.mortals.xhx.common.pdu.DeviceReq;
...
@@ -23,6 +23,7 @@ import com.mortals.xhx.common.pdu.DeviceReq;
import
com.mortals.xhx.common.pdu.site.SitePdu
;
import
com.mortals.xhx.common.pdu.site.SitePdu
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.feign.IFillDeviceFeign
;
import
com.mortals.xhx.feign.IFillDeviceFeign
;
import
com.mortals.xhx.feign.IInfoPublishDeviceFeign
;
import
com.mortals.xhx.feign.IOfficeDeviceFeign
;
import
com.mortals.xhx.feign.IOfficeDeviceFeign
;
import
com.mortals.xhx.feign.ISampleDeviceFeign
;
import
com.mortals.xhx.feign.ISampleDeviceFeign
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
...
@@ -92,6 +93,9 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -92,6 +93,9 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
@Autowired
@Autowired
private
IFillDeviceFeign
fillDeviceFeign
;
private
IFillDeviceFeign
fillDeviceFeign
;
@Autowired
private
IInfoPublishDeviceFeign
infoPublishDeviceFeign
;
@Value
(
"${thirdPartyPath:/inter/device/deviceIn}"
)
@Value
(
"${thirdPartyPath:/inter/device/deviceIn}"
)
private
String
thirdPartyPath
;
private
String
thirdPartyPath
;
...
@@ -391,6 +395,14 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -391,6 +395,14 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
Rest
<
String
>
sampleRest
=
sampleDeviceFeign
.
deviceCall
(
deviceReq
);
Rest
<
String
>
sampleRest
=
sampleDeviceFeign
.
deviceCall
(
deviceReq
);
log
.
info
(
"sample resp ==>{}"
,
JSON
.
toJSONString
(
sampleRest
));
log
.
info
(
"sample resp ==>{}"
,
JSON
.
toJSONString
(
sampleRest
));
}
}
if
(
"xxgk"
.
equals
(
platformEntity
.
getPlatformSn
()))
{
deviceReq
.
setReceiveMethod
(
update
.
getValue
());
//调用样表系统系统
Rest
<
String
>
sampleRest
=
infoPublishDeviceFeign
.
deviceCall
(
deviceReq
);
log
.
info
(
"info publish resp ==>{}"
,
JSON
.
toJSONString
(
sampleRest
));
}
if
(
"tdxt"
.
equals
(
platformEntity
.
getPlatformSn
()))
{
if
(
"tdxt"
.
equals
(
platformEntity
.
getPlatformSn
()))
{
deviceReq
.
setReceiveMethod
(
update
.
getValue
());
deviceReq
.
setReceiveMethod
(
update
.
getValue
());
//调用样表系统系统
//调用样表系统系统
...
...
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