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
0beec712
Commit
0beec712
authored
Dec 25, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 写时间后 立马 读一次 判断是否写入成功
parent
59b5b63e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
AgingStageOneProcessJob.java
.../java/com/zehong/system/task/AgingStageOneProcessJob.java
+3
-4
AgingStageThreeProcessJob.java
...ava/com/zehong/system/task/AgingStageThreeProcessJob.java
+6
-3
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/task/AgingStageOneProcessJob.java
View file @
0beec712
...
...
@@ -166,16 +166,14 @@ public class AgingStageOneProcessJob implements Job {
// 5. 写入自检让设备开始自检,跟 上面的状态没关系
writeSelfCheckStatus
(
master
,
deviceId
,
binding
);
binding
.
setWriteTimeStatus
(
"1"
);
// 6. 更新数据库
palletDeviceBindingMapper
.
updatePalletDeviceBinding
(
binding
);
log
.
debug
(
"设备{}处理完成: ip={}, port={}, status={}"
,
deviceId
,
ip
,
port
,
result
[
1
]);
log
.
info
(
"设备{}处理完成: ip={}, port={}, status={}"
,
deviceId
,
ip
,
port
,
result
[
1
]);
return
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"设备{}处理异常: ip={}, port={}"
,
deviceId
,
ip
,
port
,
e
);
log
.
info
(
"设备{}处理异常: ip={}, port={}"
,
deviceId
,
ip
,
port
,
e
);
if
(
binding
==
null
)
{
binding
=
palletDeviceBindingMapper
.
selectByTrayIdAndIndex
(
ip
,
deviceId
);
}
...
...
@@ -259,6 +257,7 @@ public class AgingStageOneProcessJob implements Job {
binding
.
setRecordDate
(
String
.
valueOf
(
day
));
binding
.
setRecordHour
(
String
.
valueOf
(
hour
));
binding
.
setRecordMinute
(
String
.
valueOf
(
minute
));
binding
.
setWriteTimeStatus
(
"1"
);
log
.
debug
(
"设备{}时间写入成功"
,
deviceId
);
}
else
{
log
.
info
(
"设备{}时间写入失败: year={}, month={}, day={}, hour={}, minute={}"
,
deviceId
,
ints
[
4
],
ints
[
5
],
ints
[
6
],
ints
[
7
],
ints
[
8
]);
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/task/AgingStageThreeProcessJob.java
View file @
0beec712
...
...
@@ -375,15 +375,18 @@ public class AgingStageThreeProcessJob implements Job {
binding
.
setRecordDate
(
String
.
valueOf
(
day
));
binding
.
setRecordHour
(
String
.
valueOf
(
hour
));
binding
.
setRecordMinute
(
String
.
valueOf
(
minute
));
log
.
debug
(
"设备{}时间写入成功"
,
deviceId
);
binding
.
setWriteTimeStatus
(
"1"
);
binding
.
setRunTimeStatus
(
"1"
);
log
.
info
(
"设备{}时间写入成功"
,
deviceId
);
}
else
{
log
.
info
(
"设备{}时间写入失败: year={}, month={}, day={}, hour={}, minute={}"
,
deviceId
,
ints
[
4
],
ints
[
5
],
ints
[
6
],
ints
[
7
],
ints
[
8
]);
binding
.
setWriteTimeStatus
(
"0"
);
binding
.
setRunTimeStatus
(
"0"
);
recordAlarmByBinding
(
binding
,
"设备时间写入失败"
);
}
}
else
{
binding
.
setRunTimeStatus
(
"0"
);
log
.
error
(
"设备{}时间更新失败"
,
deviceId
);
log
.
info
(
"设备{}时间更新失败"
,
deviceId
);
recordAlarmByBinding
(
binding
,
"设备时间更新失败"
);
}
// 2. 如果时间状态为1,则更新 时间运行状态 为异常 状态
...
...
@@ -393,7 +396,7 @@ public class AgingStageThreeProcessJob implements Job {
}
// 3. 写时间状态 异常状态;不管
}
catch
(
Exception
e
)
{
binding
.
setRunTimeStatus
(
"0"
);
log
.
error
(
"设备{}时间更新异常"
,
deviceId
,
e
);
log
.
info
(
"设备{}时间更新异常"
,
deviceId
,
e
);
recordAlarmByBinding
(
binding
,
"设备时间更新异常: "
+
e
.
getMessage
());
}
}
...
...
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