|
@@ -8,9 +8,11 @@ import com.fdkankan.common.constant.CommonStatus;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.common.util.RandomUtil;
|
|
|
+import com.fdkankan.contro.entity.CameraType;
|
|
|
import com.fdkankan.contro.entity.Scene3dNum;
|
|
|
import com.fdkankan.contro.enums.CameraTypeEnum;
|
|
|
import com.fdkankan.contro.mapper.IScene3dNumMapper;
|
|
|
+import com.fdkankan.contro.service.ICameraTypeService;
|
|
|
import com.fdkankan.contro.service.IScene3dNumService;
|
|
|
import com.fdkankan.dingtalk.DingTalkSendUtils;
|
|
|
import com.fdkankan.redis.constant.RedisKey;
|
|
@@ -67,6 +69,8 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
|
|
|
|
|
|
@Autowired
|
|
|
private DingTalkSendUtils dingTalkSendUtils;
|
|
|
+ @Autowired
|
|
|
+ private ICameraTypeService cameraTypeService;
|
|
|
|
|
|
@Override
|
|
|
public String generateSceneNum(Integer cameraType) throws Exception {
|
|
@@ -123,11 +127,15 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private static String addPrefix( String num,Integer cameraType){
|
|
|
- if(cameraType == null){
|
|
|
+ private String addPrefix(String num,Integer camType){
|
|
|
+ if(camType == null){
|
|
|
+ return num;
|
|
|
+ }
|
|
|
+ CameraType cameraType = cameraTypeService.getByCamType(camType);
|
|
|
+ if(Objects.isNull(cameraType)){
|
|
|
return num;
|
|
|
}
|
|
|
- return CameraTypeEnum.getSceneNumPrefixByType(cameraType) + num;
|
|
|
+ return cameraType.getScenePrefix() + num;
|
|
|
}
|
|
|
|
|
|
@Override
|