自动化立体仓库 - WMS系统
#1
dubin
2025-11-04 57e7846403cd3c72cc70e17e205c4e0d8b3aa404
src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -69,15 +69,17 @@
    @RequestMapping(value = "/locDetlOut/auth")
    @ManagerAuth
    public R stockOutListAll(@RequestParam(value = "matnrs[]",required = false) List<String> matnrs){
        if (!matnrs.isEmpty()) {
    public R stockOutListAll(@RequestParam(value = "locNos[]") List<String> locNos,@RequestParam(value = "matnrs[]",required = false) List<String> matnrs){
        if (!locNos.isEmpty()&&!matnrs.isEmpty()) {
            List<LocDetl> res = new ArrayList<>();
            for (String locNo : new HashSet<>(locNos)) {
                for (String matnr : new HashSet<>(matnrs)) {
                    List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr",matnr));
                    List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr",matnr).eq("loc_no",locNo));
                    if (!locDetls.isEmpty()) {
                        res.addAll(locDetls);
                    }
                }
            }
            return R.ok().add(res);
        }
        return R.parse(BaseRes.EMPTY);
@@ -104,6 +106,27 @@
        return R.ok(stockOut);
    }
    @RequestMapping(value = "/clamp/out/list/auth")
    @ManagerAuth
    public R clampOutList(@RequestParam(defaultValue = "1")Integer curr,
                          @RequestParam(defaultValue = "10")Integer limit,
                          @RequestParam Map<String, Object> param){
        if (!Cools.isEmpty(param.get("modi_time"))){
            String val = String.valueOf(param.get("modi_time"));
            if (val.contains(RANGE_TIME_LINK)) {
                String[] dates = val.split(RANGE_TIME_LINK);
                param.put("startTime", DateUtils.convert(dates[0]));
                param.put("endTime", DateUtils.convert(dates[1]));
                param.remove("modi_time");
            }
        }
        Page<LocDetl> stockOut = locDetlService.getStockOut(toPage(curr, limit, param, LocDetl.class));
        if (stockOut.getRecords().size()==0){
            stockOut = locDetlService.getStockOut(toPage(1, limit, param, LocDetl.class));
        }
        return R.ok(stockOut);
    }
    @RequestMapping(value = "/locDetl/list/auth")// /locDetl/list/auth 接口问题
    @ManagerAuth
    public R list(@RequestParam(defaultValue = "1")Integer curr,