| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.stock.dto.StockOutRecordDto; |
| | | import com.ruoyi.stock.service.StockOutRecordService; |
| | | import com.ruoyi.stock.word.WeighbridgeDocGenerator; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class StockOutRecordController { |
| | | @Autowired |
| | | private StockOutRecordService stockOutRecordService; |
| | | @Autowired |
| | | private WeighbridgeDocGenerator weighbridgeDocGenerator; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "生产出库-出库管理-列表", businessType = BusinessType.OTHER) |
| | |
| | | return AjaxResult.success(stockOutRecordService.add(stockOutRecordDto)); |
| | | } |
| | | |
| | | @PutMapping("/{id}") |
| | | @Log(title = "出库管理-更新出库", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@PathVariable("id") Long id, @RequestBody StockOutRecordDto stockOutRecordDto) { |
| | | return AjaxResult.success(stockOutRecordService.update(id, stockOutRecordDto)); |
| | | @PostMapping("/editStockOut") |
| | | @PreAuthorize("@ss.hasPermi('dispatch_edit')") |
| | | @ApiOperation("编辑出库记录") |
| | | public AjaxResult editStockOut(@RequestBody StockOutRecordDto stockOutRecordDto) { |
| | | return AjaxResult.success(stockOutRecordService.editStockOut(stockOutRecordDto)); |
| | | |
| | | } |
| | | |
| | | @DeleteMapping("") |
| | | @PreAuthorize("@ss.hasPermi('dispatch_cancel')") |
| | | @Log(title = "出库管理-删除出库", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | } |
| | | return AjaxResult.success(stockOutRecordService.batchDelete(ids)); |
| | | } |
| | | |
| | | @PostMapping("/exportStockOutRecord") |
| | | @ApiOperation("导出出库记录") |
| | | public void exportStockOutRecord(HttpServletResponse response, StockOutRecordDto stockOutRecordDto) { |
| | | stockOutRecordService.exportStockOutRecord(response,stockOutRecordDto); |
| | | } |
| | | |
| | | } |