| | |
| | | @PostMapping("/saves") |
| | | public R saves(FeedbackVO feedback) { |
| | | |
| | | if (feedback.getStatus()==0) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat();// 格式化时间 |
| | | sdf.applyPattern("yyyy-MM-dd HH:mm:ss");// a为am/pm的标记 |
| | | Date date = new Date();// 获取当前时间 |
| | |
| | | operation.setZctime(sdf.format(date)); |
| | | operationService.save(operation); |
| | | |
| | | feedbackService.save(feedback); |
| | | Wj wj = new Wj(); |
| | | if (feedback.getSpaddress().equals("")&&feedback.getSpaddress()!=null) { |
| | | |
| | |
| | | } |
| | | if (feedback.getTpaddress().equals("")&&feedback.getTpaddress()!=null){ |
| | | |
| | | } |
| | | else { |
| | | } else { |
| | | String[] splittp = feedback.getTpaddress().split(",");//以逗号分割 |
| | | for ( |
| | | String string3 : splittp) { |
| | |
| | | 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); |
| | | |
| | | return R.success("新增成功"); |
| | | } |