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
844dc1cc
Commit
844dc1cc
authored
Aug 21, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 待下料 下料功能实现。
parent
9afc5cb7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
1 deletion
+73
-1
RobotArmCommandController.java
...g/web/controller/equipment/RobotArmCommandController.java
+8
-0
RobotArmCommandMapper.java
.../java/com/zehong/system/mapper/RobotArmCommandMapper.java
+2
-0
IRobotArmCommandService.java
...va/com/zehong/system/service/IRobotArmCommandService.java
+2
-0
RobotArmCommandServiceImpl.java
...ehong/system/service/impl/RobotArmCommandServiceImpl.java
+24
-0
RobotArmCommandMapper.xml
...rc/main/resources/mapper/system/RobotArmCommandMapper.xml
+10
-0
robotArmCommand.js
zhmes-agecal-web/src/api/robotArm/robotArmCommand.js
+10
-0
AgingLayer.vue
zhmes-agecal-web/src/views/screen/components/AgingLayer.vue
+17
-1
No files found.
zhmes-agecal-admin/src/main/java/com/zehong/web/controller/equipment/RobotArmCommandController.java
View file @
844dc1cc
...
...
@@ -63,6 +63,14 @@ public class RobotArmCommandController extends BaseController
return
AjaxResult
.
success
(
robotArmCommandService
.
selectRobotArmCommandById
(
robotArmCommandId
));
}
/**
* 新增空白机械臂指令
*/
@PostMapping
(
"/insertBlankingRobotArmCommand"
)
public
AjaxResult
insertBlankingRobotArmCommand
(
@RequestBody
RobotArmCommand
robotArmCommand
)
{
return
toAjax
(
robotArmCommandService
.
insertBlankingRobotArmCommand
(
robotArmCommand
));
}
/**
* 新增机械臂指令
*/
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/RobotArmCommandMapper.java
View file @
844dc1cc
...
...
@@ -22,6 +22,8 @@ public interface RobotArmCommandMapper
public
RobotArmCommand
findExecutingCommand
(
String
trayCode
,
String
storeyCode
);
public
RobotArmCommand
findExecutingCommandByType
(
String
trayCode
,
String
storeyCode
,
String
type
);
public
RobotArmCommand
selectLatestPendingTray
();
public
RobotArmCommand
findByTrayAndStatus
(
@Param
(
"trayCode"
)
String
trayCode
,
@Param
(
"status"
)
String
status
);
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/IRobotArmCommandService.java
View file @
844dc1cc
...
...
@@ -29,6 +29,8 @@ public interface IRobotArmCommandService
public
List
<
RobotArmCommand
>
findByType
(
String
type
);
public
int
insertBlankingRobotArmCommand
(
RobotArmCommand
robotArmCommand
);
/**
* 新增机械臂指令
*
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/RobotArmCommandServiceImpl.java
View file @
844dc1cc
...
...
@@ -240,6 +240,30 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
return
robotArmCommandMapper
.
findByType
(
type
);
}
/**
* 批量新增空闲指令
*
* @param robotArmCommand r
* @return r
*/
@Override
public
int
insertBlankingRobotArmCommand
(
RobotArmCommand
robotArmCommand
)
{
if
(
robotArmCommand
.
getTrayCode
()
==
null
||
robotArmCommand
.
getStoreyCode
()
==
null
)
{
throw
new
RuntimeException
(
"托盘和层不能为空"
);
}
// type 1 是 待下料的
RobotArmCommand
executingCommandByType
=
robotArmCommandMapper
.
findExecutingCommandByType
(
robotArmCommand
.
getTrayCode
(),
robotArmCommand
.
getStoreyCode
(),
"1"
);
if
(
executingCommandByType
!=
null
)
{
throw
new
RuntimeException
(
"当前托盘正在执行指令"
);
}
robotArmCommand
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
robotArmCommandMapper
.
insertRobotArmCommand
(
robotArmCommand
);
}
/**
* 新增机械臂指令
*
...
...
zhmes-agecal-system/src/main/resources/mapper/system/RobotArmCommandMapper.xml
View file @
844dc1cc
...
...
@@ -49,6 +49,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND f_status = '1'
<!-- 状态为执行中 -->
LIMIT 1
</select>
<select
id=
"findExecutingCommandByType"
resultMap=
"RobotArmCommandResult"
>
<include
refid=
"selectRobotArmCommandVo"
/>
WHERE f_tray_code = #{trayCode}
AND f_storey_code = #{storeyCode}
AND f_type = #{type}
AND f_status = '1'
<!-- 状态为执行中 -->
LIMIT 1
</select>
<!-- 查找最近扫码但未处理的托盘 -->
<select
id=
"selectLatestPendingTray"
resultMap=
"RobotArmCommandResult"
>
<include
refid=
"selectRobotArmCommandVo"
/>
...
...
zhmes-agecal-web/src/api/robotArm/robotArmCommand.js
View file @
844dc1cc
...
...
@@ -26,6 +26,16 @@ export function addCommand(data) {
})
}
// 新增机械臂指令
export
function
insertBlankingRobotArmCommand
(
data
)
{
return
request
({
url
:
'/robotArm/command/insertBlankingRobotArmCommand'
,
method
:
'post'
,
data
:
data
})
}
// 执行上电操作
export
function
powerOnCommand
(
commandId
)
{
return
request
({
...
...
zhmes-agecal-web/src/views/screen/components/AgingLayer.vue
View file @
844dc1cc
...
...
@@ -83,7 +83,7 @@
<!-- 操作按钮区域 -->
<div
class=
"tray-actions"
>
<button
class=
"btn-action btn-load"
@
click=
"loadTray"
>
<button
class=
"btn-action btn-load"
@
click=
"loadTray"
v-if=
"trayInfo.status === '1'"
>
<i
class=
"icon-load"
></i>
下料
</button>
</div>
...
...
@@ -98,6 +98,7 @@
<
script
>
import
{
queryByDepartmentId
}
from
"@/api/storey/storey"
;
import
{
testPowerOutage
}
from
"@/api/testScheduledTasks/testTasks"
;
import
{
insertBlankingRobotArmCommand
}
from
"@/api/robotArm/robotArmCommand"
;
export
default
{
name
:
"AgingLayer"
,
props
:
{
...
...
@@ -242,6 +243,21 @@ export default {
// 操作按钮方法
loadTray
()
{
this
.
$message
.
success
(
"下料操作已执行"
);
const
robotArmCommand
=
{
trayCode
:
this
.
trayInfo
.
fTrayCode
,
storeyCode
:
this
.
trayInfo
.
storeyCode
,
type
:
'1'
};
insertBlankingRobotArmCommand
(
robotArmCommand
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
"添加成功"
);
this
.
showAddDialog
=
false
;
}
else
{
this
.
msgSuccess
(
"添加失败"
);
}
})
},
powerOn
()
{
...
...
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