| | |
| | | import org.springblade.jfpt.animalheat.service.AnimalHeatService; |
| | | import org.springblade.jfpt.catalog.service.catalogService; |
| | | import org.springblade.jfpt.equipment.service.IEquipmentService; |
| | | import org.springblade.jfpt.operation.service.IOperationService; |
| | | import org.springblade.jfpt.operation.vo.OperationVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IAlarmService alarmService; |
| | | |
| | | @Autowired |
| | | private IOperationService operationService; |
| | | |
| | | private static ServerHandler serverHandler; |
| | | |
| | |
| | | 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"); |
| | | } |
| | | |
| | | serverHandler.alarmService.s(alarm); |
| | | |
| | | OperationVO operation = new OperationVO(); |
| | | operation.setSnumber(alarm.getAlarmId()); |
| | | operation.setSname(alarm.getAlarmPeople()); |
| | | operation.setJid(alarm.getId().toString()); |
| | | operation.setZc("接警"); |
| | | operation.setZctime(alarm.getJjTime()); |
| | | serverHandler.operationService.save(operation); |
| | | |
| | | outData.add("LEOK#@"); |
| | | long endTime1 = System.currentTimeMillis(); //获取结束时间 |
| | | |