yangyang
2025-03-20 6f3f068606f1f18ce859def1b6960571fd742605
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocController.java
@@ -76,8 +76,7 @@
        if (Objects.isNull(loc.getTypeIds())) {
            throw new CoolException("库位类型不能为空!!");
        }
        List<Long> lists = JSONArray.parseArray(loc.getTypeIds(), Long.class);
        String join = StringUtils.join(lists, ",");
        String join = StringUtils.join(loc.getTypeIds(), ",");
        loc.setType(join);
        loc.setCreateBy(getLoginUserId());
@@ -87,7 +86,7 @@
        }
        if (!locService.saveType(loc)) {
            throw new CoolException("库位类型保存失败!!");
            throw new CoolException("库位类型关联关系保存失败!!");
        }
        return R.ok("Save Success").add(loc);
    }
@@ -97,10 +96,17 @@
    @PostMapping("/loc/update")
    public R update(@RequestBody Loc loc) {
        loc.setUpdateBy(getLoginUserId());
        loc.setUpdateTime(new Date());
        String join = StringUtils.join(loc.getTypeIds(), ",");
        loc.setType(join);
        if (!locService.updateById(loc)) {
            return R.error("Update Fail");
        }
        if (!locService.updateLoc(loc)) {
            throw new CoolException("库位类型关联关系修改失败!!");
        }
        return R.ok("Update Success").add(loc);
    }