|
@@ -146,10 +146,7 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
Long sceneCount = sceneMap.get(cameraDetail.getCameraId()) == null ? 0L : sceneMap.get(cameraDetail.getCameraId());
|
|
|
Long scenePlusCount = scenePlusMap.get(cameraDetail.getCameraId()) == null ? 0L : scenePlusMap.get(cameraDetail.getCameraId());
|
|
|
Long count = sceneProCount + sceneCount + scenePlusCount;
|
|
|
- List<String> snCodeList = companySnCodeMap.get(cameraDetail.getCompanyId());
|
|
|
- if(snCodeList == null){
|
|
|
- snCodeList = new ArrayList<>();
|
|
|
- }
|
|
|
+ List<String> snCodeList = companySnCodeMap.computeIfAbsent(cameraDetail.getCompanyId(), k -> new ArrayList<>());
|
|
|
Camera camera = cameraHashMap.get(cameraDetail.getCameraId());
|
|
|
if(camera != null){
|
|
|
snCodeList.add(camera.getSnCode());
|