|
@@ -252,6 +252,25 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5047);
|
|
|
}
|
|
|
|
|
|
+ Camera camera = cameraService.getBySnCode(mac);
|
|
|
+ if(Objects.isNull(camera)){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_7010);
|
|
|
+ }
|
|
|
+ CameraDetail cameraDetail = cameraDetailService.getById(camera.getId());
|
|
|
+ if(Objects.isNull(cameraDetail)){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_7010);
|
|
|
+ }
|
|
|
+ Long companyId = cameraDetail.getCompanyId();
|
|
|
+ if(Objects.nonNull(companyId)){
|
|
|
+ Company company = companyService.getById(companyId);
|
|
|
+ if(Objects.nonNull(company)){
|
|
|
+ Integer canUpWebsite = company.getCanUpWebsite();
|
|
|
+ if(Objects.nonNull(canUpWebsite) && canUpWebsite == CommonStatus.NO.code().intValue()){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_4006);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
log.info("mac:{} 准备上传文件,folderName:{}", mac, folderName);
|
|
|
ResponseSceneFile responseSceneFile = new ResponseSceneFile();
|
|
|
|