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
6cf1eae8
Commit
6cf1eae8
authored
Nov 06, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 上料指令开始执行后,就把 层的状态更新为运行,如果不更改状态的话,再扫码上料就还会用原来的层上料。
parent
01e592a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
TStoreyInfoMapper.java
...main/java/com/zehong/system/mapper/TStoreyInfoMapper.java
+2
-0
RobotArmCommandServiceImpl.java
...ehong/system/service/impl/RobotArmCommandServiceImpl.java
+7
-1
TStoreyInfoMapper.xml
...em/src/main/resources/mapper/system/TStoreyInfoMapper.xml
+8
-0
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/TStoreyInfoMapper.java
View file @
6cf1eae8
...
...
@@ -30,6 +30,8 @@ public interface TStoreyInfoMapper
public
void
unbindByCode
(
TStoreyInfo
tStoreyInfo
);
public
void
updateStatusByCode
(
TStoreyInfo
tStoreyInfo
);
// 新增方法:查询离机械臂最近的空闲层
public
TStoreyInfo
selectNearestFreeStorey
();
/**
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/RobotArmCommandServiceImpl.java
View file @
6cf1eae8
...
...
@@ -125,8 +125,8 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
robotArmCommandMapper
.
updateRobotArmCommand
(
command
);
// 如果是下料,则 先断电再去下料
String
storeyCode
=
command
.
getStoreyCode
();
if
(
"UNLOAD"
.
equals
(
commandType
))
{
String
storeyCode
=
command
.
getStoreyCode
();
if
(
StringUtils
.
isNotBlank
(
storeyCode
))
{
String
[]
split
=
storeyCode
.
split
(
"-"
);
...
...
@@ -146,6 +146,12 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
throw
new
RuntimeException
(
e
);
}
}
// 如果是下料,则 先把 t_story_info 设置为 运行中,占上位置,避免此时 再上料 是使用重复位置
}
else
{
TStoreyInfo
tStoreyInfo
=
new
TStoreyInfo
();
tStoreyInfo
.
setfStoreyCode
(
command
.
getStoreyCode
());
tStoreyInfo
.
setfStatus
(
"1"
);
storeyInfoMapper
.
updateStatusByCode
(
tStoreyInfo
);
}
// 通过WebSocket广播更新
...
...
zhmes-agecal-system/src/main/resources/mapper/system/TStoreyInfoMapper.xml
View file @
6cf1eae8
...
...
@@ -213,6 +213,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where f_storey_code = #{fStoreyCode}
</update>
<update
id=
"updateStatusByCode"
parameterType=
"TStoreyInfo"
>
update t_storey_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"fStatus != null"
>
f_status = #{fStatus},
</if>
<if
test=
"fUpdateTime != null"
>
f_update_time = #{fUpdateTime},
</if>
</trim>
where f_storey_code = #{fStoreyCode}
</update>
<delete
id=
"deleteTStoreyInfoById"
parameterType=
"Long"
>
delete from t_storey_info where f_storey_id = #{fStoreyId}
</delete>
...
...
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