Commit be3a7c5e authored by wanghao's avatar wanghao

1 解绑的时候 清理托盘 和 层数据

parent 4198ca5c
......@@ -32,6 +32,8 @@ public interface TStoreyInfoMapper
public void unbindByCode(String fStoreyCode);
public void unbindByTrayId(Long trayId);
public void updateStatusByCode(TStoreyInfo tStoreyInfo);
// 新增方法:查询离机械臂最近的空闲层
......
......@@ -335,8 +335,9 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
// 解绑设备
palletDeviceBindingMapper.unbindAllDevice(trayId);
tStoreyInfoMapper.unbindByTrayId(trayId);
// 初始托盘状态
tTrayInfoMapper.initStatusByTrayId(trayId);
tTrayInfoMapper.clearStoreyCodeByTrayId(trayId);
return AjaxResult.success();
}
......@@ -359,8 +360,10 @@ public class PalletDeviceBindingServiceImpl implements IPalletDeviceBindingServi
// 解绑设备
palletDeviceBindingMapper.unbindAllDevice(trayId);
// 初始托盘状态
tTrayInfoMapper.initStatusByTrayId(trayId);
tStoreyInfoMapper.unbindByTrayId(trayId);
// 初始托盘状态 可能会出现手动直接下料 不会走自定义任务的清理
tTrayInfoMapper.clearStoreyCodeByTrayId(trayId);
return AjaxResult.success();
}
......
......@@ -231,6 +231,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
set f_status = '0', f_aging_start_time = null,f_aging_end_time = null,f_estimated_end_time = null
where f_storey_code = #{fStoreyCode}
</update>
<update id="unbindByTrayId" parameterType="Long">
update t_storey_info storeyInfo left join t_tray_info trayInfo on storeyInfo.f_storey_code = trayInfo.f_storey_code
set storeyInfo.f_status = '0', storeyInfo.f_aging_start_time = null,storeyInfo.f_aging_end_time = null,storeyInfo.f_estimated_end_time = null
where trayInfo.f_tray_id = #{trayId}
</update>
<update id="updateStatusByCode" parameterType="TStoreyInfo">
update t_storey_info
<trim prefix="SET" suffixOverrides=",">
......
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