From 91ab1a15515c4c213b2ac4f777a7f20c3d0d59ad Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期五, 28 三月 2025 13:49:53 +0800 Subject: [PATCH] 一个订单在每个站点检验都需要扫码入库报检,在中间站点复核继续试验之后默认自动将样品出库,且在列表中也不需要再展示出来,到最后一步复核结束反而是需要手动去出库不能自动出库,且出库之后也不需要在页面展示 --- framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java b/framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java index 2018aef..0ec0878 100644 --- a/framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java +++ b/framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java @@ -4,6 +4,7 @@ import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSON; import com.yuanchu.mom.annotation.ValueAuth; +import com.yuanchu.mom.annotation.ValueClassify; import com.yuanchu.mom.exception.ErrorException; import com.yuanchu.mom.exception.MyFileException; import com.yuanchu.mom.mapper.AuthMapper; @@ -30,6 +31,9 @@ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { if(handler instanceof HandlerMethod) { + if(request.getRequestURL().toString().contains("/error") || request.getRequestURL().toString().contains("/outPath")){ + return HandlerInterceptor.super.preHandle(request, response, handler); + } HandlerMethod h = (HandlerMethod)handler; ValueAuth annotation = h.getMethodAnnotation(ValueAuth.class); if(annotation!=null){ @@ -38,8 +42,12 @@ JSONObject obj = JSONUtil.parseObj(new Jwt().readJWT(request.getHeader("token")).get("data")); Integer userId = Integer.parseInt(obj.get("id") + ""); int i = authMapper.isPower(userId, h.getMethod().getName()); - if (i == 0){ + // 鍒ゆ柇鏄惁鏈夋潈闄愭敞瑙� + ValueClassify valueClassify = h.getMethodAnnotation(ValueClassify.class); + if (valueClassify == null) { + return HandlerInterceptor.super.preHandle(request, response, handler); + } throw new ErrorException(obj.get("name") + " 鏃犳潈闄愯闂� " + h.getMethod().getName() + " 鎺ュ彛"); } } @@ -54,5 +62,6 @@ @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { HandlerInterceptor.super.afterCompletion(request, response, handler, ex); + } } -- Gitblit v1.9.3