|
@@ -71,12 +71,15 @@ public class LaserController extends BaseController{
|
|
|
cameraId = scenePro.getCameraId();
|
|
|
userId = scenePro.getUserId();
|
|
|
}
|
|
|
-
|
|
|
- if(userId != null && userId.equals(user.getId())){
|
|
|
+ User sceneUser = userService.getById(userId);
|
|
|
+ if(sceneUser == null || sceneUser.getCompanyId() == null){
|
|
|
+ return Result.success(false);
|
|
|
+ }
|
|
|
+ if( sceneUser.getId().equals(userId)){
|
|
|
return Result.success(true);
|
|
|
}
|
|
|
|
|
|
- Company company = companyService.getByCameraId(cameraId);
|
|
|
+ Company company = companyService.getById(sceneUser.getCompanyId());
|
|
|
if(company != null && company.getId().equals(user.getCompanyId())){
|
|
|
return Result.success(true);
|
|
|
}
|
|
@@ -86,7 +89,7 @@ public class LaserController extends BaseController{
|
|
|
List<Integer> ids = numList.stream().map(TmContractorNum::getContractorId).collect(Collectors.toList());
|
|
|
List<TmContractor> tmContractors = tmContractorService.listByIds(ids);
|
|
|
for (TmContractor tmContractor : tmContractors) {
|
|
|
- if(tmContractor.getContractorUserId().equals(user.getId())){
|
|
|
+ if(tmContractor.getContractorCompanyId().equals(user.getCompanyId())){
|
|
|
return Result.success(true);
|
|
|
}
|
|
|
}
|