From a2d1636333fc785f84de829a096f0aa210560102 Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期三, 21 一月 2026 17:54:01 +0800
Subject: [PATCH] 出库记录

---
 src/main/java/com/ruoyi/stock/controller/StockInRecordController.java |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java b/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
new file mode 100644
index 0000000..0c6fa02
--- /dev/null
+++ b/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
@@ -0,0 +1,54 @@
+package com.ruoyi.stock.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.stock.dto.StockInRecordDto;
+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.util.CollectionUtils;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@Api(tags = "閲囪喘鍏ュ簱")
+@RequestMapping("/stockInRecord")
+public class StockInRecordController {
+    @Autowired
+    private StockInRecordService stockInRecordService;
+
+    @GetMapping("/listPageByProduction")
+    @Log(title = "鐢熶骇鍏ュ簱-鍏ュ簱绠$悊-鍒楄〃", businessType = BusinessType.OTHER)
+    @ApiOperation(value = "鍏ュ簱绠$悊鍒楄〃")
+    public AjaxResult listPage(Page page, StockInRecordDto stockInRecordDto) {
+        IPage<StockInRecordDto> result = stockInRecordService.listPage(page, stockInRecordDto);
+        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));
+    }
+
+    @DeleteMapping("")
+    @Log(title = "鍏ュ簱绠$悊-鍒犻櫎鍏ュ簱", businessType = BusinessType.DELETE)
+    public AjaxResult delete(@RequestBody List<Long> ids) {
+        if(CollectionUtils.isEmpty(ids)){
+            return AjaxResult.error("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
+        }
+        return AjaxResult.success(stockInRecordService.batchDelete(ids));
+    }
+
+}

--
Gitblit v1.9.3