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
5aa9a014
Commit
5aa9a014
authored
Dec 31, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 写自检后 判断下 是否写成功
parent
eb99eb55
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
36 deletions
+44
-36
PalletDeviceBinding.java
...in/java/com/zehong/system/domain/PalletDeviceBinding.java
+24
-24
Modbus4jUtils.java
...ain/java/com/zehong/system/modbus/util/Modbus4jUtils.java
+8
-7
AgingStageTwoProcessJob.java
.../java/com/zehong/system/task/AgingStageTwoProcessJob.java
+12
-5
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/domain/PalletDeviceBinding.java
View file @
5aa9a014
...
@@ -129,7 +129,7 @@ public class PalletDeviceBinding extends BaseEntity
...
@@ -129,7 +129,7 @@ public class PalletDeviceBinding extends BaseEntity
/**
/**
* 实时AD
* 实时AD
*/
*/
private
int
realTimeAd
;
private
Integer
realTimeAd
;
/**
/**
* 实时状态 0-异常;1-正常
* 实时状态 0-异常;1-正常
...
@@ -150,32 +150,32 @@ public class PalletDeviceBinding extends BaseEntity
...
@@ -150,32 +150,32 @@ public class PalletDeviceBinding extends BaseEntity
/**
/**
* 写自检状态 空 是没写 0-失败;1-成功
* 写自检状态 空 是没写 0-失败;1-成功
*/
*/
private
int
writeSelfCheckStatus
;
private
Integer
writeSelfCheckStatus
;
/**
/**
* 继电器状态 0:初始 1:动作
* 继电器状态 0:初始 1:动作
*/
*/
private
int
relayStatus
;
private
Integer
relayStatus
;
/**
/**
* 脉冲状态 0:初始 1:动作
* 脉冲状态 0:初始 1:动作
*/
*/
private
int
pulseStatus
;
private
Integer
pulseStatus
;
/**
/**
* 模块状态 0:异常 1:正常
* 模块状态 0:异常 1:正常
*/
*/
private
int
moduleStatus
;
private
Integer
moduleStatus
;
/**
/**
* SIM卡状态 0:异常 1:正常
* SIM卡状态 0:异常 1:正常
*/
*/
private
int
simCardStatus
;
private
Integer
simCardStatus
;
/**
/**
* 网络状态 0:异常 1:正常
* 网络状态 0:异常 1:正常
*/
*/
private
int
networkStatus
;
private
Integer
networkStatus
;
public
String
getStatus
()
{
public
String
getStatus
()
{
return
status
;
return
status
;
...
@@ -353,14 +353,10 @@ public class PalletDeviceBinding extends BaseEntity
...
@@ -353,14 +353,10 @@ public class PalletDeviceBinding extends BaseEntity
this
.
runTimeStatus
=
runTimeStatus
;
this
.
runTimeStatus
=
runTimeStatus
;
}
}
public
int
getRealTimeAd
()
{
public
Integer
getRealTimeAd
()
{
return
realTimeAd
;
return
realTimeAd
;
}
}
public
void
setRealTimeAd
(
int
realTimeAd
)
{
this
.
realTimeAd
=
realTimeAd
;
}
public
String
getRealTimeStatus
()
{
public
String
getRealTimeStatus
()
{
return
realTimeStatus
;
return
realTimeStatus
;
}
}
...
@@ -401,51 +397,55 @@ public class PalletDeviceBinding extends BaseEntity
...
@@ -401,51 +397,55 @@ public class PalletDeviceBinding extends BaseEntity
this
.
calibrationConcentrationStatus
=
calibrationConcentrationStatus
;
this
.
calibrationConcentrationStatus
=
calibrationConcentrationStatus
;
}
}
public
int
getWriteSelfCheckStatus
()
{
public
void
setRealTimeAd
(
Integer
realTimeAd
)
{
this
.
realTimeAd
=
realTimeAd
;
}
public
Integer
getWriteSelfCheckStatus
()
{
return
writeSelfCheckStatus
;
return
writeSelfCheckStatus
;
}
}
public
void
setWriteSelfCheckStatus
(
int
writeSelfCheckStatus
)
{
public
void
setWriteSelfCheckStatus
(
Integer
writeSelfCheckStatus
)
{
this
.
writeSelfCheckStatus
=
writeSelfCheckStatus
;
this
.
writeSelfCheckStatus
=
writeSelfCheckStatus
;
}
}
public
int
getRelayStatus
()
{
public
Integer
getRelayStatus
()
{
return
relayStatus
;
return
relayStatus
;
}
}
public
void
setRelayStatus
(
int
relayStatus
)
{
public
void
setRelayStatus
(
Integer
relayStatus
)
{
this
.
relayStatus
=
relayStatus
;
this
.
relayStatus
=
relayStatus
;
}
}
public
int
getPulseStatus
()
{
public
Integer
getPulseStatus
()
{
return
pulseStatus
;
return
pulseStatus
;
}
}
public
void
setPulseStatus
(
int
pulseStatus
)
{
public
void
setPulseStatus
(
Integer
pulseStatus
)
{
this
.
pulseStatus
=
pulseStatus
;
this
.
pulseStatus
=
pulseStatus
;
}
}
public
int
getModuleStatus
()
{
public
Integer
getModuleStatus
()
{
return
moduleStatus
;
return
moduleStatus
;
}
}
public
void
setModuleStatus
(
int
moduleStatus
)
{
public
void
setModuleStatus
(
Integer
moduleStatus
)
{
this
.
moduleStatus
=
moduleStatus
;
this
.
moduleStatus
=
moduleStatus
;
}
}
public
int
getSimCardStatus
()
{
public
Integer
getSimCardStatus
()
{
return
simCardStatus
;
return
simCardStatus
;
}
}
public
void
setSimCardStatus
(
int
simCardStatus
)
{
public
void
setSimCardStatus
(
Integer
simCardStatus
)
{
this
.
simCardStatus
=
simCardStatus
;
this
.
simCardStatus
=
simCardStatus
;
}
}
public
int
getNetworkStatus
()
{
public
Integer
getNetworkStatus
()
{
return
networkStatus
;
return
networkStatus
;
}
}
public
void
setNetworkStatus
(
int
networkStatus
)
{
public
void
setNetworkStatus
(
Integer
networkStatus
)
{
this
.
networkStatus
=
networkStatus
;
this
.
networkStatus
=
networkStatus
;
}
}
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/modbus/util/Modbus4jUtils.java
View file @
5aa9a014
...
@@ -1067,13 +1067,14 @@ public class Modbus4jUtils {
...
@@ -1067,13 +1067,14 @@ public class Modbus4jUtils {
// 20251206 写完时间写自检,写自检就在时间后边写就行,不管时间写不写成功
// 20251206 写完时间写自检,写自检就在时间后边写就行,不管时间写不写成功
try
{
try
{
Modbus4jUtils
.
writeRegister
(
master
,
deviceId
,
15
,
(
short
)
1
);
Modbus4jUtils
.
writeRegister
(
master
,
deviceId
,
15
,
(
short
)
1
);
Thread
.
sleep
(
2000
);
return
1
;
int
[]
ints
=
Modbus4jUtils
.
readDeviceRegisters
(
master
,
deviceId
);
// Thread.sleep(2000);
if
(
ints
[
15
]
==
1
)
{
// int[] ints = Modbus4jUtils.readDeviceRegisters(master, deviceId);
return
1
;
// if (ints[15] == 1) {
}
else
{
// return 1;
return
0
;
// } else {
}
// return 0;
// }
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
0
;
return
0
;
}
}
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/task/AgingStageTwoProcessJob.java
View file @
5aa9a014
...
@@ -200,11 +200,18 @@ public class AgingStageTwoProcessJob implements Job {
...
@@ -200,11 +200,18 @@ public class AgingStageTwoProcessJob implements Job {
errorCount
.
incrementAndGet
();
errorCount
.
incrementAndGet
();
return
false
;
return
false
;
}
}
binding
.
setRelayStatus
(
result
[
10
]);
binding
.
setPulseStatus
(
result
[
11
]);
int
relayStatus
=
result
[
10
];
binding
.
setModuleStatus
(
result
[
12
]);
int
pulseStatus
=
result
[
11
];
binding
.
setSimCardStatus
(
result
[
13
]);
int
moduleStatus
=
result
[
12
];
binding
.
setNetworkStatus
(
result
[
14
]);
int
simCardStatus
=
result
[
13
];
int
networkStatus
=
result
[
14
];
binding
.
setRelayStatus
(
relayStatus
);
binding
.
setPulseStatus
(
pulseStatus
);
binding
.
setModuleStatus
(
moduleStatus
);
binding
.
setSimCardStatus
(
simCardStatus
);
binding
.
setNetworkStatus
(
networkStatus
);
// 重用之前的master连接进行写操作
// 重用之前的master连接进行写操作
master
=
Modbus4jUtils
.
createModbusMaster
(
ip
,
port
);
master
=
Modbus4jUtils
.
createModbusMaster
(
ip
,
port
);
int
i
=
Modbus4jUtils
.
writeSelfCheckStatus
(
master
,
deviceId
);
int
i
=
Modbus4jUtils
.
writeSelfCheckStatus
(
master
,
deviceId
);
...
...
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