| | |
| | | if (Objects.isNull(locType.getName())) { |
| | | throw new CoolException("库位类型不能为空!!"); |
| | | } |
| | | if (Objects.isNull(locType.getCode())) { |
| | | throw new CoolException("库位编码不为空!!"); |
| | | } |
| | | if (Objects.isNull(locType.getRegex())) { |
| | | throw new CoolException("库位规则表达式不能为空!!"); |
| | | } |
| | |
| | | @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"); |
| | | } |