| | |
| | | String paramsStr = "%7B%22type%22%3A%22ff%22%2C%22dataCnt%22%3A%22" + ardTankLock.getLockNum() + "01" + checkNum + "%22%7D"; |
| | | |
| | | sendCmd(finalSyURL,userId,ardTankLock.getCarId(),199,"DataDownTransfer", paramsStr,sessionId); |
| | | PositionContainer.getCarThreadMap().remove(ardTankLock.getCarId());//发送完,从容器去除 |
| | | } |
| | | }; |
| | | if(PositionContainer.getCarThreadMap().get(ardTankLock.getCarId()) != null){//容器中无线程,放入容器 |
| | | PositionContainer.getCarThreadMap().put(ardTankLock.getCarId(),lockThread); |
| | | } |
| | | lockThread.start(); |
| | | } |
| | | } |
| | |
| | | String paramsStr = "%7B%22type%22%3A%22ff%22%2C%22dataCnt%22%3A%22" + ardTankLock.getLockNum() + "08" + timeHex + checkNum + "%22%7D"; |
| | | |
| | | sendCmd(finalSyURL,userId,ardTankLock.getCarId(),199,"DataDownTransfer", paramsStr,sessionId); |
| | | PositionContainer.getCarThreadMap().remove(ardTankLock.getCarId());//发送完,从容器去除 |
| | | } |
| | | }; |
| | | if(PositionContainer.getCarThreadMap().get(ardTankLock.getCarId()) != null){//容器中无线程,放入容器 |
| | | PositionContainer.getCarThreadMap().put(ardTankLock.getCarId(),lockThread); |
| | | } |
| | | lockThread.start(); |
| | | } |
| | | } |
| | |
| | | }; |
| | | sendTimer.scheduleAtFixedRate(sendLockStateTask,date,3000); |
| | | |
| | | try{ |
| | | Thread.sleep(3000); |
| | | }catch(Exception e){ |
| | | |
| | | } |
| | | |
| | | |
| | | /*Timer alarmTimer = new Timer();//定时获取报警 |
| | | TimerTask alarmTask = new TimerTask(){ |
| | | Timer passwordTimer = new Timer();//定时查看电磁锁密码状态 |
| | | TimerTask passwordTask = new TimerTask(){ |
| | | @Override |
| | | public void run() { |
| | | Thread alarmThread = new Thread() { |
| | | @Override |
| | | public void run() { |
| | | ardTankLockService.getAlarm(userId,password); |
| | | ardTankLockService.readPassword(userId,password); |
| | | } |
| | | }; |
| | | alarmThread.start(); |
| | | } |
| | | }; |
| | | alarmTimer.scheduleAtFixedRate(alarmTask,date,3000);*/ |
| | | passwordTimer.scheduleAtFixedRate(passwordTask,date,11000); |
| | | |
| | | } |
| | | |