| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | public R addstockInventory(@RequestBody StockInventoryDto stockInventoryDto) { |
| | | stockInventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_STOCK_IN.getCode())); |
| | | stockInventoryDto.setRecordId(0L); |
| | | return R.ok(stockInventoryService.addstockInventory(stockInventoryDto)); |
| | | return R.ok(stockInventoryService.addstockInventory(stockInventoryDto,2)); |
| | | } |
| | | |
| | | |
| | |
| | | return R.ok(stockInventoryService.subtractStockInventory(stockInventoryDto)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("importStockInventory") |
| | | @ApiOperation("导入库存") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R importStockInventory(MultipartFile file) { |
| | | return stockInventoryService.importStockInventory(file); |
| | | } |