Commit b7f98770 authored by wanghao's avatar wanghao

1 下料解绑数据调整

parent 0fa60356
...@@ -30,7 +30,7 @@ public interface TStoreyInfoMapper ...@@ -30,7 +30,7 @@ public interface TStoreyInfoMapper
*/ */
public TStoreyInfo selectTStoreyInfoByCode(String fStoreyCode); public TStoreyInfo selectTStoreyInfoByCode(String fStoreyCode);
public void unbindByCode(TStoreyInfo tStoreyInfo); public void unbindByCode(String fStoreyCode);
public void updateStatusByCode(TStoreyInfo tStoreyInfo); public void updateStatusByCode(TStoreyInfo tStoreyInfo);
......
...@@ -247,12 +247,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService ...@@ -247,12 +247,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
storeyInfoMapper.updateStatusByCode(tStoreyInfo); storeyInfoMapper.updateStatusByCode(tStoreyInfo);
// 如果是下料的话 得把 下料的 流程走完 // 如果是下料的话 得把 下料的 流程走完
} else { } else {
tStoreyInfo.setfStoreyCode(tStoreyInfo.getfStoreyCode()); storeyInfoMapper.unbindByCode(storeyCode);
tStoreyInfo.setUpdateTime(new Date());
tStoreyInfo.setfStatus("0");
tStoreyInfo.setfAgingStartTime(null);
tStoreyInfo.setfAgingEndTime(null);
storeyInfoMapper.unbindByCode(tStoreyInfo);
// 清理 托盘 和 层的关联关系 // 清理 托盘 和 层的关联关系
tTrayInfoMapper.clearStoreyCodeByStoreyCode(storeyCode); tTrayInfoMapper.clearStoreyCodeByStoreyCode(storeyCode);
......
...@@ -120,12 +120,7 @@ public class AllCommandHandler { ...@@ -120,12 +120,7 @@ public class AllCommandHandler {
log.info("已发送断电指令 - 设备:{} 层:{}", event.getDeviceCode(), event.getLayer()); log.info("已发送断电指令 - 设备:{} 层:{}", event.getDeviceCode(), event.getLayer());
master.destroy(); master.destroy();
tStoreyInfo.setfStoreyCode(tStoreyInfo.getfStoreyCode()); tStoreyInfoMapper.unbindByCode(storeyCode);
tStoreyInfo.setUpdateTime(new Date());
tStoreyInfo.setfStatus("0");
tStoreyInfo.setfAgingStartTime(null);
tStoreyInfo.setfAgingEndTime(null);
tStoreyInfoMapper.unbindByCode(tStoreyInfo);
// 清理 托盘 和 层的关联关系 // 清理 托盘 和 层的关联关系
tTrayInfoMapper.clearStoreyCodeByStoreyCode(storeyCode); tTrayInfoMapper.clearStoreyCodeByStoreyCode(storeyCode);
......
...@@ -209,12 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -209,12 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="unbindByCode" parameterType="TStoreyInfo"> <update id="unbindByCode" parameterType="TStoreyInfo">
update t_storey_info update t_storey_info
<trim prefix="SET" suffixOverrides=","> set f_status = '0', f_aging_start_time = null,f_aging_end_time = null
<if test="fStatus != null">f_status = #{fStatus},</if>
<if test="fAgingStartTime == null">f_aging_start_time = null,</if>
<if test="fAgingEndTime == null">f_aging_end_time = null,</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
</trim>
where f_storey_code = #{fStoreyCode} where f_storey_code = #{fStoreyCode}
</update> </update>
<update id="updateStatusByCode" parameterType="TStoreyInfo"> <update id="updateStatusByCode" parameterType="TStoreyInfo">
......
...@@ -106,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -106,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="clearStoreyCodeByStoreyCode" parameterType="string"> <update id="clearStoreyCodeByStoreyCode" parameterType="string">
update t_tray_info update t_tray_info
set f_storey_code = null set f_storey_code = null
where f_storey_code = #{fStoreyCode} where f_storey_code = #{storeyCode}
</update> </update>
<update id="initStatusByTrayId" parameterType="long"> <update id="initStatusByTrayId" parameterType="long">
update t_tray_info update t_tray_info
......
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