| | |
| | | |
| | | @PostMapping("/insertfeed") |
| | | public R insertfeed(String jid, String snumber, String sname, String addvcd, String place, |
| | | String result, String describe, String type, String devicenumber, String galarmpeople, |
| | | String phone, String stime, String ctime, String feedbackaudio, String feedbackvideo, |
| | | String feedbackphoto, String jd, String wd, String tname, HttpServletResponse response) { |
| | | String result, String describe, String type, String devicenumber, String galarmpeople, |
| | | String phone, String stime, String ctime, String feedbackaudio, String feedbackvideo, |
| | | String feedbackphoto, String jd, String wd, String tname, HttpServletResponse response) { |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials", "true"); |
| | |
| | | @PostMapping("/saves") |
| | | public R saves(FeedbackVO feedback) { |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat();// 格式化时间 |
| | | sdf.applyPattern("yyyy-MM-dd HH:mm:ss");// a为am/pm的标记 |
| | | Date date = new Date();// 获取当前时间 |
| | | //System.out.println("现在时间:" + sdf.format(date)); // 输出已经格式化的现在时间(24小时制) |
| | | if (feedback.getStatus()==0) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat();// 格式化时间 |
| | | sdf.applyPattern("yyyy-MM-dd HH:mm:ss");// a为am/pm的标记 |
| | | Date date = new Date();// 获取当前时间 |
| | | //System.out.println("现在时间:" + sdf.format(date)); // 输出已经格式化的现在时间(24小时制) |
| | | |
| | | Operation operation = new Operation(); |
| | | operation.setJid(feedback.getJid()); |
| | | operation.setSnumber(feedback.getSnumber()); |
| | | operation.setZc("任务反馈提交,警情结束"); |
| | | operation.setSname(feedback.getSname()); |
| | | Operation operation = new Operation(); |
| | | operation.setJid(feedback.getJid()); |
| | | operation.setSnumber(feedback.getSnumber()); |
| | | operation.setZc("任务反馈提交,警情结束"); |
| | | operation.setSname(feedback.getSname()); |
| | | |
| | | operation.setZctime(sdf.format(date)); |
| | | operationService.save(operation); |
| | | operation.setZctime(sdf.format(date)); |
| | | operationService.save(operation); |
| | | |
| | | Wj wj = new Wj(); |
| | | if (feedback.getSpaddress().equals("") && feedback.getSpaddress() != null) { |
| | | |
| | | } else { |
| | | //获取视频地址 |
| | | String[] splitsp = feedback.getSpaddress().split(",");//以逗号分割 |
| | | for (String string2 : splitsp) { |
| | | wj.setJid(feedback.getJid()); |
| | | wj.setAddress(string2); |
| | | iWjService.insertfeed(wj); |
| | | } |
| | | } |
| | | if (feedback.getTpaddress().equals("") && feedback.getTpaddress() != null) { |
| | | |
| | | } else { |
| | | String[] splittp = feedback.getTpaddress().split(",");//以逗号分割 |
| | | for ( |
| | | String string3 : splittp) { |
| | | wj.setJid(feedback.getJid()); |
| | | wj.setAddress(string3); |
| | | iWjService.insertfeed(wj); |
| | | } |
| | | } |
| | | |
| | | alarmService.updateJtype(operation.getJid(), "2", null, null); |
| | | } |
| | | |
| | | if (feedback.getStatus()==1){ |
| | | Wj wj = new Wj(); |
| | | if (feedback.getSpaddress() != null && feedback.getSpaddress()!="") { |
| | | //获取视频地址 |
| | | String[] splitsp = feedback.getSpaddress().split(",");//以逗号分割 |
| | | for (String string2 : splitsp) { |
| | | wj.setSnumber(feedback.getSnumber()); |
| | | wj.setAddress(string2); |
| | | iWjService.insertfeed(wj); |
| | | } |
| | | } |
| | | if (feedback.getTpaddress() != null && feedback.getTpaddress()!="") { |
| | | String[] splittp = feedback.getTpaddress().split(",");//以逗号分割 |
| | | for ( |
| | | String string3 : splittp) { |
| | | wj.setSnumber(feedback.getSnumber()); |
| | | wj.setAddress(string3); |
| | | iWjService.insertfeed(wj); |
| | | } |
| | | } |
| | | } |
| | | |
| | | feedbackService.save(feedback); |
| | | Wj wj = new Wj(); |
| | | if (feedback.getSpaddress().equals("")&&feedback.getSpaddress()!=null) { |
| | | |
| | | } else { |
| | | //获取视频地址 |
| | | String[] splitsp = feedback.getSpaddress().split(",");//以逗号分割 |
| | | for (String string2 : splitsp) { |
| | | wj.setJid(feedback.getJid()); |
| | | wj.setAddress(string2); |
| | | iWjService.insertfeed(wj); |
| | | } |
| | | } |
| | | if (feedback.getTpaddress().equals("")&&feedback.getTpaddress()!=null){ |
| | | |
| | | } |
| | | else { |
| | | String[] splittp = feedback.getTpaddress().split(",");//以逗号分割 |
| | | for ( |
| | | String string3 : splittp) { |
| | | wj.setJid(feedback.getJid()); |
| | | wj.setAddress(string3); |
| | | iWjService.insertfeed(wj); |
| | | } |
| | | } |
| | | alarmService.updateJtype(operation.getJid(), "2", null, null); |
| | | |
| | | return R.success("新增成功"); |
| | | } |