| | |
| | | private ArdCamerasMapper ardCamerasMapper; |
| | | @Resource |
| | | private IHikClientService hikClientService; |
| | | @Resource |
| | | private ArdCamerasMapper camerasMapper; |
| | | |
| | | @PostConstruct |
| | | public void initTask() { |
| | |
| | | } |
| | | ardVideoInspectTask.setCurrentStepId(""); |
| | | ardVideoInspectTask.setCurrentStepStartTime(""); |
| | | ardVideoInspectTaskMapper.updateArdVideoInspectTask(ardVideoInspectTask); |
| | | ardVideoInspectTaskMapper.updateArdVideoInspectTaskWithCurrentSetpInfo(ardVideoInspectTask); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | public void insertArdVideoInspectTaskStep(ArdVideoInspectTask ardVideoInspectTask) { |
| | | List<ArdVideoInspectTaskStep> ardVideoInspectTaskStepList = ardVideoInspectTask.getArdVideoInspectTaskStepList(); |
| | | String id = ardVideoInspectTask.getId(); |
| | | //获取相机 |
| | | ArdCameras camera = camerasMapper.selectArdCamerasById(ardVideoInspectTask.getCameraId()); |
| | | Collections.sort(ardVideoInspectTaskStepList,new ArdVideoInspectTaskStepComparator(this.ardAlarmpointsWellMapper,camera.getLongitude(),camera.getLatitude())); |
| | | String taskId = ardVideoInspectTask.getId(); |
| | | for (int i = 0; i < ardVideoInspectTaskStepList.size(); i++) { |
| | | ArdVideoInspectTaskStep step = ardVideoInspectTaskStepList.get(i); |
| | | step.setTaskId(taskId); |
| | | step.setOrderNumber(new Integer(i+1)); |
| | | } |
| | | if (StringUtils.isNotNull(ardVideoInspectTaskStepList)) { |
| | | List<ArdVideoInspectTaskStep> list = new ArrayList<ArdVideoInspectTaskStep>(); |
| | | for (ArdVideoInspectTaskStep ardVideoInspectTaskStep : ardVideoInspectTaskStepList) { |
| | | if (ardVideoInspectTaskStep.getId() == null) { |
| | | //新的步骤,添加 |
| | |
| | | /*插入巡检记录*/ |
| | | ArdVideoInspectRecord ardVideoInspectRecord = new ArdVideoInspectRecord(); |
| | | ardVideoInspectRecord.setStepId(step.getId()); |
| | | ArdAlarmpointsWell ardAlarmpointsWell = ardAlarmpointsWellMapper.selectArdAlarmpointsWellById(step.getWellId()); |
| | | if(StringUtils.isNotNull(ardAlarmpointsWell)) |
| | | { |
| | | ardVideoInspectRecord.setWellName(ardAlarmpointsWell.getWellId()); |
| | | } |
| | | Date currentStepStartDate = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, currentStepStartTime); |
| | | Date currentStepStopDate = DateUtils.addMinutes(currentStepStartDate, step.getRecordingTime()); |
| | | ardVideoInspectRecord.setStartTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, currentStepStartDate)); |
| | |
| | | |
| | | return timeList; |
| | | } |
| | | } |
| | | } |