diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index f76628c4..ead83dcd 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -116,7 +116,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { // 过滤请求 .authorizeRequests() // 对于登录login 注册register 验证码captchaImage 允许匿名访问 - .antMatchers("/login", "/register", "/captchaImage","/dc/**").anonymous() + .antMatchers("/login", "/register", "/captchaImage").anonymous() .antMatchers( HttpMethod.GET, "/", @@ -126,8 +126,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { "/**/*.js", "/profile/**" ).permitAll() - .antMatchers("/swagger-ui.html").anonymous() - .antMatchers("/swagger-resources/**").anonymous() +// .antMatchers("/swagger-ui.html").anonymous() +// .antMatchers("/swagger-resources/**").anonymous() .antMatchers("/webjars/**").anonymous() .antMatchers("/*/api-docs").anonymous() .antMatchers("/druid/**").anonymous() diff --git a/zc-business/src/main/java/com/zc/business/controller/VideoController.java b/zc-business/src/main/java/com/zc/business/controller/VideoController.java index 2021f8a4..7c374ad6 100644 --- a/zc-business/src/main/java/com/zc/business/controller/VideoController.java +++ b/zc-business/src/main/java/com/zc/business/controller/VideoController.java @@ -412,35 +412,30 @@ public class VideoController extends BaseController { Integer pileNumDistance = pileNumTransformMetre(pileNum); Map result = new HashMap<>(); - //上行列表 + //上行列表(包含双向) List> upCameraList = datalist.stream() - .filter(item -> "0".equals(item.get("camOrientation"))) .map(item->{ item.put("distance",Math.abs(pileNumTransformMetre(item.get("pileNum").toString()) - pileNumDistance)); return item; }) + .filter(item -> + ("0".equals(item.get("camOrientation")) || "2".equals(item.get("camOrientation"))) + && Integer.parseInt(item.get("distance").toString()) < 2000) .sorted(comparing(item -> Integer.parseInt(item.get("distance").toString()))) .collect(Collectors.toList()); - if (upCameraList.size() > 0 && Integer.parseInt(upCameraList.get(0).get("distance").toString()) < 2000){ - result.put("upCamera",upCameraList.get(0)); - } else { - result.put("upCamera",new HashMap<>()); - } + result.put("upCamera",upCameraList); + //下行列表 List> downCameraList = datalist.stream() - .filter(item -> "1".equals(item.get("camOrientation"))) .map(item->{ item.put("distance",Math.abs(pileNumTransformMetre(item.get("pileNum").toString()) - pileNumDistance)); return item; }) + .filter(item -> "1".equals(item.get("camOrientation")) && Integer.parseInt(item.get("distance").toString()) < 2000) .sorted(comparing(item -> Integer.parseInt(item.get("distance").toString()))) .collect(Collectors.toList()); - if (downCameraList.size() > 0 && Integer.parseInt(downCameraList.get(0).get("distance").toString()) < 2000){ - result.put("downCamera",downCameraList.get(0)); - } else { - result.put("downCamera",new HashMap<>()); - } + result.put("downCamera",downCameraList); return AjaxResult.success(result); diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcBoardServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcBoardServiceImpl.java index 8a2c0a1f..a8c06783 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcBoardServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcBoardServiceImpl.java @@ -260,7 +260,7 @@ public class DcBoardServiceImpl implements IDcBoardService { result.add(map); }else { status = "0"; - map.put("code",status); + map.put("code",status); map.put("msg",ajaxResult13.get("msg").toString()); result.add(map); }