Commit b7f98770 authored by wanghao's avatar wanghao

1 下料解绑数据调整

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