|
@@ -21,6 +21,7 @@ import com.fdkankan.manage_jp.service.IUserService;
|
|
|
import com.fdkankan.manage_jp.vo.request.SceneParam;
|
|
|
import com.fdkankan.manage_jp.vo.response.SceneVo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -126,7 +127,12 @@ public class LaserService {
|
|
|
List<Camera> cameraList = cameraService.getLikeChildName(param.getChildName());
|
|
|
List<String> snCodes = cameraList.stream().map(Camera::getSnCode).collect(Collectors.toList());
|
|
|
if(snCodes.size() >0){
|
|
|
- param.setSnCodes(snCodes);
|
|
|
+ if(param.getSnCodes() != null && param.getSnCodes().size() >0){
|
|
|
+ List<String> list3 = param.getSnCodes().stream().filter(snCodes::contains).collect(Collectors.toList());
|
|
|
+ param.setSnCodes(list3);
|
|
|
+ }else {
|
|
|
+ param.setSnCodes(snCodes);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
BeanUtils.copyProperties(param,newParam);
|