From 3bf81c083883d4861d53380423ee8a44c899b5f6 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 26 三月 2026 18:04:46 +0800
Subject: [PATCH] fix:1.仓储库存单位转换记录和库存关联更新 2.原材料和非原材料的数量区分 3.入库和出库记录删除单位转换库存更新 4.过磅单单位转换更新
---
src/main/java/com/ruoyi/stock/controller/StockInRecordController.java | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java b/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
index 4428405..c666f54 100644
--- a/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
+++ b/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
@@ -10,9 +10,11 @@
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;
@RestController
@@ -30,25 +32,27 @@
return AjaxResult.success(result);
}
- @PostMapping("")
- @Log(title = "鍏ュ簱绠$悊-鏂板鍏ュ簱", businessType = BusinessType.INSERT)
- public AjaxResult add(@RequestBody StockInRecordDto stockInRecordDto) {
- return AjaxResult.success(stockInRecordService.add(stockInRecordDto));
- }
-
- @PutMapping("/{id}")
- @Log(title = "鍏ュ簱绠$悊-鏇存柊鍏ュ簱", businessType = BusinessType.UPDATE)
- public AjaxResult update(@PathVariable("id") Long id, @RequestBody StockInRecordDto stockInRecordDto) {
- return AjaxResult.success(stockInRecordService.update(id, stockInRecordDto));
+ @PostMapping("/editStockInStock")
+ @PreAuthorize("@ss.hasPermi('receipt_edit')")
+ @ApiOperation("缂栬緫鍏ュ簱璁板綍")
+ public AjaxResult editStockInStock(@RequestBody StockInRecordDto stockInRecordDto) {
+ return AjaxResult.success(stockInRecordService.editStockInStock(stockInRecordDto));
}
@DeleteMapping("")
+ @PreAuthorize("@ss.hasPermi('receipt_cancel')")
@Log(title = "鍏ュ簱绠$悊-鍒犻櫎鍏ュ簱", businessType = BusinessType.DELETE)
public AjaxResult delete(@RequestBody List<Long> ids) {
- if(CollectionUtils.isEmpty(ids)){
+ if (CollectionUtils.isEmpty(ids)) {
return AjaxResult.error("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
}
return AjaxResult.success(stockInRecordService.batchDelete(ids));
}
+ @PostMapping("/exportStockInRecord")
+ @ApiOperation("瀵煎嚭鍏ュ簱璁板綍")
+ public void exportStockInRecord(HttpServletResponse response, StockInRecordDto stockInRecordDto) {
+ stockInRecordService.exportStockInRecord(response, stockInRecordDto);
+ }
+
}
--
Gitblit v1.9.3