|
@@ -169,7 +169,10 @@ public class AuthorizeCameraServiceImpl extends ServiceImpl<IAuthorizeCameraMapp
|
|
|
if(bySnCode == null){
|
|
|
throw new BusinessException(ResultCode.UPDATE_CAMERA_NO_IN);
|
|
|
}
|
|
|
-
|
|
|
+ CameraDetail byCameraId = cameraDetailService.getByCameraId(bySnCode.getId());
|
|
|
+ if(byCameraId == null){
|
|
|
+ throw new BusinessException(ResultCode.UPDATE_CAMERA_NO_IN);
|
|
|
+ }
|
|
|
try {
|
|
|
CamRegSDto dtos = new CamRegSDto();
|
|
|
dtos.setMachineCode(authorizeCamera.getMachineCode());
|
|
@@ -185,7 +188,7 @@ public class AuthorizeCameraServiceImpl extends ServiceImpl<IAuthorizeCameraMapp
|
|
|
throw new BusinessException(ResultCode.GET_MACHINE_CODE_ERROR);
|
|
|
}
|
|
|
AuthorizeCameraLog authorizeCameraLog = authorizeCameraLogService.saveLog(cameraDetail, snCode, authorizeKey);
|
|
|
- authorizeCameraDetailService.updateSnCode(cameraDetail.getId(),snCode);
|
|
|
+ authorizeCameraDetailService.updateSnCode(cameraDetail.getId(),bySnCode.getId(),CameraUtils.getCameraType(byCameraId.getType()),snCode);
|
|
|
return authorizeCameraLog;
|
|
|
}catch (Exception e){
|
|
|
throw new BusinessException(ResultCode.GET_MACHINE_CODE_ERROR);
|