|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.fdkankan.common.constant.Constant;
|
|
|
+import com.fdkankan.ucenter.common.CameraTypeEnum;
|
|
|
import com.fdkankan.ucenter.common.constants.NacosProperty;
|
|
|
import com.fdkankan.ucenter.entity.*;
|
|
|
import com.fdkankan.ucenter.httpClient.service.LaserService;
|
|
@@ -118,7 +119,7 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
if(!"local".equals(NacosProperty.uploadType) && cameraDetail.getType()!=10){
|
|
|
sceneProService.lockOrUnLockBySpace(cameraDetail,cameraDetail.getCameraId()); //封存场景
|
|
|
}
|
|
|
- if(cameraDetail.getType() == 10){
|
|
|
+ if (cameraDetail.getType() == CameraTypeEnum.LASER_TURN.getType() || cameraDetail.getType() == CameraTypeEnum.SG_TURN.getType()) {
|
|
|
fdkkLaserService.toBind(false,cameraMap.get(cameraDetail.getCameraId()).getSnCode(),null,null);
|
|
|
}
|
|
|
}
|
|
@@ -159,7 +160,7 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
HashMap<Long, CameraDetail> detailMap = this.getByCameraIds(cameraIds);
|
|
|
HashMap<Long, Camera> cameraMap = cameraService.getByIds(cameraIds);
|
|
|
for (CameraDetail cameraDetail : detailMap.values()) {
|
|
|
- if(cameraDetail.getType() == 10){
|
|
|
+ if (cameraDetail.getType() == CameraTypeEnum.LASER_TURN.getType() || cameraDetail.getType() == CameraTypeEnum.SG_TURN.getType()) {
|
|
|
fdkkLaserService.toBind(true,cameraMap.get(cameraDetail.getCameraId()).getSnCode(),user.getUserName(),user.getId());
|
|
|
}
|
|
|
}
|
|
@@ -264,7 +265,7 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
}
|
|
|
@Override
|
|
|
public Long getTotalSpaceByCameraId(CameraDetail cameraDetail) {
|
|
|
- if(cameraDetail.getType() == 10 || cameraDetail.getType() == 11){
|
|
|
+ if (cameraDetail.getType() == CameraTypeEnum.LASER_TURN.getType() || cameraDetail.getType() == CameraTypeEnum.SG_TURN.getType()) {
|
|
|
return -1L;
|
|
|
}
|
|
|
UserIncrement userIncrement = userIncrementService.getByCameraId(cameraDetail.getCameraId());
|
|
@@ -281,7 +282,7 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
if(cameraDetail == null){
|
|
|
return false;
|
|
|
}
|
|
|
- if(cameraDetail.getType() == 10 || cameraDetail.getType() == 11){
|
|
|
+ if (cameraDetail.getType() == CameraTypeEnum.LASER_TURN.getType() || cameraDetail.getType() == CameraTypeEnum.SG_TURN.getType()) {
|
|
|
return true;
|
|
|
}
|
|
|
return checkSpace(cameraDetail,space);
|
|
@@ -289,7 +290,7 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
|
|
|
@Override
|
|
|
public Boolean checkSpace(CameraDetail detailEntity, Long space) {
|
|
|
- if(detailEntity.getType() == 10 || detailEntity.getType() == 11){
|
|
|
+ if (detailEntity.getType() == CameraTypeEnum.LASER_TURN.getType() || detailEntity.getType() == CameraTypeEnum.SG_TURN.getType()) {
|
|
|
return true;
|
|
|
}
|
|
|
UserIncrement userIncrement = userIncrementService.getByCameraId(detailEntity.getCameraId());
|
|
@@ -303,7 +304,7 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
@Override
|
|
|
public Boolean checkSpace(CameraDetail detailEntity, IncrementType incrementType, Long space) {
|
|
|
Long totalSpace = 0L;
|
|
|
- if(detailEntity.getType() == 10 || detailEntity.getType() == 11){
|
|
|
+ if (detailEntity.getType() == CameraTypeEnum.LASER_TURN.getType() || detailEntity.getType() == CameraTypeEnum.SG_TURN.getType()) {
|
|
|
return true;
|
|
|
}
|
|
|
if("SP".equals(detailEntity.getUnit())){
|