|
@@ -102,6 +102,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
ISceneMoveLogService sceneMoveLogService;
|
|
|
@Autowired
|
|
|
IProjectNumService projectNumService;
|
|
|
+ @Autowired
|
|
|
+ IProjectSceneGpsService projectSceneGpsService;
|
|
|
|
|
|
@Override
|
|
|
public Long getCountByUserIds(List<Long> userIds) {
|
|
@@ -507,6 +509,12 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
if(StringUtils.isBlank(param.getNum()) || param.getMapShow() == null){
|
|
|
throw new BusinessException(ResultCode.PARAM_ERROR);
|
|
|
}
|
|
|
+ if(param.getMapShow() == 1){ //开启查询是否有GPS,没有不能开启
|
|
|
+ ProjectSceneGps projectSceneGps = projectSceneGpsService.getByNum(param.getNum());
|
|
|
+ if(projectSceneGps == null){
|
|
|
+ throw new BusinessException(ResultCode.SCENE_NOT_GPS);
|
|
|
+ }
|
|
|
+ }
|
|
|
LambdaUpdateWrapper<ScenePro> proWr = new LambdaUpdateWrapper<>();
|
|
|
proWr.eq(ScenePro::getNum,param.getNum());
|
|
|
proWr.set(ScenePro::getMapShow,param.getMapShow());
|
|
@@ -517,4 +525,20 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
plusWr.set(ScenePlus::getMapShow,param.getMapShow());
|
|
|
scenePlusService.update(plusWr);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void openMapShow(List<String> sceneMapShowList) {
|
|
|
+ if(sceneMapShowList == null || sceneMapShowList.isEmpty()){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ LambdaUpdateWrapper<ScenePro> proWr = new LambdaUpdateWrapper<>();
|
|
|
+ proWr.in(ScenePro::getNum,sceneMapShowList);
|
|
|
+ proWr.set(ScenePro::getMapShow,1);
|
|
|
+ this.update(proWr);
|
|
|
+
|
|
|
+ LambdaUpdateWrapper<ScenePlus> plusWr = new LambdaUpdateWrapper<>();
|
|
|
+ plusWr.in(ScenePlus::getNum,sceneMapShowList);
|
|
|
+ plusWr.set(ScenePlus::getMapShow,1);
|
|
|
+ scenePlusService.update(plusWr);
|
|
|
+ }
|
|
|
}
|