| | |
| | | if (police.size() != 0){ |
| | | alarm.setAlarmId( police.get(0).get("alarmId").toString()); |
| | | alarm.setAlarmPeople( police.get(0).get("alarmPeople").toString()); |
| | | // Date date = new Date(); |
| | | // SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // alarm.setJjTime(dateFormat.format(date)); |
| | | Date date = new Date(); |
| | | SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | alarm.setJjTime(dateFormat.format(date)); |
| | | |
| | | serverHandler.alarmService.updatePoliceStatus( police.get(0).get("alarmId").toString(),"1"); |
| | | }else { |
| | | alarm.setAlarmId( online_police.get(0).get("id").toString()); |
| | | alarm.setAlarmPeople(online_police.get(0).get("name").toString()); |
| | | // Date date = new Date(); |
| | | // SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // alarm.setJjTime(dateFormat.format(date)); |
| | | Date date = new Date(); |
| | | SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | alarm.setJjTime(dateFormat.format(date)); |
| | | |
| | | serverHandler.alarmService.updatePoliceStatus(online_police.get(0).get("id").toString(),"1"); |
| | | } |