|
@@ -232,12 +232,19 @@ public class RtkDeviceServiceImpl extends ServiceImpl<IRtkDeviceMapper, RtkDevic
|
|
|
continue;
|
|
|
}
|
|
|
rtkSnSet.add(rtkSn);
|
|
|
+ Integer cameraType = null;
|
|
|
if(StringUtils.isNotBlank(cameraSn)){
|
|
|
Camera camera = cameraService.getBySnCode(cameraSn);
|
|
|
if(camera == null){
|
|
|
errorIndex.add(index -3);
|
|
|
continue;
|
|
|
}
|
|
|
+ CameraDetail cameraDetail = cameraDetailService.getByCameraId(camera.getId());
|
|
|
+ if(cameraDetail == null){
|
|
|
+ errorIndex.add(index -3);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ cameraType = CameraUtils.getCameraType3(cameraDetail.getType());
|
|
|
RtkDevice rtkDevice2 = this.getByCameraSn(cameraSn);
|
|
|
if(rtkDevice2 !=null){
|
|
|
errorIndex.add(index -3);
|
|
@@ -250,7 +257,7 @@ public class RtkDeviceServiceImpl extends ServiceImpl<IRtkDeviceMapper, RtkDevic
|
|
|
cameraSnSet.add(cameraSn);
|
|
|
|
|
|
}
|
|
|
- RtkDeviceInParam param = new RtkDeviceInParam(cameraSn,rtkTypeEnum.getCode(),rtkSn,rtkSgSn);
|
|
|
+ RtkDeviceInParam param = new RtkDeviceInParam(cameraSn,cameraType,rtkTypeEnum.getCode(),rtkSn,rtkSgSn);
|
|
|
params.add(param);
|
|
|
}
|
|
|
excelService.toExcelError(errorIndex);
|
|
@@ -267,6 +274,7 @@ public class RtkDeviceServiceImpl extends ServiceImpl<IRtkDeviceMapper, RtkDevic
|
|
|
RtkDevice rtkDevice = new RtkDevice();
|
|
|
rtkDevice.setRtkSnCode(param.getRtkSn());
|
|
|
rtkDevice.setCameraSn(param.getCameraSn());
|
|
|
+ rtkDevice.setCameraType(param.getCameraType());
|
|
|
rtkDevice.setSgRtkSn(param.getRtkSgSn());
|
|
|
rtkDevice.setRtkType(param.getRtkType());
|
|
|
rtkDevice.setCreateUserId(Long.valueOf( StpUtil.getLoginId().toString()));
|