skyouc
13 小时以前 6166b702c4cf716302e44cc118bc8e5fc8e909b3
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocController.java
@@ -73,7 +73,7 @@
        Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, locCode),false);
        List<Loc> list = locService.list(new LambdaQueryWrapper<Loc>()
                .eq(Loc::getAreaId, loc.getAreaId())
                .eq(Loc::getChannel,loc.getChannel())
                .eq(!Objects.isNull(loc.getChannel()), Loc::getChannel,loc.getChannel())
                .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
        );
        List<String> list1 = list.stream().map(obj -> obj.getCode()).collect(Collectors.toList());
@@ -127,10 +127,13 @@
    public R update(@RequestBody Loc loc) {
        loc.setUpdateBy(getLoginUserId());
        String join = StringUtils.join(loc.getTypeIds(), ",");
        loc.setType(join);
        if (Objects.isNull(loc.getTypeIds())) {
            throw new CoolException("库位类型不能为空!!");
        if (!Objects.isNull(loc.getTypeIds())) {
            loc.setType(join);
        }
        if (Objects.isNull(loc.getTypeIds()) && !Objects.isNull(loc.getType())) {
            loc.setTypeIds(Arrays.asList(Long.valueOf(loc.getType())));
        }
        if (!locService.updateById(loc)) {
            return R.error("Update Fail");
        }