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
307fa9cd
Commit
307fa9cd
authored
Oct 09, 2026
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 测试分支,单独测试 不需要 机械臂 获取iot数据
parent
927e9662
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
NettyUdpServerHandler.java
...om/zehong/system/netty/handler/NettyUdpServerHandler.java
+24
-16
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/netty/handler/NettyUdpServerHandler.java
View file @
307fa9cd
...
...
@@ -165,25 +165,33 @@ public class NettyUdpServerHandler extends SimpleChannelInboundHandler<DatagramP
public
void
onlyCompleted
()
{
Long
commandId
=
null
;
// 优先从currentCommandId获取
if
(
currentCommandId
!=
null
)
{
commandId
=
currentCommandId
;
}
else
{
// 如果currentCommandId为空,从数据库查询正在执行的任务
List
<
RobotArmCommand
>
robotArmCommands
=
robotArmCommandService
.
selectTopRunningRobotArmCommands
();
if
(
robotArmCommands
!=
null
&&
!
robotArmCommands
.
isEmpty
())
{
commandId
=
robotArmCommands
.
get
(
0
).
getRobotArmCommandId
();
// 如果找到了指令ID,更新currentCommandId
currentCommandId
=
commandId
;
}
// 如果currentCommandId为空,从数据库查询正在执行的任务
List
<
RobotArmCommand
>
robotArmCommands
=
robotArmCommandService
.
selectTopRunningRobotArmCommands
();
if
(
robotArmCommands
!=
null
&&
!
robotArmCommands
.
isEmpty
())
{
commandId
=
robotArmCommands
.
get
(
0
).
getRobotArmCommandId
();
// 如果找到了指令ID,更新currentCommandId
currentCommandId
=
commandId
;
}
if
(
currentCommandId
!=
null
){
robotArmCommandService
.
completeCommand
(
currentCommandId
);
}
if
(
commandId
!=
null
)
{
robotArmCommandService
.
completeCommand
(
commandId
);
// 使用状态机完成指令
// 优先从currentCommandId获取
// if (currentCommandId != null) {
// commandId = currentCommandId;
// } else {
// // 如果currentCommandId为空,从数据库查询正在执行的任务
// List<RobotArmCommand> robotArmCommands = robotArmCommandService.selectTopRunningRobotArmCommands();
// if (robotArmCommands != null && !robotArmCommands.isEmpty()) {
// commandId = robotArmCommands.get(0).getRobotArmCommandId();
// // 如果找到了指令ID,更新currentCommandId
// currentCommandId = commandId;
// }
// }
//
// if (commandId != null) {
// completeCommandWithStateMachine(commandId);
}
//
}
}
/**
...
...
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