|
@@ -4,8 +4,6 @@ import com.aivfo.business.manage.entity.dao.Embryo;
|
|
|
import com.aivfo.business.manage.entity.param.query.resource.*;
|
|
import com.aivfo.business.manage.entity.param.query.resource.*;
|
|
|
import com.aivfo.business.manage.entity.param.setting.photosearchbutton.PictureSearchButtonDTO;
|
|
import com.aivfo.business.manage.entity.param.setting.photosearchbutton.PictureSearchButtonDTO;
|
|
|
import com.aivfo.business.manage.entity.vo.resource.EmbryoRecordDetailResourceVO;
|
|
import com.aivfo.business.manage.entity.vo.resource.EmbryoRecordDetailResourceVO;
|
|
|
-import com.aivfo.business.manage.entity.vo.resource.picture.FocusPreviewPictureVO;
|
|
|
|
|
-import com.aivfo.business.manage.entity.vo.resource.picture.FocusPreviewVO;
|
|
|
|
|
import com.aivfo.business.manage.entity.vo.resource.picture.VideoLinePictureVO;
|
|
import com.aivfo.business.manage.entity.vo.resource.picture.VideoLinePictureVO;
|
|
|
import com.aivfo.business.manage.entity.vo.resource.video.VideoVO;
|
|
import com.aivfo.business.manage.entity.vo.resource.video.VideoVO;
|
|
|
import com.aivfo.business.manage.service.EmbryoService;
|
|
import com.aivfo.business.manage.service.EmbryoService;
|
|
@@ -452,41 +450,6 @@ public class ResourceServiceImpl implements ResourceService {
|
|
|
return pictureService.getPictures(videoDAO.getTlSn(), videoDAO.getHouseSn(), wrapper);
|
|
return pictureService.getPictures(videoDAO.getTlSn(), videoDAO.getHouseSn(), wrapper);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 对焦预览
|
|
|
|
|
- *
|
|
|
|
|
- * @param focusPreviewQueryDTO
|
|
|
|
|
- * @return com.aivfo.business.manage.entity.vo.resource.picture.FocusPreviewVO
|
|
|
|
|
- * @Date 2024/4/29
|
|
|
|
|
- * @Author wangyl
|
|
|
|
|
- */
|
|
|
|
|
- @Override
|
|
|
|
|
- public FocusPreviewVO getAutofocusPictures(FocusPreviewQueryDTO focusPreviewQueryDTO) {
|
|
|
|
|
- List<PictureDAO> lastAutofocusPictureByEmbryoId = pictureService.getLastAutofocusPictureByEmbryoId(focusPreviewQueryDTO.getTlSn(), focusPreviewQueryDTO.getHouseSn(), Arrays.asList(focusPreviewQueryDTO.getEmbryoId()));
|
|
|
|
|
- FocusPreviewVO focusPreviewVO = new FocusPreviewVO();
|
|
|
|
|
- if (CollectionUtils.isEmpty(lastAutofocusPictureByEmbryoId)) {
|
|
|
|
|
- return focusPreviewVO;
|
|
|
|
|
- }
|
|
|
|
|
- List<FocusPreviewPictureVO> copy = BeanUtils.copyPropertiesListCallBack(lastAutofocusPictureByEmbryoId, FocusPreviewPictureVO.class, (s, t) -> {
|
|
|
|
|
- // M3-02: image_score 已停写(本地对焦后无云端打分),文件名不再拼分数段,避免拼成 "..._null"
|
|
|
|
|
- t.setImageName(StringUtils.format("{}_{}_{}", s.getHouseSn(), s.getWellSn(), s.getShootingPosition()));
|
|
|
|
|
- if (s.getCropState() != CropState.SUCCEED) {
|
|
|
|
|
- t.setImageUrl("");
|
|
|
|
|
- }
|
|
|
|
|
- // M3-02: 原 max(comparing(getImageScore)) 在 image_score 全 null 时 Comparator 抛 NPE、空流 .get() 抛 NoSuchElement。
|
|
|
|
|
- // 本地对焦后无打分,"最高分高亮"失去数据源;改判据为下位机标记的 clearest(CLEAREST)。
|
|
|
|
|
- // clearest 取自源 PictureDAO,对 null 安全(equals 反向调用);无 CLEAREST 标记则不高亮(highestScore 默认 false)。
|
|
|
|
|
- if (DegreeOfClarity.CLEAREST.equals(s.getClearest())) {
|
|
|
|
|
- t.setHighestScore(true);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- int asInt = copy.stream().mapToInt(FocusPreviewPictureVO::getPictureLayer).max().getAsInt();
|
|
|
|
|
- focusPreviewVO.setAutofocusTime(lastAutofocusPictureByEmbryoId.get(0).getImageTime());
|
|
|
|
|
- focusPreviewVO.setEnd(lastAutofocusPictureByEmbryoId.get(0).getTotalLayer() == asInt);
|
|
|
|
|
- focusPreviewVO.setFocusPreviewPictureVOList(copy);
|
|
|
|
|
- return focusPreviewVO;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取源图分页信息
|
|
* 获取源图分页信息
|
|
|
*
|
|
*
|
|
@@ -641,14 +604,6 @@ public class ResourceServiceImpl implements ResourceService {
|
|
|
return resList;
|
|
return resList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
- public List<PictureDAO> getAllFocusPictureByEmbryoId(FocusPreviewQueryDTO focusPreviewQueryDTO) {
|
|
|
|
|
- LambdaQueryWrapper<PictureDAO> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
- wrapper.eq(PictureDAO::getEmbryoId, focusPreviewQueryDTO.getEmbryoId())
|
|
|
|
|
- .eq(PictureDAO::getPhotographType, PhotoMode.AUTOFOCUS);
|
|
|
|
|
- return pictureService.getPictures(focusPreviewQueryDTO.getTlSn(), focusPreviewQueryDTO.getHouseSn(), wrapper);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 图片视频组装
|
|
* 图片视频组装
|
|
|
*
|
|
*
|