| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.management.domain.SlGoodsShelf; |
| | | import com.ruoyi.management.domain.SlVolumeProductionZy; |
| | | import com.ruoyi.management.domain.dto.*; |
| | |
| | | @RequestMapping("/sl-volume-production-zy") |
| | | @Api(value = "发起转移接口", tags = "发起转移接口", description = "发起转移接口") |
| | | public class SlVolumeProductionZyController { |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private SlVolumeProductionZyService slVolumeProductionZyService; |
| | | @Autowired |
| | |
| | | @PostMapping("/getNumberAndShelfByManagementId") |
| | | @ApiOperation(value = "根据仓库id 查询楼层和货架") |
| | | public R<NumberAndShelfVO> getNumberAndShelfByManagementId(@RequestBody QueryDTO dto) { |
| | | tokenService.getLoginUser(); |
| | | return R.ok(slVolumeProductionZyService.getNumberAndShelfByManagementId(dto)); |
| | | } |
| | | @GetMapping("/getNumberAndShelf") |
| | | @ApiOperation(value = "根据仓库Id 获取楼层数量和所有货架数组") |
| | | public R<GetNumberAndShelfVO> getNumberAndShelf(Long managementId) { |
| | | tokenService.getLoginUser(); |
| | | GetNumberAndShelfVO getNumberAndShelfVO = new GetNumberAndShelfVO(); |
| | | getNumberAndShelfVO.setManagementNumber(storeManagementService.getById(managementId).getStoreManagementNumber()); |
| | | List<SlGoodsShelf> list = slGoodsShelfService.list(new QueryWrapper<SlGoodsShelf>() |
| | |
| | | getNumberAndShelfVO.setList(list); |
| | | return R.ok(getNumberAndShelfVO); |
| | | } |
| | | @GetMapping("/getNumberAndShelf1") |
| | | @ApiOperation(value = "根据仓库Id 获取楼层数量和所有货架数组") |
| | | public R<GetNumberAndShelfVO> getNumberAndShelf1(Long managementId) { |
| | | tokenService.getLoginUser(); |
| | | GetNumberAndShelfVO getNumberAndShelfVO = new GetNumberAndShelfVO(); |
| | | getNumberAndShelfVO.setManagementNumber(storeManagementService.getById(managementId).getStoreManagementNumber()); |
| | | List<SlGoodsShelf> list = slGoodsShelfService.list(new QueryWrapper<SlGoodsShelf>() |
| | | .eq("del_flag", 0) |
| | | .isNotNull("img_id") |
| | | .eq("store_management_id", managementId)); |
| | | getNumberAndShelfVO.setList(list); |
| | | return R.ok(getNumberAndShelfVO); |
| | | } |
| | | @PostMapping("/getVolumeProductionzyCode") |
| | | @ApiOperation(value = "获取转移管理二维码") |
| | | public R<PageDTO<getVolumeProductionzyCodeVO>> getVolumeProductionzyCode(VolumeProductionZygCodeQuery volumeProductionZygCodeQuery) { |
| | | tokenService.getLoginUser(); |
| | | return R.ok(slVolumeProductionZyService.getVolumeProductionzyCode(volumeProductionZygCodeQuery)); |
| | | } |
| | | |
| | | @PostMapping("/addSlVolumeProductionZy") |
| | | @ApiOperation(value = "添加转移") |
| | | public R addSlVolumeProductionZy(@RequestBody ADDZYDTO addzydto) { |
| | | slVolumeProductionZyService.addSlVolumeProductionZy(addzydto); |
| | | return R.ok(); |
| | | tokenService.getLoginUser(); |
| | | return slVolumeProductionZyService.addSlVolumeProductionZy(addzydto); |
| | | } |
| | | @PostMapping("/deleteSlVolumeProductionZyUpdate") |
| | | @ApiOperation(value = "编辑时删除转移数据") |
| | | public R addSlVolumeProductionZy(@RequestBody DeleteCKDTO dto) { |
| | | tokenService.getLoginUser(); |
| | | QueryWrapper<SlVolumeProductionZy> slVolumeProductionZyQueryWrapper = new QueryWrapper<>(); |
| | | slVolumeProductionZyQueryWrapper.eq("del_flag","0"); |
| | | slVolumeProductionZyQueryWrapper.eq("rk_id",dto.getRkId()); |
| | |
| | | @PostMapping("/updSlVolumeProductionZy") |
| | | @ApiOperation(value = "修改转移") |
| | | public R updSlVolumeProductionZy(@RequestBody List<UpdaddSlVolumeProductionZyDTO> updaddSlVolumeProductionZyDTO) { |
| | | tokenService.getLoginUser(); |
| | | slVolumeProductionZyService.updSlVolumeProductionZy(updaddSlVolumeProductionZyDTO); |
| | | return R.ok(); |
| | | } |
| | |
| | | @PostMapping("/getSlVolumeProductionZyList") |
| | | @ApiOperation(value = "分页获取通过转移管理ID当前出库的物资") |
| | | public R<PageDTO<ManagementimgVolumeProductionZyVO>> getSlVolumeProductionZyList(@RequestBody ManagementimgVolumeProductionZyQuery managementimgVolumeProductionZyQuery) { |
| | | tokenService.getLoginUser(); |
| | | return R.ok(slVolumeProductionZyService.getSlVolumeProductionZyList(managementimgVolumeProductionZyQuery)); |
| | | } |
| | | |
| | |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delStoreManagement( |
| | | @ApiParam(name = "id", value = "转移批次id", required = true) @PathVariable("id") Integer id) { |
| | | tokenService.getLoginUser(); |
| | | SlVolumeProductionZy byId = slVolumeProductionZyService.getById(id); |
| | | byId.setDelFlag("1"); |
| | | slVolumeProductionZyService.updateById(byId); |