Commit 1504025b authored by 王晓倩's avatar 王晓倩

断电、上电指令

parent bbbfbcb6
......@@ -34,7 +34,8 @@ public class ReceiverThread extends Thread {
// 将接收到的字节转换为十六进制字符串显示
hexResponse = HexUtils.bytesToHex(responseBytes);
log.info("收到服务器响应: " + hexResponse);
if(hexResponse.length() >= 58) {
// 老化柜58,上电断电24,写时间26
if(hexResponse.length() == 58 || hexResponse.length() == 24 || hexResponse.length() == 26) {
break;
}
}
......
......@@ -19,6 +19,14 @@ public interface TStoreyInfoMapper
*/
public TStoreyInfo selectTStoreyInfoById(Long fStoreyId);
/**
* 查询老化层信息
*
* @param fStoreyCode 老化层信息Code
* @return 老化层信息
*/
public TStoreyInfo selectTStoreyInfoByCode(String fStoreyCode);
/**
* 查询老化层信息列表
*
......@@ -43,14 +51,6 @@ public interface TStoreyInfoMapper
*/
public int updateTStoreyInfo(TStoreyInfo tStoreyInfo);
/**
* 修改老化层信息
*
* @param tStoreyInfo 老化层信息
* @return 结果
*/
public int updateTStoreyInfoByCode(TStoreyInfo tStoreyInfo);
/**
* 删除老化层信息
*
......
......@@ -19,6 +19,14 @@ public interface ITStoreyInfoService
*/
public TStoreyInfo selectTStoreyInfoById(Long fStoreyId);
/**
* 查询老化层信息
*
* @param fStoreyCode 老化层信息Code
* @return 老化层信息
*/
public TStoreyInfo selectTStoreyInfoByCode(String fStoreyCode);
/**
* 查询老化层信息列表
*
......@@ -43,14 +51,6 @@ public interface ITStoreyInfoService
*/
public int updateTStoreyInfo(TStoreyInfo tStoreyInfo);
/**
* 修改老化层信息
*
* @param tStoreyInfo 老化层信息
* @return 结果
*/
public int updateTStoreyInfoByCode(TStoreyInfo tStoreyInfo);
/**
* 批量删除老化层信息
*
......
......@@ -31,6 +31,18 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
return tStoreyInfoMapper.selectTStoreyInfoById(fStoreyId);
}
/**
* 查询老化层信息
*
* @param fStoreyCode 老化层信息Code
* @return 老化层信息
*/
@Override
public TStoreyInfo selectTStoreyInfoByCode(String fStoreyCode)
{
return tStoreyInfoMapper.selectTStoreyInfoByCode(fStoreyCode);
}
/**
* 查询老化层信息列表
*
......@@ -67,11 +79,6 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
return tStoreyInfoMapper.updateTStoreyInfo(tStoreyInfo);
}
public int updateTStoreyInfoByCode(TStoreyInfo tStoreyInfo)
{
return tStoreyInfoMapper.updateTStoreyInfoByCode(tStoreyInfo);
}
/**
* 批量删除老化层信息
*
......
......@@ -41,6 +41,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where f_storey_id = #{fStoreyId}
</select>
<select id="selectTStoreyInfoByCode" parameterType="String" resultMap="TStoreyInfoResult">
<include refid="selectTStoreyInfoVo"/>
where f_storey_code = #{fStoreyCode}
</select>
<insert id="insertTStoreyInfo" parameterType="TStoreyInfo">
insert into t_storey_info
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -85,22 +90,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where f_storey_id = #{fStoreyId}
</update>
<update id="updateTStoreyInfoByCode" parameterType="TStoreyInfo">
update t_storey_info
<trim prefix="SET" suffixOverrides=",">
<if test="fEquipmentId != null">f_equipment_id = #{fEquipmentId},</if>
<if test="fStoreyCode != null">f_storey_code = #{fStoreyCode},</if>
<if test="fTrayCode != null">f_tray_code = #{fTrayCode},</if>
<if test="fIp != null">f_ip = #{fIp},</if>
<if test="fStatus != null">f_status = #{fStatus},</if>
<if test="fPort != null">f_port = #{fPort},</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
<if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
<if test="fAlarmTime != null">f_alarm_time = #{fAlarmTime},</if>
</trim>
where f_storey_code = #{fStoreyCode}
</update>
<delete id="deleteTStoreyInfoById" parameterType="Long">
delete from t_storey_info where f_storey_id = #{fStoreyId}
</delete>
......
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