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 |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java b/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
index 94e4669..c666f54 100644
--- a/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
+++ b/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
@@ -6,11 +6,11 @@
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.stock.dto.StockInRecordDto;
-import com.ruoyi.stock.dto.StockInventoryDto;
 import com.ruoyi.stock.service.StockInRecordService;
 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.*;
 
@@ -32,12 +32,18 @@
         return AjaxResult.success(result);
     }
 
-
+    @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));
@@ -46,7 +52,7 @@
     @PostMapping("/exportStockInRecord")
     @ApiOperation("瀵煎嚭鍏ュ簱璁板綍")
     public void exportStockInRecord(HttpServletResponse response, StockInRecordDto stockInRecordDto) {
-        stockInRecordService.exportStockInRecord(response,stockInRecordDto);
+        stockInRecordService.exportStockInRecord(response, stockInRecordDto);
     }
 
 }

--
Gitblit v1.9.3