1
skyouc
2025-03-21 54f12f528d78dd54f6813fa54d8f65c28cdd7984
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocController.java
@@ -98,7 +98,6 @@
    @Transactional(rollbackFor = Exception.class)
    public R update(@RequestBody Loc loc) {
        loc.setUpdateBy(getLoginUserId());
        String join = StringUtils.join(loc.getTypeIds(), ",");
        loc.setType(join);
@@ -159,6 +158,18 @@
        return locService.modifyLocs(locs);
    }
    @PreAuthorize("hasAuthority('manager:loc:update')")
    @PostMapping("/loc/batch/area")
    @ApiOperation("库位批量分区")
    public R batchLocArea(@RequestBody LocModifyParams locs) {
        if (Objects.isNull(locs)) {
            throw new CoolException("参数不能为空!!");
        }
        locs.setCreateBy(getLoginUserId());
        locs.setUpdateBy(getLoginUserId());
        return locService.batchBindLocs(locs);
    }
    @PreAuthorize("hasAuthority('manager:loc:update')")
    @ApiOperation("库位初始化")
@@ -167,9 +178,31 @@
        if (Objects.isNull(param)) {
            throw new CoolException("初始化信息不能为空!!");
        }
        if (Objects.isNull(param.getWarehouseId())) {
            throw new CoolException("仓库ID不能为空!!");
        }
        if (Objects.isNull(param.getAreaId())) {
            throw new CoolException("库区ID不能为空!!");
        }
        if (Objects.isNull(param.getStartRow())) {
            throw new CoolException("起始排不能为空!!");
        }
        if (Objects.isNull(param.getEndRow())) {
            throw new CoolException("终止排不能为空!!");
        }
        if (Objects.isNull(param.getStartBay())) {
            throw new CoolException("起始列不能为空!!");
        }
        if (Objects.isNull(param.getEndBay())) {
            throw new CoolException("终止列不能为空!!");
        }
        if (Objects.isNull(param.getStartLev())) {
            throw new CoolException("起始层不能为空!!");
        }
        if (Objects.isNull(param.getEndLev())) {
            throw new CoolException("终止层不能为空!!");
        }
        return locService.initLocs(param);
    }