| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | @PreAuthorize("hasAuthority('manager:loc:update')") |
| | | @OperationLog("Update 库位信息表") |
| | | @PostMapping("/loc/update") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R update(@RequestBody Loc loc) { |
| | | loc.setUpdateBy(getLoginUserId()); |
| | | |
| | |
| | | } |
| | | |
| | | if (!locService.updateLoc(loc)) { |
| | | throw new CoolException("库位类型关联关系修改失败!!"); |
| | | throw new CoolException("库位类型关联关系修改失败!@!"); |
| | | } |
| | | return R.ok("Update Success").add(loc); |
| | | } |
| | |
| | | return locService.modifyLocs(locs); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:loc:update')") |
| | | @PostMapping("/loc/batch/area") |
| | | @ApiOperation("库位批量分区") |
| | | public R batchLocArea(@RequestBody LocModifyParams locs) { |
| | | if (Objects.isNull(locs)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | return locService.batchBindLocs(locs); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:loc:update')") |
| | | @ApiOperation("库位初始化") |