skyouc
2025-04-12 ba4a73717339424325a8f82d0f10ec22aec1aad3
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocController.java
@@ -106,7 +106,6 @@
        if (!locService.updateById(loc)) {
            return R.error("Update Fail");
        }
        if (!locService.updateLoc(loc)) {
            throw new CoolException("库位类型关联关系修改失败!@!");
        }
@@ -178,34 +177,36 @@
    @PostMapping("/loc/init")
    public R initLocInfo(@Valid @RequestBody LocMastInitParam param) {
        if (Objects.isNull(param)) {
            throw new CoolException("初始化信息不能为空!!");
            return R.error("初始化信息不能为空!!");
        }
        if (Objects.isNull(param.getTypeIds()) && param.getTypeIds().isEmpty()) {
            return R.error("库位类型不能为空!!");
        }
        if (Objects.isNull(param.getWarehouseId())) {
            throw new CoolException("仓库ID不能为空!!");
            return R.error("仓库ID不能为空!!");
        }
        if (Objects.isNull(param.getAreaId())) {
            throw new CoolException("库区ID不能为空!!");
            return R.error("库区ID不能为空!!");
        }
        if (Objects.isNull(param.getStartRow())) {
            throw new CoolException("起始排不能为空!!");
            return R.error("起始排不能为空!!");
        }
        if (Objects.isNull(param.getEndRow())) {
            throw new CoolException("终止排不能为空!!");
            return R.error("终止排不能为空!!");
        }
        if (Objects.isNull(param.getStartBay())) {
            throw new CoolException("起始列不能为空!!");
            return R.error("起始列不能为空!!");
        }
        if (Objects.isNull(param.getEndBay())) {
            throw new CoolException("终止列不能为空!!");
            return R.error("终止列不能为空!!");
        }
        if (Objects.isNull(param.getStartLev())) {
            throw new CoolException("起始层不能为空!!");
            return R.error("起始层不能为空!!");
        }
        if (Objects.isNull(param.getEndLev())) {
            throw new CoolException("终止层不能为空!!");
            return R.error("终止层不能为空!!");
        }
        return locService.initLocs(param);
        return locService.initLocs(param, getLoginUserId());
    }
}