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
d5cbef0d
Commit
d5cbef0d
authored
Sep 25, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 指令指令完成,但是 没有检测到机械臂完成。
parent
6a332201
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
4 deletions
+69
-4
EquipmentDataCollection.java
...ong/web/controller/equipment/EquipmentDataCollection.java
+38
-3
robotArmCommand.js
zhmes-agecal-web/src/api/robotArm/robotArmCommand.js
+7
-0
index.vue
zhmes-agecal-web/src/views/storey/index.vue
+24
-1
No files found.
zhmes-agecal-admin/src/main/java/com/zehong/web/controller/equipment/EquipmentDataCollection.java
View file @
d5cbef0d
package
com
.
zehong
.
web
.
controller
.
equipment
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.utils.TCP.TCPClient
;
import
com.zehong.system.domain.TEquipmentAlarmData
;
import
com.zehong.system.domain.TEquipmentInfo
;
...
...
@@ -7,12 +8,12 @@ import com.zehong.system.domain.TStoreyInfo;
import
com.zehong.system.service.ITEquipmentAlarmDataService
;
import
com.zehong.system.service.ITEquipmentInfoService
;
import
com.zehong.system.service.ITStoreyInfoService
;
import
com.zehong.system.task.DeviceTaskScheduler
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.*
;
/**
...
...
@@ -31,6 +32,40 @@ public class EquipmentDataCollection {
private
ITStoreyInfoService
tStoreyInfoService
;
@Autowired
private
ITEquipmentAlarmDataService
tEquipmentAlarmDataService
;
@Autowired
private
DeviceTaskScheduler
deviceTaskScheduler
;
/**
* 触发设备监控任务
* @return 执行结果
*/
@GetMapping
(
"/trigger/{ipAndPort}"
)
public
AjaxResult
triggerDeviceTask
(
@PathVariable
(
"ipAndPort"
)
String
ipAndPort
)
{
long
storeyId
=
0
;
try
{
String
[]
split
=
ipAndPort
.
split
(
","
);
String
storeyIdStr
=
split
[
0
];
String
DEFAULT_TEST_IP
=
split
[
1
];
int
port
=
Integer
.
parseInt
(
split
[
2
]);
TStoreyInfo
tStoreyInfo
=
tStoreyInfoService
.
selectTStoreyInfoByCode
(
storeyIdStr
);
storeyId
=
tStoreyInfo
.
getfStoreyId
();
log
.
info
(
"开始执行测试设备任务:storeyId={}, ip={}, port={}"
,
storeyId
,
DEFAULT_TEST_IP
,
port
);
// 调用调度器执行任务
deviceTaskScheduler
.
scheduleDeviceMonitoring
(
storeyId
,
DEFAULT_TEST_IP
,
port
);
log
.
info
(
"测试设备任务已提交:storeyId={}"
,
storeyId
);
return
AjaxResult
.
success
(
"设备任务已成功提交"
,
String
.
format
(
"任务参数:storeyId=%d, ip=%s, port=%d"
,
storeyId
,
DEFAULT_TEST_IP
,
port
));
}
catch
(
Exception
e
)
{
log
.
error
(
"触发设备任务失败:storeyId={}"
,
storeyId
,
e
);
return
AjaxResult
.
error
(
"触发设备任务失败:"
+
e
.
getMessage
());
}
}
/**
* 1.老化柜巡查
* 2.老化层断电
...
...
zhmes-agecal-web/src/api/robotArm/robotArmCommand.js
View file @
d5cbef0d
...
...
@@ -53,6 +53,13 @@ export function sendStopCommand() {
}
// 停止当前指令
export
function
sendWriteHour
(
ipAndPort
)
{
return
request
({
url
:
'/equipmentData/trigger/'
+
ipAndPort
,
method
:
'get'
})
}
// 执行上电操作
export
function
powerOnCommand
(
commandId
)
{
return
request
({
...
...
zhmes-agecal-web/src/views/storey/index.vue
View file @
d5cbef0d
...
...
@@ -111,6 +111,15 @@
@
click=
"handleStop"
>
机械臂停止
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-circle-close"
size=
"mini"
@
click=
"handleWriteHour"
>
写时间测试
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
...
...
@@ -247,7 +256,7 @@ import { listStorey, getStorey, delStorey, addStorey, updateStorey,
exportStorey
,
PowerOn
,
PowerOutage
,
batchReadingCabinetStatus
,
powerOnAllStore
,
powerOffAllStore
,
feeding
,
blanking
,
readingHoldingRegister
}
from
"@/api/storey/storey"
;
import
{
sendHomeCommand
,
sendStopCommand
}
from
"@/api/robotArm/robotArmCommand"
;
import
{
sendHomeCommand
,
sendStopCommand
,
sendWriteHour
}
from
"@/api/robotArm/robotArmCommand"
;
export
default
{
name
:
"Info"
,
...
...
@@ -525,6 +534,20 @@ export default {
}
)
}
,
/** 写时钟 */
handleWriteHour
()
{
this
.
$prompt
(
'请输入ip加端口号 逗号分隔'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
}
).
then
(({
value
}
)
=>
{
sendWriteHour
(
value
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
msgSuccess
(
"msg = "
+
response
.
data
);
}
}
)
}
).
catch
(()
=>
{
}
);
}
,
// 停止
handleStop
()
{
sendStopCommand
().
then
(
response
=>
{
...
...
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