|
@@ -136,19 +136,25 @@ public class RtkInfoServiceImpl extends ServiceImpl<IRtkInfoMapper, RtkInfo> imp
|
|
|
throw new BusinessException(ResultCode.CAMERA_NOT_EXIST);
|
|
|
}
|
|
|
}
|
|
|
- if(StringUtils.isNotBlank(rtkInfo.getCameraSnCode())){
|
|
|
- dbRtkInfo2 = this.getByCameraSnCode(rtkInfo.getRtkSnCode());
|
|
|
+ if(StringUtils.isNotBlank(rtkInfo.getSgRtkSn())){
|
|
|
+ dbRtkInfo2 = this.getSgRtkSn(rtkInfo.getSgRtkSn());
|
|
|
}
|
|
|
|
|
|
if(rtkInfo.getId() == null){
|
|
|
if(dbRtkInfo != null){
|
|
|
throw new BusinessException(ResultCode.RTK_SN_EXIST);
|
|
|
}
|
|
|
+ if(dbRtkInfo2 != null){
|
|
|
+ throw new BusinessException(ResultCode.SGRTK_SN_EXIST);
|
|
|
+ }
|
|
|
rtkInfo.setCreateUserId(Long.valueOf((String) StpUtil.getLoginId()));
|
|
|
}else {
|
|
|
if( dbRtkInfo != null && !Objects.equals(dbRtkInfo.getId(), rtkInfo.getId()) ){
|
|
|
throw new BusinessException(ResultCode.RTK_SN_EXIST);
|
|
|
}
|
|
|
+ if( dbRtkInfo2 != null && !Objects.equals(dbRtkInfo2.getId(), rtkInfo.getId()) ){
|
|
|
+ throw new BusinessException(ResultCode.SGRTK_SN_EXIST);
|
|
|
+ }
|
|
|
rtkInfo.setUpdateUserId(Long.valueOf((String)StpUtil.getLoginId()));
|
|
|
}
|
|
|
|
|
@@ -163,7 +169,10 @@ public class RtkInfoServiceImpl extends ServiceImpl<IRtkInfoMapper, RtkInfo> imp
|
|
|
this.saveOrUpdate(rtkInfo);
|
|
|
}
|
|
|
|
|
|
- private void checkSaveParam(RtkInfo param){
|
|
|
- //2024-07-02 09:44:49.379 [http-nio-8082-exec-2767] ERROR c.f.ucenter.exception.GlobalExceptionHandler - 服务错误:
|
|
|
+ private RtkInfo getSgRtkSn(String sgRtkSn) {
|
|
|
+ LambdaQueryWrapper<RtkInfo> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(RtkInfo::getSgRtkSn,sgRtkSn);
|
|
|
+ return this.getOne(wrapper);
|
|
|
}
|
|
|
+
|
|
|
}
|