|
@@ -623,7 +623,7 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
|
|
|
|
|
|
@Override
|
|
|
public Integer insExcelList(List<HashMap<Integer, String>> excelRowList) {
|
|
|
- List<String> wifiNameList = new ArrayList<>();
|
|
|
+ HashSet<String> snCodes = new HashSet<>();
|
|
|
List<CameraWifiPrefix> cameraTypeList = cameraWifiPrefixService.list();
|
|
|
HashMap<String,CameraWifiPrefix> cameraTypeMap = new HashMap<>();
|
|
|
cameraTypeList.forEach(entity->cameraTypeMap.put(entity.getWifiNamePrefix(),entity));
|
|
@@ -656,7 +656,10 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
|
|
|
errorIndex.add(index -3);
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
+ if(snCodes.contains(snCode.toUpperCase())){
|
|
|
+ errorIndex.add(index -3);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
CameraInOutParam param = new CameraInOutParam();
|
|
|
param.setSnCode(snCode);
|
|
|
param.setWifiNamePrefix(wifiPerName);
|
|
@@ -664,8 +667,7 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
|
|
|
param.setVersion(version);
|
|
|
param.setCameraType(cameraWifiPrefix.getCameraType());
|
|
|
params.add(param);
|
|
|
- String wifiName = map.get(0);
|
|
|
- wifiNameList.add(wifiName);
|
|
|
+ snCodes.add(snCode.toUpperCase());
|
|
|
}
|
|
|
|
|
|
excelService.toExcelError(errorIndex);
|