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
0a1e841f
Commit
0a1e841f
authored
Sep 01, 2026
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 老化过程中 获取卡号,获取IOT状态调整中
parent
1235fb46
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
97 additions
and
24 deletions
+97
-24
PalletDeviceBinding.java
...in/java/com/zehong/system/domain/PalletDeviceBinding.java
+13
-0
PalletDeviceUploadFailure.java
...a/com/zehong/system/domain/PalletDeviceUploadFailure.java
+13
-0
PalletDeviceUploadHistory.java
...a/com/zehong/system/domain/PalletDeviceUploadHistory.java
+13
-0
IRobotArmCommandService.java
...va/com/zehong/system/service/IRobotArmCommandService.java
+1
-1
RobotArmCommandServiceImpl.java
...ehong/system/service/impl/RobotArmCommandServiceImpl.java
+10
-5
TStoreyInfoServiceImpl.java
...om/zehong/system/service/impl/TStoreyInfoServiceImpl.java
+1
-1
AgingStageFourProcessJob.java
...java/com/zehong/system/task/AgingStageFourProcessJob.java
+3
-1
AllCommandHandler.java
...c/main/java/com/zehong/system/task/AllCommandHandler.java
+2
-1
PalletDeviceBindingMapper.xml
...ain/resources/mapper/system/PalletDeviceBindingMapper.xml
+14
-5
PalletDeviceUploadFailureMapper.xml
...sources/mapper/system/PalletDeviceUploadFailureMapper.xml
+13
-5
PalletDeviceUploadHistoryMapper.xml
...sources/mapper/system/PalletDeviceUploadHistoryMapper.xml
+14
-5
No files found.
zhmes-agecal-system/src/main/java/com/zehong/system/domain/PalletDeviceBinding.java
View file @
0a1e841f
...
...
@@ -228,6 +228,11 @@ public class PalletDeviceBinding extends BaseEntity
*/
private
String
nbCode
;
/**
* 上报时间 从iot获取的时间
*/
private
String
reportTime
;
public
String
getDeviceStatus
()
{
return
deviceStatus
;
}
...
...
@@ -580,6 +585,14 @@ public class PalletDeviceBinding extends BaseEntity
this
.
nbCode
=
nbCode
;
}
public
String
getReportTime
()
{
return
reportTime
;
}
public
void
setReportTime
(
String
reportTime
)
{
this
.
reportTime
=
reportTime
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/domain/PalletDeviceUploadFailure.java
View file @
0a1e841f
...
...
@@ -170,6 +170,19 @@ public class PalletDeviceUploadFailure extends BaseEntity
@Excel
(
name
=
"iot状态(0-异常,1-正常)"
)
private
Integer
iotStatus
;
/**
* 上报时间 从iot获取的时间
*/
private
String
reportTime
;
public
String
getReportTime
()
{
return
reportTime
;
}
public
void
setReportTime
(
String
reportTime
)
{
this
.
reportTime
=
reportTime
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/domain/PalletDeviceUploadHistory.java
View file @
0a1e841f
...
...
@@ -182,6 +182,19 @@ public class PalletDeviceUploadHistory extends BaseEntity
/** iot状态 0-异常 1-正常 */
@Excel
(
name
=
"iot状态(0-异常,1-正常)"
)
private
Integer
iotStatus
;
/**
* 上报时间 从iot获取的时间
*/
private
String
reportTime
;
public
String
getReportTime
()
{
return
reportTime
;
}
public
void
setReportTime
(
String
reportTime
)
{
this
.
reportTime
=
reportTime
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/IRobotArmCommandService.java
View file @
0a1e841f
...
...
@@ -93,7 +93,7 @@ public interface IRobotArmCommandService
public
int
findNotCompletedCommand
(
String
command
);
void
generateBlankingCommand
(
String
trayCode
,
String
storeyCode
,
String
command
);
void
generateBlankingCommand
(
String
trayCode
,
String
storeyCode
,
String
command
,
String
productStandardInspectionNumber
);
void
sendHomeCommand
();
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/RobotArmCommandServiceImpl.java
View file @
0a1e841f
...
...
@@ -194,11 +194,13 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
log
.
info
(
"已发送断电指令 - 设备:{} 层:{}"
,
tEquipmentInfo
.
getfEquipmentCode
(),
layer
);
master
.
destroy
();
if
(
StringUtils
.
isNotBlank
(
command
.
getProductStandardInspectionNumber
())){
ProductStandardInspection
productStandardInspection
=
productStandardInspectionMapper
.
selectByNumber
(
command
.
getProductStandardInspectionNumber
());
if
(
"1"
.
equals
(
productStandardInspection
.
getHasUpload
())){
if
(
productStandardInspection
!=
null
&&
"1"
.
equals
(
productStandardInspection
.
getHasUpload
())){
log
.
info
(
"子任务开始查询IOT状态了"
);
eventPublisher
.
publishEvent
(
new
IotStatusEvent
(
this
,
storeyCode
));
}
}
// 如果正常 则发送 IOT请求
}
catch
(
ModbusTransportException
|
ModbusInitException
e
)
{
log
.
info
(
"下料发送断电指令失败 - 设备:{} 层:{}"
,
tEquipmentInfo
.
getfEquipmentCode
(),
layer
);
...
...
@@ -305,7 +307,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
* @param command c
*/
@Override
public
void
generateBlankingCommand
(
String
trayCode
,
String
storeyCode
,
String
command
)
{
public
void
generateBlankingCommand
(
String
trayCode
,
String
storeyCode
,
String
command
,
String
productStandardInspectionNumber
)
{
// 创建机械臂任务
RobotArmCommand
robotArmCommand
=
new
RobotArmCommand
();
robotArmCommand
.
setType
(
"1"
);
...
...
@@ -314,6 +316,9 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
robotArmCommand
.
setStoreyCode
(
storeyCode
);
robotArmCommand
.
setCreateTime
(
new
Date
());
robotArmCommand
.
setCommand
(
command
);
if
(
StringUtils
.
isNotBlank
(
productStandardInspectionNumber
)){
robotArmCommand
.
setProductStandardInspectionNumber
(
productStandardInspectionNumber
);
}
robotArmCommandMapper
.
insertRobotArmCommand
(
robotArmCommand
);
notifyCommandsUpdate
();
}
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/TStoreyInfoServiceImpl.java
View file @
0a1e841f
...
...
@@ -657,7 +657,7 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
}
if
(
tTrayInfo
!=
null
)
{
robotArmCommandService
.
generateBlankingCommand
(
tTrayInfo
.
getfTrayCode
(),
tStoreyInfo
.
getfStoreyCode
(),
command
);
robotArmCommandService
.
generateBlankingCommand
(
tTrayInfo
.
getfTrayCode
(),
tStoreyInfo
.
getfStoreyCode
(),
command
,
null
);
}
}
else
{
robotArmCommandService
.
sendCommand
(
command
);
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/task/AgingStageFourProcessJob.java
View file @
0a1e841f
...
...
@@ -162,7 +162,9 @@ public class AgingStageFourProcessJob implements Job {
// cleanUpJobs(fStoreyId,context);
// 8. 发送机械臂指令(单独捕获异常)
try
{
robotArmCommandService
.
generateBlankingCommand
(
tStoreyInfo
.
getfTrayCode
(),
storeyCode
,
tStoreyInfo
.
getBlankingCommand
());
List
<
PalletDeviceBinding
>
palletDeviceBindings
=
palletDeviceBindingMapper
.
listByStoreyCode
(
storeyCode
);
String
productStandardInspectionNumber
=
palletDeviceBindings
.
get
(
0
).
getProductStandardInspectionNumber
();
robotArmCommandService
.
generateBlankingCommand
(
tStoreyInfo
.
getfTrayCode
(),
storeyCode
,
tStoreyInfo
.
getBlankingCommand
(),
productStandardInspectionNumber
);
log
.
info
(
"机械臂指令发送完成:fStoreyId={};trayCode={};storeyCode={};blankingCommand={}"
,
fStoreyId
,
tStoreyInfo
.
getfTrayCode
(),
storeyCode
,
tStoreyInfo
.
getBlankingCommand
());
}
catch
(
Exception
e
)
{
log
.
error
(
"机械臂指令发送异常:fStoreyId={}"
,
fStoreyId
,
e
);
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/task/AllCommandHandler.java
View file @
0a1e841f
...
...
@@ -291,7 +291,7 @@ public class AllCommandHandler {
}
// 6. 根据结果设置状态(应用到该主板下的所有设备)
Integer
statusToSet
;
int
statusToSet
;
if
(
StringUtils
.
isNotBlank
(
result
))
{
Map
<
String
,
String
>
dataMap
=
iotDataAndTokenUtil
.
processIotData
(
result
);
...
...
@@ -299,6 +299,7 @@ public class AllCommandHandler {
if
(
dataMap
!=
null
&&
!
dataMap
.
isEmpty
())
{
String
reportTimeStr
=
dataMap
.
get
(
"reportTime"
);
Date
bindingTime
=
palletDeviceBinding
.
getBindingTime
();
palletDeviceBinding
.
setReportTime
(
reportTimeStr
);
if
(
StringUtils
.
isNotBlank
(
reportTimeStr
)
&&
bindingTime
!=
null
)
{
try
{
...
...
zhmes-agecal-system/src/main/resources/mapper/system/PalletDeviceBindingMapper.xml
View file @
0a1e841f
...
...
@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"simCardNo"
column=
"f_sim_card_no"
/>
<result
property=
"iotStatus"
column=
"f_iot_status"
/>
<result
property=
"nbCode"
column=
"f_nb_code"
/>
<result
property=
"reportTime"
column=
"f_report_time"
/>
</resultMap>
...
...
@@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
palDeviceBinding.f_sim_card_no,
palDeviceBinding.f_iot_status,
palDeviceBinding.f_nb_code,
palDeviceBinding.f_report_time,
inspection.f_reading_mode,
inspection.f_has_upload
from t_pallet_device_binding palDeviceBinding
...
...
@@ -209,6 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
palDeviceBinding.f_sim_card_no,
palDeviceBinding.f_iot_status,
palDeviceBinding.f_nb_code,
palDeviceBinding.f_report_time,
inspection.f_reading_mode,
inspection.f_has_upload
from t_pallet_device_binding palDeviceBinding
...
...
@@ -290,7 +293,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_standard_inspect_result = null,
f_sim_card_no = null,
f_iot_status = null,
f_nb_code = null
f_nb_code = null,
f_report_time = null
where f_tray_id = #{trayId}
</update>
<insert
id=
"insertPalletDeviceBinding"
parameterType=
"PalletDeviceBinding"
useGeneratedKeys=
"true"
keyProperty=
"palletDeviceBindingId"
>
...
...
@@ -358,7 +362,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_standard_inspect_result = null,
f_sim_card_no = null,
f_iot_status = null,
f_nb_code = null
f_nb_code = null,
f_report_time = null
where f_pallet_device_binding_id = #{palletDeviceBindingId}
</update>
<update
id=
"updatePalletDeviceBinding"
parameterType=
"PalletDeviceBinding"
>
...
...
@@ -406,6 +411,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"simCardNo != null"
>
f_sim_card_no = #{simCardNo},
</if>
<if
test=
"iotStatus != null"
>
f_iot_status = #{iotStatus},
</if>
<if
test=
"nbCode != null"
>
f_nb_code = #{nbCode},
</if>
<if
test=
"reportTime != null"
>
f_report_time = #{reportTime},
</if>
</trim>
where f_pallet_device_binding_id = #{palletDeviceBindingId} and f_motherboard_code is not null
</update>
...
...
@@ -444,7 +450,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update
id=
"batchUpdateIotStatus"
parameterType=
"list"
>
<foreach
collection=
"palletDeviceBindingList"
item=
"item"
index=
"index"
separator=
";"
>
UPDATE t_pallet_device_binding
SET f_iot_status = #{item.iotStatus}
SET f_iot_status = #{item.iotStatus},
f_report_time = #{item.reportTime}
where f_pallet_device_binding_id = #{item.palletDeviceBindingId}
</foreach>
</update>
...
...
@@ -483,7 +490,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_standard_inspect_result = null,
f_sim_card_no = null,
f_iot_status = null,
f_nb_code = null
f_nb_code = null,
f_report_time = null
<choose>
<when
test=
"item.motherboardCode != null"
>
, f_motherboard_code = #{item.motherboardCode}
...
...
@@ -527,7 +535,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_standard_inspect_result = null,
f_sim_card_no = null,
f_iot_status = null,
f_nb_code = null
f_nb_code = null,
f_report_time = null
where f_tray_id = #{trayId}
</update>
...
...
zhmes-agecal-system/src/main/resources/mapper/system/PalletDeviceUploadFailureMapper.xml
View file @
0a1e841f
...
...
@@ -44,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"hasUpload"
column=
"f_has_upload"
/>
<result
property=
"simCardNo"
column=
"f_sim_card_no"
/>
<result
property=
"iotStatus"
column=
"f_iot_status"
/>
<result
property=
"reportTime"
column=
"f_report_time"
/>
</resultMap>
<sql
id=
"selectPalletDeviceUploadFailureVo"
>
...
...
@@ -86,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
palDeviceBinding.f_standard_inspect_result,
palDeviceBinding.f_sim_card_no,
palDeviceBinding.f_iot_status,
palDeviceBinding.f_report_time,
inspection.f_has_upload
from t_pallet_device_upload_failure palDeviceBinding
left join t_tray_info trayInfo on trayInfo.f_tray_id = palDeviceBinding.f_tray_id
...
...
@@ -177,7 +179,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_product_standard_inspection_number,
f_standard_inspect_result,
f_sim_card_no,
f_iot_status
f_iot_status,
f_report_time,
</trim>
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -218,7 +221,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.productStandardInspectionNumber},
#{item.standardInspectResult},
#{item.simCardNo},
#{item.iotStatus}
#{item.iotStatus},
#{item.reportTime}
</trim>
</foreach>
</insert>
...
...
@@ -261,7 +265,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_product_standard_inspection_number,
f_standard_inspect_result,
f_sim_card_no,
f_iot_status
f_iot_status,
f_report_time
</trim>
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -302,7 +307,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.productStandardInspectionNumber},
#{item.standardInspectResult},
#{item.simCardNo},
#{item.iotStatus}
#{item.iotStatus},
#{item.reportTime}
</trim>
</foreach>
</insert>
...
...
@@ -344,9 +350,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"networkStatus != null"
>
f_network_status,
</if>
<if
test=
"productStandardInspectionNumber != null"
>
f_product_standard_inspection_number,
</if>
<if
test=
"standardInspectResult != null"
>
f_standard_inspect_result,
</if>
<if
test=
"simCardNo != null"
>
f_sim_card_no,
</if>
<if
test=
"iotStatus != null"
>
f_iot_status,
</if>
<if
test=
"reportTime != null"
>
f_report_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"trayId != null"
>
#{trayId},
</if>
...
...
@@ -386,6 +392,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"standardInspectResult != null"
>
#{standardInspectResult},
</if>
<if
test=
"simCardNo != null"
>
#{simCardNo},
</if>
<if
test=
"iotStatus != null"
>
#{iotStatus},
</if>
<if
test=
"reportTime != null"
>
#{reportTime},
</if>
</trim>
</insert>
...
...
@@ -429,6 +436,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"standardInspectResult != null"
>
f_standard_inspect_result = #{standardInspectResult},
</if>
<if
test=
"simCardNo != null"
>
f_sim_card_no = #{simCardNo},
</if>
<if
test=
"iotStatus != null"
>
f_iot_status = #{iotStatus},
</if>
<if
test=
"reportTime != null"
>
f_report_time = #{reportTime},
</if>
</trim>
where f_id = #{id}
</update>
...
...
zhmes-agecal-system/src/main/resources/mapper/system/PalletDeviceUploadHistoryMapper.xml
View file @
0a1e841f
...
...
@@ -46,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"simCardNo"
column=
"f_sim_card_no"
/>
<result
property=
"iotStatus"
column=
"f_iot_status"
/>
<result
property=
"reportTime"
column=
"f_report_time"
/>
</resultMap>
<sql
id=
"selectPalletDeviceUploadHistoryVo"
>
...
...
@@ -87,7 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
palDeviceBinding.f_product_standard_inspection_number,
palDeviceBinding.f_standard_inspect_result,
palDeviceBinding.f_sim_card_no,
palDeviceBinding.f_iot_status
palDeviceBinding.f_iot_status,
palDeviceBinding.f_report_time
from t_pallet_device_upload_history palDeviceBinding
left join t_tray_info trayInfo on trayInfo.f_tray_id = palDeviceBinding.f_tray_id
</sql>
...
...
@@ -147,7 +149,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_product_standard_inspection_number,
f_standard_inspect_result,
f_sim_card_no,
f_iot_status
f_iot_status,
f_report_time
</trim>
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -188,7 +191,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.productStandardInspectionNumber},
#{item.standardInspectResult},
#{item.simCardNo},
#{item.iotStatus}
#{item.iotStatus},
#{item.reportTime}
</trim>
</foreach>
</insert>
...
...
@@ -232,7 +236,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_product_standard_inspection_number,
f_standard_inspect_result,
f_sim_card_no,
f_iot_status
f_iot_status,
f_report_time
</trim>
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -273,7 +278,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.productStandardInspectionNumber},
#{item.standardInspectResult},
#{item.simCardNo},
#{item.iotStatus}
#{item.iotStatus},
#{item.reportTime}
</trim>
</foreach>
</insert>
...
...
@@ -317,6 +323,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"standardInspectResult != null"
>
f_standard_inspect_result,
</if>
<if
test=
"simCardNo != null"
>
f_sim_card_no,
</if>
<if
test=
"iotStatus != null"
>
f_iot_status,
</if>
<if
test=
"reportTime != null"
>
f_report_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"trayId != null"
>
#{trayId},
</if>
...
...
@@ -329,6 +336,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"bindingTime != null"
>
#{bindingTime},
</if>
<if
test=
"unbindingTime != null"
>
#{unbindingTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"reportTime != null"
>
#{reportTime},
</if>
<if
test=
"deviceStatus != null"
>
#{deviceStatus},
</if>
<if
test=
"recordYear != null"
>
#{recordYear},
</if>
<if
test=
"recordMonth != null"
>
#{recordMonth},
</if>
...
...
@@ -402,6 +410,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"simCardNo != null"
>
f_sim_card_no = #{simCardNo},
</if>
<if
test=
"iotStatus != null"
>
f_iot_status = #{iotStatus},
</if>
<if
test=
"reportTime != null"
>
f_report_time = #{reportTime},
</if>
</trim>
where f_id = #{id}
</update>
...
...
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