Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhmes-agecal
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
耿迪迪
zhmes-agecal
Commits
d06703a1
Commit
d06703a1
authored
Sep 17, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 测试 501 502 503 端口号
parent
15140a8e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
1 deletion
+69
-1
TStoreyInfoController.java
...ehong/web/controller/equipment/TStoreyInfoController.java
+8
-0
ITStoreyInfoService.java
...n/java/com/zehong/system/service/ITStoreyInfoService.java
+2
-0
TStoreyInfoServiceImpl.java
...om/zehong/system/service/impl/TStoreyInfoServiceImpl.java
+28
-0
storey.js
zhmes-agecal-web/src/api/storey/storey.js
+6
-0
index.vue
zhmes-agecal-web/src/views/storey/index.vue
+25
-1
No files found.
zhmes-agecal-admin/src/main/java/com/zehong/web/controller/equipment/TStoreyInfoController.java
View file @
d06703a1
...
@@ -104,6 +104,14 @@ public class TStoreyInfoController extends BaseController
...
@@ -104,6 +104,14 @@ public class TStoreyInfoController extends BaseController
return
tStoreyInfoService
.
batchReadingCabinetStatus
(
fEquipmentCode
);
return
tStoreyInfoService
.
batchReadingCabinetStatus
(
fEquipmentCode
);
}
}
/**
* 批量读取寄存器
*/
@GetMapping
(
value
=
"/handleReadingHoldingRegister/{ipAndPort}"
)
public
AjaxResult
handleReadingHoldingRegister
(
@PathVariable
(
"ipAndPort"
)
String
ipAndPort
)
{
return
tStoreyInfoService
.
handleReadingHoldingRegister
(
ipAndPort
);
}
/**
/**
* 给所有设备下电
* 给所有设备下电
*/
*/
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/ITStoreyInfoService.java
View file @
d06703a1
...
@@ -45,6 +45,8 @@ public interface ITStoreyInfoService
...
@@ -45,6 +45,8 @@ public interface ITStoreyInfoService
public
AjaxResult
batchReadingCabinetStatus
(
String
fEquipmentCode
);
public
AjaxResult
batchReadingCabinetStatus
(
String
fEquipmentCode
);
public
AjaxResult
handleReadingHoldingRegister
(
String
ipAndPort
);
public
AjaxResult
powerOffAllStore
();
public
AjaxResult
powerOffAllStore
();
public
AjaxResult
powerOnAllStore
();
public
AjaxResult
powerOnAllStore
();
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/TStoreyInfoServiceImpl.java
View file @
d06703a1
...
@@ -11,6 +11,8 @@ import com.zehong.system.domain.TEquipmentInfo;
...
@@ -11,6 +11,8 @@ import com.zehong.system.domain.TEquipmentInfo;
import
com.zehong.system.domain.TStoreyInfo
;
import
com.zehong.system.domain.TStoreyInfo
;
import
com.zehong.system.mapper.TEquipmentInfoMapper
;
import
com.zehong.system.mapper.TEquipmentInfoMapper
;
import
com.zehong.system.mapper.TStoreyInfoMapper
;
import
com.zehong.system.mapper.TStoreyInfoMapper
;
import
com.zehong.system.modbus.business.DeviceStatusReaderAndTimeSetter
;
import
com.zehong.system.modbus.handler.ModbusResultHandler
;
import
com.zehong.system.modbus.util.Modbus4jUtils
;
import
com.zehong.system.modbus.util.Modbus4jUtils
;
import
com.zehong.system.service.IRobotArmCommandService
;
import
com.zehong.system.service.IRobotArmCommandService
;
import
com.zehong.system.service.ITStoreyInfoService
;
import
com.zehong.system.service.ITStoreyInfoService
;
...
@@ -44,6 +46,9 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
...
@@ -44,6 +46,9 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
@Resource
@Resource
private
IRobotArmCommandService
robotArmCommandService
;
private
IRobotArmCommandService
robotArmCommandService
;
@Resource
private
DeviceStatusReaderAndTimeSetter
deviceStatusReaderAndTimeSetter
;
private
final
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
10
);
private
final
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
10
);
/**
/**
...
@@ -317,6 +322,29 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
...
@@ -317,6 +322,29 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
}
@Override
public
AjaxResult
handleReadingHoldingRegister
(
String
ipAndPort
)
{
if
(
StringUtils
.
isBlank
(
ipAndPort
)
||
ipAndPort
.
split
(
"-"
).
length
!=
2
)
{
return
AjaxResult
.
error
(
"ip和端口格式错误!!!"
);
}
String
[]
split
=
ipAndPort
.
split
(
"-"
);
List
<
Integer
>
registerOffset
;
if
(
"501"
.
equals
(
split
[
1
]))
{
registerOffset
=
Arrays
.
asList
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
);
}
else
if
(
"502"
.
equals
(
split
[
1
]))
{
registerOffset
=
Arrays
.
asList
(
28
,
29
,
30
,
31
,
32
,
33
,
34
,
35
,
36
,
37
,
38
,
39
,
40
,
41
,
42
,
43
,
44
,
45
,
46
,
47
,
48
,
49
,
50
,
51
,
52
,
53
,
54
);
}
else
{
registerOffset
=
Arrays
.
asList
(
55
,
56
,
57
,
58
,
59
,
60
,
61
,
62
,
63
,
64
,
65
,
66
,
67
,
68
,
69
,
70
,
71
,
72
);
}
ModbusResultHandler
modbusResultHandler
=
new
ModbusResultHandler
();
deviceStatusReaderAndTimeSetter
.
startMultiDeviceMonitoring
(
split
[
0
],
Integer
.
parseInt
(
split
[
1
]),
registerOffset
,
modbusResultHandler
,
null
);
return
null
;
}
/**
/**
* 批量读取设备状态
* 批量读取设备状态
* @param fEquipmentCode f
* @param fEquipmentCode f
...
...
zhmes-agecal-web/src/api/storey/storey.js
View file @
d06703a1
...
@@ -97,6 +97,12 @@ export function batchReadingCabinetStatus(fEquipmentCode) {
...
@@ -97,6 +97,12 @@ export function batchReadingCabinetStatus(fEquipmentCode) {
})
})
}
}
export
function
readingHoldingRegister
(
ipAndPort
)
{
return
request
({
url
:
'/storey/handleReadingHoldingRegister/'
+
ipAndPort
,
method
:
'get'
})
}
export
function
powerOnAllStore
()
{
export
function
powerOnAllStore
()
{
return
request
({
return
request
({
url
:
'/storey/powerOnAllStore'
,
url
:
'/storey/powerOnAllStore'
,
...
...
zhmes-agecal-web/src/views/storey/index.vue
View file @
d06703a1
...
@@ -63,6 +63,16 @@
...
@@ -63,6 +63,16 @@
@
click=
"handleReading"
@
click=
"handleReading"
>
批量读取设备状态
</el-button>
>
批量读取设备状态
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-reading"
size=
"mini"
@
click=
"handleHoldingRegister"
>
测试501端口
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"danger"
type=
"danger"
...
@@ -236,7 +246,7 @@
...
@@ -236,7 +246,7 @@
import
{
listStorey
,
getStorey
,
delStorey
,
addStorey
,
updateStorey
,
import
{
listStorey
,
getStorey
,
delStorey
,
addStorey
,
updateStorey
,
exportStorey
,
PowerOn
,
PowerOutage
,
exportStorey
,
PowerOn
,
PowerOutage
,
batchReadingCabinetStatus
,
powerOnAllStore
,
powerOffAllStore
,
batchReadingCabinetStatus
,
powerOnAllStore
,
powerOffAllStore
,
feeding
,
blanking
}
from
"@/api/storey/storey"
;
feeding
,
blanking
,
readingHoldingRegister
}
from
"@/api/storey/storey"
;
import
{
sendHomeCommand
,
sendStopCommand
}
from
"@/api/robotArm/robotArmCommand"
;
import
{
sendHomeCommand
,
sendStopCommand
}
from
"@/api/robotArm/robotArmCommand"
;
export
default
{
export
default
{
...
@@ -456,6 +466,20 @@ export default {
...
@@ -456,6 +466,20 @@ export default {
this
.
msgSuccess
(
"删除成功"
);
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
).
catch
(()
=>
{
}
);
}
,
}
,
// 测试 某个设备的 501,502,503端口号
handleHoldingRegister
()
{
this
.
$prompt
(
'请输入ip加端口号 逗号分隔'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
}
).
then
(({
value
}
)
=>
{
readingHoldingRegister
(
value
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
msgSuccess
(
"msg = "
+
response
.
data
);
}
}
)
}
).
catch
(()
=>
{
}
);
}
,
handleReading
()
{
handleReading
()
{
this
.
$prompt
(
'请输入老化柜编号'
,
'提示'
,
{
this
.
$prompt
(
'请输入老化柜编号'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
...
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