| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | 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 (!locService.updateById(loc)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | |
| | | if (!locService.updateLoc(loc)) { |
| | | throw new CoolException("库位类型关联关系修改失败!@!"); |
| | | } |
| | |
| | | if (Objects.isNull(locs)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | locs.setCreateBy(getLoginUser().getId()); |
| | | locs.setUpdateBy(getLoginUser().getId()); |
| | | locs.setCreateBy(getLoginUserId()); |
| | | locs.setUpdateBy(getLoginUserId()); |
| | | return locService.batchBindLocs(locs); |
| | | } |
| | | |