From 557345e4cf8d5e5b051fe118ec1651d4134b9c71 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 26 一月 2026 15:55:36 +0800
Subject: [PATCH] feat: 成品库存的冻结与解冻功能

---
 src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java |   76 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 74 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java b/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
index ec20ef3..195b9c2 100644
--- a/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
+++ b/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.basic.pojo.ProductModel;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -33,6 +34,18 @@
 
     @Autowired
     private ProcurementRecordService procurementRecordService;
+
+
+    /**
+     * 閫氳繃閿�鍞骇鍝乮d鑾峰彇鍏ュ簱鏁伴噺
+     * @param salesProductId
+     * @return
+     */
+    @GetMapping("/getProcurementAmount")
+    @ApiOperation(value = "閫氳繃閿�鍞骇鍝乮d鑾峰彇鍏ュ簱鏁伴噺")
+    public AjaxResult getProcurementAmount(@RequestParam("salesProductId") Long salesProductId) {
+        return AjaxResult.success(procurementRecordService.getProcurementAmount(salesProductId));
+    }
 
 
     @GetMapping("/productlist")
@@ -107,12 +120,24 @@
         IPage<ProcurementPageDto> result = procurementRecordService.listPage(page, procurementDto);
         return AjaxResult.success(result);
     }
-
+    @GetMapping("/listReport")
+    @ApiOperation(value = "鏌ヨ搴撳瓨鍥捐〃鏁版嵁")
+    public AjaxResult listReport() {
+        return AjaxResult.success(procurementRecordService.getReportList());
+    }
     @GetMapping("/listPageByProduction")
     @Log(title = "鐢熶骇鍏ュ簱-鍏ュ簱绠$悊-鍏ュ簱鏌ヨ", businessType = BusinessType.OTHER)
     @ApiOperation(value = "鍏ュ簱鏌ヨ")
     public AjaxResult listPageByProduction(Page page, ProcurementPageDto procurementDto) {
         IPage<ProcurementPageDto> result = procurementRecordService.listPageByProduction(page, procurementDto);
+        return AjaxResult.success(result);
+    }
+
+    @GetMapping("/listPageByProductProduction")
+    @Log(title = "鐢熶骇鍏ュ簱-鍏ュ簱绠$悊-鐢熶骇鍏ュ簱鏌ヨ", businessType = BusinessType.OTHER)
+    @ApiOperation(value = "鍏ュ簱鏌ヨ")
+    public AjaxResult listPageByProductProduction(Page page, ProcurementPageDto procurementDto) {
+        IPage<ProcurementPageDto> result = procurementRecordService.listPageByProductProduction(page, procurementDto);
         return AjaxResult.success(result);
     }
 
@@ -130,6 +155,48 @@
         IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopy(page, procurementDto);
         return AjaxResult.success(result);
     }
+
+    @PostMapping("frozenStorageQuality")
+    @Log(title = "閲囪喘鍏ュ簱-搴撳瓨绠$悊-鍐荤粨涓嶅悎鏍间骇鍝�", businessType = BusinessType.UPDATE)
+    public AjaxResult frozenStorageQuality(@RequestBody List<Integer> frozenIds) {
+        boolean result = procurementRecordService.frozenStorageQuality(frozenIds);
+        if (result) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    @PostMapping("thawStorageQuality")
+    @Log(title = "閲囪喘鍏ュ簱-搴撳瓨绠$悊-瑙e喕涓嶅悎鏍间骇鍝�", businessType = BusinessType.UPDATE)
+    public AjaxResult thawStorageQuality(@RequestBody List<Integer> thawIds) {
+        boolean result = procurementRecordService.thawStorageQuality(thawIds);
+        if (result) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    @PostMapping("frozenFinishedQuality")
+    @Log(title = "閲囪喘鍏ュ簱-搴撳瓨绠$悊-鍐荤粨涓嶅悎鏍间骇鍝�", businessType = BusinessType.UPDATE)
+    public AjaxResult frozenFinishedQuality(@RequestBody List<Integer> frozenIds) {
+        boolean result = procurementRecordService.frozenFinishedQuality(frozenIds);
+        if (result) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    @PostMapping("thawFinishedQuality")
+    @Log(title = "閲囪喘鍏ュ簱-搴撳瓨绠$悊-瑙e喕涓嶅悎鏍间骇鍝�", businessType = BusinessType.UPDATE)
+    public AjaxResult thawFinishedQuality(@RequestBody List<Integer> thawIds) {
+        boolean result = procurementRecordService.thawFinishedQuality(thawIds);
+        if (result) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+
 
     @GetMapping("/listPageCopyByProduction")
     @Log(title = "鐢熶骇鍏ュ簱-搴撳瓨绠$悊-鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER)
@@ -210,5 +277,10 @@
         util.exportExcel(response, customStorages, "鍏ュ簱鍙拌处");
     }
 
-
+    @GetMapping("/listPageProductionStock")
+    @Log(title = "搴撳瓨绠$悊-鎴愬搧搴撳瓨", businessType = BusinessType.OTHER)
+    public AjaxResult listPageProductionStock(Page page, ProcurementPageDto procurementDto) {
+        IPage<ProductModel> result = procurementRecordService.listPageProductionStock(page,procurementDto);
+        return AjaxResult.success(result);
+    }
 }

--
Gitblit v1.9.3