skyouc
2025-03-21 beff9e424cbc5a86fb02ae5b089bd6ae9d04d78e
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocTypeController.java
@@ -59,6 +59,9 @@
        if (Objects.isNull(locType.getName())) {
            throw new CoolException("库位类型不能为空!!");
        }
        if (Objects.isNull(locType.getCode())) {
            throw new CoolException("库位编码不为空!!");
        }
        if (Objects.isNull(locType.getRegex())) {
            throw new CoolException("库位规则表达式不能为空!!");
        }
@@ -74,8 +77,16 @@
    @OperationLog("Update loc type")
    @PostMapping("/locType/update")
    public R update(@RequestBody LocType locType) {
        if (Objects.isNull(locType.getName())) {
            throw new CoolException("库位类型不能为空!!");
        }
        if (Objects.isNull(locType.getCode())) {
            throw new CoolException("库位编码不为空!!");
        }
        if (Objects.isNull(locType.getRegex())) {
            throw new CoolException("库位规则表达式不能为空!!");
        }
        locType.setUpdateBy(getLoginUserId());
        locType.setUpdateTime(new Date());
        if (!locTypeService.updateById(locType)) {
            return R.error("Update Fail");
        }