| | |
| | | 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()); |
| | |
| | | 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"); |
| | | } |