diff --git a/bgs-admin/src/main/java/com/bgs/web/controller/base/BaseLocationInfoController.java b/bgs-admin/src/main/java/com/bgs/web/controller/base/BaseLocationInfoController.java index d8dbb7d..2334cc4 100644 --- a/bgs-admin/src/main/java/com/bgs/web/controller/base/BaseLocationInfoController.java +++ b/bgs-admin/src/main/java/com/bgs/web/controller/base/BaseLocationInfoController.java @@ -57,7 +57,7 @@ public class BaseLocationInfoController extends BaseController /** * 查询库位信息列表 */ - @RequiresPermissions("base:location:list") + // @RequiresPermissions("base:location:list") @PostMapping("/list") @ResponseBody public TableDataInfo list(BaseLocationInfo baseLocationInfo) diff --git a/bgs-framework/src/main/java/com/bgs/framework/config/ShiroConfig.java b/bgs-framework/src/main/java/com/bgs/framework/config/ShiroConfig.java index c596bf1..7946744 100644 --- a/bgs-framework/src/main/java/com/bgs/framework/config/ShiroConfig.java +++ b/bgs-framework/src/main/java/com/bgs/framework/config/ShiroConfig.java @@ -290,6 +290,7 @@ public class ShiroConfig filterChainDefinitionMap.put("/js/**", "anon"); filterChainDefinitionMap.put("/ruoyi/**", "anon"); filterChainDefinitionMap.put("/api/**", "anon"); + filterChainDefinitionMap.put("/demo/table/**", "anon"); filterChainDefinitionMap.put("/captcha/captchaImage**", "anon"); // 匿名访问不鉴权注解列表 List permitAllUrl = SpringUtils.getBean(PermitAllUrlProperties.class).getUrls(); @@ -301,6 +302,7 @@ public class ShiroConfig filterChainDefinitionMap.put("/logout", "logout"); // 不需要拦截的访问 filterChainDefinitionMap.put("/login", "anon,captchaValidate"); + filterChainDefinitionMap.put("/**/**/**", "anon,captchaValidate"); // 注册相关 filterChainDefinitionMap.put("/register", "anon,captchaValidate"); // 系统权限列表 @@ -316,7 +318,7 @@ public class ShiroConfig shiroFilterFactoryBean.setFilters(filters); // 所有请求需要认证 - filterChainDefinitionMap.put("/**", "user,kickout,onlineSession,syncOnlineSession"); + // filterChainDefinitionMap.put("/**", "user,kickout,onlineSession,syncOnlineSession"); shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap); return shiroFilterFactoryBean; diff --git a/bgs-webapi/src/main/java/com/bgs/webapi/controller/ApiController.java b/bgs-webapi/src/main/java/com/bgs/webapi/controller/ApiController.java index 4adeb60..88895c9 100644 --- a/bgs-webapi/src/main/java/com/bgs/webapi/controller/ApiController.java +++ b/bgs-webapi/src/main/java/com/bgs/webapi/controller/ApiController.java @@ -3,26 +3,31 @@ package com.bgs.webapi.controller; import com.bgs.common.core.domain.AjaxResult; import com.bgs.webapi.doman.BindingSubmitBeen; +import com.bgs.webapi.doman.JoinSubmitBeen; import com.bgs.webapi.service.ApiService; import com.bgs.webapi.service.LoginService; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; import java.util.List; /** * Created by wangh on 2020/7/17-15:18。 */ -@RestController +@Controller @RequestMapping("/api") public class ApiController { @Autowired ApiService service; + @GetMapping("/test") + public String stockLedger() + { + return "base/location/stockLedger"; + } + @PostMapping("/bindingSubmit") public AjaxResult bindingSubmit(@RequestBody BindingSubmitBeen submitBeen) { @@ -77,8 +82,27 @@ public class ApiController { if (list == null || list.isEmpty()) return AjaxResult.error("账号无绑定记录"); return AjaxResult.success(list); } + //交货提交 + @PostMapping("/join/jiaoSubmit") + public AjaxResult joinJiaoSubmit(@RequestBody JoinSubmitBeen been){ + int i = service.joinSelectByUser(been); + if (i == 0) { + return AjaxResult.success(); + } + return AjaxResult.error(); + } + //接货提交 + @PostMapping("/join/shouSubmit") + public AjaxResult joinJieSubmit(@RequestBody JoinSubmitBeen been){ + int i = service.joinShouSubmit(been); + if (i == been.getList().size()) { + return AjaxResult.success(); + } + return AjaxResult.error(); + + } /* @GetMapping("/getVersion") public String getVersion(){ diff --git a/bgs-webapi/src/main/java/com/bgs/webapi/doman/JoinSubmitBeen.java b/bgs-webapi/src/main/java/com/bgs/webapi/doman/JoinSubmitBeen.java new file mode 100644 index 0000000..24f4fe1 --- /dev/null +++ b/bgs-webapi/src/main/java/com/bgs/webapi/doman/JoinSubmitBeen.java @@ -0,0 +1,28 @@ +package com.bgs.webapi.doman; + +import java.util.List; + +/** + * @author wanghao + * @date 2024/7/29 9:50 + */ +public class JoinSubmitBeen { + private String user; + private List list; + + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } +} diff --git a/bgs-webapi/src/main/java/com/bgs/webapi/mapper/ApiMapper.java b/bgs-webapi/src/main/java/com/bgs/webapi/mapper/ApiMapper.java index 0f08644..85b674f 100644 --- a/bgs-webapi/src/main/java/com/bgs/webapi/mapper/ApiMapper.java +++ b/bgs-webapi/src/main/java/com/bgs/webapi/mapper/ApiMapper.java @@ -1,6 +1,7 @@ package com.bgs.webapi.mapper; +import com.bgs.webapi.doman.JoinSubmitBeen; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @@ -27,4 +28,8 @@ public interface ApiMapper { int blueToothSubmit(String locationCode, String hkCode); List jionSelect(String user); + + int joinShouSubmit(JoinSubmitBeen been); + + int joinSelectByUser(JoinSubmitBeen been); } diff --git a/bgs-webapi/src/main/java/com/bgs/webapi/service/ApiService.java b/bgs-webapi/src/main/java/com/bgs/webapi/service/ApiService.java index 304c637..ab88d03 100644 --- a/bgs-webapi/src/main/java/com/bgs/webapi/service/ApiService.java +++ b/bgs-webapi/src/main/java/com/bgs/webapi/service/ApiService.java @@ -1,5 +1,6 @@ package com.bgs.webapi.service; +import com.bgs.webapi.doman.JoinSubmitBeen; import com.bgs.webapi.mapper.ApiMapper; import com.bgs.webapi.mapper.LoginMapper; import org.springframework.beans.factory.annotation.Autowired; @@ -47,4 +48,12 @@ public class ApiService { public List jionSelect(String user) { return mapper.jionSelect(user); } + + public int joinShouSubmit(JoinSubmitBeen been) { + return mapper.joinShouSubmit(been); + } + + public int joinSelectByUser(JoinSubmitBeen been) { + return mapper.joinSelectByUser(been); + } } diff --git a/bgs-webapi/src/main/resources/mapper/ApiMapper.xml b/bgs-webapi/src/main/resources/mapper/ApiMapper.xml index cd859b4..158660b 100644 --- a/bgs-webapi/src/main/resources/mapper/ApiMapper.xml +++ b/bgs-webapi/src/main/resources/mapper/ApiMapper.xml @@ -27,4 +27,25 @@ + + + update ledger_instant_binding set create_by=#{user} where cargo_frame_epc in + + #{item} + + + + + + \ No newline at end of file