|
@@ -69,10 +69,10 @@ public class LaserService {
|
|
|
|
|
|
|
|
|
public void disableCooperation(HashMap<Long, CameraDetail> detailMap, HashMap<Long, Camera> cameraMap ){
|
|
|
- this.disableCooperation(getCooperationParam(detailMap,cameraMap,null));
|
|
|
+ this.disableCooperation(getCooperationdDisableParam(detailMap,cameraMap));
|
|
|
}
|
|
|
public void enableCameraCooperation(HashMap<Long,CameraDetail> detailMap,HashMap<Long,Camera> cameraMap ,String username){
|
|
|
- this.enableCameraCooperation(getCooperationParam(detailMap,cameraMap,username));
|
|
|
+ this.enableCameraCooperation(getCooperationSaveParam(detailMap,cameraMap,username));
|
|
|
}
|
|
|
|
|
|
public void disableCooperation(List<Map<String, String>> params) {
|
|
@@ -82,7 +82,7 @@ public class LaserService {
|
|
|
laserClient.cooperationDisable(params);
|
|
|
}
|
|
|
|
|
|
- public List<Map<String, String>> getCooperationParam(HashMap<Long,CameraDetail> detailMap,HashMap<Long,Camera> cameraMap ,String username){
|
|
|
+ public List<Map<String, String>> getCooperationdDisableParam(HashMap<Long,CameraDetail> detailMap,HashMap<Long,Camera> cameraMap ){
|
|
|
List<Map<String, String>> laserParams = new ArrayList<>();
|
|
|
List<Long> userIds = new ArrayList<>();
|
|
|
for (Long aLong : detailMap.keySet()) {
|
|
@@ -106,6 +106,20 @@ public class LaserService {
|
|
|
}
|
|
|
return laserParams;
|
|
|
}
|
|
|
+ public List<Map<String, String>> getCooperationSaveParam(HashMap<Long,CameraDetail> detailMap,HashMap<Long,Camera> cameraMap ,String username){
|
|
|
+ List<Map<String, String>> laserParams = new ArrayList<>();
|
|
|
+ for (Long cameraId : detailMap.keySet()) {
|
|
|
+ CameraDetail cameraDetail = detailMap.get(cameraId);
|
|
|
+ if (cameraDetail.getType() == CameraTypeEnum.LASER_TURN.getType()) {
|
|
|
+ Camera cameraEntity = cameraMap.get(cameraId);
|
|
|
+ Map<String, String> param = new HashMap<>();
|
|
|
+ param.put("snCode", cameraEntity.getSnCode());
|
|
|
+ param.put("cooperationUserName", username);
|
|
|
+ laserParams.add(param);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return laserParams;
|
|
|
+ }
|
|
|
|
|
|
public void enableCameraCooperation(List<Map<String, String>> params) {
|
|
|
if(params.size() <=0){
|