| | |
| | | import java.time.Instant; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | |
| | | try { |
| | | ImageResources imageResources = new ImageResources(); |
| | | imageResources.setType("01"); |
| | | imageResources.setType("05"); |
| | | imageResources.setBelongToId(baseCase.getId()); |
| | | imageResources.setUrl(videoAlarmReport.getPicData()); |
| | | imageResources.setCreateTime(LocalDateTime.now()); |
| | |
| | | VideoPoint videoPoint = videoPointService.getByCode(alarmParam.getEventNumber()); |
| | | |
| | | List<DataDictionary> dataDictionaries = dataDictionaryService.queryByRemark(alarmParam.getSubject()); |
| | | |
| | | Instant instant = Instant.ofEpochMilli(Long.parseLong(alarmParam.getIncidentDate())); |
| | | LocalDateTime alarmTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault()); |
| | | DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | LocalDateTime alarmTime = LocalDateTime.parse(alarmParam.getIncidentDate(), df); |
| | | |
| | | BaseCase baseCase = BaseCase.builder().eventSource(1).category(QuestionCategory.VIOLATION.getCode()) |
| | | .code(utilNumber.createCaseCode()).createTime(LocalDateTime.now()).createUser(0L).state(1). |
| | |
| | | try { |
| | | for (int i = 0; i < imgs.length; i++) { |
| | | ImageResources imageResources = new ImageResources(); |
| | | imageResources.setType("01"); |
| | | imageResources.setType("04"); |
| | | imageResources.setBelongToId(baseCase.getId()); |
| | | imageResources.setUrl(imgs[i]); |
| | | imageResources.setCreateTime(LocalDateTime.now()); |