Commit 344043d7 authored by wanghao's avatar wanghao

1 解绑后 重新绑定自测报错调整

2 扫码绑定校验重复设备号
parent 630fa641
...@@ -53,6 +53,8 @@ public interface TTrayInfoMapper ...@@ -53,6 +53,8 @@ public interface TTrayInfoMapper
*/ */
public int updateTTrayInfo(TTrayInfo tTrayInfo); public int updateTTrayInfo(TTrayInfo tTrayInfo);
public int updateStatusByStoreyCode(TTrayInfo tTrayInfo);
public int updateStatusByTrayCode(TTrayInfo tTrayInfo); public int updateStatusByTrayCode(TTrayInfo tTrayInfo);
public int updateStatusByTrayId(TTrayInfo tTrayInfo); public int updateStatusByTrayId(TTrayInfo tTrayInfo);
......
...@@ -7,6 +7,7 @@ import com.zehong.common.constant.RoboticArmConstans; ...@@ -7,6 +7,7 @@ import com.zehong.common.constant.RoboticArmConstans;
import com.zehong.common.utils.StringUtils; import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.http.HttpUtils; import com.zehong.common.utils.http.HttpUtils;
import com.zehong.system.domain.*; import com.zehong.system.domain.*;
import com.zehong.system.mapper.TTrayInfoMapper;
import com.zehong.system.service.IPalletDeviceBindingService; import com.zehong.system.service.IPalletDeviceBindingService;
import com.zehong.system.service.IPalletDeviceUploadHistoryService; import com.zehong.system.service.IPalletDeviceUploadHistoryService;
import com.zehong.system.service.IProcessCalibrationResultHistoryService; import com.zehong.system.service.IProcessCalibrationResultHistoryService;
...@@ -52,6 +53,9 @@ public class CalibrationResultEventHandler { ...@@ -52,6 +53,9 @@ public class CalibrationResultEventHandler {
@Resource @Resource
private IProcessCalibrationResultHistoryService processCalibrationResultHistoryService; private IProcessCalibrationResultHistoryService processCalibrationResultHistoryService;
@Resource
private TTrayInfoMapper tTrayInfoMapper;
/** /**
* check是否启动 ,没启动就启动下 开始老化 * check是否启动 ,没启动就启动下 开始老化
* *
...@@ -158,6 +162,12 @@ public class CalibrationResultEventHandler { ...@@ -158,6 +162,12 @@ public class CalibrationResultEventHandler {
// 批量更新 // 批量更新
palletDeviceBindingService.batchUpdateAdAndStatus(palletDeviceBindings); palletDeviceBindingService.batchUpdateAdAndStatus(palletDeviceBindings);
// 更新托盘为标检完成状态3
TTrayInfo tTrayInfo = new TTrayInfo();
tTrayInfo.setfStatus("3");
tTrayInfo.setfTrayCode(trayCode);
tTrayInfoMapper.updateStatusByTrayCode(tTrayInfo);
return palletDeviceBindings; return palletDeviceBindings;
} }
......
...@@ -44,6 +44,8 @@ public interface ITTrayInfoService ...@@ -44,6 +44,8 @@ public interface ITTrayInfoService
*/ */
public int updateTTrayInfo(TTrayInfo tTrayInfo); public int updateTTrayInfo(TTrayInfo tTrayInfo);
public int updateStatusByStoreCode(TTrayInfo tTrayInfo);
public int updateStatusByTrayCode(TTrayInfo tTrayInfo); public int updateStatusByTrayCode(TTrayInfo tTrayInfo);
public int updateStatusByTrayId(TTrayInfo tTrayInfo); public int updateStatusByTrayId(TTrayInfo tTrayInfo);
......
...@@ -79,11 +79,21 @@ public class TTrayInfoServiceImpl implements ITTrayInfoService ...@@ -79,11 +79,21 @@ public class TTrayInfoServiceImpl implements ITTrayInfoService
return tTrayInfoMapper.updateTTrayInfo(tTrayInfo); return tTrayInfoMapper.updateTTrayInfo(tTrayInfo);
} }
@Override
public int updateStatusByStoreCode(TTrayInfo tTrayInfo) {
return tTrayInfoMapper.updateStatusByStoreyCode(tTrayInfo);
}
/**
* 修改托盘状态
*
* @param tTrayInfo 托盘信息
* @return 批量结果
*/
@Override @Override
public int updateStatusByTrayCode(TTrayInfo tTrayInfo) { public int updateStatusByTrayCode(TTrayInfo tTrayInfo) {
return tTrayInfoMapper.updateStatusByTrayCode(tTrayInfo); return tTrayInfoMapper.updateStatusByTrayCode(tTrayInfo);
} }
@Override @Override
public int updateStatusByTrayId(TTrayInfo tTrayInfo) { public int updateStatusByTrayId(TTrayInfo tTrayInfo) {
return tTrayInfoMapper.initStatusByTrayId(tTrayInfo.getfTrayId()); return tTrayInfoMapper.initStatusByTrayId(tTrayInfo.getfTrayId());
......
...@@ -81,7 +81,7 @@ public class AllCommandHandler { ...@@ -81,7 +81,7 @@ public class AllCommandHandler {
TTrayInfo tTrayInfo = new TTrayInfo(); TTrayInfo tTrayInfo = new TTrayInfo();
tTrayInfo.setfStatus("1"); tTrayInfo.setfStatus("1");
tTrayInfo.setfStoreyCode(storeyCode); tTrayInfo.setfStoreyCode(storeyCode);
trayInfoService.updateStatusByTrayCode(tTrayInfo); trayInfoService.updateStatusByStoreCode(tTrayInfo);
deviceTaskScheduler.scheduleDeviceMonitoring(tStoreyInfo.getfStoreyId(), fip, fport); deviceTaskScheduler.scheduleDeviceMonitoring(tStoreyInfo.getfStoreyId(), fip, fport);
} }
......
...@@ -169,6 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -169,6 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="resetAll" parameterType="long"> <update id="resetAll" parameterType="long">
update t_pallet_device_binding update t_pallet_device_binding
set f_device_code = null, set f_device_code = null,
f_status = null,
f_binding_time = null, f_binding_time = null,
f_unbinding_time = null, f_unbinding_time = null,
f_status = null, f_status = null,
...@@ -222,6 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -222,6 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="unbindDevice" parameterType="long"> <update id="unbindDevice" parameterType="long">
update t_pallet_device_binding update t_pallet_device_binding
set f_device_code = null, set f_device_code = null,
f_status = null,
f_unbinding_time = NOW(), f_unbinding_time = NOW(),
f_record_year = null, f_record_year = null,
f_record_month = null, f_record_month = null,
...@@ -303,6 +305,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -303,6 +305,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
UPDATE t_pallet_device_binding UPDATE t_pallet_device_binding
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
f_unbinding_time = null, f_unbinding_time = null,
f_status = null,
f_binding_time = NOW(), f_binding_time = NOW(),
f_record_year = null, f_record_year = null,
f_record_month = null, f_record_month = null,
...@@ -320,7 +323,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -320,7 +323,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_real_time_ad_status = null, f_real_time_ad_status = null,
f_calibration_concentration = null, f_calibration_concentration = null,
f_calibration_concentration_status = null f_calibration_concentration_status = null
<if test="item.deviceCode != null">f_device_code = #{item.deviceCode},</if> <choose>
<when test="item.deviceCode != null">
, f_device_code = #{item.deviceCode}
</when>
</choose>
</trim> </trim>
WHERE f_pallet_device_binding_id = #{item.palletDeviceBindingId} WHERE f_pallet_device_binding_id = #{item.palletDeviceBindingId}
</foreach> </foreach>
...@@ -328,6 +335,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -328,6 +335,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="unbindAllDevice" parameterType="long"> <update id="unbindAllDevice" parameterType="long">
update t_pallet_device_binding update t_pallet_device_binding
set f_device_code = null, set f_device_code = null,
f_status = null,
f_unbinding_time = NOW(), f_unbinding_time = NOW(),
f_status = '1', f_status = '1',
f_record_year = null, f_record_year = null,
......
...@@ -89,11 +89,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -89,11 +89,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</insert> </insert>
<update id="updateStatusByTrayCode" parameterType="TTrayInfo"> <update id="updateStatusByStoreyCode" parameterType="TTrayInfo">
update t_tray_info update t_tray_info
set f_status = #{fStatus} set f_status = #{fStatus}
where f_storey_code = #{fStoreyCode} where f_storey_code = #{fStoreyCode}
</update> </update>
<update id="updateStatusByTrayCode" parameterType="TTrayInfo">
update t_tray_info
set f_status = #{fStatus}
where f_tray_code = #{fTrayCode}
</update>
<update id="updateStatusByTrayId" parameterType="TTrayInfo"> <update id="updateStatusByTrayId" parameterType="TTrayInfo">
update t_tray_info update t_tray_info
set f_status = #{fStatus} set f_status = #{fStatus}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment