| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.management.domain.ManagementGoodsMaterials; |
| | | import com.ruoyi.management.domain.SlGoodsMaterials; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | |
| | | @Api(value = "物资管理接口", tags = "物资管理接口", description = "物资管理接口") |
| | | public class SlGoodsMaterialsController { |
| | | |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @PostMapping("/getGoodSmaterialsList") |
| | | @ApiOperation(value = "分页获物资管理") |
| | | public R<PageDTO<SlGoodsMaterialsVO>> getGoodSmaterialsList(@RequestBody SlGoodsMaterialsQuery slGoodsMaterialsQuery) { |
| | | tokenService.getLoginUser(); |
| | | return R.ok(slGoodsMaterialsService.getGoodSmaterialsList(slGoodsMaterialsQuery)); |
| | | } |
| | | |
| | | @PostMapping("/addGoodSmaterials") |
| | | @ApiOperation(value = "添加/修改物资管理") |
| | | public R addSlGoodsShelf(@RequestBody SlGoodsMaterialsDTO slGoodsMaterialsDTO) { |
| | | tokenService.getLoginUser(); |
| | | slGoodsMaterialsService.addSlGoodsShelf(slGoodsMaterialsDTO); |
| | | return R.ok(); |
| | | } |
| | |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delStoreManagement( |
| | | @ApiParam(name = "id", value = "货架管理id", required = true) @PathVariable("id") Long id) { |
| | | tokenService.getLoginUser(); |
| | | // 判断当前物资有没有存在于入库 出库 转移记录 和库存 |
| | | List<ManagementGoodsMaterials> goodsMaterialsId = managementGoodsMaterialsMapper.selectList(new QueryWrapper<ManagementGoodsMaterials>() |
| | | .eq("goods_materials_id", id) |
| | |
| | | @GetMapping("/getGoodSmaterialsOne/{id}") |
| | | @ApiOperation(value = "物资管理詳情") |
| | | public R<SlGoodsMaterials> getGoodSmaterialsOne(@ApiParam(name = "id", value = "物资管理id", required = true) @PathVariable("id") Long id) { |
| | | tokenService.getLoginUser(); |
| | | return R.ok(slGoodsMaterialsService.getById(id)); |
| | | } |
| | | |
| | | @PostMapping("/getStoreManagementGoodSmaterialsOne") |
| | | @ApiOperation(value = "库存管理查看详情") |
| | | public R<PageDTO<StoreManagementGoodSmaterialsVO>> getStoreManagementGoodSmaterialsOne(@RequestBody StoreManagementGoodSmaterialsQuery storeManagementGoodSmaterialsQuery) { |
| | | tokenService.getLoginUser(); |
| | | return R.ok(slGoodsMaterialsService.getStoreManagementGoodSmaterialsOne(storeManagementGoodSmaterialsQuery)); |
| | | } |
| | | |
| | | @PostMapping("/getSmaterialsOne") |
| | | @ApiOperation(value = "感觉物资库存管理查看详情") |
| | | public R<StoreManagementGoodSmaterialsVO> getSmaterialsOne(@RequestBody StoreManagementGoodSmaterialsQuery storeManagementGoodSmaterialsQuery) { |
| | | tokenService.getLoginUser(); |
| | | return R.ok(slGoodsMaterialsService.getSmaterialsOne(storeManagementGoodSmaterialsQuery)); |
| | | } |
| | | |
| | | @GetMapping("/getGooManagementGoodSmaterials/{id}") |
| | | @ApiOperation(value = "库存管理查看物资詳情") |
| | | public R<StoreManagementGoodSmaterialsVO> getGooManagementGoodSmaterials(@ApiParam(name = "id", value = "物资管理id", required = true) @PathVariable("id") Long id) { |
| | | tokenService.getLoginUser(); |
| | | StoreManagementGoodSmaterialsVO storeManagementGoodSmaterialsVO=new StoreManagementGoodSmaterialsVO(); |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrappers= Wrappers.lambdaQuery(); |
| | | wrappers.eq( ManagementGoodsMaterials::getGoodsMaterialsId,id); |