| | |
| | | package com.ruoyi.management.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.SlGoodsMaterials; |
| | | import com.ruoyi.management.domain.SlGoodsShelf; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | | import com.ruoyi.management.domain.SlStoreManagementImg; |
| | | import com.ruoyi.management.domain.*; |
| | | import com.ruoyi.management.domain.dto.*; |
| | | import com.ruoyi.management.domain.vo.SlGoodsShelfVO; |
| | | import com.ruoyi.management.mapper.SlVolumeProductionRkMapper; |
| | | import com.ruoyi.management.service.SlGoodsShelfService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Resource |
| | | private SlGoodsShelfService slGoodsShelfService; |
| | | @Resource |
| | | private SlVolumeProductionRkMapper slVolumeProductionRkMapper; |
| | | |
| | | @PostMapping("/getGoodsShelfList") |
| | | @ApiOperation(value = "分页获货架表管理") |
| | |
| | | @PostMapping("/addSlGoodsShelf") |
| | | @ApiOperation(value = "添加/修改货架管理") |
| | | public R addSlGoodsShelf(@RequestBody SlGoodsShelfDTO slGoodsShelfDTO) { |
| | | slGoodsShelfService.addSlGoodsShelf(slGoodsShelfDTO); |
| | | return R.ok(); |
| | | return slGoodsShelfService.addSlGoodsShelf(slGoodsShelfDTO); |
| | | } |
| | | |
| | | @GetMapping("/SlGoodsShelf/{id}") |
| | |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delStoreManagement( |
| | | @ApiParam(name = "id", value = "货架管理id", required = true) @PathVariable("id") Long id) { |
| | | List<SlVolumeProductionRk> slVolumeProductionRks = slVolumeProductionRkMapper.selectList(new QueryWrapper<SlVolumeProductionRk>() |
| | | .eq("shelf_id", id) |
| | | .ge("repertory_zhai",0) |
| | | .isNotNull("new_add_time") |
| | | .eq("del_flag", "0")); |
| | | if (slVolumeProductionRks.size() > 0) { |
| | | return R.fail("删除失败,当前货架存有物资"); |
| | | } |
| | | SlGoodsShelf byId = slGoodsShelfService.getById(id); |
| | | byId.setDelFlag("1"); |
| | | slGoodsShelfService.updateById(byId); |