From 65d2410369591a9128acd4832b362e673772f409 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期一, 10 十一月 2025 15:17:31 +0800
Subject: [PATCH] yys  优化仓储物流整体逻辑

---
 src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java |   54 +++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 47 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java b/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
index 4a7b85a..8ab1c1a 100644
--- a/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
+++ b/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
@@ -6,12 +6,11 @@
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.procurementrecord.dto.*;
+import com.ruoyi.procurementrecord.pojo.CustomStorage;
 import com.ruoyi.procurementrecord.service.ProcurementRecordService;
-import com.ruoyi.purchase.dto.InvoicePurchaseReportDto;
-import com.ruoyi.quality.pojo.QualityInspect;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
@@ -35,7 +34,7 @@
     @GetMapping("/productlist")
     @Log(title = "閲囪喘鍏ュ簱-鍏ュ簱绠$悊-鏂板鍏ュ簱鏌ヨ", businessType = BusinessType.OTHER)
     public AjaxResult list(ProcurementDto procurementDto) {
-        List<ProcurementDto> result =procurementRecordService.listProcurementBySalesLedgerId(procurementDto);
+        List<ProcurementDto> result = procurementRecordService.listProcurementBySalesLedgerId(procurementDto);
         return AjaxResult.success(result);
     }
 
@@ -43,7 +42,16 @@
     @Log(title = "閲囪喘鍏ュ簱-鍏ュ簱绠$悊-鏂板鍏ュ簱", businessType = BusinessType.INSERT)
     @Transactional
     public AjaxResult add(@RequestBody ProcurementAddDto procurementDto) {
+        procurementDto.setType(1);
+        procurementDto.setTypeName("閲囪喘鍏ュ簱");
         return AjaxResult.success(procurementRecordService.add(procurementDto));
+    }
+
+    @PostMapping("/addCustom")
+    @Log(title = "鑷畾涔夊叆搴�-鍏ュ簱绠$悊-鏂板鍏ュ簱", businessType = BusinessType.INSERT)
+    @Transactional
+    public AjaxResult addCustom(@RequestBody List<CustomStorage> customStorage) {
+        return procurementRecordService.addCustom(customStorage);
     }
 
     @PostMapping("/update")
@@ -69,17 +77,49 @@
 
     @GetMapping("/listPage")
     @Log(title = "閲囪喘鍏ュ簱-鍏ュ簱绠$悊-鍏ュ簱鏌ヨ", businessType = BusinessType.OTHER)
+    @ApiOperation(value = "鍏ュ簱鏌ヨ")
     public AjaxResult listPage(Page page, ProcurementPageDto procurementDto) {
-        IPage<ProcurementPageDto> result =procurementRecordService.listPage(page, procurementDto);
+        IPage<ProcurementPageDto> result = procurementRecordService.listPage(page, procurementDto);
+        return AjaxResult.success(result);
+    }
+
+    @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("/listPageByCustom")
+    @Log(title = "鑷畾涔夊叆搴�-鍏ュ簱绠$悊-鍏ュ簱鏌ヨ", businessType = BusinessType.OTHER)
+    @ApiOperation(value = "鍏ュ簱鏌ヨ")
+    public AjaxResult listPageByCustom(Page page, CustomStorage customStorage) {
+        IPage<CustomStorage> result = procurementRecordService.listPageByCustom(page, customStorage);
         return AjaxResult.success(result);
     }
 
     @GetMapping("/listPageCopy")
-    @Log(title = "閲囪喘鍏ュ簱-鍏ュ簱绠$悊-鍏ュ簱鏌ヨ", businessType = BusinessType.OTHER)
+    @Log(title = "閲囪喘鍏ュ簱-搴撳瓨绠$悊-鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER)
     public AjaxResult listPageCopy(Page page, ProcurementPageDto procurementDto) {
-        IPage<ProcurementPageDtoCopy> result =procurementRecordService.listPageCopy(page, procurementDto);
+        IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopy(page, procurementDto);
         return AjaxResult.success(result);
     }
+
+    @GetMapping("/listPageCopyByProduction")
+    @Log(title = "鐢熶骇鍏ュ簱-搴撳瓨绠$悊-鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER)
+    public AjaxResult listPageCopyByProduction(Page page, ProcurementPageDto procurementDto) {
+        IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopyByProduction(page, procurementDto);
+        return AjaxResult.success(result);
+    }
+
+    @GetMapping("/listPageCopyByCustom")
+    @Log(title = "鑷畾涔夊叆搴�-搴撳瓨绠$悊-鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER)
+    public AjaxResult listPageCopyByCustom(Page page, CustomStorage customStorage) {
+        IPage<CustomStorage> result = procurementRecordService.listPageCopyByCustom(page, customStorage);
+        return AjaxResult.success(result);
+    }
+
     @GetMapping("/getReportList")
     @Log(title = "搴撳瓨鎶ヨ〃鏌ヨ", businessType = BusinessType.OTHER)
     public AjaxResult getReportList(Page page, ProcurementPageDto procurementDto) {

--
Gitblit v1.9.3