| | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.dto.SalesLedgerDto; |
| | | import com.ruoyi.stock.dto.StockOutRecordDto; |
| | | import com.ruoyi.stock.service.StockOutRecordService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("/reAudit") |
| | | @Log(title = "出库管理-反审出库", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "批量反审出库记录") |
| | | public AjaxResult reAudit(@RequestBody StockOutRecordDto approveDto) { |
| | | if(CollectionUtils.isEmpty(approveDto.getIds())){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | } |
| | | stockOutRecordService.batchReAudit(approveDto.getIds()); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @GetMapping("/oilOutAvailableQty") |
| | | @Operation(summary = "油品出库可用量(上次剩余油量+当前库存)") |
| | | public AjaxResult oilOutAvailableQty(StockOutRecordDto stockOutRecordDto) { |
| | | return AjaxResult.success(stockOutRecordService.getOilOutAvailableQty(stockOutRecordDto)); |
| | | } |
| | | |
| | | @PutMapping("/{id}/residualOil") |
| | | @Log(title = "出库管理-录入剩余油量", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "录入本次送完货后的剩余油量(只更新该字段)") |
| | | public AjaxResult updateResidualOil(@PathVariable("id") Long id, @RequestBody StockOutRecordDto stockOutRecordDto) { |
| | | return AjaxResult.success(stockOutRecordService.updateResidualOil(id, stockOutRecordDto.getResidualOil())); |
| | | } |
| | | |
| | | @GetMapping("/bindableSalesLedger") |
| | | @Operation(summary = "油品出库-可绑定的销售台账下拉") |
| | | public AjaxResult bindableSalesLedger(Page page, SalesLedgerDto salesLedgerDto) { |
| | | return AjaxResult.success(stockOutRecordService.listBindableSalesLedger(page, salesLedgerDto)); |
| | | } |
| | | |
| | | } |