提交 584ae507 authored 作者: 林业通's avatar 林业通

净化器定时修改

上级 75a49be8
......@@ -42,7 +42,7 @@ public interface OtherShDeviceDao extends BaseMapper<ShDeviceEntity> {
Map<String, Object> info(Integer id);
@Select("select id from sh_device where online_status = 2 and online_time is not null and now() > date_add(online_time,interval 2 minute)")
@Select("select id from sh_device where online_status = 2 and online_time is not null and now() > date_add(online_time,interval 1 minute)")
List<Map<String, Object>> timeout();
@Select("<script>" +
......
......@@ -51,6 +51,15 @@ public class OtherShDeviceTimingServiceImpl extends ServiceImpl<OtherShDeviceTim
ProtocolContent protocol = new ProtocolContent();
String type = entity1.getNumbering().substring(1, 3);
switch (type) {
case "01": {
String action = entity.getAction() == 1 ? "01" : "00";
protocol.setReceiveId(entity1.getNumbering());
protocol.setContent(action);
protocol.setDeviceType(type);
protocol.setCmd("13");
mqProducer.sendT(JSON.toJSONString(protocol));
break;
}
case "02": {
String action = entity.getAction() == 1 ? "01" : entity.getAction() == 2 ? "00" : "02";
String actionTwo = entity.getActionTwo() == 1 ? "01" : entity.getActionTwo() == 2 ? "00" : "02";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论