| | |
| | | import com.ycl.entity.caseHandler.Violations; |
| | | import com.ycl.entity.video.VideoAlarmReport; |
| | | import com.ycl.entity.video.VideoPoint; |
| | | import com.ycl.mapper.caseHandler.BaseCaseMapper; |
| | | import com.ycl.mapper.caseHandler.ViolationsMapper; |
| | | import com.ycl.service.caseHandler.IBaseCaseService; |
| | | import com.ycl.service.caseHandler.IViolationsService; |
| | | import com.ycl.service.video.impl.IVideoPointService; |
| | | import com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | |
| | | private IVideoPointService videoPointService; |
| | | private IBaseCaseService baseCaseService; |
| | | |
| | | @Resource |
| | | BaseCaseMapper baseCaseMapper; |
| | | |
| | | @Autowired |
| | | public void setVideoPointService(IVideoPointService videoPointService) { |
| | | this.videoPointService = videoPointService; |
| | | } |
| | | |
| | | @Autowired |
| | | public void setBaseCaseService(IBaseCaseService baseCaseService) { |
| | | this.baseCaseService = baseCaseService; |
| | |
| | | baseCase.setLongitude(videoPoint.getLongitude()); |
| | | baseCase.setStreetId(videoPoint.getStreetId()); |
| | | baseCase.setCommunityId(videoPoint.getCommunityId()); |
| | | baseCase.setSite(videoPoint.getAddress()); |
| | | |
| | | baseCaseService.save(baseCase); |
| | | violations.setId(baseCase.getId()); |
| | | violations.setVideoAlarmReportId(videoAlarmReport.getId()); |
| | | violations.setVideoPointId(videoPoint.getId()); |
| | | violations.setDescription(videoAlarmReport.getAlgoName()); |
| | | baseMapper.insert(violations); |
| | | } |
| | | baseCaseService.save(baseCase); |
| | | violations.setId(baseCase.getId()); |
| | | violations.setVideoAlarmReportId(videoAlarmReport.getId()); |
| | | violations.setVideoPointId(videoPoint.getId()); |
| | | baseMapper.insert(violations); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<VideoAndAreaVO> selectType() { |
| | | return baseCaseMapper.selectType(); |
| | | } |
| | | } |