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
2a1ab005
Commit
2a1ab005
authored
Jul 21, 2026
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 老化过程中 获取卡号,获取IOT状态调整中
parent
a7ca757c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
341 additions
and
15 deletions
+341
-15
pom.xml
pom.xml
+4
-5
pom.xml
zhmes-agecal-common/pom.xml
+7
-2
Constants.java
...n/src/main/java/com/zehong/common/constant/Constants.java
+2
-0
PalletDeviceBinding.java
...in/java/com/zehong/system/domain/PalletDeviceBinding.java
+1
-1
PalletDeviceBindingMapper.java
...a/com/zehong/system/mapper/PalletDeviceBindingMapper.java
+2
-0
IPalletDeviceBindingService.java
...om/zehong/system/service/IPalletDeviceBindingService.java
+2
-0
PalletDeviceBindingServiceImpl.java
...g/system/service/impl/PalletDeviceBindingServiceImpl.java
+5
-0
RobotArmCommandServiceImpl.java
...ehong/system/service/impl/RobotArmCommandServiceImpl.java
+2
-0
AllCommandHandler.java
...c/main/java/com/zehong/system/task/AllCommandHandler.java
+286
-5
IotStatusEvent.java
...ain/java/com/zehong/system/task/event/IotStatusEvent.java
+19
-2
PalletDeviceBindingMapper.xml
...ain/resources/mapper/system/PalletDeviceBindingMapper.xml
+11
-0
No files found.
pom.xml
View file @
2a1ab005
...
...
@@ -3,14 +3,14 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.zehong
</groupId>
<artifactId>
zehong
</artifactId>
<version>
3.5.0
</version>
<name>
zehong
</name>
<description>
项目管理系统
</description>
<properties>
<zehong.version>
3.5.0
</zehong.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
...
...
@@ -33,7 +33,7 @@
<velocity.version>
1.7
</velocity.version>
<jwt.version>
0.9.1
</jwt.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
...
...
@@ -203,7 +203,6 @@
<artifactId>
zhmes-agecal-common
</artifactId>
<version>
${zehong.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
@@ -262,4 +261,4 @@
</pluginRepository>
</pluginRepositories>
</project>
\ No newline at end of file
</project>
zhmes-agecal-common/pom.xml
View file @
2a1ab005
...
...
@@ -52,7 +52,7 @@
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
<!-- JSON工具类 -->
<dependency>
<groupId>
com.fasterxml.jackson.core
</groupId>
...
...
@@ -134,6 +134,11 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-websocket
</artifactId>
</dependency>
<dependency>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<version>
33.2.0-jre
</version>
<!-- 建议使用最新稳定版 -->
</dependency>
</dependencies>
</project>
\ No newline at end of file
</project>
zhmes-agecal-common/src/main/java/com/zehong/common/constant/Constants.java
View file @
2a1ab005
...
...
@@ -134,6 +134,8 @@ public class Constants
public
static
final
String
IOT_LOGIN_USERNAME
=
"iot.login.username"
;
public
static
final
String
IOT_LOGIN_ADDRESS
=
"iot.login.url"
;
public
static
final
String
IOT_LOGIN_PASSWORD
=
"iot.login.password"
;
public
static
final
String
IOT_LOGIN_TOKEN
=
"iot.login.token"
;
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/domain/PalletDeviceBinding.java
View file @
2a1ab005
...
...
@@ -219,7 +219,7 @@ public class PalletDeviceBinding extends BaseEntity
/**
* iot状态
* 0-异常 1-正常
* 0-异常 1-正常
2-Nb码为空 3-网络状态异常
*/
private
Integer
iotStatus
;
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/PalletDeviceBindingMapper.java
View file @
2a1ab005
...
...
@@ -86,6 +86,8 @@ public interface PalletDeviceBindingMapper
public
int
batchUpdateNbCode
(
@Param
(
"palletDeviceBindingList"
)
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
public
int
batchUpdateIotStatus
(
@Param
(
"palletDeviceBindingList"
)
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
public
int
batchUpdateDeviceCodeAndUnbindingTime
(
@Param
(
"palletDeviceBindingList"
)
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
public
int
unbindAllDevice
(
Long
trayId
);
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/IPalletDeviceBindingService.java
View file @
2a1ab005
...
...
@@ -41,6 +41,8 @@ public interface IPalletDeviceBindingService
public
void
batchUpdateNbCode
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
public
void
batchUpdateIotStatus
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
);
/**
* 新增托盘绑定的设备列
*
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/PalletDeviceBindingServiceImpl.java
View file @
2a1ab005
...
...
@@ -142,6 +142,11 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
palletDeviceBindingMapper
.
batchUpdateNbCode
(
palletDeviceBindingList
);
}
@Override
public
void
batchUpdateIotStatus
(
List
<
PalletDeviceBinding
>
palletDeviceBindingList
)
{
palletDeviceBindingMapper
.
batchUpdateIotStatus
(
palletDeviceBindingList
);
}
/**
* 新增托盘绑定的设备列
*
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/RobotArmCommandServiceImpl.java
View file @
2a1ab005
...
...
@@ -190,6 +190,8 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
Modbus4jUtils
.
writeCoil
(
master
,
1
,
registerOffsetInt
,
false
);
log
.
info
(
"已发送断电指令 - 设备:{} 层:{}"
,
tEquipmentInfo
.
getfEquipmentCode
(),
layer
);
master
.
destroy
();
// 如果正常 则发送 IOT请求
}
catch
(
ModbusTransportException
|
ModbusInitException
e
)
{
log
.
info
(
"下料发送断电指令失败 - 设备:{} 层:{}"
,
tEquipmentInfo
.
getfEquipmentCode
(),
layer
);
throw
new
RuntimeException
(
e
);
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/task/AllCommandHandler.java
View file @
2a1ab005
This diff is collapsed.
Click to expand it.
zhmes-agecal-system/src/main/java/com/zehong/system/task/event/IotStatusEvent.java
View file @
2a1ab005
package
com
.
zehong
.
system
.
task
.
event
;
import
org.springframework.context.ApplicationEvent
;
/**
* @author lenovo
* @date 2026/7/18
* @description IOTstatus event
* @description IOT
status event
*/
public
class
IotStatusEvent
{
public
class
IotStatusEvent
extends
ApplicationEvent
{
private
String
storeyCode
;
public
IotStatusEvent
(
Object
source
,
String
storeyCode
)
{
super
(
source
);
this
.
storeyCode
=
storeyCode
;
}
public
String
getStoreyCode
()
{
return
storeyCode
;
}
public
void
setStoreyCode
(
String
storeyCode
)
{
this
.
storeyCode
=
storeyCode
;
}
}
zhmes-agecal-system/src/main/resources/mapper/system/PalletDeviceBindingMapper.xml
View file @
2a1ab005
...
...
@@ -154,10 +154,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"listByTrayCode"
parameterType=
"string"
resultMap=
"PalletDeviceBindingResult"
>
<include
refid=
"selectPalletDeviceBindingVo"
/>
where trayInfo.f_tray_code = #{trayCode}
and palDeviceBinding.f_motherboard_code is not null
and palDeviceBinding.f_motherboard_code != ''
</select>
<select
id=
"listByStoreyCode"
parameterType=
"string"
resultMap=
"PalletDeviceBindingResult"
>
<include
refid=
"selectPalletDeviceBindingVo"
/>
where palDeviceBinding.f_storey_code = #{storeyCode}
and palDeviceBinding.f_motherboard_code is not null
and palDeviceBinding.f_motherboard_code != ''
</select>
<select
id=
"selectPalletDeviceBindingById"
parameterType=
"Long"
resultMap=
"PalletDeviceBindingResult"
>
...
...
@@ -437,6 +441,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where f_pallet_device_binding_id = #{item.palletDeviceBindingId} and f_motherboard_code is not null
</foreach>
</update>
<update
id=
"batchUpdateIotStatus"
parameterType=
"list"
>
<foreach
collection=
"palletDeviceBindingList"
item=
"item"
index=
"index"
separator=
";"
>
UPDATE t_pallet_device_binding
SET f_iot_status = #{item.iotStatus}
where f_pallet_device_binding_id = #{item.palletDeviceBindingId}
</foreach>
</update>
<update
id=
"batchUpdateDeviceCodeAndUnbindingTime"
parameterType=
"list"
>
<foreach
collection=
"palletDeviceBindingList"
item=
"item"
index=
"index"
separator=
";"
>
UPDATE t_pallet_device_binding
...
...
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