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
04b02950
Commit
04b02950
authored
Sep 23, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1测试上电断电操作
parent
cddda129
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
5 deletions
+26
-5
TTrayInfoMapper.java
...c/main/java/com/zehong/system/mapper/TTrayInfoMapper.java
+2
-0
RobotArmCommandServiceImpl.java
...ehong/system/service/impl/RobotArmCommandServiceImpl.java
+3
-3
AllCommandHandler.java
...c/main/java/com/zehong/system/task/AllCommandHandler.java
+11
-0
DeviceCommunicationJob.java
...n/java/com/zehong/system/task/DeviceCommunicationJob.java
+4
-1
TTrayInfoMapper.xml
...stem/src/main/resources/mapper/system/TTrayInfoMapper.xml
+5
-0
TrayInformation.vue
...gecal-web/src/views/screen/components/TrayInformation.vue
+1
-1
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/TTrayInfoMapper.java
View file @
04b02950
...
...
@@ -47,6 +47,8 @@ public interface TTrayInfoMapper
*/
public
int
updateTTrayInfo
(
TTrayInfo
tTrayInfo
);
public
int
updateStatusByTrayCode
(
TTrayInfo
tTrayInfo
);
public
int
unbindByCode
(
TTrayInfo
tTrayInfo
);
/**
* 删除托盘信息
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/RobotArmCommandServiceImpl.java
View file @
04b02950
...
...
@@ -125,9 +125,9 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
// 如果是下料,则 先断电再去下料
if
(
"UNLOAD"
.
equals
(
commandType
))
{
String
trayCode
=
command
.
getTra
yCode
();
if
(
StringUtils
.
isNotBlank
(
tra
yCode
))
{
String
[]
split
=
tra
yCode
.
split
(
"-"
);
String
storeyCode
=
command
.
getStore
yCode
();
if
(
StringUtils
.
isNotBlank
(
store
yCode
))
{
String
[]
split
=
store
yCode
.
split
(
"-"
);
TEquipmentInfo
tEquipmentInfo
=
equipmentInfoMapper
.
selectTEquipmentInfoByCode
(
split
[
0
]);
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/task/AllCommandHandler.java
View file @
04b02950
...
...
@@ -6,9 +6,11 @@ import com.serotonin.modbus4j.exception.ModbusInitException;
import
com.serotonin.modbus4j.exception.ModbusTransportException
;
import
com.zehong.system.domain.TEquipmentAlarmData
;
import
com.zehong.system.domain.TStoreyInfo
;
import
com.zehong.system.domain.TTrayInfo
;
import
com.zehong.system.modbus.util.Modbus4jUtils
;
import
com.zehong.system.service.ITEquipmentAlarmDataService
;
import
com.zehong.system.service.ITStoreyInfoService
;
import
com.zehong.system.service.ITTrayInfoService
;
import
org.quartz.SchedulerException
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.scheduling.annotation.Async
;
...
...
@@ -31,6 +33,9 @@ public class AllCommandHandler {
@Resource
private
ITStoreyInfoService
tStoreyInfoService
;
@Resource
private
ITTrayInfoService
trayInfoService
;
@Resource
private
DeviceTaskScheduler
deviceTaskScheduler
;
...
...
@@ -66,6 +71,12 @@ public class AllCommandHandler {
tStoreyInfo
.
setfAgingStartTime
(
new
Date
());
tStoreyInfoService
.
updateTStoreyInfo
(
tStoreyInfo
);
// 同时 把 托盘的 状态更新
TTrayInfo
tTrayInfo
=
new
TTrayInfo
();
tTrayInfo
.
setfStatus
(
"1"
);
tTrayInfo
.
setfStoreyCode
(
storeyCode
);
trayInfoService
.
updateTTrayInfo
(
tTrayInfo
);
deviceTaskScheduler
.
scheduleDeviceMonitoring
(
tStoreyInfo
.
getfStoreyId
(),
fip
,
fport
);
}
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/task/DeviceCommunicationJob.java
View file @
04b02950
...
...
@@ -10,6 +10,7 @@ import org.quartz.JobDataMap;
import
org.quartz.JobExecutionContext
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.Arrays
;
...
...
@@ -31,6 +32,9 @@ public class DeviceCommunicationJob implements Job {
@Resource
private
TStoreyInfoMapper
tStoreyInfoMapper
;
@Autowired
private
ModbusResultHandler
resultHandler
;
@Override
public
void
execute
(
JobExecutionContext
context
)
{
JobDataMap
data
=
context
.
getJobDetail
().
getJobDataMap
();
...
...
@@ -42,7 +46,6 @@ public class DeviceCommunicationJob implements Job {
// 1. 执行Modbus通信
String
s
=
tStoreyInfo
.
getfPort
();
String
ip
=
tStoreyInfo
.
getfIp
();
ModbusResultHandler
resultHandler
=
new
ModbusResultHandler
();
// 501 的 27个 设备id
List
<
Integer
>
registerOffsetsOne
=
Arrays
.
asList
(
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
);
// 501 对应 27个设备读取状态 并设置时间
...
...
zhmes-agecal-system/src/main/resources/mapper/system/TTrayInfoMapper.xml
View file @
04b02950
...
...
@@ -85,6 +85,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</insert>
<update
id=
"updateStatusByTrayCode"
parameterType=
"TTrayInfo"
>
update t_tray_info
set f_status = #{fStatus}
where f_storey_code = #{fStoreyCode}
</update>
<update
id=
"updateTTrayInfo"
parameterType=
"TTrayInfo"
>
update t_tray_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
...
...
zhmes-agecal-web/src/views/screen/components/TrayInformation.vue
View file @
04b02950
...
...
@@ -64,7 +64,7 @@
</el-table-column>
<el-table-column
prop=
"location"
label=
"位置"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
class=
"location-text"
>
{{
scope
.
row
.
location
}}
</div>
<div
class=
"location-text"
>
{{
scope
.
row
.
fStoreyCode
}}
</div>
</
template
>
</el-table-column>
</el-table>
...
...
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