|
@@ -27,14 +27,17 @@ public class DeviceControlSchedule {
|
|
|
@Scheduled(cron = "0 0 10 * * ?")
|
|
|
public void settingUploadTime(){
|
|
|
Map<String, Channel> commandCopy = DiscardServerHandler.manageChannelMap;
|
|
|
+ Map<Channel, String> channelMap = DiscardServerHandler.channelMap;
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
String result = null;
|
|
|
if (!commandCopy.isEmpty()) {
|
|
|
Set<String> socketIds = commandCopy.keySet();
|
|
|
for (String socketId : socketIds) {
|
|
|
+ Channel channel = commandCopy.get(socketId);
|
|
|
+ String deviceId = channelMap.get(channel);
|
|
|
try {
|
|
|
param.put("socketId", socketId);
|
|
|
- param.put("commandStr", "[3g*"+ 918196626 +"*0009*UPLOAD,10]");
|
|
|
+ param.put("commandStr", "[3g*"+ deviceId +"*0009*UPLOAD,10]");
|
|
|
result = RequestUtil.doGet("localhost:7009/setting/uploadtime", param);
|
|
|
} catch (ConnectException e) {
|
|
|
logger.info(e.getLocalizedMessage());
|