| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.stock.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.enums.StockQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockUnQualifiedRecordTypeEnum; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.stock.dto.StockUninventoryDto; |
| | | import com.ruoyi.stock.service.StockUninventoryService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä¸åæ ¼åºå表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-22 10:17:45 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/stockUninventory") |
| | | public class StockUninventoryController { |
| | | @Autowired |
| | | private StockUninventoryService stockUninventoryService; |
| | | |
| | | @GetMapping("/pagestockUninventory") |
| | | @ApiOperation("å页æ¥è¯¢åºå") |
| | | public R pagestockUninventory(Page page, StockUninventoryDto stockUninventoryDto) { |
| | | IPage<StockUninventoryDto> stockUninventoryDtoIPage = stockUninventoryService.pageStockUninventory(page, stockUninventoryDto); |
| | | return R.ok(stockUninventoryDtoIPage); |
| | | } |
| | | |
| | | @PostMapping("/addstockUninventory") |
| | | @ApiOperation("æ°å¢åºå") |
| | | public R addstockUninventory(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockUnQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_IN.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | | return R.ok(stockUninventoryService.addStockUninventory(stockUninventoryDto)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/subtractstockUninventory") |
| | | @ApiOperation("æ£ååºå") |
| | | public R subtractstockUninventory(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockUnQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_OUT.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | | return R.ok(stockUninventoryService.subtractStockUninventory(stockUninventoryDto)); |
| | | } |
| | | |
| | | } |