|
@@ -20,6 +20,7 @@ import com.fdkankan.manage.httpClient.client.FdKKClient;
|
|
|
import com.fdkankan.manage.httpClient.service.LaserService;
|
|
import com.fdkankan.manage.httpClient.service.LaserService;
|
|
|
import com.fdkankan.manage.entity.*;
|
|
import com.fdkankan.manage.entity.*;
|
|
|
import com.fdkankan.manage.httpClient.service.OverallService;
|
|
import com.fdkankan.manage.httpClient.service.OverallService;
|
|
|
|
|
+import com.fdkankan.manage.mapper.IScenePlusMapper;
|
|
|
import com.fdkankan.manage.mapper.ISceneProMapper;
|
|
import com.fdkankan.manage.mapper.ISceneProMapper;
|
|
|
import com.fdkankan.manage.mq.common.MqQueueUtil;
|
|
import com.fdkankan.manage.mq.common.MqQueueUtil;
|
|
|
import com.fdkankan.manage.mq.param.ScenePayStatusVo;
|
|
import com.fdkankan.manage.mq.param.ScenePayStatusVo;
|
|
@@ -29,6 +30,7 @@ import com.fdkankan.manage.util.CameraUtils;
|
|
|
import com.fdkankan.manage.util.DateUtils;
|
|
import com.fdkankan.manage.util.DateUtils;
|
|
|
import com.fdkankan.manage.util.SceneStatusUtil;
|
|
import com.fdkankan.manage.util.SceneStatusUtil;
|
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
|
|
|
+import com.fdkankan.manage.vo.request.SetFeedOptionParam;
|
|
|
import com.fdkankan.manage.vo.response.*;
|
|
import com.fdkankan.manage.vo.response.*;
|
|
|
import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
@@ -106,6 +108,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
OverallService overallService;
|
|
OverallService overallService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
ICameraTypeService cameraTypeService;
|
|
ICameraTypeService cameraTypeService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ IFeedbackOptionService feedbackOptionService;
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -205,13 +209,15 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public PageInfo pageList(SceneParam param) {
|
|
public PageInfo pageList(SceneParam param) {
|
|
|
-
|
|
|
|
|
- SceneTypeLabelEnum sceneTypeLabelEnum = SceneTypeLabelEnum.getByLabelType(param.getType());
|
|
|
|
|
- if(sceneTypeLabelEnum == null){
|
|
|
|
|
- throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
|
|
|
|
+ SceneTypeLabelEnum sceneTypeLabelEnum = null;
|
|
|
|
|
+ if(param.getType() != null){
|
|
|
|
|
+ sceneTypeLabelEnum = SceneTypeLabelEnum.getByLabelType(param.getType());
|
|
|
|
|
+ if(sceneTypeLabelEnum == null){
|
|
|
|
|
+ throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(param.getType() == 3){ //双目lite
|
|
|
|
|
|
|
+ if(param.getType() != null && param.getType() == 3){ //双目lite
|
|
|
return sceneService.pageList(param);
|
|
return sceneService.pageList(param);
|
|
|
}
|
|
}
|
|
|
//优化查询,去掉left join
|
|
//优化查询,去掉left join
|
|
@@ -241,7 +247,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
return PageInfo.PageInfoEmpty(param.getPageNum(),param.getPageSize());
|
|
return PageInfo.PageInfoEmpty(param.getPageNum(),param.getPageSize());
|
|
|
}
|
|
}
|
|
|
HashMap<String, JSONObject> laserMap = new HashMap<>();
|
|
HashMap<String, JSONObject> laserMap = new HashMap<>();
|
|
|
- param.setIsLaser(sceneTypeLabelEnum.getLaser());
|
|
|
|
|
|
|
+ param.setIsLaser(sceneTypeLabelEnum != null && sceneTypeLabelEnum.getLaser());
|
|
|
|
|
|
|
|
Page<SceneVo> page = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
Page<SceneVo> page = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
|
List<SceneVo> records = page.getRecords();
|
|
List<SceneVo> records = page.getRecords();
|
|
@@ -252,6 +258,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
HashMap<String,MqSendLog> mqSendLogMap = null;
|
|
HashMap<String,MqSendLog> mqSendLogMap = null;
|
|
|
|
|
|
|
|
List<String> sceneNumList = page.getRecords().stream().map(SceneVo::getNum).collect(Collectors.toList());
|
|
List<String> sceneNumList = page.getRecords().stream().map(SceneVo::getNum).collect(Collectors.toList());
|
|
|
|
|
+ List<Integer> feedbackOptionIds = page.getRecords().stream().map(SceneVo::getFeedbackOptionId).collect(Collectors.toList());
|
|
|
|
|
+ HashMap<Integer, FeedbackOption> mapByIds = feedbackOptionService.getMapByIds(new HashSet<>(feedbackOptionIds));
|
|
|
|
|
+
|
|
|
if(!records.isEmpty()){
|
|
if(!records.isEmpty()){
|
|
|
map = copyLogService.getByNewNumList(sceneNumList);
|
|
map = copyLogService.getByNewNumList(sceneNumList);
|
|
|
coldStorageMap = sceneColdStorageService.getByNumList(sceneNumList);
|
|
coldStorageMap = sceneColdStorageService.getByNumList(sceneNumList);
|
|
@@ -288,6 +297,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
if(record.getSceneSource() != null && (SceneTypeLabelEnum.isLaserBySceneSource(record.getSceneSource()))){
|
|
if(record.getSceneSource() != null && (SceneTypeLabelEnum.isLaserBySceneSource(record.getSceneSource()))){
|
|
|
record.setComputeTime(record.getMeshComputeTime());
|
|
record.setComputeTime(record.getMeshComputeTime());
|
|
|
}
|
|
}
|
|
|
|
|
+ if(CameraUtils.isLaser(record.getSceneSource(),record.getIsObj())){
|
|
|
|
|
+ record.setSceneName(record.getLaserTitle());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if(record.getStatus() != -2){
|
|
if(record.getStatus() != -2){
|
|
|
record.setComputeTime(null);
|
|
record.setComputeTime(null);
|
|
@@ -327,7 +339,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
}
|
|
|
record.setBuildErrorReason(SceneBuildProcessLogEnum.getReason(process));
|
|
record.setBuildErrorReason(SceneBuildProcessLogEnum.getReason(process));
|
|
|
}
|
|
}
|
|
|
- //{"latitude":22.3672085,"longitude":113.595673,"altitude":9.275519,"horizontalAccuracy":65.0,"verticalAccuracy":10.0,"timestamp":1564381147.2775609}
|
|
|
|
|
record.setAddressComponent(commonService.getAddressComponent(record.getGps()));
|
|
record.setAddressComponent(commonService.getAddressComponent(record.getGps()));
|
|
|
|
|
|
|
|
if(mqSendLogMap!=null){
|
|
if(mqSendLogMap!=null){
|
|
@@ -337,13 +348,11 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
record.setStatus(-4);
|
|
record.setStatus(-4);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ FeedbackOption feedbackOption = mapByIds.get(record.getFeedbackOptionId());
|
|
|
|
|
+ if(feedbackOption != null){
|
|
|
|
|
+ record.setFeedbackOptionName(feedbackOption.getNameCn());
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
-// if(record.getLocation() != null && (record.getLocation() == 5 || record.getLocation() == 6)){
|
|
|
|
|
-// if(record.getMixture() != 1){
|
|
|
|
|
-// record.setSlamCount(record.getShootCount());
|
|
|
|
|
-// record.setShootCount(null);
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
}
|
|
}
|
|
|
return PageInfo.PageInfo(page);
|
|
return PageInfo.PageInfo(page);
|
|
|
}
|
|
}
|
|
@@ -683,7 +692,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
}
|
|
|
scenePlusService.removeById(scenePlus.getId());
|
|
scenePlusService.removeById(scenePlus.getId());
|
|
|
}
|
|
}
|
|
|
- if(sceneSource != null && (sceneSource == 4 || sceneSource == 5 || sceneSource ==57)){
|
|
|
|
|
|
|
+ if(CameraUtils.isLaser(sceneSource)){
|
|
|
laserService.delete(num);
|
|
laserService.delete(num);
|
|
|
}
|
|
}
|
|
|
//overallService.delete(num);
|
|
//overallService.delete(num);
|
|
@@ -910,7 +919,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//深时场景通知修改计算完成时间
|
|
//深时场景通知修改计算完成时间
|
|
|
- if(sceneResource != null && (sceneResource == 4 || sceneResource == 5)){
|
|
|
|
|
|
|
+ if(CameraUtils.isLaser(sceneResource)){
|
|
|
HashMap<String,String> map = new HashMap<>();
|
|
HashMap<String,String> map = new HashMap<>();
|
|
|
map.put("sceneCode",num);
|
|
map.put("sceneCode",num);
|
|
|
map.put("algorithmTime",date);
|
|
map.put("algorithmTime",date);
|
|
@@ -962,4 +971,56 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
public Object labelList() {
|
|
public Object labelList() {
|
|
|
return SceneTypeLabelEnum.getAllProperties();
|
|
return SceneTypeLabelEnum.getAllProperties();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void setFeedbackOption(SetFeedOptionParam param) {
|
|
|
|
|
+ LambdaUpdateWrapper<ScenePro> updateWrapper = new LambdaUpdateWrapper<>();
|
|
|
|
|
+ updateWrapper.eq(ScenePro::getNum,param.getNum());
|
|
|
|
|
+ updateWrapper.set(ScenePro::getFeedbackOptionId,param.getFeedbackOptionId());
|
|
|
|
|
+ this.update(updateWrapper);
|
|
|
|
|
+
|
|
|
|
|
+ LambdaUpdateWrapper<ScenePlus> updateWrapper2 = new LambdaUpdateWrapper<>();
|
|
|
|
|
+ updateWrapper2.eq(ScenePlus::getNum,param.getNum());
|
|
|
|
|
+ updateWrapper2.set(ScenePlus::getFeedbackOptionId,param.getFeedbackOptionId());
|
|
|
|
|
+ scenePlusService.update(updateWrapper2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ IScenePlusMapper scenePlusMapper;
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void reDelScene(List<String> numList) {
|
|
|
|
|
+
|
|
|
|
|
+ List<String> laserNumList = new ArrayList<>();
|
|
|
|
|
+ List<ScenePro> sceneProList = this.getBaseMapper().selectDelPro(numList);
|
|
|
|
|
+ if(!sceneProList.isEmpty()){
|
|
|
|
|
+ List<Long> proIds = sceneProList.stream().map(ScenePro::getId).collect(Collectors.toList());
|
|
|
|
|
+ this.getBaseMapper().reDelScenePro(numList);
|
|
|
|
|
+ this.getBaseMapper().reDelSceneProEdit(proIds);
|
|
|
|
|
+
|
|
|
|
|
+ List<String> lNumList = sceneProList.stream().filter(e -> CameraUtils.isLaser(e.getSceneSource())).map(ScenePro::getNum).collect(Collectors.toList());
|
|
|
|
|
+ if(!lNumList.isEmpty()){
|
|
|
|
|
+ laserNumList.addAll(lNumList);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ List<ScenePlus> scenePlusList = scenePlusMapper.selectDelPro(numList);
|
|
|
|
|
+ if(!scenePlusList.isEmpty()){
|
|
|
|
|
+ List<Long> plusIds = scenePlusList.stream().map(ScenePlus::getId).collect(Collectors.toList());
|
|
|
|
|
+ scenePlusMapper.reDelScenePro(numList);
|
|
|
|
|
+ scenePlusMapper.reDelSceneProEdit(plusIds);
|
|
|
|
|
+
|
|
|
|
|
+ List<String> lNumList = scenePlusList.stream().filter(e -> CameraUtils.isLaser(e.getSceneSource())).map(ScenePlus::getNum).collect(Collectors.toList());
|
|
|
|
|
+ if(!lNumList.isEmpty()){
|
|
|
|
|
+ laserNumList.addAll(lNumList);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(!laserNumList.isEmpty()){
|
|
|
|
|
+ HashMap<String,String> map = new HashMap<>();
|
|
|
|
|
+ map.put("numList",JSONObject.toJSONString(laserNumList));
|
|
|
|
|
+ rabbitMqProducer.sendByWorkQueue(MqQueueUtil.RECOVER_SCENE,map);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|