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

定时修改

上级 ab884fc5
......@@ -15,6 +15,6 @@ public class ShDeviceSwitchTimingTask implements ITask {
@Override
public void run(String params) {
otherShDeviceTimingService.listTimingByTime1();
otherShDeviceTimingService.listTimingByTime();
}
}
......@@ -67,9 +67,6 @@ public class OtherShDeviceTimingServiceImpl extends ServiceImpl<OtherShDeviceTim
protocol.setDeviceType(type);
protocol.setCmd("18");
mqProducer.sendT(JSON.toJSONString(protocol));
redisUtils.set(entity1.getNumbering() + "action1", action, 60);
redisUtils.set(entity1.getNumbering() + "action2", actionTwo, 60);
// logger.info("action1 : {}", redisUtils.get(entity1.getNumbering() + "action"));
break;
}
case "03": {
......@@ -79,9 +76,6 @@ public class OtherShDeviceTimingServiceImpl extends ServiceImpl<OtherShDeviceTim
protocol.setDeviceType(type);
protocol.setCmd("18");
mqProducer.sendT(JSON.toJSONString(protocol));
redisUtils.set(entity1.getNumbering() + "action", action);
logger.info("action : {}", redisUtils.get(entity1.getNumbering() + "action"));
logger.info("Numbering : {}", entity1.getNumbering());
break;
}
case "04": {
......@@ -160,6 +154,7 @@ public class OtherShDeviceTimingServiceImpl extends ServiceImpl<OtherShDeviceTim
Integer deviceId = (Integer) map.get("device_id");
Integer action = (Integer) map.get("action");
Integer actionTwo = (Integer) map.get("action_two");
//判断是符合关闭的时间还是打开的时间
Long flag = (Long) map.get("flag");
ShDeviceEntity entity1 = shDeviceService.getById(deviceId);
......@@ -172,14 +167,10 @@ public class OtherShDeviceTimingServiceImpl extends ServiceImpl<OtherShDeviceTim
String content = "";
if (action != 0 && actionTwo != 0) {
content = s + s + "000000000003";
// redisUtils.set(entity1.getNumbering() + "action1", flag == 1 ? 1 : 2, 60);
// redisUtils.set(entity1.getNumbering() + "action2", flag == 1 ? 3 : 4, 60);
}else if (action != 0) {
content = s + "00000000000001";
// redisUtils.set(entity1.getNumbering() + "action1", flag == 1 ? 1 : 2, 60);
}else if (actionTwo != 0) {
content = "00"+ s +"000000000002";
// redisUtils.set(entity1.getNumbering() + "action2", flag == 1 ? 3 : 4, 60);
}
protocol.setReceiveId(entity1.getNumbering());
protocol.setContent(content);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论